@australiangreens/ag-internal-components 0.0.96 → 0.0.98

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
@@ -1,26 +1,26 @@
1
- var Pt = Object.defineProperty, Nt = Object.defineProperties;
2
- var Lt = Object.getOwnPropertyDescriptors;
3
- var ee = Object.getOwnPropertySymbols;
1
+ var Lt = Object.defineProperty, _t = Object.defineProperties;
2
+ var Mt = Object.getOwnPropertyDescriptors;
3
+ var te = Object.getOwnPropertySymbols;
4
4
  var Te = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
5
- var he = (e, t, n) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
5
+ var he = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
7
  Te.call(t, n) && he(e, n, t[n]);
8
- if (ee)
9
- for (var n of ee(t))
8
+ if (te)
9
+ for (var n of te(t))
10
10
  Be.call(t, n) && he(e, n, t[n]);
11
11
  return e;
12
- }, k = (e, t) => Nt(e, Lt(t));
12
+ }, k = (e, t) => _t(e, Mt(t));
13
13
  var Ee = (e, t) => {
14
14
  var n = {};
15
15
  for (var i in e)
16
16
  Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
- if (e != null && ee)
18
- for (var i of ee(e))
17
+ if (e != null && te)
18
+ for (var i of te(e))
19
19
  t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
20
20
  return n;
21
21
  };
22
22
  var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var N = (e, t, n) => new Promise((i, r) => {
23
+ var L = (e, t, n) => new Promise((i, r) => {
24
24
  var s = (l) => {
25
25
  try {
26
26
  d(n.next(l));
@@ -36,31 +36,32 @@ var N = (e, t, n) => new Promise((i, r) => {
36
36
  }, d = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, c);
37
37
  d((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as h, Fragment as L, jsx as o } from "react/jsx-runtime";
40
- import { useState as B, createContext as Ye, useCallback as oe, useContext as Ke, useEffect as ie, createElement as xe, useRef as ge } from "react";
41
- import { Typography as E, Button as re, Paper as Je, Box as $, Drawer as we, styled as Ae, IconButton as Y, Container as Ze, useTheme as se, useMediaQuery as _t, Collapse as Mt, Avatar as Pe, Fade as Rt, Skeleton as Ne, Toolbar as Ht, Divider as Le, CssBaseline as Wt, Dialog as je, LinearProgress as et, DialogTitle as tt, DialogContent as nt, DialogActions as ot, Autocomplete as be, TextField as Se, CircularProgress as ke, Chip as zt, Tooltip as Ut, Stack as Gt, Snackbar as Vt, Alert as qt, FormHelperText as Xt } from "@mui/material";
42
- import Qt from "@mui/material/CssBaseline";
43
- import { styled as R, createTheme as it, alpha as fe } from "@mui/material/styles";
44
- import { AgError as Yt } from "@australiangreens/ag-error";
45
- import { createHelper as X } from "souvlaki";
46
- import { BrowserRouter as Kt } from "react-router-dom";
47
- import rt from "@mui/material/List";
48
- import { ArrowForward as at, ArrowBack as st, ViewHeadline as Jt, Cancel as Zt, ArrowDropDown as jt } from "@mui/icons-material";
49
- import { atom as _, useSetAtom as lt, useAtomValue as _e, useAtom as V, getDefaultStore as en, Provider as ct } from "jotai";
50
- import { useHydrateAtoms as dt } from "jotai/utils";
51
- import tn from "autosuggest-highlight/match";
52
- import nn from "autosuggest-highlight/parse";
53
- import { useQuery as on, QueryClient as rn, QueryClientProvider as an } from "@tanstack/react-query";
54
- import { useAuth0 as ut } from "@auth0/auth0-react";
55
- import { Buffer as sn } from "buffer";
56
- import ln from "@mui/material/Skeleton";
57
- function $o({ text: e }) {
39
+ import { jsxs as p, Fragment as E, jsx as o } from "react/jsx-runtime";
40
+ import { useState as B, createContext as Je, useCallback as ie, useContext as Ze, useEffect as re, createElement as xe, useRef as ge } from "react";
41
+ import { Typography as F, Button as ae, Paper as je, Box as y, Drawer as we, styled as Ae, IconButton as K, Container as et, useTheme as se, useMediaQuery as Rt, Collapse as Ht, Avatar as Pe, Fade as Wt, Skeleton as Ne, Toolbar as zt, Divider as Le, CssBaseline as Ut, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as be, TextField as Se, CircularProgress as ke, Chip as Gt, Tooltip as Vt, Stack as qt, Snackbar as Xt, Alert as Qt, FormHelperText as Yt } from "@mui/material";
42
+ import Kt from "@mui/material/CssBaseline";
43
+ import { styled as R, createTheme as at, alpha as fe } from "@mui/material/styles";
44
+ import { AgError as Jt } from "@australiangreens/ag-error";
45
+ import { createHelper as Q } from "souvlaki";
46
+ import { BrowserRouter as Zt } from "react-router-dom";
47
+ import st from "@mui/material/List";
48
+ import { ArrowForward as lt, ArrowBack as ct, ViewHeadline as jt, Cancel as en, ArrowDropDown as tn } from "@mui/icons-material";
49
+ import { atom as _, useSetAtom as dt, useAtomValue as _e, useAtom as V, getDefaultStore as nn, Provider as ut } from "jotai";
50
+ import { useHydrateAtoms as pt } from "jotai/utils";
51
+ import Me from "react-avatar";
52
+ import on from "autosuggest-highlight/match";
53
+ import rn from "autosuggest-highlight/parse";
54
+ import { useQuery as an, QueryClient as sn, QueryClientProvider as ln } from "@tanstack/react-query";
55
+ import { useAuth0 as ht } from "@auth0/auth0-react";
56
+ import { Buffer as cn } from "buffer";
57
+ import dn from "@mui/material/Skeleton";
58
+ function Oo({ text: e }) {
58
59
  const [t, n] = B(0);
59
- return /* @__PURE__ */ h(L, { children: [
60
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
61
- /* @__PURE__ */ o(E, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
60
+ return /* @__PURE__ */ p(E, { children: [
61
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
62
+ /* @__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" }) }),
62
63
  /* @__PURE__ */ o(
63
- re,
64
+ ae,
64
65
  {
65
66
  variant: "outlined",
66
67
  onClick: () => n((i) => i + 1),
@@ -68,17 +69,17 @@ function $o({ text: e }) {
68
69
  children: "Hello I am a button"
69
70
  }
70
71
  ),
71
- /* @__PURE__ */ h("p", { children: [
72
+ /* @__PURE__ */ p("p", { children: [
72
73
  "This is some text: ",
73
74
  /* @__PURE__ */ o("span", { children: e })
74
75
  ] }),
75
- /* @__PURE__ */ h(Je, { children: [
76
+ /* @__PURE__ */ p(je, { children: [
76
77
  "This number will incremember when button pressed: ",
77
78
  t
78
79
  ] })
79
80
  ] });
80
81
  }
81
- const pt = 330, ht = 73, U = "Navbar", q = {
82
+ const gt = 330, ft = 73, U = "Navbar", q = {
82
83
  root: `${U}-root`,
83
84
  menuButton: `${U}-menuButton`,
84
85
  hide: `${U}-hide`,
@@ -86,7 +87,7 @@ const pt = 330, ht = 73, U = "Navbar", q = {
86
87
  userInfoHolder: `${U}-userInfoHolder`,
87
88
  settings: `${U}-settings`,
88
89
  pieChartIcon: `${U}-pieChartIcon`
89
- }, cn = R($, {
90
+ }, un = R(y, {
90
91
  name: "NavBar"
91
92
  })(({ theme: e }) => ({
92
93
  [`&.${q.root}`]: {
@@ -107,7 +108,7 @@ const pt = 330, ht = 73, U = "Navbar", q = {
107
108
  marginTop: "64px",
108
109
  marginBottom: "16px"
109
110
  }
110
- })), gt = () => ({
111
+ })), mt = () => ({
111
112
  position: "absolute",
112
113
  height: "100%",
113
114
  overflowX: "hidden",
@@ -115,51 +116,51 @@ const pt = 330, ht = 73, U = "Navbar", q = {
115
116
  color: "white",
116
117
  backgroundColor: "black"
117
118
  // backgroundColor: '#e8e8e8',
118
- }), dn = () => a({
119
- width: pt
120
- }, gt()), un = () => a({
121
- width: ht
122
- }, gt()), pn = R(we, {
119
+ }), pn = () => a({
120
+ width: gt
121
+ }, mt()), hn = () => a({
122
+ width: ft
123
+ }, mt()), gn = R(we, {
123
124
  shouldForwardProp: (e) => e !== "open"
124
125
  })(({ theme: e, open: t }) => a(a({
125
- width: t ? pt : ht,
126
+ width: t ? gt : ft,
126
127
  flexShrink: 0,
127
128
  whiteSpace: "nowrap",
128
129
  boxSizing: "border-box",
129
130
  zIndex: e.zIndex.drawer + 100
130
131
  }, t && {
131
- "& .MuiDrawer-paper": dn()
132
+ "& .MuiDrawer-paper": pn()
132
133
  }), !t && {
133
- "& .MuiDrawer-paper": un()
134
+ "& .MuiDrawer-paper": hn()
134
135
  }));
135
- class De extends Yt {
136
+ class De extends Jt {
136
137
  }
137
138
  Fe(De, "errorName", "ContextError");
138
- const ft = Ye(null), hn = {}, gn = {}, fn = ({
139
- overrideState: e = hn,
140
- overrideActions: t = gn,
139
+ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
140
+ overrideState: e = fn,
141
+ overrideActions: t = mn,
141
142
  children: n
142
143
  }) => {
143
- const [{ open: i }, r] = B({ open: !0 }), s = oe((l) => {
144
+ const [{ open: i }, r] = B({ open: !0 }), s = ie((l) => {
144
145
  r({ open: l });
145
- }, []), c = oe(() => {
146
+ }, []), c = ie(() => {
146
147
  r((l) => k(a({}, l), { open: !l.open }));
147
148
  }, []), d = a(a({
148
149
  open: i,
149
150
  setOpen: s,
150
151
  toggleOpen: c
151
152
  }, e), t);
152
- return /* @__PURE__ */ o(ft.Provider, { value: d, children: n });
153
- }, mn = () => {
154
- const e = Ke(ft);
153
+ return /* @__PURE__ */ o(Ct.Provider, { value: d, children: n });
154
+ }, xn = () => {
155
+ const e = Ze(Ct);
155
156
  if (e === null)
156
157
  throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
158
  return e;
158
- }, Cn = (e = {}) => a({
159
+ }, vn = (e = {}) => a({
159
160
  open: !0
160
- }, e), Io = X(
161
- (e = Cn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(fn, { overrideState: e, overrideActions: t, children: n })
162
- ), Oo = X(() => ({ children: e }) => /* @__PURE__ */ o(Kt, { children: e })), Me = 7, To = R(rt)(({ theme: e }) => ({
161
+ }, e), To = Q(
162
+ (e = vn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Cn, { overrideState: e, overrideActions: t, children: n })
163
+ ), Bo = Q(() => ({ children: e }) => /* @__PURE__ */ o(Zt, { children: e })), Re = 7, Eo = R(st)(({ theme: e }) => ({
163
164
  backgroundColor: "black",
164
165
  color: "white",
165
166
  "& .MuiListItem-root": {
@@ -168,7 +169,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
168
169
  "& .MuiListItemButton-root": {
169
170
  " .MuiListItemIcon-root": {
170
171
  color: "white",
171
- padding: `${Me}px`
172
+ padding: `${Re}px`
172
173
  },
173
174
  // Focus state
174
175
  "&.Mui-focusVisible": {
@@ -179,7 +180,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
179
180
  borderLeftStyle: "solid",
180
181
  borderLeftWidth: "7px",
181
182
  borderLeftColor: e.palette.primary.main,
182
- paddingLeft: `calc(${e.spacing(2)} - ${Me}px)`
183
+ paddingLeft: `calc(${e.spacing(2)} - ${Re}px)`
183
184
  },
184
185
  // Hover state
185
186
  "&:hover": {
@@ -197,7 +198,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
197
198
  // '&.Mui-selected.Mui-focusVisible:hover': {
198
199
  // },
199
200
  }
200
- })), Re = 7, Bo = R(rt)(({ theme: e }) => ({
201
+ })), He = 7, Fo = R(st)(({ theme: e }) => ({
201
202
  backgroundColor: "#e8e8e8",
202
203
  color: "inherit",
203
204
  "& .MuiListItem-root": {
@@ -206,7 +207,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
206
207
  "& .MuiListItemButton-root": {
207
208
  " .MuiListItemIcon-root": {
208
209
  color: "inherit",
209
- padding: `${Re}px`
210
+ padding: `${He}px`
210
211
  },
211
212
  // Focus state
212
213
  "&.Mui-focusVisible": {
@@ -217,7 +218,7 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
217
218
  borderLeftStyle: "solid",
218
219
  borderLeftWidth: "7px",
219
220
  borderLeftColor: e.palette.primary.main,
220
- paddingLeft: `calc(${e.spacing(2)} - ${Re}px)`
221
+ paddingLeft: `calc(${e.spacing(2)} - ${He}px)`
221
222
  },
222
223
  // Hover state
223
224
  "&:hover": {
@@ -236,15 +237,15 @@ const ft = Ye(null), hn = {}, gn = {}, fn = ({
236
237
  // },
237
238
  }
238
239
  }));
239
- function Eo({
240
+ function Po({
240
241
  "data-testid": e,
241
242
  children: t
242
243
  }) {
243
- const { open: n } = mn();
244
- return /* @__PURE__ */ h(cn, { className: q.root, "data-testid": e, children: [
245
- /* @__PURE__ */ o(Qt, {}),
244
+ const { open: n } = xn();
245
+ return /* @__PURE__ */ p(un, { className: q.root, "data-testid": e, children: [
246
+ /* @__PURE__ */ o(Kt, {}),
246
247
  /* @__PURE__ */ o(
247
- pn,
248
+ gn,
248
249
  {
249
250
  variant: "permanent",
250
251
  anchor: "left",
@@ -255,14 +256,14 @@ function Eo({
255
256
  )
256
257
  ] });
257
258
  }
258
- const xn = 24, vn = 64, G = "TopBar", T = {
259
+ const wn = 24, An = 64, G = "TopBar", T = {
259
260
  topStripe: `${G}-topStripe`,
260
261
  titleBar: `${G}-titleBar`,
261
262
  titleSlider: `${G}-titleSlider`,
262
263
  titleText: `${G}-titleText`,
263
264
  leftPanelButton: `${G}-leftPanelButton`,
264
265
  rightPanelButton: `${G}-leftPanelButton`
265
- }, wn = Ae("div", {
266
+ }, bn = Ae("div", {
266
267
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
267
268
  name: G
268
269
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -271,12 +272,12 @@ const xn = 24, vn = 64, G = "TopBar", T = {
271
272
  width: "100%",
272
273
  [`& .${T.topStripe}`]: {
273
274
  width: "100%",
274
- height: `${xn}px`,
275
+ height: `${wn}px`,
275
276
  backgroundColor: e.palette.primary.main
276
277
  },
277
278
  [`& .${T.titleBar}`]: {
278
279
  backgroundColor: e.palette.primary.light,
279
- height: `${vn}px`,
280
+ height: `${An}px`,
280
281
  padding: e.spacing(0, 3),
281
282
  width: "100%"
282
283
  },
@@ -314,17 +315,17 @@ const xn = 24, vn = 64, G = "TopBar", T = {
314
315
  })
315
316
  };
316
317
  });
317
- function An({
318
+ function Sn({
318
319
  titleText: e = "",
319
320
  leftPanel: t,
320
321
  rightPanel: n,
321
322
  "data-testid": i
322
323
  }) {
323
- return /* @__PURE__ */ h(wn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
324
+ return /* @__PURE__ */ p(bn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
324
325
  /* @__PURE__ */ o("div", { className: T.topStripe }),
325
- /* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ h($, { className: T.titleSlider, children: [
326
- t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ h(
327
- Y,
326
+ /* @__PURE__ */ o("div", { className: T.titleBar, children: /* @__PURE__ */ p(y, { className: T.titleSlider, children: [
327
+ t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ p(
328
+ K,
328
329
  {
329
330
  className: T.leftPanelButton,
330
331
  color: "inherit",
@@ -334,13 +335,13 @@ function An({
334
335
  size: "large",
335
336
  children: [
336
337
  " ",
337
- /* @__PURE__ */ o(at, {})
338
+ /* @__PURE__ */ o(lt, {})
338
339
  ]
339
340
  }
340
341
  ),
341
- /* @__PURE__ */ o(E, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
342
- n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ h(
343
- Y,
342
+ /* @__PURE__ */ o(F, { className: T.titleText, variant: "h6", noWrap: !0, children: e }),
343
+ n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ p(
344
+ K,
344
345
  {
345
346
  className: T.rightPanelButton,
346
347
  color: "inherit",
@@ -350,14 +351,14 @@ function An({
350
351
  size: "large",
351
352
  children: [
352
353
  " ",
353
- /* @__PURE__ */ o(st, {})
354
+ /* @__PURE__ */ o(ct, {})
354
355
  ]
355
356
  }
356
357
  )
357
358
  ] }) })
358
359
  ] });
359
360
  }
360
- const mt = 400, bn = Ae(we, {
361
+ const xt = 400, kn = Ae(we, {
361
362
  shouldForwardProp: (e) => (
362
363
  // Note we do want anchor to be forwarded to the Drawer component
363
364
  ![
@@ -387,7 +388,7 @@ const mt = 400, bn = Ae(we, {
387
388
  marginLeft: `${r}px`
388
389
  }))
389
390
  })
390
- ), Sn = Ae($, {
391
+ ), Dn = Ae(y, {
391
392
  shouldForwardProp: (e) => !["anchor"].includes(e)
392
393
  })(({ theme: e, anchor: t }) => k(a({
393
394
  display: "flex",
@@ -407,60 +408,60 @@ const mt = 400, bn = Ae(we, {
407
408
  marginRight: t === "right" ? e.spacing(2) : 0
408
409
  }
409
410
  }));
410
- function He({
411
+ function We({
411
412
  children: e,
412
413
  anchor: t = "left",
413
414
  open: n,
414
415
  onClose: i = () => {
415
416
  },
416
417
  titleText: r = "",
417
- width: s = mt,
418
+ width: s = xt,
418
419
  showCloseArrow: c = !0,
419
420
  debugOpacity: d = !1,
420
421
  headerBoxProps: l = {},
421
422
  onOpened: u,
422
- onClosed: w,
423
- "data-testid": x,
423
+ onClosed: v,
424
+ "data-testid": C,
424
425
  navBarOpen: A = !1,
425
426
  navBarWidthOpen: g = 0,
426
- navBarWidthClosed: y = 0
427
+ navBarWidthClosed: $ = 0
427
428
  }) {
428
- return /* @__PURE__ */ h(
429
- bn,
429
+ return /* @__PURE__ */ p(
430
+ kn,
430
431
  {
431
432
  SlideProps: {
432
433
  onEntered: () => u == null ? void 0 : u(),
433
- onExited: () => w == null ? void 0 : w()
434
+ onExited: () => v == null ? void 0 : v()
434
435
  },
435
436
  variant: "persistent",
436
437
  anchor: t,
437
438
  open: n,
438
439
  width: s,
439
440
  debugOpacity: d,
440
- "data-testid": x,
441
+ "data-testid": C,
441
442
  navBarOpen: A,
442
443
  navBarWidthOpen: g,
443
- navBarWidthClosed: y,
444
+ navBarWidthClosed: $,
444
445
  children: [
445
- /* @__PURE__ */ o(Sn, k(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ h(L, { children: [
446
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: r }),
447
- c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
448
- /* @__PURE__ */ o(st, { "data-testid": "arrowbackicon" }),
446
+ /* @__PURE__ */ o(Dn, k(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ p(E, { children: [
447
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r }),
448
+ c && /* @__PURE__ */ p(K, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
449
+ /* @__PURE__ */ o(ct, { "data-testid": "arrowbackicon" }),
449
450
  " "
450
451
  ] })
451
- ] }) : /* @__PURE__ */ h(L, { children: [
452
- c && /* @__PURE__ */ h(Y, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
453
- /* @__PURE__ */ o(at, {}),
452
+ ] }) : /* @__PURE__ */ p(E, { children: [
453
+ c && /* @__PURE__ */ p(K, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
454
+ /* @__PURE__ */ o(lt, {}),
454
455
  " "
455
456
  ] }),
456
- /* @__PURE__ */ o(E, { variant: "h6", color: "inherit", component: "div", children: r })
457
+ /* @__PURE__ */ o(F, { variant: "h6", color: "inherit", component: "div", children: r })
457
458
  ] }) })),
458
459
  e
459
460
  ]
460
461
  }
461
462
  );
462
463
  }
463
- const kn = R($, {
464
+ const yn = R(y, {
464
465
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
465
466
  name: "PanelAwareMargins"
466
467
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -483,27 +484,27 @@ const kn = R($, {
483
484
  }),
484
485
  marginRight: `${(r = n == null ? void 0 : n.width) != null ? r : 0}px`
485
486
  });
486
- }), Dn = R(Ze, {
487
+ }), $n = R(et, {
487
488
  name: "PageContainer"
488
489
  })(({ theme: e }) => ({
489
490
  // Horizontal padding comes from the Container's gutter
490
491
  paddingTop: e.spacing(3),
491
492
  paddingBottom: e.spacing(3)
492
493
  // TODO: Remove max width
493
- })), me = !1, Ce = !1, te = {
494
+ })), me = !1, Ce = !1, ne = {
494
495
  titleText: "",
495
496
  flavour: "push",
496
- width: mt,
497
+ width: xt,
497
498
  arrowButtons: "both",
498
499
  startOpen: !1,
499
500
  open: void 0,
500
501
  onChangeOpen: void 0,
501
- content: /* @__PURE__ */ o(L, {}),
502
+ content: /* @__PURE__ */ o(E, {}),
502
503
  onOpened: void 0,
503
504
  onClosed: void 0,
504
505
  dataTestId: void 0
505
506
  };
506
- function Fo({
507
+ function No({
507
508
  children: e,
508
509
  titleText: t = "",
509
510
  leftPanel: n,
@@ -514,106 +515,106 @@ function Fo({
514
515
  pageContentDataTestId: d,
515
516
  topBarDataTestId: l,
516
517
  navBarOpen: u,
517
- navBarWidthOpen: w,
518
- navBarWidthClosed: x
518
+ navBarWidthOpen: v,
519
+ navBarWidthClosed: C
519
520
  }) {
520
- const [A, g] = B(me), [y, b] = B(Ce), [D, I] = B(me), [O, F] = B(Ce), P = n !== void 0, S = i !== void 0, {
521
- titleText: v,
521
+ const [A, g] = B(me), [$, b] = B(Ce), [D, I] = B(me), [O, P] = B(Ce), N = n !== void 0, S = i !== void 0, {
522
+ titleText: w,
522
523
  content: H,
523
524
  flavour: W,
524
- open: p,
525
+ open: h,
525
526
  onChangeOpen: f,
526
527
  width: m,
527
- arrowButtons: C,
528
+ arrowButtons: x,
528
529
  startOpen: M,
529
- onOpened: J,
530
+ onOpened: Z,
530
531
  onClosed: le,
531
- dataTestId: It
532
- } = n ? a(a({}, te), n) : a({}, te), {
533
- titleText: Ot,
534
- content: Tt,
532
+ dataTestId: Tt
533
+ } = n ? a(a({}, ne), n) : a({}, ne), {
534
+ titleText: Bt,
535
+ content: Et,
535
536
  flavour: ye,
536
537
  open: ce,
537
538
  onChangeOpen: $e,
538
539
  width: de,
539
- arrowButtons: Z,
540
- startOpen: j,
541
- onOpened: Bt,
542
- onClosed: Et,
543
- dataTestId: Ft
544
- } = i ? a(a({}, te), i) : a({}, te);
545
- ie(() => {
540
+ arrowButtons: j,
541
+ startOpen: ee,
542
+ onOpened: Ft,
543
+ onClosed: Pt,
544
+ dataTestId: Nt
545
+ } = i ? a(a({}, ne), i) : a({}, ne);
546
+ re(() => {
546
547
  M !== me && (g(M), I(M));
547
- }, [M]), ie(() => {
548
- j !== Ce && (b(j), F(j));
549
- }, [j]);
550
- const ue = p === void 0 ? A : p, pe = ce === void 0 ? y : ce, Ie = (z) => {
551
- p === void 0 && (g(z), r && S && (z ? (b(!1), F(y)) : b(O))), f && f(z);
548
+ }, [M]), re(() => {
549
+ ee !== Ce && (b(ee), P(ee));
550
+ }, [ee]);
551
+ const ue = h === void 0 ? A : h, pe = ce === void 0 ? $ : ce, Ie = (z) => {
552
+ h === void 0 && (g(z), r && S && (z ? (b(!1), P($)) : b(O))), f && f(z);
552
553
  }, Oe = (z) => {
553
- ce === void 0 && (b(z), r && P && (z ? (g(!1), I(A)) : g(D))), $e && $e(z);
554
+ ce === void 0 && (b(z), r && N && (z ? (g(!1), I(A)) : g(D))), $e && $e(z);
554
555
  };
555
- return /* @__PURE__ */ h($, { children: [
556
- P && /* @__PURE__ */ o(
557
- He,
556
+ return /* @__PURE__ */ p(y, { children: [
557
+ N && /* @__PURE__ */ o(
558
+ We,
558
559
  {
559
- "data-testid": It,
560
+ "data-testid": Tt,
560
561
  anchor: "left",
561
562
  open: ue,
562
563
  onClose: () => Ie(!1),
563
564
  width: m,
564
- titleText: v,
565
+ titleText: w,
565
566
  debugOpacity: s,
566
- showCloseArrow: C === "both" || C === "close",
567
- onOpened: J,
567
+ showCloseArrow: x === "both" || x === "close",
568
+ onOpened: Z,
568
569
  onClosed: le,
569
570
  navBarOpen: u,
570
- navBarWidthOpen: w,
571
- navBarWidthClosed: x,
571
+ navBarWidthOpen: v,
572
+ navBarWidthClosed: C,
572
573
  children: H
573
574
  }
574
575
  ),
575
576
  S && /* @__PURE__ */ o(
576
- He,
577
+ We,
577
578
  {
578
- "data-testid": Ft,
579
+ "data-testid": Nt,
579
580
  anchor: "right",
580
581
  open: pe,
581
582
  onClose: () => Oe(!1),
582
583
  width: de,
583
- titleText: Ot,
584
+ titleText: Bt,
584
585
  debugOpacity: s,
585
- showCloseArrow: Z === "both" || Z === "close",
586
- onOpened: Bt,
587
- onClosed: Et,
586
+ showCloseArrow: j === "both" || j === "close",
587
+ onOpened: Ft,
588
+ onClosed: Pt,
588
589
  navBarOpen: u,
589
- navBarWidthOpen: w,
590
- navBarWidthClosed: x,
591
- children: Tt
590
+ navBarWidthOpen: v,
591
+ navBarWidthClosed: C,
592
+ children: Et
592
593
  }
593
594
  ),
594
595
  /* @__PURE__ */ o(
595
- An,
596
+ Sn,
596
597
  a(a({
597
598
  titleText: t,
598
599
  "data-testid": l
599
- }, P && W === "push" ? {
600
+ }, N && W === "push" ? {
600
601
  leftPanel: {
601
602
  open: ue,
602
603
  width: m,
603
604
  onOpen: () => Ie(!0),
604
- showOpenArrow: C === "both" || C === "open"
605
+ showOpenArrow: x === "both" || x === "open"
605
606
  }
606
607
  } : {}), S && ye === "push" ? {
607
608
  rightPanel: {
608
609
  open: pe,
609
610
  width: de,
610
611
  onOpen: () => Oe(!0),
611
- showOpenArrow: Z === "both" || Z === "open"
612
+ showOpenArrow: j === "both" || j === "open"
612
613
  }
613
614
  } : {})
614
615
  ),
615
616
  /* @__PURE__ */ o(
616
- kn,
617
+ yn,
617
618
  k(a(a({}, W === "push" ? {
618
619
  leftPanel: {
619
620
  open: ue,
@@ -625,37 +626,37 @@ function Fo({
625
626
  width: de
626
627
  }
627
628
  } : {}), {
628
- children: /* @__PURE__ */ o(Dn, k(a({ "data-testid": d }, c), { children: e }))
629
+ children: /* @__PURE__ */ o($n, k(a({ "data-testid": d }, c), { children: e }))
629
630
  })
630
631
  )
631
632
  ] });
632
633
  }
633
- const Ct = () => {
634
+ const vt = () => {
634
635
  const e = se();
635
- return _t(e.breakpoints.down("sm"));
636
- }, yn = 64, $n = 72, In = 256, K = _(!0), xt = _(In), vt = _($n), ve = _(""), On = _(void 0), wt = _(yn), At = _(void 0);
637
- function Tn({ links: e }) {
636
+ return Rt(e.breakpoints.down("sm"));
637
+ }, In = 64, On = 72, Tn = 256, J = _(!0), wt = _(Tn), At = _(On), ve = _(""), Bn = _(void 0), bt = _(In), St = _(void 0);
638
+ function En({ links: e }) {
638
639
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
639
640
  }
640
- const ne = "Navbar", Q = {
641
- root: `${ne}-root`,
642
- menuButton: `${ne}-menuButton`,
643
- hide: `${ne}-hide`,
644
- content: `${ne}-content`
641
+ const oe = "Navbar", Y = {
642
+ root: `${oe}-root`,
643
+ menuButton: `${oe}-menuButton`,
644
+ hide: `${oe}-hide`,
645
+ content: `${oe}-content`
645
646
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
646
647
  // settings: `${PREFIX}-settings`,
647
648
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
648
- }, Bn = R($, { name: "NavBar" })(({ theme: e }) => ({
649
- [`&.${Q.root}`]: {
649
+ }, Fn = R(y, { name: "NavBar" })(({ theme: e }) => ({
650
+ [`&.${Y.root}`]: {
650
651
  display: "flex"
651
652
  },
652
- [`& .${Q.menuButton}`]: {
653
+ [`& .${Y.menuButton}`]: {
653
654
  marginRight: 36
654
655
  },
655
- [`& .${Q.hide}`]: {
656
+ [`& .${Y.hide}`]: {
656
657
  display: "none"
657
658
  },
658
- [`& .${Q.content}`]: {
659
+ [`& .${Y.content}`]: {
659
660
  flexGrow: 1,
660
661
  padding: e.spacing(3)
661
662
  }
@@ -664,13 +665,13 @@ const ne = "Navbar", Q = {
664
665
  // marginTop: '64px',
665
666
  // marginBottom: '16px',
666
667
  // },
667
- })), ae = (e, t, n) => e.transitions.create(t, {
668
+ })), X = (e, t, n) => e.transitions.create(t, {
668
669
  easing: e.transitions.easing.sharp,
669
670
  duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
670
- }), En = (e) => {
671
+ }), Pn = (e) => {
671
672
  const t = se();
672
673
  return /* @__PURE__ */ o(
673
- Mt,
674
+ Ht,
674
675
  a({
675
676
  easing: t.transitions.easing.sharp,
676
677
  timeout: {
@@ -679,7 +680,7 @@ const ne = "Navbar", Q = {
679
680
  }
680
681
  }, e)
681
682
  );
682
- }, bt = (e) => {
683
+ }, kt = (e) => {
683
684
  var t, n;
684
685
  return {
685
686
  overflowX: "hidden",
@@ -687,13 +688,13 @@ const ne = "Navbar", Q = {
687
688
  backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
688
689
  // Provide default so tests don't need to wrap theme provider
689
690
  };
690
- }, We = (e, t) => a({
691
+ }, ze = (e, t) => a({
691
692
  width: t,
692
- transition: ae(e, "width", "entering")
693
- }, bt(e)), ze = (e, t) => a({
693
+ transition: X(e, "width", "entering")
694
+ }, kt(e)), Ue = (e, t) => a({
694
695
  width: t,
695
- transition: ae(e, "width", "leaving")
696
- }, bt(e)), Fn = R(we, {
696
+ transition: X(e, "width", "leaving")
697
+ }, kt(e)), Nn = R(we, {
697
698
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
698
699
  })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
699
700
  flexShrink: 0,
@@ -701,14 +702,14 @@ const ne = "Navbar", Q = {
701
702
  boxSizing: "border-box",
702
703
  display: "flex",
703
704
  flexDirection: "column"
704
- }, t && k(a({}, We(e, n)), {
705
+ }, t && k(a({}, ze(e, n)), {
705
706
  backgroundColor: "",
706
- "& .MuiDrawer-paper": We(e, n)
707
- })), !t && k(a({}, ze(e, r ? n : i)), {
707
+ "& .MuiDrawer-paper": ze(e, n)
708
+ })), !t && k(a({}, Ue(e, r ? n : i)), {
708
709
  backgroundColor: "",
709
- "& .MuiDrawer-paper": ze(e, r ? n : i)
710
+ "& .MuiDrawer-paper": Ue(e, r ? n : i)
710
711
  })));
711
- function Pn(e) {
712
+ function Ln(e) {
712
713
  let t = 0;
713
714
  for (let n = 0, i = e.length; n < i; n++) {
714
715
  const r = e.charCodeAt(n);
@@ -716,11 +717,11 @@ function Pn(e) {
716
717
  }
717
718
  return t;
718
719
  }
719
- const Ue = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Nn = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
720
- function Ln({ user: e, domainCode: t, open: n }) {
721
- const i = se();
722
- return /* @__PURE__ */ h(
723
- $,
720
+ const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Ve = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
721
+ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
722
+ const r = se();
723
+ return /* @__PURE__ */ p(
724
+ y,
724
725
  {
725
726
  sx: {
726
727
  paddingTop: 3,
@@ -730,37 +731,53 @@ function Ln({ user: e, domainCode: t, open: n }) {
730
731
  gap: "0.5rem"
731
732
  },
732
733
  children: [
733
- /* @__PURE__ */ o(
734
- $,
734
+ !i && /* @__PURE__ */ o(
735
+ y,
735
736
  {
736
737
  sx: {
737
738
  width: n ? "5rem" : "2rem",
738
- transition: n ? ae(i, ["width", "height"], "entering") : ae(i, ["width", "height"], "leaving"),
739
+ transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
739
740
  aspectRatio: 1
740
741
  },
741
- children: e != null && e.name ? /* @__PURE__ */ o(
742
+ children: e != null && e.name ? /* @__PURE__ */ o(E, { children: /* @__PURE__ */ o(
742
743
  Pe,
743
744
  {
744
745
  src: e == null ? void 0 : e.picture,
745
746
  sx: {
746
747
  width: "100%",
747
748
  height: "100%",
748
- bgcolor: Ue[Math.abs(Pn(e == null ? void 0 : e.name)) % Ue.length]
749
+ bgcolor: Ge[Math.abs(Ln(e == null ? void 0 : e.name)) % Ge.length]
749
750
  },
750
- children: Nn(e == null ? void 0 : e.name)
751
+ children: Ve(e == null ? void 0 : e.name)
751
752
  }
752
- ) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
753
+ ) }) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
754
+ }
755
+ ),
756
+ i && /* @__PURE__ */ o(
757
+ y,
758
+ {
759
+ sx: {
760
+ width: n ? "5rem" : "2rem",
761
+ transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
762
+ aspectRatio: 1
763
+ },
764
+ children: e != null && e.name ? /* @__PURE__ */ o(E, { children: /* @__PURE__ */ p(Me, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
765
+ " ",
766
+ Ve(e == null ? void 0 : e.name),
767
+ " ",
768
+ "ab"
769
+ ] }) }) : /* @__PURE__ */ o(Me, {})
753
770
  }
754
771
  ),
755
- /* @__PURE__ */ o(En, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Rt, { in: n, children: /* @__PURE__ */ h($, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
756
- e != null && e.name ? /* @__PURE__ */ o(E, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
757
- t ? /* @__PURE__ */ o(E, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
772
+ /* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ p(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
773
+ e != null && e.name ? /* @__PURE__ */ o(F, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
774
+ t ? /* @__PURE__ */ o(F, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
758
775
  ] }) }) })
759
776
  ]
760
777
  }
761
778
  );
762
779
  }
763
- function _n({
780
+ function Mn({
764
781
  open: e,
765
782
  widthClosed: t,
766
783
  widthOpen: n,
@@ -769,56 +786,57 @@ function _n({
769
786
  middle: s,
770
787
  bottom: c,
771
788
  user: d,
772
- domainCode: l
789
+ domainCode: l,
790
+ useNewAvatar: u = !1
773
791
  }) {
774
- const u = Ct(), w = lt(K);
775
- return /* @__PURE__ */ o(Bn, { className: Q.root, "data-testid": i, children: /* @__PURE__ */ h(
776
- Fn,
792
+ const v = vt(), C = dt(J);
793
+ return /* @__PURE__ */ o(Fn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ p(
794
+ Nn,
777
795
  {
778
796
  open: e,
779
797
  widthOpen: n,
780
798
  widthClosed: t,
781
799
  anchor: "left",
782
- variant: u ? "temporary" : "permanent",
800
+ variant: v ? "temporary" : "permanent",
783
801
  PaperProps: {
784
802
  component: "nav"
785
803
  },
786
804
  onClose: () => {
787
- w(!1);
805
+ C(!1);
788
806
  },
789
- isSmallScreen: u,
807
+ isSmallScreen: v,
790
808
  children: [
791
- !u && /* @__PURE__ */ o(Ht, {}),
792
- r && /* @__PURE__ */ h($, { flexGrow: "0", children: [
809
+ !v && /* @__PURE__ */ o(zt, {}),
810
+ r && /* @__PURE__ */ p(y, { flexGrow: "0", children: [
793
811
  r,
794
812
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
795
813
  ] }),
796
- /* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Tn, { links: s }) : s }),
797
- /* @__PURE__ */ h($, { flexGrow: "0", children: [
814
+ /* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(En, { links: s }) : s }),
815
+ /* @__PURE__ */ p(y, { flexGrow: "0", children: [
798
816
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
799
- /* @__PURE__ */ o(Ln, { user: d, domainCode: l, open: e }),
800
- c && /* @__PURE__ */ o(L, { children: c })
817
+ /* @__PURE__ */ o(_n, { user: d, domainCode: l, open: e, useNewAvatar: u }),
818
+ c && /* @__PURE__ */ o(E, { children: c })
801
819
  ] })
802
820
  ]
803
821
  }
804
822
  ) });
805
823
  }
806
- function Mn({
824
+ function Rn({
807
825
  children: e,
808
826
  topBarHeight: t,
809
827
  maxWidth: n = !1,
810
828
  noPadding: i
811
829
  }) {
812
830
  return /* @__PURE__ */ o(
813
- $,
831
+ y,
814
832
  {
815
833
  sx: {
816
834
  overflow: "auto",
817
835
  height: `calc(100vh - ${t}px)`,
818
836
  flexGrow: 1
819
837
  },
820
- children: i ? /* @__PURE__ */ o($, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
821
- Ze,
838
+ children: i ? /* @__PURE__ */ o(y, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
839
+ et,
822
840
  {
823
841
  component: "main",
824
842
  id: "main-content",
@@ -830,18 +848,18 @@ function Mn({
830
848
  }
831
849
  );
832
850
  }
833
- const Rn = "TopBar", Hn = {
834
- titleText: `${Rn}-titleText`
851
+ const Hn = "TopBar", Wn = {
852
+ titleText: `${Hn}-titleText`
835
853
  };
836
- function Wn({
854
+ function zn({
837
855
  titleText: e = "",
838
856
  height: t,
839
857
  "data-testid": n,
840
858
  middle: i
841
859
  }) {
842
- const r = lt(K), s = () => r((l) => !l), c = se(), d = Ct();
843
- return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ h(
844
- Je,
860
+ const r = dt(J), s = () => r((l) => !l), c = se(), d = vt();
861
+ return /* @__PURE__ */ o("header", { "data-testid": n, children: /* @__PURE__ */ p(
862
+ je,
845
863
  {
846
864
  square: !0,
847
865
  elevation: 0,
@@ -859,22 +877,22 @@ function Wn({
859
877
  },
860
878
  children: [
861
879
  /* @__PURE__ */ o(
862
- Y,
880
+ K,
863
881
  {
864
882
  size: "medium",
865
883
  color: "inherit",
866
884
  sx: { padding: 1.5, marginLeft: "12px" },
867
885
  onClick: s,
868
- children: /* @__PURE__ */ o(Jt, { fontSize: "medium" })
886
+ children: /* @__PURE__ */ o(jt, { fontSize: "medium" })
869
887
  }
870
888
  ),
871
- /* @__PURE__ */ o(E, { className: Hn.titleText, variant: "h6", component: "h1", children: e }),
889
+ /* @__PURE__ */ o(F, { className: Wn.titleText, variant: "h6", component: "h1", children: e }),
872
890
  i
873
891
  ]
874
892
  }
875
893
  ) });
876
894
  }
877
- function Po({
895
+ function Lo({
878
896
  children: e,
879
897
  initialTitleText: t,
880
898
  initialNavBarOpen: n,
@@ -885,42 +903,43 @@ function Po({
885
903
  navBarMiddle: d,
886
904
  navBarBottom: l,
887
905
  user: u,
888
- domainCode: w
906
+ domainCode: v
889
907
  }) {
890
- dt([
891
- [K, n != null ? n : !0],
908
+ pt([
909
+ [J, n != null ? n : !0],
892
910
  [ve, t != null ? t : ""]
893
911
  ]);
894
- const x = _e(K), [A] = V(xt), [g] = V(vt), y = _e(ve), [b] = V(wt), [D] = V(On), [I] = V(At);
895
- return /* @__PURE__ */ h($, { children: [
896
- /* @__PURE__ */ o(Wt, {}),
912
+ const C = _e(J), [A] = V(wt), [g] = V(At), $ = _e(ve), [b] = V(bt), [D] = V(Bn), [I] = V(St);
913
+ return /* @__PURE__ */ p(y, { children: [
914
+ /* @__PURE__ */ o(Ut, {}),
897
915
  /* @__PURE__ */ o(
898
- Wn,
916
+ zn,
899
917
  {
900
- titleText: y,
918
+ titleText: $,
901
919
  "data-testid": s,
902
920
  height: b,
903
921
  middle: D
904
922
  }
905
923
  ),
906
- /* @__PURE__ */ h($, { sx: { display: "flex" }, children: [
924
+ /* @__PURE__ */ p(y, { sx: { display: "flex" }, children: [
907
925
  /* @__PURE__ */ o(
908
- _n,
926
+ Mn,
909
927
  {
910
- open: x,
928
+ open: C,
911
929
  top: I,
912
930
  middle: d,
913
931
  bottom: l,
914
932
  user: u,
915
- domainCode: w,
933
+ domainCode: v,
916
934
  widthOpen: A,
917
935
  widthClosed: g,
918
936
  offsetTop: b,
919
- "data-testid": c
937
+ "data-testid": c,
938
+ useNewAvatar: !0
920
939
  }
921
940
  ),
922
941
  /* @__PURE__ */ o(
923
- Mn,
942
+ Rn,
924
943
  k(a({
925
944
  "data-testid": r,
926
945
  topBarHeight: b
@@ -931,7 +950,7 @@ function Po({
931
950
  ] })
932
951
  ] });
933
952
  }
934
- const St = ({
953
+ const Dt = ({
935
954
  isOpen: e,
936
955
  dialogTitle: t,
937
956
  children: n,
@@ -942,45 +961,45 @@ const St = ({
942
961
  sx: d,
943
962
  "data-testid": l,
944
963
  disableCloseOnBackdropOrEscape: u = !1,
945
- isLoading: w = !1
964
+ isLoading: v = !1
946
965
  }) => {
947
- var g, y;
948
- const [x, A] = B(!1);
949
- return /* @__PURE__ */ h(
950
- je,
966
+ var g, $;
967
+ const [C, A] = B(!1);
968
+ return /* @__PURE__ */ p(
969
+ tt,
951
970
  {
952
971
  open: e,
953
- onClose: (b, D) => N(void 0, null, function* () {
954
- u && (D === "backdropClick" || D === "escapeKeyDown") || x || (s != null && s.onClick ? yield s.onClick() : c());
972
+ onClose: (b, D) => L(void 0, null, function* () {
973
+ u && (D === "backdropClick" || D === "escapeKeyDown") || C || (s != null && s.onClick ? yield s.onClick() : c());
955
974
  }),
956
975
  fullWidth: !0,
957
976
  maxWidth: i != null ? i : "xs",
958
977
  "data-testid": l,
959
978
  sx: d,
960
979
  children: [
961
- w && /* @__PURE__ */ o(et, { sx: { height: "4px", marginBottom: "-4px" } }),
962
- /* @__PURE__ */ o(tt, { children: t }),
963
- /* @__PURE__ */ o(nt, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
964
- /* @__PURE__ */ h(ot, { children: [
980
+ v && /* @__PURE__ */ o(nt, { sx: { height: "4px", marginBottom: "-4px" } }),
981
+ /* @__PURE__ */ o(ot, { children: t }),
982
+ /* @__PURE__ */ o(it, { sx: { "& > :last-child": { marginBottom: 0 } }, children: n }),
983
+ /* @__PURE__ */ p(rt, { children: [
965
984
  /* @__PURE__ */ o(
966
- re,
985
+ ae,
967
986
  {
968
987
  onClick: (g = s == null ? void 0 : s.onClick) != null ? g : c,
969
988
  "data-testid": s == null ? void 0 : s.testId,
970
- disabled: (s == null ? void 0 : s.disabled) || x,
989
+ disabled: (s == null ? void 0 : s.disabled) || C,
971
990
  color: s == null ? void 0 : s.buttonColor,
972
- children: (y = s == null ? void 0 : s.text) != null ? y : "Cancel"
991
+ children: ($ = s == null ? void 0 : s.text) != null ? $ : "Cancel"
973
992
  }
974
993
  ),
975
994
  r && /* @__PURE__ */ o(
976
- re,
995
+ ae,
977
996
  {
978
- onClick: () => N(void 0, null, function* () {
997
+ onClick: () => L(void 0, null, function* () {
979
998
  var b;
980
999
  A(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), A(!1);
981
1000
  }),
982
1001
  "data-testid": r.testId,
983
- disabled: r.disabled || x,
1002
+ disabled: r.disabled || C,
984
1003
  color: r == null ? void 0 : r.buttonColor,
985
1004
  children: r.text
986
1005
  }
@@ -989,20 +1008,20 @@ const St = ({
989
1008
  ]
990
1009
  }
991
1010
  );
992
- }, kt = ({
1011
+ }, yt = ({
993
1012
  minLength: e,
994
1013
  preLoadedOptions: t,
995
1014
  lookup: n,
996
1015
  label: i,
997
1016
  inputValue: r
998
- }) => on({
1017
+ }) => an({
999
1018
  queryFn: () => e && r.length < e ? t != null ? t : [] : t ? t.filter(
1000
1019
  (s) => s.label.toLowerCase().includes(r.toLowerCase())
1001
1020
  ) : n(r),
1002
1021
  queryKey: ["autocomplete", i, r]
1003
1022
  });
1004
- function No({
1005
- lookup: e = () => N(this, null, function* () {
1023
+ function _o({
1024
+ lookup: e = () => L(this, null, function* () {
1006
1025
  }),
1007
1026
  enableHighlighting: t = !0,
1008
1027
  onChange: n,
@@ -1013,27 +1032,27 @@ function No({
1013
1032
  sx: d,
1014
1033
  boxSx: l,
1015
1034
  textFieldColor: u,
1016
- textFieldVariant: w = "filled",
1017
- loadingText: x = "Loading...",
1035
+ textFieldVariant: v = "filled",
1036
+ loadingText: C = "Loading...",
1018
1037
  noOptionsText: A = "No options",
1019
- popupIcon: g = /* @__PURE__ */ o(jt, {}),
1020
- error: y = !1,
1038
+ popupIcon: g = /* @__PURE__ */ o(tn, {}),
1039
+ error: $ = !1,
1021
1040
  helperText: b = "",
1022
1041
  preLoadedOptions: D = void 0,
1023
1042
  disablePortal: I = !1,
1024
1043
  disableIconFlip: O = !1
1025
1044
  }) {
1026
- const [F, P] = B(""), S = (p, f) => {
1027
- const m = s.filter((C) => C.id !== f);
1028
- n(m, "delete", p);
1029
- }, { data: v, isLoading: H } = kt({
1030
- inputValue: F,
1045
+ const [P, N] = B(""), S = (h, f) => {
1046
+ const m = s.filter((x) => x.id !== f);
1047
+ n(m, "delete", h);
1048
+ }, { data: w, isLoading: H } = yt({
1049
+ inputValue: P,
1031
1050
  label: r,
1032
1051
  lookup: e,
1033
1052
  minLength: i,
1034
1053
  preLoadedOptions: D
1035
- }), W = F.length >= i;
1036
- return /* @__PURE__ */ h("div", { "data-testid": c, children: [
1054
+ }), W = P.length >= i;
1055
+ return /* @__PURE__ */ p("div", { "data-testid": c, children: [
1037
1056
  /* @__PURE__ */ o(
1038
1057
  be,
1039
1058
  {
@@ -1041,31 +1060,31 @@ function No({
1041
1060
  "data-testid": c ? `${c}:Autocomplete` : void 0,
1042
1061
  disablePortal: I,
1043
1062
  multiple: !0,
1044
- getOptionLabel: (p) => typeof p == "string" ? p : p.label,
1063
+ getOptionLabel: (h) => typeof h == "string" ? h : h.label,
1045
1064
  loading: W ? H : !1,
1046
- options: [...s, ...v != null ? v : []],
1065
+ options: [...s, ...w != null ? w : []],
1047
1066
  filterSelectedOptions: !0,
1048
1067
  includeInputInList: !0,
1049
1068
  value: s,
1050
- onChange: (p, f, m) => {
1051
- n(f, m, p);
1069
+ onChange: (h, f, m) => {
1070
+ n(f, m, h);
1052
1071
  },
1053
- onInputChange: (p, f) => P(f),
1072
+ onInputChange: (h, f) => N(f),
1054
1073
  noOptionsText: W ? A : "Start typing to search",
1055
- loadingText: x,
1074
+ loadingText: C,
1056
1075
  popupIcon: g,
1057
- renderInput: (p) => /* @__PURE__ */ o(
1076
+ renderInput: (h) => /* @__PURE__ */ o(
1058
1077
  Se,
1059
- k(a({}, p), {
1078
+ k(a({}, h), {
1060
1079
  label: r,
1061
1080
  fullWidth: !0,
1062
- variant: w,
1063
- error: y,
1081
+ variant: v,
1082
+ error: $,
1064
1083
  helperText: b,
1065
- InputProps: k(a({}, p.InputProps), {
1066
- endAdornment: /* @__PURE__ */ h(L, { children: [
1084
+ InputProps: k(a({}, h.InputProps), {
1085
+ endAdornment: /* @__PURE__ */ p(E, { children: [
1067
1086
  H ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20 }) : null,
1068
- p.InputProps.endAdornment
1087
+ h.InputProps.endAdornment
1069
1088
  ] })
1070
1089
  }),
1071
1090
  "data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
@@ -1076,26 +1095,26 @@ function No({
1076
1095
  })
1077
1096
  ),
1078
1097
  renderTags: () => null,
1079
- isOptionEqualToValue: (p, f) => p.id === f.id,
1080
- renderOption: (p, f, m) => {
1098
+ isOptionEqualToValue: (h, f) => h.id === f.id,
1099
+ renderOption: (h, f, m) => {
1081
1100
  if (t) {
1082
- const C = tn(f.label, m.inputValue, {
1101
+ const x = on(f.label, m.inputValue, {
1083
1102
  insideWords: !0,
1084
1103
  findAllOccurrences: !0
1085
- }), M = nn(f.label, C);
1104
+ }), M = rn(f.label, x);
1086
1105
  return /* @__PURE__ */ xe(
1087
1106
  "li",
1088
- k(a({}, p), {
1107
+ k(a({}, h), {
1089
1108
  key: f.id,
1090
1109
  "data-testid": c ? `${c}:Autocomplete:option(${f.id.toString()})` : void 0
1091
1110
  }),
1092
- /* @__PURE__ */ o("div", { children: M.map((J, le) => /* @__PURE__ */ o(
1111
+ /* @__PURE__ */ o("div", { children: M.map((Z, le) => /* @__PURE__ */ o(
1093
1112
  "span",
1094
1113
  {
1095
1114
  style: {
1096
- fontWeight: J.highlight ? 700 : 400
1115
+ fontWeight: Z.highlight ? 700 : 400
1097
1116
  },
1098
- children: J.text
1117
+ children: Z.text
1099
1118
  },
1100
1119
  le
1101
1120
  )) })
@@ -1103,7 +1122,7 @@ function No({
1103
1122
  } else
1104
1123
  return /* @__PURE__ */ xe(
1105
1124
  "li",
1106
- k(a({}, p), {
1125
+ k(a({}, h), {
1107
1126
  key: f.id,
1108
1127
  "data-testid": c ? `${c}:option(${f.id.toString()})` : void 0
1109
1128
  }),
@@ -1112,8 +1131,8 @@ function No({
1112
1131
  }
1113
1132
  }
1114
1133
  ),
1115
- s.length > 0 && /* @__PURE__ */ o($, { sx: l, children: s.map((p) => /* @__PURE__ */ o(
1116
- zt,
1134
+ s.length > 0 && /* @__PURE__ */ o(y, { sx: l, children: s.map((h) => /* @__PURE__ */ o(
1135
+ Gt,
1117
1136
  {
1118
1137
  sx: {
1119
1138
  marginTop: 1,
@@ -1121,9 +1140,9 @@ function No({
1121
1140
  height: "auto"
1122
1141
  },
1123
1142
  label: /* @__PURE__ */ o(
1124
- Ut,
1143
+ Vt,
1125
1144
  {
1126
- title: p.tooltipContent || "",
1145
+ title: h.tooltipContent || "",
1127
1146
  placement: "bottom-start",
1128
1147
  PopperProps: {
1129
1148
  modifiers: [
@@ -1135,24 +1154,24 @@ function No({
1135
1154
  }
1136
1155
  ]
1137
1156
  },
1138
- children: /* @__PURE__ */ o(E, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
1157
+ children: /* @__PURE__ */ o(F, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
1139
1158
  }
1140
1159
  ),
1141
- "data-testid": c ? `${c}:Chip(${p.id.toString()})` : void 0,
1142
- onDelete: (f) => S(f, p.id),
1160
+ "data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
1161
+ onDelete: (f) => S(f, h.id),
1143
1162
  deleteIcon: /* @__PURE__ */ o(
1144
- Zt,
1163
+ en,
1145
1164
  {
1146
- "data-testid": c ? `${c}:Chip(${p.id.toString()}):deleteIcon` : void 0
1165
+ "data-testid": c ? `${c}:Chip(${h.id.toString()}):deleteIcon` : void 0
1147
1166
  }
1148
1167
  )
1149
1168
  },
1150
- p.id
1169
+ h.id
1151
1170
  )) })
1152
1171
  ] });
1153
1172
  }
1154
- const Lo = ({
1155
- lookup: e = () => N(void 0, null, function* () {
1173
+ const Mo = ({
1174
+ lookup: e = () => L(void 0, null, function* () {
1156
1175
  }),
1157
1176
  onChange: t,
1158
1177
  label: n,
@@ -1163,36 +1182,36 @@ const Lo = ({
1163
1182
  "data-testid": d,
1164
1183
  noOptionsText: l = "No options",
1165
1184
  minLength: u = 3,
1166
- disablePortal: w = !1,
1167
- preLoadedOptions: x,
1185
+ disablePortal: v = !1,
1186
+ preLoadedOptions: C,
1168
1187
  helperText: A = "",
1169
1188
  disabled: g,
1170
- popupIcon: y,
1189
+ popupIcon: $,
1171
1190
  disableIconFlip: b
1172
1191
  }) => {
1173
- const [D, I] = B(""), { data: O, isLoading: F } = kt({
1192
+ const [D, I] = B(""), { data: O, isLoading: P } = yt({
1174
1193
  inputValue: D,
1175
1194
  label: n,
1176
1195
  lookup: e,
1177
1196
  minLength: u != null ? u : 0,
1178
- preLoadedOptions: x
1179
- }), P = D.length >= u;
1180
- return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(Gt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1197
+ preLoadedOptions: C
1198
+ }), N = D.length >= u;
1199
+ return /* @__PURE__ */ o("div", { "data-testid": d, children: /* @__PURE__ */ o(qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1181
1200
  be,
1182
1201
  {
1183
1202
  sx: a(a({}, r), b ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1184
1203
  "data-testid": d ? `${d}:Autocomplete` : void 0,
1185
- loading: P ? F : !1,
1204
+ loading: N ? P : !1,
1186
1205
  options: O != null ? O : [],
1187
- onChange: (S, v) => {
1188
- t(S, v);
1206
+ onChange: (S, w) => {
1207
+ t(S, w);
1189
1208
  },
1190
- disablePortal: w,
1209
+ disablePortal: v,
1191
1210
  filterOptions: (S) => S,
1192
1211
  value: i,
1193
- noOptionsText: P ? l : "Start typing to search",
1212
+ noOptionsText: N ? l : "Start typing to search",
1194
1213
  getOptionLabel: (S) => S.label,
1195
- popupIcon: y,
1214
+ popupIcon: $,
1196
1215
  renderInput: (S) => /* @__PURE__ */ o(
1197
1216
  Se,
1198
1217
  k(a({
@@ -1204,27 +1223,27 @@ const Lo = ({
1204
1223
  helperText: A
1205
1224
  })
1206
1225
  ),
1207
- isOptionEqualToValue: (S, v) => S.id === v.id,
1208
- onInputChange: (S, v) => {
1209
- I(v);
1226
+ isOptionEqualToValue: (S, w) => S.id === w.id,
1227
+ onInputChange: (S, w) => {
1228
+ I(w);
1210
1229
  },
1211
- renderOption: (S, v) => /* @__PURE__ */ xe(
1230
+ renderOption: (S, w) => /* @__PURE__ */ xe(
1212
1231
  "li",
1213
1232
  k(a({}, S), {
1214
- key: v.id,
1215
- "data-testid": d ? `${d}:Autocomplete:option(${v.id.toString()})` : void 0
1233
+ key: w.id,
1234
+ "data-testid": d ? `${d}:Autocomplete:option(${w.id.toString()})` : void 0
1216
1235
  }),
1217
- v.label
1236
+ w.label
1218
1237
  ),
1219
1238
  disabled: g
1220
1239
  }
1221
1240
  ) }) });
1222
- }, zn = (e) => {
1241
+ }, Un = (e) => {
1223
1242
  if (!e)
1224
1243
  return -1;
1225
1244
  try {
1226
1245
  const n = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
1227
- sn.from(n, "base64").toString("utf8").split("").map(function(s) {
1246
+ cn.from(n, "base64").toString("utf8").split("").map(function(s) {
1228
1247
  return "%" + ("00" + s.charCodeAt(0).toString(16)).slice(-2);
1229
1248
  }).join("")
1230
1249
  ), r = JSON.parse(i);
@@ -1232,25 +1251,25 @@ const Lo = ({
1232
1251
  } catch (t) {
1233
1252
  return -1;
1234
1253
  }
1235
- }, _o = ({
1254
+ }, Ro = ({
1236
1255
  open: e = !1,
1237
1256
  closeHandler: t,
1238
1257
  setAuth0ExpiryTime: n
1239
1258
  }) => {
1240
- const { logout: i, getAccessTokenSilently: r } = ut(), [s, c] = B(0), d = () => N(void 0, null, function* () {
1259
+ const { logout: i, getAccessTokenSilently: r } = ht(), [s, c] = B(0), d = () => L(void 0, null, function* () {
1241
1260
  i({ logoutParams: { returnTo: `${window.location.origin}` } });
1242
- }), l = () => N(void 0, null, function* () {
1261
+ }), l = () => L(void 0, null, function* () {
1243
1262
  c(s + 1), t();
1244
1263
  });
1245
- return ie(() => {
1246
- (() => N(void 0, null, function* () {
1264
+ return re(() => {
1265
+ (() => L(void 0, null, function* () {
1247
1266
  if (s > 0) {
1248
- const A = yield r({ cacheMode: "off" }), g = zn(A) * 1e3;
1267
+ const A = yield r({ cacheMode: "off" }), g = Un(A) * 1e3;
1249
1268
  n(g);
1250
1269
  }
1251
1270
  }))();
1252
1271
  }, [s, r, n]), /* @__PURE__ */ o(
1253
- St,
1272
+ Dt,
1254
1273
  {
1255
1274
  isOpen: e,
1256
1275
  primaryButton: {
@@ -1274,28 +1293,28 @@ const Lo = ({
1274
1293
  }
1275
1294
  );
1276
1295
  };
1277
- function Un(e) {
1296
+ function Gn(e) {
1278
1297
  return "error" in e;
1279
1298
  }
1280
- function Gn(e) {
1299
+ function Vn(e) {
1281
1300
  return e.error === "access_denied";
1282
1301
  }
1283
- function Vn(e) {
1302
+ function qn(e) {
1284
1303
  var i;
1285
1304
  const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1286
1305
  return t === "access_denied" && n.startsWith("You do not have the required authorization");
1287
1306
  }
1288
- function qn(e) {
1307
+ function Xn(e) {
1289
1308
  var i;
1290
1309
  const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1291
1310
  return t === "access_denied" && n.startsWith("User did not authorize the request");
1292
1311
  }
1293
- function Mo({
1312
+ function Ho({
1294
1313
  children: e,
1295
1314
  appName: t = "the app"
1296
1315
  }) {
1297
- const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: s, logout: c } = ut();
1298
- if (ie(() => {
1316
+ const { isAuthenticated: n, isLoading: i, error: r, loginWithRedirect: s, logout: c } = ht();
1317
+ if (re(() => {
1299
1318
  if (i || n || r)
1300
1319
  return;
1301
1320
  const d = {
@@ -1304,42 +1323,42 @@ function Mo({
1304
1323
  }
1305
1324
  };
1306
1325
  s(d);
1307
- }, [i, n, r, s]), r && Un(r)) {
1326
+ }, [i, n, r, s]), r && Gn(r)) {
1308
1327
  let d = "Auth error", l = "An unknown Auth0 error occurred.";
1309
- return Vn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : qn(r) ? (d = "App not authorised", l = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`) : Gn(r) && (d = "Unauthorised", l = "Authorisation with auth0 failed for an unknown reason."), /* @__PURE__ */ h(je, { open: !0, children: [
1310
- /* @__PURE__ */ o(tt, { children: d }),
1311
- /* @__PURE__ */ o(nt, { children: /* @__PURE__ */ o(E, { children: l }) }),
1312
- /* @__PURE__ */ o(ot, { children: /* @__PURE__ */ o(re, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1328
+ return qn(r) ? (d = "Unauthorised", l = `You are not authorised to access ${t}.`) : Xn(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(tt, { open: !0, children: [
1329
+ /* @__PURE__ */ o(ot, { children: d }),
1330
+ /* @__PURE__ */ o(it, { children: /* @__PURE__ */ o(F, { children: l }) }),
1331
+ /* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(ae, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1313
1332
  ] });
1314
1333
  }
1315
- return n ? /* @__PURE__ */ o(L, { children: e }) : /* @__PURE__ */ o(ln, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1334
+ return n ? /* @__PURE__ */ o(E, { children: e }) : /* @__PURE__ */ o(dn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1316
1335
  }
1317
- const Xn = {
1336
+ const Qn = {
1318
1337
  autoHideDuration: 6e3,
1319
1338
  anchorOrigin: { vertical: "top", horizontal: "center" },
1320
1339
  // The default is false. If we prefer timer to continue when window loses
1321
1340
  // focus, change to true
1322
1341
  disableWindowBlurListener: !1
1323
- }, Qn = {
1342
+ }, Yn = {
1324
1343
  shouldClose: (e, t) => t !== "clickaway"
1325
- }, Ge = {
1344
+ }, qe = {
1326
1345
  message: "",
1327
1346
  severity: "info",
1328
1347
  variant: "standard",
1329
1348
  progressIndicator: void 0
1330
1349
  // Can use 'circular' or 'linear'
1331
- }, Ve = 100, qe = 2e3, Yn = 2e3, Kn = (() => {
1350
+ }, Xe = 100, Qe = 2e3, Kn = 2e3, Jn = (() => {
1332
1351
  let e = 0;
1333
1352
  return () => (e += 1, e);
1334
- })(), Jn = {
1353
+ })(), Zn = {
1335
1354
  borderBottomLeftRadius: "0px",
1336
1355
  borderBottomRightRadius: "0px"
1337
- }, Zn = {}, jn = {}, Dt = Ye(null);
1338
- function eo(s) {
1356
+ }, jn = {}, eo = {}, $t = Je(null);
1357
+ function to(s) {
1339
1358
  var c = s, {
1340
- overrideState: e = Zn,
1341
- overrideActions: t = jn,
1342
- shouldClose: n = Qn.shouldClose,
1359
+ overrideState: e = jn,
1360
+ overrideActions: t = eo,
1361
+ shouldClose: n = Yn.shouldClose,
1343
1362
  children: i
1344
1363
  } = c, r = Ee(c, [
1345
1364
  "overrideState",
@@ -1348,88 +1367,88 @@ function eo(s) {
1348
1367
  "children"
1349
1368
  ]);
1350
1369
  var f;
1351
- const [{ open: d }, l] = B({ open: !1 }), u = ge([]), w = ge(Date.now()), x = ge(0), A = oe((m) => {
1370
+ const [{ open: d }, l] = B({ open: !1 }), u = ge([]), v = ge(Date.now()), C = ge(0), A = ie((m) => {
1352
1371
  l({ open: m });
1353
- }, []), g = oe((m = {}) => {
1354
- x.current += 1, u.current.length >= Ve && Date.now() - w.current >= qe && (w.current = Date.now(), console.error(
1355
- `SaladBarProvider: MAX_QUEUE_LENGTH (${Ve}) hit ${x.current} times in last ${qe}ms)`
1356
- ), x.current = 0);
1357
- const C = a(k(a({}, Ge), {
1358
- key: Kn()
1372
+ }, []), g = ie((m = {}) => {
1373
+ C.current += 1, u.current.length >= Xe && Date.now() - v.current >= Qe && (v.current = Date.now(), console.error(
1374
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${C.current} times in last ${Qe}ms)`
1375
+ ), C.current = 0);
1376
+ const x = a(k(a({}, qe), {
1377
+ key: Jn()
1359
1378
  }), m);
1360
- return u.current.push(C), u.current.length === 1 && l({ open: !0 }), C.key;
1361
- }, []), y = (m = "", C = {}) => g(a({ message: m, severity: "success" }, C)), b = (m = "", C = {}) => g(a({ message: m, severity: "info" }, C)), D = (m = "", C = {}) => g(a({ message: m, severity: "warning" }, C)), I = (m = "", C = {}) => g(a({ message: m, severity: "error" }, C)), O = (m) => {
1362
- const C = u.current.findIndex((M) => M.key === m);
1363
- if (C !== -1)
1364
- return C === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(C, 1);
1365
- }, F = (m, C) => {
1366
- n(m, C) && l({ open: !1 });
1367
- }, P = () => {
1379
+ return u.current.push(x), u.current.length === 1 && l({ open: !0 }), x.key;
1380
+ }, []), $ = (m = "", x = {}) => g(a({ message: m, severity: "success" }, x)), b = (m = "", x = {}) => g(a({ message: m, severity: "info" }, x)), D = (m = "", x = {}) => g(a({ message: m, severity: "warning" }, x)), I = (m = "", x = {}) => g(a({ message: m, severity: "error" }, x)), O = (m) => {
1381
+ const x = u.current.findIndex((M) => M.key === m);
1382
+ if (x !== -1)
1383
+ return x === 0 ? (l({ open: !1 }), u.current[0]) : u.current.splice(x, 1);
1384
+ }, P = (m, x) => {
1385
+ n(m, x) && l({ open: !1 });
1386
+ }, N = () => {
1368
1387
  }, S = () => {
1369
1388
  u.current.shift(), u.current.length > 0 && l({ open: !0 });
1370
- }, v = (f = u.current[0]) != null ? f : a({}, Ge), H = {};
1371
- "autoHideDuration" in v && (H.autoHideDuration = v.autoHideDuration);
1372
- const W = a(a({}, Xn), r), p = a(a({
1389
+ }, w = (f = u.current[0]) != null ? f : a({}, qe), H = {};
1390
+ "autoHideDuration" in w && (H.autoHideDuration = w.autoHideDuration);
1391
+ const W = a(a({}, Qn), r), h = a(a({
1373
1392
  open: d,
1374
1393
  setOpen: A,
1375
1394
  enqueueNotification: g,
1376
- enqueueSuccessNotification: y,
1395
+ enqueueSuccessNotification: $,
1377
1396
  enqueueInfoNotification: b,
1378
1397
  enqueueWarningNotification: D,
1379
1398
  enqueueErrorNotification: I,
1380
1399
  removeNotification: O
1381
1400
  }, e), t);
1382
- return /* @__PURE__ */ h(Dt.Provider, { value: p, children: [
1401
+ return /* @__PURE__ */ p($t.Provider, { value: h, children: [
1383
1402
  i,
1384
1403
  /* @__PURE__ */ o(
1385
- Vt,
1404
+ Xt,
1386
1405
  k(a(a({}, W), H), {
1387
1406
  open: d,
1388
- onClose: F,
1407
+ onClose: P,
1389
1408
  TransitionProps: {
1390
1409
  onExited: S,
1391
- onExit: P
1410
+ onExit: N
1392
1411
  },
1393
- sx: { zIndex: Yn },
1394
- children: /* @__PURE__ */ h("div", { children: [
1412
+ sx: { zIndex: Kn },
1413
+ children: /* @__PURE__ */ p("div", { children: [
1395
1414
  /* @__PURE__ */ o(
1396
- qt,
1415
+ Qt,
1397
1416
  {
1398
- onClose: (m) => F(m, "closeAlert"),
1399
- severity: v.severity,
1417
+ onClose: (m) => P(m, "closeAlert"),
1418
+ severity: w.severity,
1400
1419
  variant: "filled",
1401
- icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
1402
- style: v.progressIndicator === "linear" ? Jn : void 0,
1403
- children: v.message
1420
+ icon: w.progressIndicator === "circular" ? /* @__PURE__ */ o(ke, { size: "1em" }) : void 0,
1421
+ style: w.progressIndicator === "linear" ? Zn : void 0,
1422
+ children: w.message
1404
1423
  }
1405
1424
  ),
1406
- v.progressIndicator === "linear" && /* @__PURE__ */ o(et, { color: "primary" })
1425
+ w.progressIndicator === "linear" && /* @__PURE__ */ o(nt, { color: "primary" })
1407
1426
  ] })
1408
1427
  })
1409
1428
  )
1410
1429
  ] });
1411
1430
  }
1412
- function to() {
1413
- const e = Ke(Dt);
1431
+ function no() {
1432
+ const e = Ze($t);
1414
1433
  if (e === null)
1415
1434
  throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1416
1435
  return e;
1417
1436
  }
1418
- const Ro = X(
1419
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, k(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1420
- ), no = en(), Ho = ({
1437
+ const Wo = Q(
1438
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(to, k(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1439
+ ), oo = nn(), zo = ({
1421
1440
  children: e,
1422
1441
  store: t
1423
- }) => /* @__PURE__ */ o(ct, { store: t != null ? t : no, children: e }), yt = "domainCode";
1424
- var Qe;
1425
- const Xe = _(
1426
- JSON.parse((Qe = localStorage.getItem(yt)) != null ? Qe : '{"domainCode": ""}').domainCode
1427
- ), $t = _(
1428
- (e) => e(Xe),
1442
+ }) => /* @__PURE__ */ o(ut, { store: t != null ? t : oo, children: e }), It = "domainCode";
1443
+ var Ke;
1444
+ const Ye = _(
1445
+ JSON.parse((Ke = localStorage.getItem(It)) != null ? Ke : '{"domainCode": ""}').domainCode
1446
+ ), Ot = _(
1447
+ (e) => e(Ye),
1429
1448
  (e, t, n) => {
1430
- t(Xe, n), localStorage.setItem(yt, JSON.stringify({ domainCode: n }));
1449
+ t(Ye, n), localStorage.setItem(It, JSON.stringify({ domainCode: n }));
1431
1450
  }
1432
- ), oo = {
1451
+ ), io = {
1433
1452
  act: "ACT",
1434
1453
  nsw: "NSW",
1435
1454
  nt: "NT",
@@ -1441,10 +1460,10 @@ const Xe = _(
1441
1460
  ag: "AG",
1442
1461
  fedmps: "Fedmps",
1443
1462
  "": ""
1444
- }, io = (e) => {
1463
+ }, ro = (e) => {
1445
1464
  var t;
1446
- return e === null ? "N/A" : (t = oo[e]) != null ? t : "";
1447
- }, Wo = ({
1465
+ return e === null ? "N/A" : (t = io[e]) != null ? t : "";
1466
+ }, Uo = ({
1448
1467
  isLoading: e,
1449
1468
  isOpen: t,
1450
1469
  onClose: n,
@@ -1452,21 +1471,21 @@ const Xe = _(
1452
1471
  applicationName: r,
1453
1472
  handleLogout: s
1454
1473
  }) => {
1455
- const [c, d] = V($t), [l, u] = B(c), { enqueueSuccessNotification: w } = to(), x = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || x || A, y = () => N(void 0, null, function* () {
1456
- l ? (d(l), w(`Set domain to ${l}`), n()) : d("");
1457
- }), b = () => N(void 0, null, function* () {
1458
- c && !x && !A ? (u(c), n()) : g && s();
1474
+ const [c, d] = V(Ot), [l, u] = B(c), { enqueueSuccessNotification: v } = no(), C = i.length === 0, A = !!c && !i.includes(c) && !i.includes(l), g = !c || C || A, $ = () => L(void 0, null, function* () {
1475
+ l ? (d(l), v(`Set domain to ${l}`), n()) : d("");
1476
+ }), b = () => L(void 0, null, function* () {
1477
+ c && !C && !A ? (u(c), n()) : g && s();
1459
1478
  });
1460
1479
  let D;
1461
- return x ? D = "Unable to retrieve your active organisations. Try logging in again." : A && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ h(
1462
- St,
1480
+ return C ? D = "Unable to retrieve your active organisations. Try logging in again." : A && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ p(
1481
+ Dt,
1463
1482
  {
1464
1483
  isOpen: t,
1465
1484
  dialogTitle: "Select an organisation",
1466
1485
  primaryButton: {
1467
1486
  text: "Confirm",
1468
- onClick: y,
1469
- disabled: !l || x || A,
1487
+ onClick: $,
1488
+ disabled: !l || C || A,
1470
1489
  buttonColor: "primary"
1471
1490
  },
1472
1491
  secondaryButton: {
@@ -1476,7 +1495,7 @@ const Xe = _(
1476
1495
  onClose: g ? () => {
1477
1496
  } : n,
1478
1497
  children: [
1479
- /* @__PURE__ */ h(E, { marginBottom: 2, children: [
1498
+ /* @__PURE__ */ p(F, { marginBottom: 2, children: [
1480
1499
  "Select the default organisation that you want to use with the ",
1481
1500
  r,
1482
1501
  "."
@@ -1489,7 +1508,7 @@ const Xe = _(
1489
1508
  disableClearable: !1,
1490
1509
  value: l !== "" ? l : null,
1491
1510
  onChange: (I, O) => u(O != null ? O : ""),
1492
- getOptionLabel: io,
1511
+ getOptionLabel: ro,
1493
1512
  options: [...i],
1494
1513
  renderInput: (I) => /* @__PURE__ */ o(
1495
1514
  Se,
@@ -1497,7 +1516,7 @@ const Xe = _(
1497
1516
  variant: "filled",
1498
1517
  label: "Select organisation",
1499
1518
  InputProps: k(a({}, I.InputProps), {
1500
- endAdornment: /* @__PURE__ */ h(L, { children: [
1519
+ endAdornment: /* @__PURE__ */ p(E, { children: [
1501
1520
  e ? /* @__PURE__ */ o(ke, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1502
1521
  I.InputProps.endAdornment
1503
1522
  ] })
@@ -1506,11 +1525,11 @@ const Xe = _(
1506
1525
  )
1507
1526
  }
1508
1527
  ),
1509
- D && /* @__PURE__ */ o(Xt, { error: !0, children: D })
1528
+ D && /* @__PURE__ */ o(Yt, { error: !0, children: D })
1510
1529
  ]
1511
1530
  }
1512
1531
  );
1513
- }, zo = it({
1532
+ }, Go = at({
1514
1533
  palette: {
1515
1534
  primary: {
1516
1535
  dark: "#00A651",
@@ -1561,7 +1580,7 @@ const Xe = _(
1561
1580
  navBar: {
1562
1581
  backgroundColor: "#E8E8E8"
1563
1582
  }
1564
- }), Uo = it({
1583
+ }), Vo = at({
1565
1584
  palette: {
1566
1585
  primary: {
1567
1586
  main: "#007236",
@@ -1655,77 +1674,77 @@ const Xe = _(
1655
1674
  navBar: {
1656
1675
  backgroundColor: "#E8E8E8"
1657
1676
  }
1658
- }), ro = {
1659
- domainCode: $t,
1660
- navBarOpen: K,
1661
- navBarWidthOpen: xt,
1662
- navBarWidthClosed: vt,
1677
+ }), ao = {
1678
+ domainCode: Ot,
1679
+ navBarOpen: J,
1680
+ navBarWidthOpen: wt,
1681
+ navBarWidthClosed: At,
1663
1682
  titleText: ve,
1664
- topBarHeight: wt,
1665
- navBarTop: At
1666
- }, Go = X(() => ({ children: e }) => /* @__PURE__ */ o(ct, { children: e })), ao = ({
1683
+ topBarHeight: bt,
1684
+ navBarTop: St
1685
+ }, qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), so = ({
1667
1686
  initialValues: e,
1668
1687
  children: t
1669
- }) => (dt(e), /* @__PURE__ */ o(L, { children: t })), Vo = X(
1688
+ }) => (pt(e), /* @__PURE__ */ o(E, { children: t })), Xo = Q(
1670
1689
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1671
- ao,
1690
+ so,
1672
1691
  {
1673
1692
  initialValues: Object.entries(e).map(
1674
1693
  ([n, i]) => [
1675
- ro[n],
1694
+ ao[n],
1676
1695
  i
1677
1696
  ]
1678
1697
  ),
1679
1698
  children: t
1680
1699
  }
1681
1700
  )
1682
- ), qo = X(() => ({ children: e }) => {
1683
- const t = new rn();
1684
- return /* @__PURE__ */ o(an, { client: t, children: e });
1701
+ ), Qo = Q(() => ({ children: e }) => {
1702
+ const t = new sn();
1703
+ return /* @__PURE__ */ o(ln, { client: t, children: e });
1685
1704
  });
1686
1705
  export {
1687
- St as AgDialog,
1688
- Po as AppLayout,
1689
- Ho as AtomProvider,
1690
- Mo as AuthGuard,
1691
- Dt as Context,
1706
+ Dt as AgDialog,
1707
+ Lo as AppLayout,
1708
+ zo as AtomProvider,
1709
+ Ho as AuthGuard,
1710
+ $t as Context,
1692
1711
  De as ContextError,
1693
- Wo as DomainCodeDialog,
1694
- $o as ExampleComponent,
1695
- No as FetchAutocomplete,
1696
- ao as HydrateAtoms,
1697
- ht as NAVBAR_WIDTH_CLOSED,
1698
- pt as NAVBAR_WIDTH_OPENED,
1699
- Eo as NavBar,
1700
- To as NavBarDarkStyledList,
1701
- Bo as NavBarLightStyledList,
1702
- fn as NavBarProvider,
1703
- Fo as PageLayout,
1704
- eo as SaladBarProvider,
1705
- _o as SessionExpiryDialog,
1706
- Lo as SingleAutocomplete,
1707
- no as atomStore,
1708
- Cn as buildNavBarState,
1709
- $t as domainCodeAtom,
1710
- zo as fed21Theme,
1711
- zn as getAuth0Expiry,
1712
- Uo as internalAgSystemsTheme,
1712
+ Uo as DomainCodeDialog,
1713
+ Oo as ExampleComponent,
1714
+ _o as FetchAutocomplete,
1715
+ so as HydrateAtoms,
1716
+ ft as NAVBAR_WIDTH_CLOSED,
1717
+ gt as NAVBAR_WIDTH_OPENED,
1718
+ Po as NavBar,
1719
+ Eo as NavBarDarkStyledList,
1720
+ Fo as NavBarLightStyledList,
1721
+ Cn as NavBarProvider,
1722
+ No as PageLayout,
1723
+ to as SaladBarProvider,
1724
+ Ro as SessionExpiryDialog,
1725
+ Mo as SingleAutocomplete,
1726
+ oo as atomStore,
1727
+ vn as buildNavBarState,
1728
+ Ot as domainCodeAtom,
1729
+ Go as fed21Theme,
1730
+ Un as getAuth0Expiry,
1731
+ Vo as internalAgSystemsTheme,
1713
1732
  q as navBarClasses,
1714
- K as navBarOpenAtom,
1715
- At as navBarTopAtom,
1716
- vt as navBarWidthClosedAtom,
1717
- xt as navBarWidthOpenAtom,
1733
+ J as navBarOpenAtom,
1734
+ St as navBarTopAtom,
1735
+ At as navBarWidthClosedAtom,
1736
+ wt as navBarWidthOpenAtom,
1718
1737
  ve as titleTextAtom,
1719
- wt as topBarHeightAtom,
1720
- On as topBarMiddleAtom,
1721
- kt as useAutocompleteOptions,
1722
- mn as useNavBar,
1723
- to as useSaladBar,
1724
- Go as withAtomProvider,
1725
- Oo as withBrowserRouter,
1726
- Io as withNavBarProvider,
1727
- Vo as withOverrideDefaults,
1728
- qo as withQueryClient,
1729
- Ro as withSaladBarProvider
1738
+ bt as topBarHeightAtom,
1739
+ Bn as topBarMiddleAtom,
1740
+ yt as useAutocompleteOptions,
1741
+ xn as useNavBar,
1742
+ no as useSaladBar,
1743
+ qo as withAtomProvider,
1744
+ Bo as withBrowserRouter,
1745
+ To as withNavBarProvider,
1746
+ Xo as withOverrideDefaults,
1747
+ Qo as withQueryClient,
1748
+ Wo as withSaladBarProvider
1730
1749
  };
1731
1750
  //# sourceMappingURL=index.js.map