@australiangreens/ag-internal-components 0.1.18 → 0.1.19

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