@australiangreens/ag-internal-components 0.0.89 → 0.0.91

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