@instructure/platform-widget-dashboard 16.7.0 → 16.8.0

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as v, Fragment as g2 } from "react/jsx-runtime";
2
2
  import { politeAnnounce as G2, InstUIThemeProvider as Fe, CanvasAsyncSelect as jb } from "@instructure/platform-instui-bindings";
3
3
  import { Alert as qe } from "@instructure/ui-alerts";
4
- import { Button as G0, IconButton as V2, CloseButton as uM } from "@instructure/ui-buttons";
4
+ import { Button as j0, IconButton as V2, CloseButton as uM } from "@instructure/ui-buttons";
5
5
  import { Flex as A } from "@instructure/ui-flex";
6
6
  import { Heading as J1 } from "@instructure/ui-heading";
7
7
  import { IconInfoLine as ka, IconCalendarMonthLine as Da, IconQuestionLine as xa, IconWarningLine as Mb, IconCheckMarkLine as ht, IconMoveUpLine as pz, IconMoveDownLine as rz, IconMoveUpTopLine as Pa, IconMoveDownBottomLine as Fa, IconArrowStartLine as az, IconArrowEndLine as Rt, IconDragHandleLine as Ua, IconTrashLine as $a, IconEmailLine as Ha, IconAnnouncementLine as Ga, IconCheckMarkSolid as Ue, SearchInstUIIcon as Yn, IconEmptyLine as ja, IconMoreLine as Ya, IconWarningSolid as Ka, IconEyeLine as Va, IconOffLine as Qa, IconDocumentLine as Za, IconDiscussionLine as Ja, IconQuizLine as eO, IconAssignmentLine as oO, IconCalendarClockLine as Kn, IconMessageLine as Vn, IconStarSolid as Qn, AlertTriangleInstUIIcon as MO, IconCheckLine as Zt, IconRefreshLine as bO, IconArrowOpenEndSolid as tO, IconA11yLine as cO, IconSearchLine as zO, CircleXInstUIIcon as nO, InfoInstUIIcon as pO, IconSpeedGraderLine as rO, IconCompleteSolid as aO, IconArrowOpenUpLine as OO, IconArrowOpenDownLine as iO, IconEditLine as sO, IconCheckPlusLine as dO, IconAddLine as Jt, IconConfigureLine as AO, IconSettingsLine as lO } from "@instructure/ui-icons";
@@ -343,16 +343,16 @@ const m1 = () => {
343
343
  widgetDashboardOverridable: q,
344
344
  dashboardExperience: f,
345
345
  availableDashboardExperiences: W,
346
- addOakMountPoint: N,
347
- rcsConfig: y,
346
+ addOakMountPoint: y,
347
+ rcsConfig: N,
348
348
  onSaveWidgetConfig: L,
349
349
  onDashboardExperienceChange: h
350
350
  }) => {
351
- const g = V(() => i && i.length > 0 ? i : a && O ? [{ id: "default", name: a, dashboardUrl: O }] : [], [i, a, O]), B = W ?? $1.availableDashboardExperiences, [C, k] = I(
351
+ const g = V(() => i && i.length > 0 ? i : a && O ? [{ id: "default", name: a, dashboardUrl: O }] : [], [i, a, O]), B = W ?? $1.availableDashboardExperiences, [C, x] = I(
352
352
  () => ui(f ?? "student", B)
353
- ), x = U(
353
+ ), k = U(
354
354
  (w) => {
355
- k(w), h == null || h(w);
355
+ x(w), h == null || h(w);
356
356
  },
357
357
  [h]
358
358
  ), D = B.length > 1, H = e0(!1), P = U(() => {
@@ -363,7 +363,7 @@ const m1 = () => {
363
363
  }, [C]);
364
364
  const [S, _] = I(
365
365
  () => (o ?? $1.preferences).learner_dashboard_tab_selection ?? F2.DASHBOARD
366
- ), [Z, s0] = I(d ?? $1.isDark), l0 = U(
366
+ ), [Z, s0] = I(d ?? $1.isDark), d0 = U(
367
367
  (w) => {
368
368
  var m0;
369
369
  const E = o ?? $1.preferences, $ = (r == null ? void 0 : r.educator_dashboard) || (r == null ? void 0 : r.admin_dashboard);
@@ -377,10 +377,10 @@ const m1 = () => {
377
377
  []
378
378
  // intentionally stable — seeds initial state only; the effect below handles switches
379
379
  ), u0 = r != null && r.educator_dashboard || r != null && r.admin_dashboard ? C : "student", J = e0({}), [X0, f0] = I(
380
- () => l0(C)
380
+ () => d0(C)
381
381
  );
382
382
  r0(() => {
383
- f0(J.current[u0] ?? l0(u0));
383
+ f0(J.current[u0] ?? d0(u0));
384
384
  }, [u0]);
385
385
  const W0 = U(
386
386
  (w, E) => {
@@ -390,13 +390,13 @@ const m1 = () => {
390
390
  });
391
391
  },
392
392
  [u0]
393
- ), [z0, c0] = I({}), [O0, j0] = I({}), w0 = U((w, E) => {
393
+ ), [z0, c0] = I({}), [O0, U0] = I({}), w0 = U((w, E) => {
394
394
  c0(($) => ({
395
395
  ...$,
396
396
  [w]: E
397
397
  }));
398
- }, []), U0 = U((w, E) => {
399
- j0(($) => ({
398
+ }, []), $0 = U((w, E) => {
399
+ U0(($) => ({
400
400
  ...$,
401
401
  [w]: E
402
402
  }));
@@ -418,7 +418,7 @@ const m1 = () => {
418
418
  sharedCourseData: j,
419
419
  dashboardFeatures: r ?? $1.dashboardFeatures,
420
420
  dashboardExperience: C,
421
- setDashboardExperience: x,
421
+ setDashboardExperience: k,
422
422
  canSwitchDashboardExperience: D,
423
423
  requestExperienceSelectFocus: P,
424
424
  shouldFocusExperienceSelect: T,
@@ -431,12 +431,12 @@ const m1 = () => {
431
431
  isDark: Z,
432
432
  setIsDark: s0,
433
433
  widgetDashboardOverridable: q ?? $1.widgetDashboardOverridable,
434
- addOakMountPoint: N ?? $1.addOakMountPoint,
435
- rcsConfig: y,
434
+ addOakMountPoint: y ?? $1.addOakMountPoint,
435
+ rcsConfig: N,
436
436
  widgetConfig: X0,
437
437
  updateWidgetConfig: W0,
438
438
  updateCourseColor: w0,
439
- updateCourseNickname: U0,
439
+ updateCourseNickname: $0,
440
440
  onSaveWidgetConfig: L
441
441
  }),
442
442
  [
@@ -449,7 +449,7 @@ const m1 = () => {
449
449
  j,
450
450
  r,
451
451
  C,
452
- x,
452
+ k,
453
453
  D,
454
454
  P,
455
455
  T,
@@ -460,12 +460,12 @@ const m1 = () => {
460
460
  u,
461
461
  Z,
462
462
  q,
463
- N,
464
463
  y,
464
+ N,
465
465
  X0,
466
466
  W0,
467
467
  w0,
468
- U0,
468
+ $0,
469
469
  L
470
470
  ]
471
471
  );
@@ -511,13 +511,13 @@ const $1 = {
511
511
  await o(f, W);
512
512
  return;
513
513
  }
514
- const N = JSON.stringify(f), y = await b(
514
+ const y = JSON.stringify(f), N = await b(
515
515
  li,
516
- W ? { layout: N, dashboardType: W } : { layout: N }
516
+ W ? { layout: y, dashboardType: W } : { layout: y }
517
517
  );
518
- if ((h = (L = y.updateWidgetDashboardLayout) == null ? void 0 : L.errors) != null && h.length)
519
- throw new Error(y.updateWidgetDashboardLayout.errors[0].message);
520
- return y;
518
+ if ((h = (L = N.updateWidgetDashboardLayout) == null ? void 0 : L.errors) != null && h.length)
519
+ throw new Error(N.updateWidgetDashboardLayout.errors[0].message);
520
+ return N;
521
521
  },
522
522
  onError: (f) => {
523
523
  a(f.message || M.failedToSaveWidgetLayout);
@@ -527,8 +527,8 @@ const $1 = {
527
527
  a(null);
528
528
  try {
529
529
  return await s.mutateAsync({ config: f, dashboardType: W }), c(!1), p(!1), !0;
530
- } catch (N) {
531
- return console.error("Failed to save widget layout:", N), !1;
530
+ } catch (y) {
531
+ return console.error("Failed to save widget layout:", y), !1;
532
532
  }
533
533
  },
534
534
  [s]
@@ -652,9 +652,9 @@ const qi = (e, o) => {
652
652
  admin: o.admin_dashboard_config
653
653
  }[r], i = Wz(O == null ? void 0 : O.layout), s = Wz(O == null ? void 0 : O.default_layout), l = oi[r], u = e0({}), d = u.current[r] ?? (i || l);
654
654
  u.current[r] = d;
655
- const [q, f] = I(d), [W, N] = I(r);
656
- W !== r && (N(r), f(d));
657
- const { markDirty: y, saveChanges: L } = hM(), h = U(
655
+ const [q, f] = I(d), [W, y] = I(r);
656
+ W !== r && (y(r), f(d));
657
+ const { markDirty: N, saveChanges: L } = hM(), h = U(
658
658
  (P, T) => {
659
659
  f((S) => {
660
660
  let _ = [...S.widgets];
@@ -691,54 +691,54 @@ const qi = (e, o) => {
691
691
  break;
692
692
  }
693
693
  return _ = Le(_, L1), _ = Le(_, q1), _ = kM(_), { ...S, widgets: _ };
694
- }), y();
694
+ }), N();
695
695
  },
696
- [y]
696
+ [N]
697
697
  ), g = U(
698
698
  (P, T, S) => {
699
699
  f((_) => {
700
700
  if (!_.widgets.find((J) => J.id === P)) return _;
701
- const s0 = _.widgets.map((J) => J.id === P ? { ...J, position: { ...J.position, col: T, row: S } } : J.position.col === T && J.position.row >= S && J.id !== P ? { ...J, position: { ...J.position, row: J.position.row + 1 } } : J), l0 = Le(
701
+ const s0 = _.widgets.map((J) => J.id === P ? { ...J, position: { ...J.position, col: T, row: S } } : J.position.col === T && J.position.row >= S && J.id !== P ? { ...J, position: { ...J.position, row: J.position.row + 1 } } : J), d0 = Le(
702
702
  Le(s0, L1),
703
703
  q1
704
- ), u0 = kM(l0);
704
+ ), u0 = kM(d0);
705
705
  return { ..._, widgets: u0 };
706
- }), y();
706
+ }), N();
707
707
  },
708
- [y]
708
+ [N]
709
709
  ), B = U(
710
710
  (P, T = c.widget) => {
711
711
  f((S) => {
712
- const _ = S.widgets.filter((l0) => l0.id !== P), Z = Le(
712
+ const _ = S.widgets.filter((d0) => d0.id !== P), Z = Le(
713
713
  Le(_, L1),
714
714
  q1
715
715
  ), s0 = kM(Z);
716
716
  return { ...S, widgets: s0 };
717
- }), y(), z == null || z(c.widgetRemoved.replace("%{widgetName}", T));
717
+ }), N(), z == null || z(c.widgetRemoved.replace("%{widgetName}", T));
718
718
  },
719
- [y, c, z]
719
+ [N, c, z]
720
720
  ), C = U(
721
721
  (P, T, S, _) => {
722
722
  f((Z) => {
723
723
  var W0;
724
- const s0 = ((W0 = crypto == null ? void 0 : crypto.randomUUID) == null ? void 0 : W0.call(crypto)) ?? "", l0 = {
724
+ const s0 = ((W0 = crypto == null ? void 0 : crypto.randomUUID) == null ? void 0 : W0.call(crypto)) ?? "", d0 = {
725
725
  id: s0 ? `${P}-widget-${s0}` : `${P}-widget`,
726
726
  type: P,
727
727
  position: { col: S, row: _, relative: 0 },
728
728
  title: T
729
- }, J = [...Z.widgets.map((z0) => z0.position.col === S && z0.position.row >= _ ? { ...z0, position: { ...z0.position, row: z0.position.row + 1 } } : z0), l0], X0 = Le(
729
+ }, J = [...Z.widgets.map((z0) => z0.position.col === S && z0.position.row >= _ ? { ...z0, position: { ...z0.position, row: z0.position.row + 1 } } : z0), d0], X0 = Le(
730
730
  Le(J, L1),
731
731
  q1
732
732
  ), f0 = kM(X0);
733
733
  return { ...Z, widgets: f0 };
734
- }), y(), z == null || z(c.widgetAdded.replace("%{widgetName}", T));
734
+ }), N(), z == null || z(c.widgetAdded.replace("%{widgetName}", T));
735
735
  },
736
- [y, c, z]
737
- ), k = U(() => {
736
+ [N, c, z]
737
+ ), x = U(() => {
738
738
  f(d);
739
- }, [d]), x = U(() => {
740
- f(s ?? l), y(), z == null || z(c.dashboardReset);
741
- }, [s, l, y, c, z]), D = U(async () => {
739
+ }, [d]), k = U(() => {
740
+ f(s ?? l), N(), z == null || z(c.dashboardReset);
741
+ }, [s, l, N, c, z]), D = U(async () => {
742
742
  await L(
743
743
  q,
744
744
  p ? r : void 0
@@ -750,8 +750,8 @@ const qi = (e, o) => {
750
750
  moveWidgetToPosition: g,
751
751
  removeWidget: B,
752
752
  addWidget: C,
753
- resetConfig: k,
754
- resetToDefault: x,
753
+ resetConfig: x,
754
+ resetToDefault: k,
755
755
  saveLayout: D
756
756
  };
757
757
  return /* @__PURE__ */ n(Ap.Provider, { value: H, children: e });
@@ -1121,8 +1121,8 @@ function Yi({
1121
1121
  }, [d, t]);
1122
1122
  let f = null;
1123
1123
  if (M && Gi(M)) {
1124
- const { a: W, b: N } = ji(M), y = W && !tb(W), L = N && !tb(N);
1125
- (y || L) && (r ? f = /* @__PURE__ */ n(Rz, { a: W, b: N }) : f = /* @__PURE__ */ v("span", { children: [
1124
+ const { a: W, b: y } = ji(M), N = W && !tb(W), L = y && !tb(y);
1125
+ (N || L) && (r ? f = /* @__PURE__ */ n(Rz, { a: W, b: y }) : f = /* @__PURE__ */ v("span", { children: [
1126
1126
  /* @__PURE__ */ n(NO, { children: /* @__PURE__ */ n(
1127
1127
  p1,
1128
1128
  {
@@ -1133,7 +1133,7 @@ function Yi({
1133
1133
  children: u.strings.details
1134
1134
  }
1135
1135
  ) }),
1136
- /* @__PURE__ */ n(e2, { id: l, children: /* @__PURE__ */ n(Rz, { a: W, b: N }) })
1136
+ /* @__PURE__ */ n(e2, { id: l, children: /* @__PURE__ */ n(Rz, { a: W, b: y }) })
1137
1137
  ] }));
1138
1138
  }
1139
1139
  return /* @__PURE__ */ n(yO, { transitionOnMount: !0, in: O, type: "fade", children: /* @__PURE__ */ n(
@@ -4290,7 +4290,7 @@ const S3 = (e, o = {
4290
4290
  }), rs = ({ display: e }) => {
4291
4291
  const { isDark: o, setIsDark: M } = S0(), { translations: b } = Q(), { currentUserId: t } = R0(), [c, z] = I(!1);
4292
4292
  return /* @__PURE__ */ n(
4293
- G0,
4293
+ j0,
4294
4294
  {
4295
4295
  onClick: async () => {
4296
4296
  const r = !o;
@@ -4453,13 +4453,13 @@ function us({
4453
4453
  try {
4454
4454
  const W = await e.getItem(f);
4455
4455
  if (W) {
4456
- const N = await t(W);
4457
- if (r(N))
4456
+ const y = await t(W);
4457
+ if (r(y))
4458
4458
  await e.removeItem(f);
4459
4459
  else
4460
4460
  return q && _z.schedule(
4461
- () => q(N)
4462
- ), N.state.data;
4461
+ () => q(y)
4462
+ ), y.state.data;
4463
4463
  }
4464
4464
  } catch (W) {
4465
4465
  process.env.NODE_ENV === "development" && (console.error(W), console.warn(
@@ -4494,7 +4494,7 @@ function us({
4494
4494
  async function s(d, q, f) {
4495
4495
  const W = p ? Os(p, f) : !0;
4496
4496
  if (W && f.state.data === void 0 && e != null) {
4497
- const y = await a(
4497
+ const N = await a(
4498
4498
  f.queryHash,
4499
4499
  (L) => {
4500
4500
  f.setState({
@@ -4503,13 +4503,13 @@ function us({
4503
4503
  }), (z === "always" || z === !0 && f.isStale()) && f.fetch();
4504
4504
  }
4505
4505
  );
4506
- if (y !== void 0)
4507
- return Promise.resolve(y);
4506
+ if (N !== void 0)
4507
+ return Promise.resolve(N);
4508
4508
  }
4509
- const N = await d(q);
4509
+ const y = await d(q);
4510
4510
  return W && e != null && _z.schedule(() => {
4511
4511
  i(f);
4512
- }), Promise.resolve(N);
4512
+ }), Promise.resolve(y);
4513
4513
  }
4514
4514
  async function l() {
4515
4515
  if (e != null && e.entries) {
@@ -4527,12 +4527,12 @@ function us({
4527
4527
  async function u(d, q = {}) {
4528
4528
  const { exact: f, queryKey: W } = q;
4529
4529
  if (e != null && e.entries) {
4530
- const N = await e.entries();
4531
- for (const [y, L] of N)
4532
- if (y.startsWith(c)) {
4530
+ const y = await e.entries();
4531
+ for (const [N, L] of y)
4532
+ if (N.startsWith(c)) {
4533
4533
  const h = await t(L);
4534
4534
  if (r(h)) {
4535
- await e.removeItem(y);
4535
+ await e.removeItem(N);
4536
4536
  continue;
4537
4537
  }
4538
4538
  if (W) {
@@ -4669,7 +4669,7 @@ const qs = 1e3 * 60 * 60 * 24, Sz = "widgetDashboardCacheBuster", Ws = () => {
4669
4669
  ] }) }) }) }) }) }),
4670
4670
  /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ v(A, { gap: "small", justifyItems: "start", children: [
4671
4671
  /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(
4672
- G0,
4672
+ j0,
4673
4673
  {
4674
4674
  size: "small",
4675
4675
  onClick: O,
@@ -4678,7 +4678,7 @@ const qs = 1e3 * 60 * 60 * 24, Sz = "widgetDashboardCacheBuster", Ws = () => {
4678
4678
  }
4679
4679
  ) }),
4680
4680
  /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(
4681
- G0,
4681
+ j0,
4682
4682
  {
4683
4683
  size: "small",
4684
4684
  color: "success",
@@ -4895,20 +4895,20 @@ const Pz = K1(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
4895
4895
  };
4896
4896
  function Cp() {
4897
4897
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ks();
4898
- const o = (A0) => Cp(A0);
4898
+ const o = (l0) => Cp(l0);
4899
4899
  if (o.version = "3.4.5", o.removed = [], !e || !e.document || e.document.nodeType !== no.document || !e.Element)
4900
4900
  return o.isSupported = !1, o;
4901
4901
  let M = e.document;
4902
- const b = M, t = b.currentScript, c = e.DocumentFragment, z = e.HTMLTemplateElement, p = e.Node, r = e.Element, a = e.NodeFilter, O = e.NamedNodeMap, i = O === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : O, s = e.HTMLFormElement, l = e.DOMParser, u = e.trustedTypes, d = r.prototype, q = ke(d, "cloneNode"), f = ke(d, "remove"), W = ke(d, "nextSibling"), N = ke(d, "childNodes"), y = ke(d, "parentNode"), L = p && p.prototype ? ke(p.prototype, "nodeType") : null;
4902
+ const b = M, t = b.currentScript, c = e.DocumentFragment, z = e.HTMLTemplateElement, p = e.Node, r = e.Element, a = e.NodeFilter, O = e.NamedNodeMap, i = O === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : O, s = e.HTMLFormElement, l = e.DOMParser, u = e.trustedTypes, d = r.prototype, q = ke(d, "cloneNode"), f = ke(d, "remove"), W = ke(d, "nextSibling"), y = ke(d, "childNodes"), N = ke(d, "parentNode"), L = p && p.prototype ? ke(p.prototype, "nodeType") : null;
4903
4903
  if (typeof z == "function") {
4904
- const A0 = M.createElement("template");
4905
- A0.content && A0.content.ownerDocument && (M = A0.content.ownerDocument);
4904
+ const l0 = M.createElement("template");
4905
+ l0.content && l0.content.ownerDocument && (M = l0.content.ownerDocument);
4906
4906
  }
4907
4907
  let h, g = "";
4908
- const B = M, C = B.implementation, k = B.createNodeIterator, x = B.createDocumentFragment, D = B.getElementsByTagName, H = b.importNode;
4908
+ const B = M, C = B.implementation, x = B.createNodeIterator, k = B.createDocumentFragment, D = B.getElementsByTagName, H = b.importNode;
4909
4909
  let P = Gz();
4910
- o.isSupported = typeof _p == "function" && typeof y == "function" && C && C.createHTMLDocument !== void 0;
4911
- const T = xs, S = Ps, _ = Fs, Z = Us, s0 = $s, l0 = Hs, u0 = Gs, J = Ys;
4910
+ o.isSupported = typeof _p == "function" && typeof N == "function" && C && C.createHTMLDocument !== void 0;
4911
+ const T = xs, S = Ps, _ = Fs, Z = Us, s0 = $s, d0 = Hs, u0 = Gs, J = Ys;
4912
4912
  let X0 = Hz, f0 = null;
4913
4913
  const W0 = T0({}, [...Pz, ...Jb, ...et, ...ot, ...Fz]);
4914
4914
  let z0 = null;
@@ -4932,8 +4932,8 @@ function Cp() {
4932
4932
  enumerable: !0,
4933
4933
  value: !1
4934
4934
  }
4935
- })), j0 = null, w0 = null;
4936
- const U0 = Object.seal(io(null, {
4935
+ })), U0 = null, w0 = null;
4936
+ const $0 = Object.seal(io(null, {
4937
4937
  tagCheck: {
4938
4938
  writable: !0,
4939
4939
  configurable: !1,
@@ -4947,7 +4947,7 @@ function Cp() {
4947
4947
  value: null
4948
4948
  }
4949
4949
  }));
4950
- let j = !0, m = !0, w = !1, E = !0, $ = !1, p0 = !0, m0 = !1, B0 = !1, N0 = !1, I0 = !1, i2 = !1, oe = !1, d0 = !0, L0 = !1;
4950
+ let j = !0, m = !0, w = !1, E = !0, $ = !1, p0 = !0, m0 = !1, B0 = !1, N0 = !1, I0 = !1, i2 = !1, oe = !1, A0 = !0, L0 = !1;
4951
4951
  const P1 = "user-content-";
4952
4952
  let S1 = !0, F1 = !1, s2 = {}, b2 = null;
4953
4953
  const d2 = T0({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
@@ -4969,9 +4969,9 @@ function Cp() {
4969
4969
  if (b1 && b1 === R)
4970
4970
  return;
4971
4971
  (!R || typeof R != "object") && (R = {}), R = Q1(R), v1 = // eslint-disable-next-line unicorn/prefer-includes
4972
- U1.indexOf(R.PARSER_MEDIA_TYPE) === -1 ? A2 : R.PARSER_MEDIA_TYPE, Z0 = v1 === "application/xhtml+xml" ? Zb : xo, f0 = a1(R, "ALLOWED_TAGS") && G1(R.ALLOWED_TAGS) ? T0({}, R.ALLOWED_TAGS, Z0) : W0, z0 = a1(R, "ALLOWED_ATTR") && G1(R.ALLOWED_ATTR) ? T0({}, R.ALLOWED_ATTR, Z0) : c0, wo = a1(R, "ALLOWED_NAMESPACES") && G1(R.ALLOWED_NAMESPACES) ? T0({}, R.ALLOWED_NAMESPACES, Zb) : y1, Co = a1(R, "ADD_URI_SAFE_ATTR") && G1(R.ADD_URI_SAFE_ATTR) ? T0(Q1(oo), R.ADD_URI_SAFE_ATTR, Z0) : oo, So = a1(R, "ADD_DATA_URI_TAGS") && G1(R.ADD_DATA_URI_TAGS) ? T0(Q1(CM), R.ADD_DATA_URI_TAGS, Z0) : CM, b2 = a1(R, "FORBID_CONTENTS") && G1(R.FORBID_CONTENTS) ? T0({}, R.FORBID_CONTENTS, Z0) : d2, j0 = a1(R, "FORBID_TAGS") && G1(R.FORBID_TAGS) ? T0({}, R.FORBID_TAGS, Z0) : Q1({}), w0 = a1(R, "FORBID_ATTR") && G1(R.FORBID_ATTR) ? T0({}, R.FORBID_ATTR, Z0) : Q1({}), s2 = a1(R, "USE_PROFILES") ? R.USE_PROFILES && typeof R.USE_PROFILES == "object" ? Q1(R.USE_PROFILES) : R.USE_PROFILES : !1, j = R.ALLOW_ARIA_ATTR !== !1, m = R.ALLOW_DATA_ATTR !== !1, w = R.ALLOW_UNKNOWN_PROTOCOLS || !1, E = R.ALLOW_SELF_CLOSE_IN_ATTR !== !1, $ = R.SAFE_FOR_TEMPLATES || !1, p0 = R.SAFE_FOR_XML !== !1, m0 = R.WHOLE_DOCUMENT || !1, I0 = R.RETURN_DOM || !1, i2 = R.RETURN_DOM_FRAGMENT || !1, oe = R.RETURN_TRUSTED_TYPE || !1, N0 = R.FORCE_BODY || !1, d0 = R.SANITIZE_DOM !== !1, L0 = R.SANITIZE_NAMED_PROPS || !1, S1 = R.KEEP_CONTENT !== !1, F1 = R.IN_PLACE || !1, X0 = Is(R.ALLOWED_URI_REGEXP) ? R.ALLOWED_URI_REGEXP : Hz, me = typeof R.NAMESPACE == "string" ? R.NAMESPACE : t2, C1 = a1(R, "MATHML_TEXT_INTEGRATION_POINTS") && R.MATHML_TEXT_INTEGRATION_POINTS && typeof R.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Q1(R.MATHML_TEXT_INTEGRATION_POINTS) : T0({}, ["mi", "mo", "mn", "ms", "mtext"]), X1 = a1(R, "HTML_INTEGRATION_POINTS") && R.HTML_INTEGRATION_POINTS && typeof R.HTML_INTEGRATION_POINTS == "object" ? Q1(R.HTML_INTEGRATION_POINTS) : T0({}, ["annotation-xml"]);
4972
+ U1.indexOf(R.PARSER_MEDIA_TYPE) === -1 ? A2 : R.PARSER_MEDIA_TYPE, Z0 = v1 === "application/xhtml+xml" ? Zb : xo, f0 = a1(R, "ALLOWED_TAGS") && G1(R.ALLOWED_TAGS) ? T0({}, R.ALLOWED_TAGS, Z0) : W0, z0 = a1(R, "ALLOWED_ATTR") && G1(R.ALLOWED_ATTR) ? T0({}, R.ALLOWED_ATTR, Z0) : c0, wo = a1(R, "ALLOWED_NAMESPACES") && G1(R.ALLOWED_NAMESPACES) ? T0({}, R.ALLOWED_NAMESPACES, Zb) : y1, Co = a1(R, "ADD_URI_SAFE_ATTR") && G1(R.ADD_URI_SAFE_ATTR) ? T0(Q1(oo), R.ADD_URI_SAFE_ATTR, Z0) : oo, So = a1(R, "ADD_DATA_URI_TAGS") && G1(R.ADD_DATA_URI_TAGS) ? T0(Q1(CM), R.ADD_DATA_URI_TAGS, Z0) : CM, b2 = a1(R, "FORBID_CONTENTS") && G1(R.FORBID_CONTENTS) ? T0({}, R.FORBID_CONTENTS, Z0) : d2, U0 = a1(R, "FORBID_TAGS") && G1(R.FORBID_TAGS) ? T0({}, R.FORBID_TAGS, Z0) : Q1({}), w0 = a1(R, "FORBID_ATTR") && G1(R.FORBID_ATTR) ? T0({}, R.FORBID_ATTR, Z0) : Q1({}), s2 = a1(R, "USE_PROFILES") ? R.USE_PROFILES && typeof R.USE_PROFILES == "object" ? Q1(R.USE_PROFILES) : R.USE_PROFILES : !1, j = R.ALLOW_ARIA_ATTR !== !1, m = R.ALLOW_DATA_ATTR !== !1, w = R.ALLOW_UNKNOWN_PROTOCOLS || !1, E = R.ALLOW_SELF_CLOSE_IN_ATTR !== !1, $ = R.SAFE_FOR_TEMPLATES || !1, p0 = R.SAFE_FOR_XML !== !1, m0 = R.WHOLE_DOCUMENT || !1, I0 = R.RETURN_DOM || !1, i2 = R.RETURN_DOM_FRAGMENT || !1, oe = R.RETURN_TRUSTED_TYPE || !1, N0 = R.FORCE_BODY || !1, A0 = R.SANITIZE_DOM !== !1, L0 = R.SANITIZE_NAMED_PROPS || !1, S1 = R.KEEP_CONTENT !== !1, F1 = R.IN_PLACE || !1, X0 = Is(R.ALLOWED_URI_REGEXP) ? R.ALLOWED_URI_REGEXP : Hz, me = typeof R.NAMESPACE == "string" ? R.NAMESPACE : t2, C1 = a1(R, "MATHML_TEXT_INTEGRATION_POINTS") && R.MATHML_TEXT_INTEGRATION_POINTS && typeof R.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Q1(R.MATHML_TEXT_INTEGRATION_POINTS) : T0({}, ["mi", "mo", "mn", "ms", "mtext"]), X1 = a1(R, "HTML_INTEGRATION_POINTS") && R.HTML_INTEGRATION_POINTS && typeof R.HTML_INTEGRATION_POINTS == "object" ? Q1(R.HTML_INTEGRATION_POINTS) : T0({}, ["annotation-xml"]);
4973
4973
  const G = a1(R, "CUSTOM_ELEMENT_HANDLING") && R.CUSTOM_ELEMENT_HANDLING && typeof R.CUSTOM_ELEMENT_HANDLING == "object" ? Q1(R.CUSTOM_ELEMENT_HANDLING) : io(null);
4974
- if (O0 = io(null), a1(G, "tagNameCheck") && c2(G.tagNameCheck) && (O0.tagNameCheck = G.tagNameCheck), a1(G, "attributeNameCheck") && c2(G.attributeNameCheck) && (O0.attributeNameCheck = G.attributeNameCheck), a1(G, "allowCustomizedBuiltInElements") && typeof G.allowCustomizedBuiltInElements == "boolean" && (O0.allowCustomizedBuiltInElements = G.allowCustomizedBuiltInElements), $ && (m = !1), i2 && (I0 = !0), s2 && (f0 = T0({}, Fz), z0 = io(null), s2.html === !0 && (T0(f0, Pz), T0(z0, Uz)), s2.svg === !0 && (T0(f0, Jb), T0(z0, Mt), T0(z0, xM)), s2.svgFilters === !0 && (T0(f0, et), T0(z0, Mt), T0(z0, xM)), s2.mathMl === !0 && (T0(f0, ot), T0(z0, $z), T0(z0, xM))), U0.tagCheck = null, U0.attributeCheck = null, a1(R, "ADD_TAGS") && (typeof R.ADD_TAGS == "function" ? U0.tagCheck = R.ADD_TAGS : G1(R.ADD_TAGS) && (f0 === W0 && (f0 = Q1(f0)), T0(f0, R.ADD_TAGS, Z0))), a1(R, "ADD_ATTR") && (typeof R.ADD_ATTR == "function" ? U0.attributeCheck = R.ADD_ATTR : G1(R.ADD_ATTR) && (z0 === c0 && (z0 = Q1(z0)), T0(z0, R.ADD_ATTR, Z0))), a1(R, "ADD_URI_SAFE_ATTR") && G1(R.ADD_URI_SAFE_ATTR) && T0(Co, R.ADD_URI_SAFE_ATTR, Z0), a1(R, "FORBID_CONTENTS") && G1(R.FORBID_CONTENTS) && (b2 === d2 && (b2 = Q1(b2)), T0(b2, R.FORBID_CONTENTS, Z0)), a1(R, "ADD_FORBID_CONTENTS") && G1(R.ADD_FORBID_CONTENTS) && (b2 === d2 && (b2 = Q1(b2)), T0(b2, R.ADD_FORBID_CONTENTS, Z0)), S1 && (f0["#text"] = !0), m0 && T0(f0, ["html", "head", "body"]), f0.table && (T0(f0, ["tbody"]), delete j0.tbody), R.TRUSTED_TYPES_POLICY) {
4974
+ if (O0 = io(null), a1(G, "tagNameCheck") && c2(G.tagNameCheck) && (O0.tagNameCheck = G.tagNameCheck), a1(G, "attributeNameCheck") && c2(G.attributeNameCheck) && (O0.attributeNameCheck = G.attributeNameCheck), a1(G, "allowCustomizedBuiltInElements") && typeof G.allowCustomizedBuiltInElements == "boolean" && (O0.allowCustomizedBuiltInElements = G.allowCustomizedBuiltInElements), $ && (m = !1), i2 && (I0 = !0), s2 && (f0 = T0({}, Fz), z0 = io(null), s2.html === !0 && (T0(f0, Pz), T0(z0, Uz)), s2.svg === !0 && (T0(f0, Jb), T0(z0, Mt), T0(z0, xM)), s2.svgFilters === !0 && (T0(f0, et), T0(z0, Mt), T0(z0, xM)), s2.mathMl === !0 && (T0(f0, ot), T0(z0, $z), T0(z0, xM))), $0.tagCheck = null, $0.attributeCheck = null, a1(R, "ADD_TAGS") && (typeof R.ADD_TAGS == "function" ? $0.tagCheck = R.ADD_TAGS : G1(R.ADD_TAGS) && (f0 === W0 && (f0 = Q1(f0)), T0(f0, R.ADD_TAGS, Z0))), a1(R, "ADD_ATTR") && (typeof R.ADD_ATTR == "function" ? $0.attributeCheck = R.ADD_ATTR : G1(R.ADD_ATTR) && (z0 === c0 && (z0 = Q1(z0)), T0(z0, R.ADD_ATTR, Z0))), a1(R, "ADD_URI_SAFE_ATTR") && G1(R.ADD_URI_SAFE_ATTR) && T0(Co, R.ADD_URI_SAFE_ATTR, Z0), a1(R, "FORBID_CONTENTS") && G1(R.FORBID_CONTENTS) && (b2 === d2 && (b2 = Q1(b2)), T0(b2, R.FORBID_CONTENTS, Z0)), a1(R, "ADD_FORBID_CONTENTS") && G1(R.ADD_FORBID_CONTENTS) && (b2 === d2 && (b2 = Q1(b2)), T0(b2, R.ADD_FORBID_CONTENTS, Z0)), S1 && (f0["#text"] = !0), m0 && T0(f0, ["html", "head", "body"]), f0.table && (T0(f0, ["tbody"]), delete U0.tbody), R.TRUSTED_TYPES_POLICY) {
4975
4975
  if (typeof R.TRUSTED_TYPES_POLICY.createHTML != "function")
4976
4976
  throw DM('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
4977
4977
  if (typeof R.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -4981,7 +4981,7 @@ function Cp() {
4981
4981
  h === void 0 && (h = Vs(u, t)), h !== null && typeof g == "string" && (g = h.createHTML(""));
4982
4982
  K1 && K1(R), b1 = R;
4983
4983
  }, he = T0({}, [...Jb, ...et, ...ks]), Re = T0({}, [...ot, ...Ds]), P2 = function(R) {
4984
- let G = y(R);
4984
+ let G = N(R);
4985
4985
  (!G || !G.tagName) && (G = {
4986
4986
  namespaceURI: me,
4987
4987
  tagName: "template"
@@ -4993,7 +4993,7 @@ function Cp() {
4993
4993
  element: R
4994
4994
  });
4995
4995
  try {
4996
- y(R).removeChild(R);
4996
+ N(R).removeChild(R);
4997
4997
  } catch {
4998
4998
  f(R);
4999
4999
  }
@@ -5045,7 +5045,7 @@ function Cp() {
5045
5045
  const A1 = G.body || G.documentElement;
5046
5046
  return R && b0 && A1.insertBefore(M.createTextNode(b0), A1.childNodes[0] || null), me === t2 ? D.call(G, m0 ? "html" : "body")[0] : m0 ? G.documentElement : A1;
5047
5047
  }, ez = function(R) {
5048
- return k.call(
5048
+ return x.call(
5049
5049
  R.ownerDocument || R,
5050
5050
  R,
5051
5051
  // eslint-disable-next-line no-bitwise
@@ -5054,7 +5054,7 @@ function Cp() {
5054
5054
  );
5055
5055
  }, oz = function(R) {
5056
5056
  R.normalize();
5057
- const G = k.call(
5057
+ const G = x.call(
5058
5058
  R.ownerDocument || R,
5059
5059
  R,
5060
5060
  // eslint-disable-next-line no-bitwise
@@ -5079,8 +5079,8 @@ function Cp() {
5079
5079
  return !1;
5080
5080
  }
5081
5081
  };
5082
- function Me(A0, R, G) {
5083
- to(A0, (b0) => {
5082
+ function Me(l0, R, G) {
5083
+ to(l0, (b0) => {
5084
5084
  b0.call(o, R, G, b1);
5085
5085
  });
5086
5086
  }
@@ -5094,11 +5094,11 @@ function Cp() {
5094
5094
  allowedTags: f0
5095
5095
  }), p0 && R.hasChildNodes() && !XM(R.firstElementChild) && E1(/<[/\w!]/g, R.innerHTML) && E1(/<[/\w!]/g, R.textContent) || p0 && R.namespaceURI === t2 && b0 === "style" && XM(R.firstElementChild) || R.nodeType === no.progressingInstruction || p0 && R.nodeType === no.comment && E1(/<[/\w]/g, R.data))
5096
5096
  return w1(R), !0;
5097
- if (j0[b0] || !(U0.tagCheck instanceof Function && U0.tagCheck(b0)) && !f0[b0]) {
5098
- if (!j0[b0] && tz(b0) && (O0.tagNameCheck instanceof RegExp && E1(O0.tagNameCheck, b0) || O0.tagNameCheck instanceof Function && O0.tagNameCheck(b0)))
5097
+ if (U0[b0] || !($0.tagCheck instanceof Function && $0.tagCheck(b0)) && !f0[b0]) {
5098
+ if (!U0[b0] && tz(b0) && (O0.tagNameCheck instanceof RegExp && E1(O0.tagNameCheck, b0) || O0.tagNameCheck instanceof Function && O0.tagNameCheck(b0)))
5099
5099
  return !1;
5100
5100
  if (S1 && !b2[b0]) {
5101
- const k0 = y(R) || R.parentNode, A1 = N(R) || R.childNodes;
5101
+ const k0 = N(R) || R.parentNode, A1 = y(R) || R.childNodes;
5102
5102
  if (A1 && k0) {
5103
5103
  const l1 = A1.length;
5104
5104
  for (let V1 = l1 - 1; V1 >= 0; --V1) {
@@ -5115,9 +5115,9 @@ function Cp() {
5115
5115
  element: R.cloneNode()
5116
5116
  }), R.textContent = G)), Me(P.afterSanitizeElements, R, null), !1);
5117
5117
  }, bz = function(R, G, b0) {
5118
- if (w0[G] || d0 && (G === "id" || G === "name") && (b0 in M || b0 in x2))
5118
+ if (w0[G] || A0 && (G === "id" || G === "name") && (b0 in M || b0 in x2))
5119
5119
  return !1;
5120
- const k0 = z0[G] || U0.attributeCheck instanceof Function && U0.attributeCheck(G, R);
5120
+ const k0 = z0[G] || $0.attributeCheck instanceof Function && $0.attributeCheck(G, R);
5121
5121
  if (!(m && !w0[G] && E1(Z, G))) {
5122
5122
  if (!(j && E1(s0, G))) {
5123
5123
  if (!k0 || w0[G]) {
@@ -5132,7 +5132,7 @@ function Cp() {
5132
5132
  } else if (!Co[G]) {
5133
5133
  if (!E1(X0, zo(b0, u0, ""))) {
5134
5134
  if (!((G === "src" || G === "xlink:href" || G === "href") && R !== "script" && kz(b0, "data:") === 0 && So[R])) {
5135
- if (!(w && !E1(l0, zo(b0, u0, "")))) {
5135
+ if (!(w && !E1(d0, zo(b0, u0, "")))) {
5136
5136
  if (b0)
5137
5137
  return !1;
5138
5138
  }
@@ -5226,38 +5226,38 @@ function Cp() {
5226
5226
  for (const k0 of b0)
5227
5227
  wM(k0);
5228
5228
  };
5229
- return o.sanitize = function(A0) {
5229
+ return o.sanitize = function(l0) {
5230
5230
  let R = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, G = null, b0 = null, k0 = null, A1 = null;
5231
- if (Xo = !A0, Xo && (A0 = "<!-->"), typeof A0 != "string" && !XM(A0) && (A0 = Es(A0), typeof A0 != "string"))
5231
+ if (Xo = !l0, Xo && (l0 = "<!-->"), typeof l0 != "string" && !XM(l0) && (l0 = Es(l0), typeof l0 != "string"))
5232
5232
  throw DM("dirty is not a string, aborting");
5233
5233
  if (!o.isSupported)
5234
- return A0;
5235
- if (B0 || z2(R), o.removed = [], typeof A0 == "string" && (F1 = !1), F1) {
5236
- const ge = A0.nodeName;
5234
+ return l0;
5235
+ if (B0 || z2(R), o.removed = [], typeof l0 == "string" && (F1 = !1), F1) {
5236
+ const ge = l0.nodeName;
5237
5237
  if (typeof ge == "string") {
5238
5238
  const be = Z0(ge);
5239
- if (!f0[be] || j0[be])
5239
+ if (!f0[be] || U0[be])
5240
5240
  throw DM("root node is forbidden and cannot be sanitized in-place");
5241
5241
  }
5242
- wM(A0);
5243
- } else if (XM(A0))
5244
- G = Jc("<!---->"), b0 = G.ownerDocument.importNode(A0, !0), b0.nodeType === no.element && b0.nodeName === "BODY" || b0.nodeName === "HTML" ? G = b0 : G.appendChild(b0), wM(b0);
5242
+ wM(l0);
5243
+ } else if (XM(l0))
5244
+ G = Jc("<!---->"), b0 = G.ownerDocument.importNode(l0, !0), b0.nodeType === no.element && b0.nodeName === "BODY" || b0.nodeName === "HTML" ? G = b0 : G.appendChild(b0), wM(b0);
5245
5245
  else {
5246
5246
  if (!I0 && !$ && !m0 && // eslint-disable-next-line unicorn/prefer-includes
5247
- A0.indexOf("<") === -1)
5248
- return h && oe ? h.createHTML(A0) : A0;
5249
- if (G = Jc(A0), !G)
5247
+ l0.indexOf("<") === -1)
5248
+ return h && oe ? h.createHTML(l0) : l0;
5249
+ if (G = Jc(l0), !G)
5250
5250
  return I0 ? null : oe ? g : "";
5251
5251
  }
5252
5252
  G && N0 && w1(G.firstChild);
5253
- const l1 = ez(F1 ? A0 : G);
5253
+ const l1 = ez(F1 ? l0 : G);
5254
5254
  for (; k0 = l1.nextNode(); )
5255
5255
  Mz(k0), cz(k0), k0.content instanceof c && Hb(k0.content);
5256
5256
  if (F1)
5257
- return $ && oz(A0), A0;
5257
+ return $ && oz(l0), l0;
5258
5258
  if (I0) {
5259
5259
  if ($ && oz(G), i2)
5260
- for (A1 = x.call(G.ownerDocument); G.firstChild; )
5260
+ for (A1 = k.call(G.ownerDocument); G.firstChild; )
5261
5261
  A1.appendChild(G.firstChild);
5262
5262
  else
5263
5263
  A1 = G;
@@ -5269,24 +5269,24 @@ function Cp() {
5269
5269
  V1 = zo(V1, ge, " ");
5270
5270
  }), h && oe ? h.createHTML(V1) : V1;
5271
5271
  }, o.setConfig = function() {
5272
- let A0 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
5273
- z2(A0), B0 = !0;
5272
+ let l0 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
5273
+ z2(l0), B0 = !0;
5274
5274
  }, o.clearConfig = function() {
5275
5275
  b1 = null, B0 = !1;
5276
- }, o.isValidAttribute = function(A0, R, G) {
5276
+ }, o.isValidAttribute = function(l0, R, G) {
5277
5277
  b1 || z2({});
5278
- const b0 = Z0(A0), k0 = Z0(R);
5278
+ const b0 = Z0(l0), k0 = Z0(R);
5279
5279
  return bz(b0, k0, G);
5280
- }, o.addHook = function(A0, R) {
5281
- typeof R == "function" && co(P[A0], R);
5282
- }, o.removeHook = function(A0, R) {
5280
+ }, o.addHook = function(l0, R) {
5281
+ typeof R == "function" && co(P[l0], R);
5282
+ }, o.removeHook = function(l0, R) {
5283
5283
  if (R !== void 0) {
5284
- const G = Bs(P[A0], R);
5285
- return G === -1 ? void 0 : Ts(P[A0], G, 1)[0];
5284
+ const G = Bs(P[l0], R);
5285
+ return G === -1 ? void 0 : Ts(P[l0], G, 1)[0];
5286
5286
  }
5287
- return Ez(P[A0]);
5288
- }, o.removeHooks = function(A0) {
5289
- P[A0] = [];
5287
+ return Ez(P[l0]);
5288
+ }, o.removeHooks = function(l0) {
5289
+ P[l0] = [];
5290
5290
  }, o.removeAllHooks = function() {
5291
5291
  P = Gz();
5292
5292
  }, o;
@@ -6110,7 +6110,7 @@ const Wd = (e) => {
6110
6110
  var f;
6111
6111
  try {
6112
6112
  const W = await O.mutateAsync(q);
6113
- (f = W == null ? void 0 : W.dismissAccountNotification) != null && f.errors || t((N) => /* @__PURE__ */ new Set([...N, q]));
6113
+ (f = W == null ? void 0 : W.dismissAccountNotification) != null && f.errors || t((y) => /* @__PURE__ */ new Set([...y, q]));
6114
6114
  } catch (W) {
6115
6115
  console.error("Failed to dismiss notification:", W);
6116
6116
  }
@@ -7210,38 +7210,38 @@ class Yp {
7210
7210
  const q = o.code, {
7211
7211
  isTop: f,
7212
7212
  isRight: W,
7213
- isLeft: N,
7214
- isBottom: y,
7213
+ isLeft: y,
7214
+ isBottom: N,
7215
7215
  maxScroll: L,
7216
7216
  minScroll: h
7217
7217
  } = Hp(d), g = iA(d), B = {
7218
7218
  x: Math.min(q === Q0.Right ? g.right - g.width / 2 : g.right, Math.max(q === Q0.Right ? g.left : g.left + g.width / 2, i.x)),
7219
7219
  y: Math.min(q === Q0.Down ? g.bottom - g.height / 2 : g.bottom, Math.max(q === Q0.Down ? g.top : g.top + g.height / 2, i.y))
7220
- }, C = q === Q0.Right && !W || q === Q0.Left && !N, k = q === Q0.Down && !y || q === Q0.Up && !f;
7220
+ }, C = q === Q0.Right && !W || q === Q0.Left && !y, x = q === Q0.Down && !N || q === Q0.Up && !f;
7221
7221
  if (C && B.x !== i.x) {
7222
- const x = d.scrollLeft + s.x, D = q === Q0.Right && x <= L.x || q === Q0.Left && x >= h.x;
7222
+ const k = d.scrollLeft + s.x, D = q === Q0.Right && k <= L.x || q === Q0.Left && k >= h.x;
7223
7223
  if (D && !s.y) {
7224
7224
  d.scrollTo({
7225
- left: x,
7225
+ left: k,
7226
7226
  behavior: p
7227
7227
  });
7228
7228
  return;
7229
7229
  }
7230
- D ? l.x = d.scrollLeft - x : l.x = q === Q0.Right ? d.scrollLeft - L.x : d.scrollLeft - h.x, l.x && d.scrollBy({
7230
+ D ? l.x = d.scrollLeft - k : l.x = q === Q0.Right ? d.scrollLeft - L.x : d.scrollLeft - h.x, l.x && d.scrollBy({
7231
7231
  left: -l.x,
7232
7232
  behavior: p
7233
7233
  });
7234
7234
  break;
7235
- } else if (k && B.y !== i.y) {
7236
- const x = d.scrollTop + s.y, D = q === Q0.Down && x <= L.y || q === Q0.Up && x >= h.y;
7235
+ } else if (x && B.y !== i.y) {
7236
+ const k = d.scrollTop + s.y, D = q === Q0.Down && k <= L.y || q === Q0.Up && k >= h.y;
7237
7237
  if (D && !s.x) {
7238
7238
  d.scrollTo({
7239
- top: x,
7239
+ top: k,
7240
7240
  behavior: p
7241
7241
  });
7242
7242
  return;
7243
7243
  }
7244
- D ? l.y = d.scrollTop - x : l.y = q === Q0.Down ? d.scrollTop - L.y : d.scrollTop - h.y, l.y && d.scrollBy({
7244
+ D ? l.y = d.scrollTop - k : l.y = q === Q0.Down ? d.scrollTop - L.y : d.scrollTop - h.y, l.y && d.scrollBy({
7245
7245
  top: -l.y,
7246
7246
  behavior: p
7247
7247
  });
@@ -7561,8 +7561,8 @@ function gA(e) {
7561
7561
  case Ho.DraggableRect:
7562
7562
  return t;
7563
7563
  }
7564
- }, [M, t, r]), N = e0(null), y = U(() => {
7565
- const h = N.current;
7564
+ }, [M, t, r]), y = e0(null), N = U(() => {
7565
+ const h = y.current;
7566
7566
  if (!h)
7567
7567
  return;
7568
7568
  const g = q.current.x * f.current.x, B = q.current.y * f.current.y;
@@ -7582,12 +7582,12 @@ function gA(e) {
7582
7582
  continue;
7583
7583
  const {
7584
7584
  direction: C,
7585
- speed: k
7585
+ speed: x
7586
7586
  } = OA(h, B, W, o, s);
7587
- for (const x of ["x", "y"])
7588
- l[x][C[x]] || (k[x] = 0, C[x] = 0);
7589
- if (k.x > 0 || k.y > 0) {
7590
- d(), N.current = h, u(y, z), q.current = k, f.current = C;
7587
+ for (const k of ["x", "y"])
7588
+ l[k][C[k]] || (x[k] = 0, C[k] = 0);
7589
+ if (x.x > 0 || x.y > 0) {
7590
+ d(), y.current = h, u(N, z), q.current = x, f.current = C;
7591
7591
  return;
7592
7592
  }
7593
7593
  }
@@ -7602,7 +7602,7 @@ function gA(e) {
7602
7602
  // eslint-disable-next-line react-hooks/exhaustive-deps
7603
7603
  [
7604
7604
  o,
7605
- y,
7605
+ N,
7606
7606
  b,
7607
7607
  d,
7608
7608
  c,
@@ -7693,21 +7693,21 @@ function BA(e, o) {
7693
7693
  measure: r,
7694
7694
  strategy: a
7695
7695
  } = t, O = e0(e), i = q(), s = rM(i), l = U(function(f) {
7696
- f === void 0 && (f = []), !s.current && z((W) => W === null ? f : W.concat(f.filter((N) => !W.includes(N))));
7696
+ f === void 0 && (f = []), !s.current && z((W) => W === null ? f : W.concat(f.filter((y) => !W.includes(y))));
7697
7697
  }, [s]), u = e0(null), d = NM((f) => {
7698
7698
  if (i && !M)
7699
7699
  return tn;
7700
7700
  if (!f || f === tn || O.current !== e || c != null) {
7701
7701
  const W = /* @__PURE__ */ new Map();
7702
- for (let N of e) {
7703
- if (!N)
7702
+ for (let y of e) {
7703
+ if (!y)
7704
7704
  continue;
7705
- if (c && c.length > 0 && !c.includes(N.id) && N.rect.current) {
7706
- W.set(N.id, N.rect.current);
7705
+ if (c && c.length > 0 && !c.includes(y.id) && y.rect.current) {
7706
+ W.set(y.id, y.rect.current);
7707
7707
  continue;
7708
7708
  }
7709
- const y = N.node.current, L = y ? new sc(r(y), y) : null;
7710
- N.rect.current = L, L && W.set(N.id, L);
7709
+ const N = y.node.current, L = N ? new sc(r(N), N) : null;
7710
+ y.rect.current = L, L && W.set(y.id, L);
7711
7711
  }
7712
7712
  return W;
7713
7713
  }
@@ -8292,16 +8292,16 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8292
8292
  modifiers: l,
8293
8293
  ...u
8294
8294
  } = o;
8295
- const d = WO(jA, void 0, GA), [q, f] = d, [W, N] = xd(), [y, L] = I(Ne.Uninitialized), h = y === Ne.Initialized, {
8295
+ const d = WO(jA, void 0, GA), [q, f] = d, [W, y] = xd(), [N, L] = I(Ne.Uninitialized), h = N === Ne.Initialized, {
8296
8296
  draggable: {
8297
8297
  active: g,
8298
8298
  nodes: B,
8299
8299
  translate: C
8300
8300
  },
8301
8301
  droppable: {
8302
- containers: k
8302
+ containers: x
8303
8303
  }
8304
- } = q, x = g != null ? B.get(g) : null, D = e0({
8304
+ } = q, k = g != null ? B.get(g) : null, D = e0({
8305
8305
  initial: null,
8306
8306
  translated: null
8307
8307
  }), H = V(() => {
@@ -8309,10 +8309,10 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8309
8309
  return g != null ? {
8310
8310
  id: g,
8311
8311
  // It's possible for the active node to unmount while dragging
8312
- data: (y1 = x == null ? void 0 : x.data) != null ? y1 : FA,
8312
+ data: (y1 = k == null ? void 0 : k.data) != null ? y1 : FA,
8313
8313
  rect: D
8314
8314
  } : null;
8315
- }, [g, x]), P = e0(null), [T, S] = I(null), [_, Z] = I(null), s0 = rM(u, Object.values(u)), l0 = yb("DndDescribedBy", z), u0 = V(() => k.getEnabled(), [k]), J = VA(s), {
8315
+ }, [g, k]), P = e0(null), [T, S] = I(null), [_, Z] = I(null), s0 = rM(u, Object.values(u)), d0 = yb("DndDescribedBy", z), u0 = V(() => x.getEnabled(), [x]), J = VA(s), {
8316
8316
  droppableRects: X0,
8317
8317
  measureDroppableContainers: f0,
8318
8318
  measuringScheduled: W0
@@ -8320,14 +8320,14 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8320
8320
  dragging: h,
8321
8321
  dependencies: [C.x, C.y],
8322
8322
  config: J.droppable
8323
- }), z0 = yA(B, g), c0 = V(() => _ ? Xt(_) : null, [_]), O0 = wo(), j0 = TA(z0, J.draggable.measure);
8323
+ }), z0 = yA(B, g), c0 = V(() => _ ? Xt(_) : null, [_]), O0 = wo(), U0 = TA(z0, J.draggable.measure);
8324
8324
  QA({
8325
8325
  activeNode: g != null ? B.get(g) : null,
8326
8326
  config: O0.layoutShiftCompensation,
8327
- initialRect: j0,
8327
+ initialRect: U0,
8328
8328
  measure: J.draggable.measure
8329
8329
  });
8330
- const w0 = cn(z0, J.draggable.measure, j0), U0 = cn(z0 ? z0.parentElement : null), j = e0({
8330
+ const w0 = cn(z0, J.draggable.measure, U0), $0 = cn(z0 ? z0.parentElement : null), j = e0({
8331
8331
  activatorEvent: null,
8332
8332
  active: null,
8333
8333
  activeNode: z0,
@@ -8337,11 +8337,11 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8337
8337
  draggableNodes: B,
8338
8338
  draggingNode: null,
8339
8339
  draggingNodeRect: null,
8340
- droppableContainers: k,
8340
+ droppableContainers: x,
8341
8341
  over: null,
8342
8342
  scrollableAncestors: [],
8343
8343
  scrollAdjustedTranslate: null
8344
- }), m = k.getNodeFor((M = j.current.over) == null ? void 0 : M.id), w = xA({
8344
+ }), m = x.getNodeFor((M = j.current.over) == null ? void 0 : M.id), w = xA({
8345
8345
  measure: J.dragOverlay.measure
8346
8346
  }), E = (b = w.nodeRef.current) != null ? b : z0, $ = h ? (t = w.rect) != null ? t : w0 : null, p0 = !!(w.nodeRef.current && w.rect), m0 = CA(p0 ? null : w0), B0 = Vp(E ? M2(E) : null), N0 = XA(h ? m ?? z0 : null), I0 = kA(N0), i2 = KA(l, {
8347
8347
  transform: {
@@ -8353,14 +8353,14 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8353
8353
  activatorEvent: _,
8354
8354
  active: H,
8355
8355
  activeNodeRect: w0,
8356
- containerNodeRect: U0,
8356
+ containerNodeRect: $0,
8357
8357
  draggingNodeRect: $,
8358
8358
  over: j.current.over,
8359
8359
  overlayNodeRect: w.rect,
8360
8360
  scrollableAncestors: N0,
8361
8361
  scrollableAncestorRects: I0,
8362
8362
  windowRect: B0
8363
- }), oe = c0 ? Wo(c0, C) : null, d0 = wA(N0), L0 = nn(d0), P1 = nn(d0, [w0]), S1 = Wo(i2, L0), F1 = $ ? bA($, i2) : null, s2 = H && F1 ? i({
8363
+ }), oe = c0 ? Wo(c0, C) : null, A0 = wA(N0), L0 = nn(A0), P1 = nn(A0, [w0]), S1 = Wo(i2, L0), F1 = $ ? bA($, i2) : null, s2 = H && F1 ? i({
8364
8364
  active: H,
8365
8365
  collisionRect: F1,
8366
8366
  droppableRects: X0,
@@ -8508,8 +8508,8 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8508
8508
  }, P.current = D2, Ee(X1, C1));
8509
8509
  }, [B, Ee]), t2 = vA(O, Mo);
8510
8510
  EA(O), Xe(() => {
8511
- w0 && y === Ne.Initializing && L(Ne.Initialized);
8512
- }, [w0, y]), r0(
8511
+ w0 && N === Ne.Initializing && L(Ne.Initialized);
8512
+ }, [w0, N]), r0(
8513
8513
  () => {
8514
8514
  const {
8515
8515
  onDragMove: y1
@@ -8588,7 +8588,7 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8588
8588
  draggableNodes: B,
8589
8589
  draggingNode: E,
8590
8590
  draggingNodeRect: $,
8591
- droppableContainers: k,
8591
+ droppableContainers: x,
8592
8592
  over: d2,
8593
8593
  scrollableAncestors: N0,
8594
8594
  scrollAdjustedTranslate: S1
@@ -8596,7 +8596,7 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8596
8596
  initial: $,
8597
8597
  translated: F1
8598
8598
  };
8599
- }, [H, z0, s2, F1, B, E, $, X0, k, d2, N0, S1]), gA({
8599
+ }, [H, z0, s2, F1, B, E, $, X0, x, d2, N0, S1]), gA({
8600
8600
  ...O0,
8601
8601
  delta: C,
8602
8602
  draggingRect: F1,
@@ -8610,10 +8610,10 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8610
8610
  activeNodeRect: w0,
8611
8611
  activatorEvent: _,
8612
8612
  collisions: s2,
8613
- containerNodeRect: U0,
8613
+ containerNodeRect: $0,
8614
8614
  dragOverlay: w,
8615
8615
  draggableNodes: B,
8616
- droppableContainers: k,
8616
+ droppableContainers: x,
8617
8617
  droppableRects: X0,
8618
8618
  over: d2,
8619
8619
  measureDroppableContainers: f0,
@@ -8622,21 +8622,21 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8622
8622
  measuringConfiguration: J,
8623
8623
  measuringScheduled: W0,
8624
8624
  windowRect: B0
8625
- }), [H, z0, w0, _, s2, U0, w, B, k, X0, d2, f0, N0, I0, J, W0, B0]), Xo = V(() => ({
8625
+ }), [H, z0, w0, _, s2, $0, w, B, x, X0, d2, f0, N0, I0, J, W0, B0]), Xo = V(() => ({
8626
8626
  activatorEvent: _,
8627
8627
  activators: t2,
8628
8628
  active: H,
8629
8629
  activeNodeRect: w0,
8630
8630
  ariaDescribedById: {
8631
- draggable: l0
8631
+ draggable: d0
8632
8632
  },
8633
8633
  dispatch: f,
8634
8634
  draggableNodes: B,
8635
8635
  over: d2,
8636
8636
  measureDroppableContainers: f0
8637
- }), [_, t2, H, w0, f, l0, B, d2, f0]);
8637
+ }), [_, t2, H, w0, f, d0, B, d2, f0]);
8638
8638
  return I1.createElement(Dp.Provider, {
8639
- value: N
8639
+ value: y
8640
8640
  }, I1.createElement(Bb.Provider, {
8641
8641
  value: Xo
8642
8642
  }, I1.createElement(HA.Provider, {
@@ -8647,7 +8647,7 @@ const ZA = /* @__PURE__ */ qO(function(o) {
8647
8647
  disabled: (p == null ? void 0 : p.restoreFocus) === !1
8648
8648
  })), I1.createElement(Ud, {
8649
8649
  ...p,
8650
- hiddenTextDescribedById: l0
8650
+ hiddenTextDescribedById: d0
8651
8651
  }));
8652
8652
  function wo() {
8653
8653
  const y1 = (T == null ? void 0 : T.autoScrollEnabled) === !1, C1 = typeof r == "object" ? r.enabled === !1 : r === !1, X1 = h && !y1 && !C1;
@@ -8678,13 +8678,13 @@ function ol(e) {
8678
8678
  role: l = rn,
8679
8679
  roleDescription: u = "draggable",
8680
8680
  tabIndex: d = 0
8681
- } = t ?? {}, q = (r == null ? void 0 : r.id) === o, f = C2(q ? Qp : JA), [W, N] = Ob(), [y, L] = Ob(), h = IA(z, o), g = rM(M);
8681
+ } = t ?? {}, q = (r == null ? void 0 : r.id) === o, f = C2(q ? Qp : JA), [W, y] = Ob(), [N, L] = Ob(), h = IA(z, o), g = rM(M);
8682
8682
  Xe(
8683
8683
  () => (i.set(o, {
8684
8684
  id: o,
8685
8685
  key: c,
8686
8686
  node: W,
8687
- activatorNode: y,
8687
+ activatorNode: N,
8688
8688
  data: g
8689
8689
  }), () => {
8690
8690
  const C = i.get(o);
@@ -8710,7 +8710,7 @@ function ol(e) {
8710
8710
  listeners: b ? void 0 : h,
8711
8711
  node: W,
8712
8712
  over: s,
8713
- setNodeRef: N,
8713
+ setNodeRef: y,
8714
8714
  setActivatorNodeRef: L,
8715
8715
  transform: f
8716
8716
  };
@@ -8751,15 +8751,15 @@ function lc(e) {
8751
8751
  },
8752
8752
  //eslint-disable-next-line react-hooks/exhaustive-deps
8753
8753
  [q]
8754
- ), N = vb({
8754
+ ), y = vb({
8755
8755
  callback: W,
8756
8756
  disabled: u || !z
8757
- }), y = U((B, C) => {
8758
- N && (C && (N.unobserve(C), i.current = !1), B && N.observe(B));
8759
- }, [N]), [L, h] = Ob(y), g = rM(o);
8757
+ }), N = U((B, C) => {
8758
+ y && (C && (y.unobserve(C), i.current = !1), B && y.observe(B));
8759
+ }, [y]), [L, h] = Ob(N), g = rM(o);
8760
8760
  return r0(() => {
8761
- !N || !L.current || (N.disconnect(), i.current = !1, N.observe(L.current));
8762
- }, [L, N]), r0(
8761
+ !y || !L.current || (y.disconnect(), i.current = !1, y.observe(L.current));
8762
+ }, [L, y]), r0(
8763
8763
  () => (p({
8764
8764
  type: h1.RegisterDroppable,
8765
8765
  element: {
@@ -8856,31 +8856,31 @@ function k1(e, o, M, b) {
8856
8856
  ), [u, d] = I(() => {
8857
8857
  const W = t[e];
8858
8858
  if (W && o in W) {
8859
- const N = l(W[o]);
8860
- return b && !b(N) ? M : N;
8859
+ const y = l(W[o]);
8860
+ return b && !b(y) ? M : y;
8861
8861
  }
8862
8862
  return M;
8863
8863
  });
8864
8864
  r0(() => {
8865
8865
  const W = t[e];
8866
8866
  if (W && o in W) {
8867
- const N = l(W[o]);
8868
- b && !b(N) ? d(M) : d(N);
8867
+ const y = l(W[o]);
8868
+ b && !b(y) ? d(M) : d(y);
8869
8869
  } else
8870
8870
  d(M);
8871
8871
  }, [t, e, o, l, M, b]);
8872
8872
  const q = m2({
8873
8873
  mutationFn: async (W) => {
8874
- const N = W && typeof W == "object" ? W : {};
8874
+ const y = W && typeof W == "object" ? W : {};
8875
8875
  if (p) {
8876
- await p(e, N);
8876
+ await p(e, y);
8877
8877
  return;
8878
8878
  }
8879
8879
  return await O(
8880
8880
  Ai,
8881
8881
  {
8882
8882
  widgetId: e,
8883
- filters: N,
8883
+ filters: y,
8884
8884
  dashboardType: s
8885
8885
  }
8886
8886
  );
@@ -8891,17 +8891,17 @@ function k1(e, o, M, b) {
8891
8891
  }), f = U(
8892
8892
  (W) => {
8893
8893
  d(W);
8894
- const N = t[e] || {};
8895
- let y = W;
8894
+ const y = t[e] || {};
8895
+ let N = W;
8896
8896
  const L = [
8897
8897
  "course-work-widget",
8898
8898
  "course-work-combined-widget",
8899
8899
  "course-work-summary-widget"
8900
8900
  ].includes(e);
8901
- L && o === "selectedCourse" && typeof W == "string" && (y = W === "all" || W.startsWith("course_") ? W : `course_${W}`);
8901
+ L && o === "selectedCourse" && typeof W == "string" && (N = W === "all" || W.startsWith("course_") ? W : `course_${W}`);
8902
8902
  const h = {
8903
- ...N,
8904
- [o]: y
8903
+ ...y,
8904
+ [o]: N
8905
8905
  };
8906
8906
  if (L && "selectedCourse" in h && typeof h.selectedCourse == "string") {
8907
8907
  const g = h.selectedCourse;
@@ -9074,7 +9074,7 @@ const Zp = ({
9074
9074
  return c ? /* @__PURE__ */ n(X, { as: "div", textAlign: "center", padding: "medium", children: /* @__PURE__ */ n(j1, { renderTitle: M.loadingCourseWorkData, size: "small" }) }) : z ? /* @__PURE__ */ n(X, { as: "div", padding: "small", children: /* @__PURE__ */ n(qe, { variant: "error", margin: "0", children: /* @__PURE__ */ v(X, { as: "div", children: [
9075
9075
  M.failedToLoadAssignmentsAndQuizzes,
9076
9076
  /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(
9077
- G0,
9077
+ j0,
9078
9078
  {
9079
9079
  size: "small",
9080
9080
  color: "secondary",
@@ -9234,25 +9234,25 @@ function er() {
9234
9234
  retry: s1.RETRY.DISABLED,
9235
9235
  persister: Ae,
9236
9236
  refetchOnMount: !1
9237
- }), f = p ? a : l, W = p ? O : u, N = p ? i : d, y = p ? s : q, L = N, h = W && !f, g = (f == null ? void 0 : f.length) ?? null, B = g !== null ? Math.ceil(g / r) : 0, C = V(() => {
9237
+ }), f = p ? a : l, W = p ? O : u, y = p ? i : d, N = p ? s : q, L = y, h = W && !f, g = (f == null ? void 0 : f.length) ?? null, B = g !== null ? Math.ceil(g / r) : 0, C = V(() => {
9238
9238
  if (!f) return;
9239
9239
  const H = e * r;
9240
9240
  return f.slice(H, H + r);
9241
- }, [f, e, r]), k = U((H) => {
9241
+ }, [f, e, r]), x = U((H) => {
9242
9242
  const P = H - 1;
9243
9243
  P >= 0 && o(P);
9244
- }, []), x = U(() => {
9244
+ }, []), k = U(() => {
9245
9245
  o(0);
9246
9246
  }, []), D = U(() => {
9247
- o(0), y();
9248
- }, [y]);
9247
+ o(0), N();
9248
+ }, [N]);
9249
9249
  return {
9250
9250
  data: C,
9251
9251
  currentPageIndex: e,
9252
9252
  totalPages: B,
9253
9253
  totalCount: g,
9254
- goToPage: k,
9255
- resetPagination: x,
9254
+ goToPage: x,
9255
+ resetPagination: k,
9256
9256
  refetch: D,
9257
9257
  isLoading: h,
9258
9258
  error: L,
@@ -9353,7 +9353,7 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9353
9353
  return /* @__PURE__ */ n(X, { as: "div", padding: "small", children: /* @__PURE__ */ n(qe, { variant: "error", margin: "0", children: /* @__PURE__ */ v(X, { as: "div", children: [
9354
9354
  e.failedToLoadGradesAndFeedback,
9355
9355
  /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(
9356
- G0,
9356
+ j0,
9357
9357
  {
9358
9358
  size: "small",
9359
9359
  onClick: () => c(),
@@ -9539,20 +9539,20 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9539
9539
  isEditMode: l = !1,
9540
9540
  dragHandleProps: u
9541
9541
  }) => {
9542
- const { translations: d, translate: q, announceForScreenReader: f } = Q(), { isMobile: W, isDesktop: N } = m1(), { config: y, moveWidget: L, removeWidget: h } = No(), { isDark: g } = S0(), B = hl[e.type], C = o || B && d[B] || e.title, k = `${e.id}-heading`, x = I1.useRef(null), [D, H] = I1.useState(null);
9542
+ const { translations: d, translate: q, announceForScreenReader: f } = Q(), { isMobile: W, isDesktop: y } = m1(), { config: N, moveWidget: L, removeWidget: h } = No(), { isDark: g } = S0(), B = hl[e.type], C = o || B && d[B] || e.title, x = `${e.id}-heading`, k = I1.useRef(null), [D, H] = I1.useState(null);
9543
9543
  r0(() => {
9544
- x.current && H(x.current);
9544
+ k.current && H(k.current);
9545
9545
  }, []);
9546
9546
  const P = (Z) => {
9547
9547
  const s0 = Z;
9548
9548
  TO(() => {
9549
9549
  L(e.id, s0);
9550
9550
  });
9551
- const l0 = document.querySelector(
9551
+ const d0 = document.querySelector(
9552
9552
  `[data-testid="${e.id}-drag-handle"]`
9553
9553
  );
9554
- if (l0) {
9555
- l0.focus();
9554
+ if (d0) {
9555
+ d0.focus();
9556
9556
  const u0 = qi(s0, d), J = q("widgetMovedDirection", {
9557
9557
  widgetName: C,
9558
9558
  direction: u0
@@ -9591,8 +9591,8 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9591
9591
  }
9592
9592
  ),
9593
9593
  widget: e,
9594
- config: y,
9595
- isStacked: !N,
9594
+ config: N,
9595
+ isStacked: !y,
9596
9596
  onSelect: P
9597
9597
  }
9598
9598
  ),
@@ -9610,7 +9610,7 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9610
9610
  )
9611
9611
  ] }), _ = () => z ? /* @__PURE__ */ n(A, { justifyItems: "center", alignItems: "center", height: "400px", children: /* @__PURE__ */ n(j1, { renderTitle: a || d.loadingWidgetData, size: "medium" }) }) : p ? /* @__PURE__ */ v(X, { as: "div", textAlign: "center", children: [
9612
9612
  /* @__PURE__ */ n(F, { color: "danger", size: "medium", children: p }),
9613
- r && /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0", children: /* @__PURE__ */ n(G0, { onClick: r, size: "small", "data-testid": `${e.id}-retry-button`, children: d.retry }) })
9613
+ r && /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0", children: /* @__PURE__ */ n(j0, { onClick: r, size: "small", "data-testid": `${e.id}-retry-button`, children: d.retry }) })
9614
9614
  ] }) : M || /* @__PURE__ */ n(X, { as: "div", textAlign: "center", children: /* @__PURE__ */ n(F, { color: "secondary", size: "medium", children: d.noContentAvailable }) });
9615
9615
  return /* @__PURE__ */ n(
9616
9616
  X,
@@ -9623,15 +9623,15 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9623
9623
  borderRadius: "large",
9624
9624
  background: "primary",
9625
9625
  "data-testid": `widget-${e.id}`,
9626
- "aria-labelledby": t && C ? k : void 0,
9626
+ "aria-labelledby": t && C ? x : void 0,
9627
9627
  role: "region",
9628
9628
  children: /* @__PURE__ */ v(A, { direction: "column", gap: "small", children: [
9629
9629
  t && C && (W ? /* @__PURE__ */ v(A, { direction: "column", gap: "x-small", children: [
9630
- /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(J1, { level: "h2", margin: "0", id: k, children: C }) }),
9630
+ /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(J1, { level: "h2", margin: "0", id: x, children: C }) }),
9631
9631
  c && /* @__PURE__ */ n(A.Item, { padding: "x-small 0 x-small x-small", children: c }),
9632
9632
  l && /* @__PURE__ */ n(A.Item, { padding: "x-small 0 x-small x-small", children: S })
9633
9633
  ] }) : /* @__PURE__ */ v(A, { direction: "row", alignItems: "center", justifyItems: "space-between", wrap: "wrap", children: [
9634
- /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: /* @__PURE__ */ n(J1, { level: "h2", variant: "titleCardSection", margin: "0", id: k, children: C }) }),
9634
+ /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: /* @__PURE__ */ n(J1, { level: "h2", variant: "titleCardSection", margin: "0", id: x, children: C }) }),
9635
9635
  c && /* @__PURE__ */ n(A.Item, { shouldGrow: !1, children: c }),
9636
9636
  l && /* @__PURE__ */ n(A.Item, { margin: "0 0 0 small", shouldGrow: !1, children: S })
9637
9637
  ] })),
@@ -9641,7 +9641,7 @@ const Al = ({ courseName: e, maxLines: o = 2 }) => {
9641
9641
  as: "div",
9642
9642
  position: "relative",
9643
9643
  elementRef: (Z) => {
9644
- x.current = Z;
9644
+ k.current = Z;
9645
9645
  },
9646
9646
  children: [
9647
9647
  _(),
@@ -10090,29 +10090,29 @@ function Dl() {
10090
10090
  const { translations: e } = Q(), [o, M] = I(), [b, t] = I(Po), [c, z] = I("course"), [p, r] = I([]), [a, O] = I(
10091
10091
  br
10092
10092
  ), [i, s] = I(""), [l, u] = I({ filterKey: "", page: 1 }), { sortBy: d, sortOrder: q } = wl(a), f = fc(i, Mc), W = Wc(f), {
10093
- accounts: N,
10094
- defaultAccountId: y,
10093
+ accounts: y,
10094
+ defaultAccountId: N,
10095
10095
  isLoading: L,
10096
10096
  error: h,
10097
10097
  refetch: g
10098
- } = or(), B = o ?? y, { terms: C, error: k } = kl(B), x = C.some((c0) => c0.id === b) ? b : Po, D = JSON.stringify({
10098
+ } = or(), B = o ?? N, { terms: C, error: x } = kl(B), k = C.some((c0) => c0.id === b) ? b : Po, D = JSON.stringify({
10099
10099
  accountId: B,
10100
- termId: x,
10100
+ termId: k,
10101
10101
  searchBy: c,
10102
10102
  filters: p,
10103
10103
  sortOption: a,
10104
10104
  searchTerm: W
10105
- }), H = l.filterKey === D ? l.page : 1, P = W !== "" || p.length > 0 || x !== Po, {
10105
+ }), H = l.filterKey === D ? l.page : 1, P = W !== "" || p.length > 0 || k !== Po, {
10106
10106
  courses: T,
10107
10107
  totalPages: S,
10108
10108
  isLoading: _,
10109
10109
  isPlaceholderData: Z,
10110
10110
  error: s0,
10111
- refetch: l0
10111
+ refetch: d0
10112
10112
  } = Xl(
10113
10113
  {
10114
10114
  accountId: B,
10115
- termId: x === Po ? void 0 : x,
10115
+ termId: k === Po ? void 0 : k,
10116
10116
  searchBy: c,
10117
10117
  searchTerm: W,
10118
10118
  filters: p,
@@ -10128,13 +10128,13 @@ function Dl() {
10128
10128
  let J = null;
10129
10129
  return h ? J = e.adminCourseSearchFailedToLoadAccounts : s0 && (J = e.adminCourseSearchFailedToLoad), {
10130
10130
  scope: {
10131
- accounts: N,
10131
+ accounts: y,
10132
10132
  accountId: B,
10133
10133
  onAccountChange: M,
10134
10134
  terms: C,
10135
- termId: x,
10135
+ termId: k,
10136
10136
  onTermChange: t,
10137
- termsFailed: !!k,
10137
+ termsFailed: !!x,
10138
10138
  searchBy: c,
10139
10139
  onSearchByChange: z,
10140
10140
  filters: p,
@@ -10157,7 +10157,7 @@ function Dl() {
10157
10157
  accountsLoading: L,
10158
10158
  failureMessage: J,
10159
10159
  retry: () => {
10160
- h && g(), s0 && l0();
10160
+ h && g(), s0 && d0();
10161
10161
  }
10162
10162
  };
10163
10163
  }
@@ -10171,44 +10171,44 @@ const On = "all", FM = [
10171
10171
  o([]);
10172
10172
  return;
10173
10173
  }
10174
- const N = FM.find((h) => h.id === W);
10175
- if (!N) return;
10176
- const L = e.includes(N.id) ? e.filter((h) => h !== N.id) : [...e, N.id];
10174
+ const y = FM.find((h) => h.id === W);
10175
+ if (!y) return;
10176
+ const L = e.includes(y.id) ? e.filter((h) => h !== y.id) : [...e, y.id];
10177
10177
  o(FM.filter((h) => L.includes(h.id)).map((h) => h.id));
10178
10178
  }, i = (W) => {
10179
- var N;
10180
- O(W), (N = a.current) == null || N.focus();
10179
+ var y;
10180
+ O(W), (y = a.current) == null || y.focus();
10181
10181
  }, s = () => {
10182
10182
  c(!1), p(null);
10183
10183
  }, l = (W) => {
10184
10184
  O(W), s();
10185
- }, u = FM.filter((W) => e.includes(W.id)), d = u.length === 0 ? null : /* @__PURE__ */ n($e, { as: "span", display: "inline-block", padding: "xx-small 0", children: u.map(({ id: W, translationKey: N }) => {
10186
- const y = M[N];
10185
+ }, u = FM.filter((W) => e.includes(W.id)), d = u.length === 0 ? null : /* @__PURE__ */ n($e, { as: "span", display: "inline-block", padding: "xx-small 0", children: u.map(({ id: W, translationKey: y }) => {
10186
+ const N = M[y];
10187
10187
  return /* @__PURE__ */ n(
10188
10188
  CO,
10189
10189
  {
10190
- text: y,
10190
+ text: N,
10191
10191
  dismissible: !0,
10192
10192
  size: "small",
10193
10193
  margin: "0 xx-small xx-small 0",
10194
10194
  onClick: (L) => {
10195
10195
  L.stopPropagation(), L.preventDefault(), i(W);
10196
10196
  },
10197
- "aria-label": b(M.adminCourseSearchFilterRemove, { name: y }),
10197
+ "aria-label": b(M.adminCourseSearchFilterRemove, { name: N }),
10198
10198
  "data-testid": `admin-course-search-filter-tag-${W}`
10199
10199
  },
10200
10200
  W
10201
10201
  );
10202
10202
  }) }), q = (W) => {
10203
- W.key !== "Backspace" || u.length === 0 || (u[u.length - 1], o(u.slice(0, -1).map((N) => N.id)));
10204
- }, f = (W, N, y) => /* @__PURE__ */ n(
10203
+ W.key !== "Backspace" || u.length === 0 || (u[u.length - 1], o(u.slice(0, -1).map((y) => y.id)));
10204
+ }, f = (W, y, N) => /* @__PURE__ */ n(
10205
10205
  iz.Option,
10206
10206
  {
10207
10207
  id: W,
10208
10208
  isHighlighted: z === W,
10209
- isSelected: y,
10209
+ isSelected: N,
10210
10210
  renderAfterLabel: ({ isSelected: L }) => L ? /* @__PURE__ */ n(Ue, { color: "primary-inverse", size: "x-small" }) : null,
10211
- children: N
10211
+ children: y
10212
10212
  },
10213
10213
  W
10214
10214
  );
@@ -10222,9 +10222,9 @@ const On = "all", FM = [
10222
10222
  isShowingOptions: t,
10223
10223
  onRequestShowOptions: () => c(!0),
10224
10224
  onRequestHideOptions: s,
10225
- onRequestHighlightOption: (W, { id: N }) => p(N ?? null),
10226
- onRequestSelectOption: (W, { id: N }) => {
10227
- N && l(N);
10225
+ onRequestHighlightOption: (W, { id: y }) => p(y ?? null),
10226
+ onRequestSelectOption: (W, { id: y }) => {
10227
+ y && l(y);
10228
10228
  },
10229
10229
  onKeyDown: q,
10230
10230
  renderBeforeInput: d,
@@ -10567,9 +10567,9 @@ function Mu(e) {
10567
10567
  return b ?? !1;
10568
10568
  }
10569
10569
  function bu(e) {
10570
- var C, k, x;
10571
- const { translations: o } = Q(), M = or(), [b, t] = I(), [c, z] = I(""), [p, r] = I(""), [a, O] = I(!1), [i, s] = I({ filterKey: "", page: 1 }), l = b ?? M.defaultAccountId, u = p.trim(), d = fc(u, Mc), q = Wc(d), f = q !== "" || c !== "", W = JSON.stringify([l, c, q, a]), N = i.filterKey === W ? i.page : 1, y = Zl(l), L = Mu(l), h = eu(
10572
- { accountId: l, searchTerm: q, roleId: c, includeDeletedUsers: a, page: N },
10570
+ var C, x, k;
10571
+ const { translations: o } = Q(), M = or(), [b, t] = I(), [c, z] = I(""), [p, r] = I(""), [a, O] = I(!1), [i, s] = I({ filterKey: "", page: 1 }), l = b ?? M.defaultAccountId, u = p.trim(), d = fc(u, Mc), q = Wc(d), f = q !== "" || c !== "", W = JSON.stringify([l, c, q, a]), y = i.filterKey === W ? i.page : 1, N = Zl(l), L = Mu(l), h = eu(
10572
+ { accountId: l, searchTerm: q, roleId: c, includeDeletedUsers: a, page: y },
10573
10573
  { enabled: f }
10574
10574
  ), g = Tb(
10575
10575
  (D) => s({ filterKey: W, page: D }),
@@ -10612,11 +10612,11 @@ function bu(e) {
10612
10612
  {
10613
10613
  renderLabel: o.adminPeopleSearchRoleLabel,
10614
10614
  value: c,
10615
- interaction: y.isSuccess ? "enabled" : "disabled",
10615
+ interaction: N.isSuccess ? "enabled" : "disabled",
10616
10616
  onChange: (D, { value: H }) => z(String(H)),
10617
10617
  children: [
10618
10618
  /* @__PURE__ */ n(p2.Option, { id: `${e.widget.id}-all-roles`, value: "", children: o.allRoles }),
10619
- (C = y.data) == null ? void 0 : C.map((D) => /* @__PURE__ */ n(
10619
+ (C = N.data) == null ? void 0 : C.map((D) => /* @__PURE__ */ n(
10620
10620
  p2.Option,
10621
10621
  {
10622
10622
  id: `${e.widget.id}-role-${D.id}`,
@@ -10642,7 +10642,7 @@ function bu(e) {
10642
10642
  }
10643
10643
  ) })
10644
10644
  ] }),
10645
- y.isError && /* @__PURE__ */ n("div", { role: "alert", children: /* @__PURE__ */ n(uo, { color: "danger", children: o.adminPeopleSearchFailedToLoadRoles }) }),
10645
+ N.isError && /* @__PURE__ */ n("div", { role: "alert", children: /* @__PURE__ */ n(uo, { color: "danger", children: o.adminPeopleSearchFailedToLoadRoles }) }),
10646
10646
  L && /* @__PURE__ */ n(
10647
10647
  wO,
10648
10648
  {
@@ -10656,11 +10656,11 @@ function bu(e) {
10656
10656
  /* @__PURE__ */ n(
10657
10657
  Vl,
10658
10658
  {
10659
- users: ((k = h.data) == null ? void 0 : k.users) ?? [],
10659
+ users: ((x = h.data) == null ? void 0 : x.users) ?? [],
10660
10660
  hasCriteria: f,
10661
10661
  isSearching: h.isLoading || h.isPlaceholderData || u !== d,
10662
- page: N,
10663
- totalPages: ((x = h.data) == null ? void 0 : x.totalPages) ?? 1,
10662
+ page: y,
10663
+ totalPages: ((k = h.data) == null ? void 0 : k.totalPages) ?? 1,
10664
10664
  onPageChange: g
10665
10665
  }
10666
10666
  )
@@ -10796,7 +10796,7 @@ function pu(e = {}) {
10796
10796
  }, [e.filter]);
10797
10797
  const f = U(() => {
10798
10798
  t({}), z(null), M(0), l();
10799
- }, [l]), W = e.limit || 3, N = c != null ? Math.ceil(c / W) : 0, y = U((g) => {
10799
+ }, [l]), W = e.limit || 3, y = c != null ? Math.ceil(c / W) : 0, N = U((g) => {
10800
10800
  const B = g - 1;
10801
10801
  B >= 0 && M(B);
10802
10802
  }, []), L = U(() => {
@@ -10805,9 +10805,9 @@ function pu(e = {}) {
10805
10805
  return {
10806
10806
  currentPage: b[o] || O,
10807
10807
  currentPageIndex: o,
10808
- totalPages: N,
10808
+ totalPages: y,
10809
10809
  totalCount: c,
10810
- goToPage: y,
10810
+ goToPage: N,
10811
10811
  resetPagination: L,
10812
10812
  refetch: f,
10813
10813
  isLoading: d,
@@ -11029,7 +11029,7 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11029
11029
  filter: o,
11030
11030
  readOnly: M = !1
11031
11031
  }) => {
11032
- var N, y, L, h;
11032
+ var y, N, L, h;
11033
11033
  const { translations: b, translate: t } = Q(), { notify: c, locale: z, timezone: p } = R0(), { isDark: r } = S0(), a = lu(), [O, i] = I(e), [s, l] = I(!1), u = a2(), d = async () => {
11034
11034
  l(!0);
11035
11035
  try {
@@ -11067,7 +11067,7 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11067
11067
  }
11068
11068
  g.forEach((B) => sessionStorage.removeItem(B));
11069
11069
  }, W = () => {
11070
- const g = O.isRead, B = s ? b.updating : g ? t("markAnnouncementAsUnread", { title: O.title }) : t("markAnnouncementAsRead", { title: O.title }), C = s ? `updating-${O.id}` : `${g ? "mark-unread" : "mark-read"}-${O.id}`, k = s ? /* @__PURE__ */ n(j1, { size: "x-small", renderTitle: b.updatingReadStatus }) : g ? /* @__PURE__ */ n(Ue, { color: "success", size: "x-small" }) : /* @__PURE__ */ n(ja, { color: "secondary", size: "x-small" });
11070
+ const g = O.isRead, B = s ? b.updating : g ? t("markAnnouncementAsUnread", { title: O.title }) : t("markAnnouncementAsRead", { title: O.title }), C = s ? `updating-${O.id}` : `${g ? "mark-unread" : "mark-read"}-${O.id}`, x = s ? /* @__PURE__ */ n(j1, { size: "x-small", renderTitle: b.updatingReadStatus }) : g ? /* @__PURE__ */ n(Ue, { color: "success", size: "x-small" }) : /* @__PURE__ */ n(ja, { color: "secondary", size: "x-small" });
11071
11071
  return /* @__PURE__ */ n(
11072
11072
  V2,
11073
11073
  {
@@ -11080,7 +11080,7 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11080
11080
  screenReaderLabel: B,
11081
11081
  "aria-pressed": s ? void 0 : g,
11082
11082
  "data-testid": C,
11083
- children: k
11083
+ children: x
11084
11084
  }
11085
11085
  );
11086
11086
  };
@@ -11101,8 +11101,8 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11101
11101
  /* @__PURE__ */ n(A.Item, { shouldShrink: !1, children: /* @__PURE__ */ n(
11102
11102
  fM,
11103
11103
  {
11104
- name: ((N = O.author) == null ? void 0 : N.name) || b.unknownAuthor,
11105
- src: (y = O.author) == null ? void 0 : y.avatarUrl,
11104
+ name: ((y = O.author) == null ? void 0 : y.name) || b.unknownAuthor,
11105
+ src: (N = O.author) == null ? void 0 : N.avatarUrl,
11106
11106
  size: "medium"
11107
11107
  }
11108
11108
  ) }),
@@ -11179,8 +11179,8 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11179
11179
  } = pu({
11180
11180
  limit: 3,
11181
11181
  filter: z
11182
- }), q = (y) => {
11183
- p(y);
11182
+ }), q = (N) => {
11183
+ p(N);
11184
11184
  }, f = V(() => ((r == null ? void 0 : r.announcements) || []).map((L) => {
11185
11185
  if (!L.course) return L;
11186
11186
  const h = L.course.id, g = t.find(
@@ -11198,7 +11198,7 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11198
11198
  {
11199
11199
  renderLabel: b.readFilter,
11200
11200
  value: z,
11201
- onChange: (y, { value: L }) => q(L),
11201
+ onChange: (N, { value: L }) => q(L),
11202
11202
  size: "small",
11203
11203
  width: "7rem",
11204
11204
  "data-testid": "announcement-filter-select",
@@ -11208,25 +11208,25 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11208
11208
  /* @__PURE__ */ n(E0.Option, { id: "all", value: "all", children: b.all })
11209
11209
  ]
11210
11210
  }
11211
- ), N = () => {
11211
+ ), y = () => {
11212
11212
  if (f.length === 0) {
11213
- const y = z === "unread" ? b.noUnreadAnnouncements : z === "read" ? b.noReadAnnouncements : b.noRecentAnnouncements;
11214
- return /* @__PURE__ */ n(X, { as: "div", margin: "large 0", children: /* @__PURE__ */ n(F, { color: "secondary", size: "medium", "data-testid": "no-announcements-message", children: y }) });
11213
+ const N = z === "unread" ? b.noUnreadAnnouncements : z === "read" ? b.noReadAnnouncements : b.noRecentAnnouncements;
11214
+ return /* @__PURE__ */ n(X, { as: "div", margin: "large 0", children: /* @__PURE__ */ n(F, { color: "secondary", size: "medium", "data-testid": "no-announcements-message", children: N }) });
11215
11215
  }
11216
- return /* @__PURE__ */ n(X, { as: "div", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: f.map((y) => /* @__PURE__ */ n(
11216
+ return /* @__PURE__ */ n(X, { as: "div", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: f.map((N) => /* @__PURE__ */ n(
11217
11217
  c1.Item,
11218
11218
  {
11219
11219
  margin: "0",
11220
11220
  children: /* @__PURE__ */ n(
11221
11221
  Wu,
11222
11222
  {
11223
- announcementItem: y,
11223
+ announcementItem: N,
11224
11224
  filter: z,
11225
11225
  readOnly: !!c
11226
11226
  }
11227
11227
  )
11228
11228
  },
11229
- `${y.id}-${y.isRead ? "read" : "unread"}`
11229
+ `${N.id}-${N.isRead ? "read" : "unread"}`
11230
11230
  )) }) });
11231
11231
  };
11232
11232
  return /* @__PURE__ */ n(
@@ -11251,7 +11251,7 @@ const fn = ({ children: e, maxLength: o = 80 }) => /* @__PURE__ */ n(F, { title:
11251
11251
  },
11252
11252
  children: /* @__PURE__ */ v(A, { direction: "column", gap: "small", children: [
11253
11253
  /* @__PURE__ */ n(A.Item, { overflowX: "visible", overflowY: "visible", children: W() }),
11254
- /* @__PURE__ */ n(A.Item, { overflowY: "visible", shouldGrow: !0, children: N() })
11254
+ /* @__PURE__ */ n(A.Item, { overflowY: "visible", shouldGrow: !0, children: y() })
11255
11255
  ] })
11256
11256
  }
11257
11257
  );
@@ -11443,18 +11443,18 @@ function i4({
11443
11443
  allowWhite: z = !1,
11444
11444
  hidePrompt: p = !1
11445
11445
  }) {
11446
- const { currentUserId: r, notify: a } = R0(), { translations: O, translate: i } = p4(), s = o || a4, [l, u] = I(!1), [d, q] = I(s), [f, W] = I(rt(t)), [N, y] = I(!1), [L, h] = I({ top: 0, left: 0 }), g = e0(null), B = V(
11446
+ const { currentUserId: r, notify: a } = R0(), { translations: O, translate: i } = p4(), s = o || a4, [l, u] = I(!1), [d, q] = I(s), [f, W] = I(rt(t)), [y, N] = I(!1), [L, h] = I({ top: 0, left: 0 }), g = e0(null), B = V(
11447
11447
  () => c ?? yu(O),
11448
11448
  [c, O]
11449
- ), C = mn(d, z), k = () => u(!1);
11449
+ ), C = mn(d, z), x = () => u(!1);
11450
11450
  r0(() => {
11451
11451
  if (!l) return;
11452
- const S = () => k(), _ = requestAnimationFrame(() => window.addEventListener("scroll", S, !0));
11452
+ const S = () => x(), _ = requestAnimationFrame(() => window.addEventListener("scroll", S, !0));
11453
11453
  return () => {
11454
11454
  cancelAnimationFrame(_), window.removeEventListener("scroll", S, !0);
11455
11455
  };
11456
11456
  }, [l]);
11457
- const x = () => {
11457
+ const k = () => {
11458
11458
  var S;
11459
11459
  const _ = (S = g.current) == null ? void 0 : S.getBoundingClientRect();
11460
11460
  if (_) {
@@ -11466,7 +11466,7 @@ function i4({
11466
11466
  }
11467
11467
  q(s), W(rt(t)), u(!0);
11468
11468
  }, D = () => {
11469
- q(s), k();
11469
+ q(s), x();
11470
11470
  }, H = async () => {
11471
11471
  var S;
11472
11472
  if (!mn(d, z)) {
@@ -11478,10 +11478,10 @@ function i4({
11478
11478
  }
11479
11479
  const _ = d.replace("#", "").toLowerCase() !== s.replace("#", "").toLowerCase(), Z = !!t && f !== rt(t);
11480
11480
  if (!_ && !Z) {
11481
- k();
11481
+ x();
11482
11482
  return;
11483
11483
  }
11484
- y(!0);
11484
+ N(!0);
11485
11485
  try {
11486
11486
  if (_ && (await gu(r, e, d), M(d)), Z && t) {
11487
11487
  const s0 = await Lu(e, f);
@@ -11490,14 +11490,14 @@ function i4({
11490
11490
  a({
11491
11491
  type: "success",
11492
11492
  message: _ && !Z ? O.colorSaved : O.changesSaved
11493
- }), k();
11493
+ }), x();
11494
11494
  } catch {
11495
11495
  a({
11496
11496
  type: "error",
11497
11497
  message: i(O.couldNotSave, { chosenColor: d })
11498
11498
  });
11499
11499
  } finally {
11500
- y(!1);
11500
+ N(!1);
11501
11501
  }
11502
11502
  }, P = (() => {
11503
11503
  const S = C ? d : "#FFFFFF";
@@ -11507,7 +11507,7 @@ function i4({
11507
11507
  /* @__PURE__ */ n("span", { ref: g, style: { display: "inline-block" }, children: /* @__PURE__ */ n(
11508
11508
  V2,
11509
11509
  {
11510
- onClick: x,
11510
+ onClick: k,
11511
11511
  screenReaderLabel: i(O.chooseColorFor, {
11512
11512
  courseName: b ?? ""
11513
11513
  }),
@@ -11622,14 +11622,14 @@ function i4({
11622
11622
  ) })
11623
11623
  ] }),
11624
11624
  /* @__PURE__ */ v(A, { justifyItems: "end", gap: "x-small", margin: "small 0 0 0", children: [
11625
- /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(G0, { size: "small", onClick: D, "data-testid": "color-picker-cancel", children: O.cancel }) }),
11625
+ /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(j0, { size: "small", onClick: D, "data-testid": "color-picker-cancel", children: O.cancel }) }),
11626
11626
  /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(
11627
- G0,
11627
+ j0,
11628
11628
  {
11629
11629
  color: "primary",
11630
11630
  size: "small",
11631
11631
  onClick: H,
11632
- interaction: N || !C ? "disabled" : "enabled",
11632
+ interaction: y || !C ? "disabled" : "enabled",
11633
11633
  "data-testid": "color-picker-apply",
11634
11634
  children: O.apply
11635
11635
  }
@@ -11881,8 +11881,8 @@ Y0.div = function(e) {
11881
11881
  throw Error(nr);
11882
11882
  if (!b[0])
11883
11883
  return e.s = c, e.c = [e.e = 0], e;
11884
- var p, r, a, O, i, s = t.slice(), l = p = t.length, u = b.length, d = b.slice(0, p), q = d.length, f = e, W = f.c = [], N = 0, y = z + (f.e = o.e - e.e) + 1;
11885
- for (f.s = c, c = y < 0 ? 0 : y, s.unshift(0); q++ < p; ) d.push(0);
11884
+ var p, r, a, O, i, s = t.slice(), l = p = t.length, u = b.length, d = b.slice(0, p), q = d.length, f = e, W = f.c = [], y = 0, N = z + (f.e = o.e - e.e) + 1;
11885
+ for (f.s = c, c = N < 0 ? 0 : N, s.unshift(0); q++ < p; ) d.push(0);
11886
11886
  do {
11887
11887
  for (a = 0; a < 10; a++) {
11888
11888
  if (p != (q = d.length))
@@ -11905,9 +11905,9 @@ Y0.div = function(e) {
11905
11905
  } else
11906
11906
  break;
11907
11907
  }
11908
- W[N++] = O ? a : ++a, d[0] && O ? d[q] = b[l] || 0 : d = [b[l]];
11908
+ W[y++] = O ? a : ++a, d[0] && O ? d[q] = b[l] || 0 : d = [b[l]];
11909
11909
  } while ((l++ < u || d[0] !== H2) && c--);
11910
- return !W[0] && N != 1 && (W.shift(), f.e--, y--), N > y && Ze(f, y, M.RM, d[0] !== H2), f;
11910
+ return !W[0] && y != 1 && (W.shift(), f.e--, N--), y > N && Ze(f, N, M.RM, d[0] !== H2), f;
11911
11911
  };
11912
11912
  Y0.eq = function(e) {
11913
11913
  return this.cmp(e) === 0;
@@ -12270,13 +12270,13 @@ const Mq = (e) => {
12270
12270
  term: s,
12271
12271
  image: l
12272
12272
  }) => {
12273
- const { translations: u, translate: d } = Q(), { locale: q, timezone: f } = R0(), { updateCourseColor: W, updateCourseNickname: N } = S0(), y = a, L = i ?? tq, h = Mq(L), g = h === "#FFFFFF", B = () => {
12274
- O == null || O(!y);
12273
+ const { translations: u, translate: d } = Q(), { locale: q, timezone: f } = R0(), { updateCourseColor: W, updateCourseNickname: y } = S0(), N = a, L = i ?? tq, h = Mq(L), g = h === "#FFFFFF", B = () => {
12274
+ O == null || O(!N);
12275
12275
  }, C = (S) => {
12276
12276
  W(e, S.startsWith("#") ? S : `#${S}`);
12277
- }, k = (S) => {
12278
- N(e, S);
12279
- }, x = t != null, D = () => y ? t == null ? u.na : c === "percentage" ? `${Math.floor(t)}%` : Array.isArray(c) ? lr(
12277
+ }, x = (S) => {
12278
+ y(e, S);
12279
+ }, k = t != null, D = () => N ? t == null ? u.na : c === "percentage" ? `${Math.floor(t)}%` : Array.isArray(c) ? lr(
12280
12280
  t,
12281
12281
  c,
12282
12282
  z,
@@ -12301,11 +12301,11 @@ const Mq = (e) => {
12301
12301
  themeOverride: { primaryInverseColor: h },
12302
12302
  color: "primary-inverse",
12303
12303
  "data-testid": `course-${e}-grade`,
12304
- "aria-hidden": !y || void 0,
12304
+ "aria-hidden": !N || void 0,
12305
12305
  children: D()
12306
12306
  }
12307
12307
  ),
12308
- !y && /* @__PURE__ */ n(e2, { children: d("Grade hidden for %{courseName}", { courseName: M }) }),
12308
+ !N && /* @__PURE__ */ n(e2, { children: d("Grade hidden for %{courseName}", { courseName: M }) }),
12309
12309
  /* @__PURE__ */ n(
12310
12310
  V2,
12311
12311
  {
@@ -12313,10 +12313,10 @@ const Mq = (e) => {
12313
12313
  withBackground: !1,
12314
12314
  withBorder: !1,
12315
12315
  color: g ? "primary-inverse" : "secondary",
12316
- screenReaderLabel: y ? d("Hide grade for %{courseName}", { courseName: M }) : d("Show grade for %{courseName}", { courseName: M }),
12316
+ screenReaderLabel: N ? d("Hide grade for %{courseName}", { courseName: M }) : d("Show grade for %{courseName}", { courseName: M }),
12317
12317
  onClick: B,
12318
- "data-testid": y ? `hide-single-grade-button-${e}` : `show-single-grade-button-${e}`,
12319
- children: y ? /* @__PURE__ */ n(Va, {}) : /* @__PURE__ */ n(Qa, {})
12318
+ "data-testid": N ? `hide-single-grade-button-${e}` : `show-single-grade-button-${e}`,
12319
+ children: N ? /* @__PURE__ */ n(Va, {}) : /* @__PURE__ */ n(Qa, {})
12320
12320
  }
12321
12321
  )
12322
12322
  ]
@@ -12331,7 +12331,7 @@ const Mq = (e) => {
12331
12331
  nicknameInfo: {
12332
12332
  nickname: M,
12333
12333
  originalName: b ?? M,
12334
- onNicknameChange: k
12334
+ onNicknameChange: x
12335
12335
  }
12336
12336
  }
12337
12337
  ) }), T = l ? /* @__PURE__ */ v(
@@ -12425,7 +12425,7 @@ const Mq = (e) => {
12425
12425
  children: s
12426
12426
  }
12427
12427
  ) }),
12428
- x && r && /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
12428
+ k && r && /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(
12429
12429
  F,
12430
12430
  {
12431
12431
  size: "small",
@@ -12496,12 +12496,12 @@ const Mq = (e) => {
12496
12496
  totalPages: l
12497
12497
  } = cr({
12498
12498
  limit: ap.MAX_GRID_ITEMS
12499
- }), u = a, d = (W, N) => {
12500
- if (N === c) {
12501
- const { [W]: y, ...L } = p;
12499
+ }), u = a, d = (W, y) => {
12500
+ if (y === c) {
12501
+ const { [W]: N, ...L } = p;
12502
12502
  r(L);
12503
12503
  } else
12504
- r({ ...p, [W]: N });
12504
+ r({ ...p, [W]: y });
12505
12505
  }, q = () => {
12506
12506
  z(!c);
12507
12507
  }, f = {
@@ -12558,7 +12558,7 @@ const Mq = (e) => {
12558
12558
  scalingFactor: W.scalingFactor,
12559
12559
  lastUpdated: W.lastUpdated,
12560
12560
  globalGradeVisibility: p[W.courseId] ?? c,
12561
- onGradeVisibilityChange: (N) => d(W.courseId, N),
12561
+ onGradeVisibilityChange: (y) => d(W.courseId, y),
12562
12562
  courseColor: W.courseColor,
12563
12563
  term: W.term,
12564
12564
  image: W.image
@@ -12685,10 +12685,10 @@ async function rq(e, o, M, b) {
12685
12685
  async function aq(e, o, M, b, t, c, z) {
12686
12686
  const { courseFilter: p, startDate: r, endDate: a, includeOverdue: O, includeNoDueDate: i, onlySubmitted: s } = c, l = await Promise.allSettled(
12687
12687
  b.map(async (W) => {
12688
- const N = t(W);
12689
- return N ? (await rq(
12690
- N.executeQuery,
12691
- N.currentUserId,
12688
+ const y = t(W);
12689
+ return y ? (await rq(
12690
+ y.executeQuery,
12691
+ y.currentUserId,
12692
12692
  M,
12693
12693
  {
12694
12694
  courseFilter: p,
@@ -12699,16 +12699,16 @@ async function aq(e, o, M, b, t, c, z) {
12699
12699
  onlySubmitted: s,
12700
12700
  observedUserId: z
12701
12701
  }
12702
- )).map((L) => ({ ...L, accountName: N.name })) : [];
12702
+ )).map((L) => ({ ...L, accountName: y.name })) : [];
12703
12703
  })
12704
12704
  ), u = l.filter(
12705
12705
  (W) => W.status === "fulfilled"
12706
12706
  );
12707
12707
  if (u.length < l.length) {
12708
- const W = l.find((N) => N.status === "rejected");
12708
+ const W = l.find((y) => y.status === "rejected");
12709
12709
  throw (W == null ? void 0 : W.reason) ?? new Error("One or more accounts failed to load");
12710
12710
  }
12711
- const d = u.flatMap((W) => W.value).sort((W, N) => !W.dueAt && !N.dueAt ? 0 : W.dueAt ? N.dueAt ? new Date(W.dueAt).getTime() - new Date(N.dueAt).getTime() : -1 : 1), q = e * o, f = q + o;
12711
+ const d = u.flatMap((W) => W.value).sort((W, y) => !W.dueAt && !y.dueAt ? 0 : W.dueAt ? y.dueAt ? new Date(W.dueAt).getTime() - new Date(y.dueAt).getTime() : -1 : 1), q = e * o, f = q + o;
12712
12712
  return {
12713
12713
  items: d.slice(q, f),
12714
12714
  pageInfo: {
@@ -12721,7 +12721,7 @@ async function aq(e, o, M, b, t, c, z) {
12721
12721
  };
12722
12722
  }
12723
12723
  async function Oq(e, o = {}, M, b, t, c, z) {
12724
- var y;
12724
+ var N;
12725
12725
  const {
12726
12726
  pageSize: p = 4,
12727
12727
  courseFilter: r,
@@ -12758,7 +12758,7 @@ async function Oq(e, o = {}, M, b, t, c, z) {
12758
12758
  throw new Error(
12759
12759
  `GraphQL query failed: ${q.errors.map((L) => L.message).join(", ")}`
12760
12760
  );
12761
- if (!((y = q == null ? void 0 : q.legacyNode) != null && y.courseWorkSubmissionsConnection))
12761
+ if (!((N = q == null ? void 0 : q.legacyNode) != null && N.courseWorkSubmissionsConnection))
12762
12762
  return {
12763
12763
  items: [],
12764
12764
  pageInfo: {
@@ -12856,10 +12856,10 @@ function hc(e = {}) {
12856
12856
  refetchOnMount: !1,
12857
12857
  retry: !1,
12858
12858
  placeholderData: Q2
12859
- }), f = (s == null ? void 0 : s.pageInfo.totalCount) ?? null, W = f != null ? Math.ceil(f / p) : 0, N = U((k) => {
12860
- const x = k - 1;
12861
- x >= 0 && O(x);
12862
- }, []), y = U(() => {
12859
+ }), f = (s == null ? void 0 : s.pageInfo.totalCount) ?? null, W = f != null ? Math.ceil(f / p) : 0, y = U((x) => {
12860
+ const k = x - 1;
12861
+ k >= 0 && O(k);
12862
+ }, []), N = U(() => {
12863
12863
  O(0);
12864
12864
  }, []), L = U(async () => (await z.invalidateQueries({
12865
12865
  queryKey: [Az]
@@ -12869,8 +12869,8 @@ function hc(e = {}) {
12869
12869
  currentPageIndex: a,
12870
12870
  totalPages: W,
12871
12871
  totalCount: f,
12872
- goToPage: N,
12873
- resetPagination: y,
12872
+ goToPage: y,
12873
+ resetPagination: N,
12874
12874
  refetch: L,
12875
12875
  isLoading: l,
12876
12876
  isPaginationLoading: u && !!s,
@@ -13253,7 +13253,7 @@ const Lr = ({
13253
13253
  e.id,
13254
13254
  "showSummaryCounts",
13255
13255
  !0,
13256
- (l0) => typeof l0 == "boolean"
13256
+ (d0) => typeof d0 == "boolean"
13257
13257
  ), u = r === "all" ? void 0 : r, d = V(
13258
13258
  () => fr(O),
13259
13259
  [O]
@@ -13262,8 +13262,8 @@ const Lr = ({
13262
13262
  [p]
13263
13263
  ), f = Z2.COURSE_WORK_COMBINED, {
13264
13264
  currentPage: W,
13265
- currentPageIndex: N,
13266
- totalPages: y,
13265
+ currentPageIndex: y,
13266
+ totalPages: N,
13267
13267
  goToPage: L,
13268
13268
  refetch: h,
13269
13269
  isLoading: g,
@@ -13274,29 +13274,29 @@ const Lr = ({
13274
13274
  courseFilter: u,
13275
13275
  ...d
13276
13276
  }), {
13277
- data: k,
13278
- isLoading: x,
13277
+ data: x,
13278
+ isLoading: k,
13279
13279
  error: D
13280
13280
  } = uc({
13281
13281
  startDate: q.startDate,
13282
13282
  endDate: q.endDate,
13283
13283
  courseId: u,
13284
13284
  enabled: s
13285
- }), H = (W == null ? void 0 : W.items) ?? [], P = o || g || x, T = M || (C ? C.message : null) || (D == null ? void 0 : D.message) || null, S = U(() => {
13285
+ }), H = (W == null ? void 0 : W.items) ?? [], P = o || g || k, T = M || (C ? C.message : null) || (D == null ? void 0 : D.message) || null, S = U(() => {
13286
13286
  b ? b() : h();
13287
13287
  }, [b, h]), _ = U(
13288
- (l0, u0) => {
13288
+ (d0, u0) => {
13289
13289
  u0.value && typeof u0.value == "string" && a(u0.value);
13290
13290
  },
13291
13291
  [a]
13292
13292
  ), Z = U(
13293
- (l0, u0) => {
13293
+ (d0, u0) => {
13294
13294
  u0.value && typeof u0.value == "string" && i(u0.value);
13295
13295
  },
13296
13296
  [i]
13297
13297
  ), s0 = U(
13298
- (l0) => {
13299
- l(l0.target.checked);
13298
+ (d0) => {
13299
+ l(d0.target.checked);
13300
13300
  },
13301
13301
  [l]
13302
13302
  );
@@ -13310,8 +13310,8 @@ const Lr = ({
13310
13310
  isEditMode: t,
13311
13311
  dragHandleProps: c,
13312
13312
  pagination: {
13313
- currentPage: N + 1,
13314
- totalPages: y,
13313
+ currentPage: y + 1,
13314
+ totalPages: N,
13315
13315
  onPageChange: L,
13316
13316
  ariaLabel: z.courseWorkPagination
13317
13317
  },
@@ -13339,8 +13339,8 @@ const Lr = ({
13339
13339
  onDateFilterChange: Z
13340
13340
  }
13341
13341
  ) }),
13342
- s && k && /* @__PURE__ */ n(A.Item, { overflowY: "hidden", children: /* @__PURE__ */ n(Lr, { summary: k, margin: "small 0" }) }),
13343
- /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: H.length === 0 ? /* @__PURE__ */ n(A, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-course-work-message", children: r === "all" ? z.noUpcomingCourseWork : z.noUpcomingCourseWorkForSelectedCourse }) }) : /* @__PURE__ */ n(X, { height: "100%", children: /* @__PURE__ */ n(A, { direction: "column", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: H.map((l0) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ n(gr, { item: l0 }) }, l0.id)) }) }) }) })
13342
+ s && x && /* @__PURE__ */ n(A.Item, { overflowY: "hidden", children: /* @__PURE__ */ n(Lr, { summary: x, margin: "small 0" }) }),
13343
+ /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: H.length === 0 ? /* @__PURE__ */ n(A, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-course-work-message", children: r === "all" ? z.noUpcomingCourseWork : z.noUpcomingCourseWorkForSelectedCourse }) }) : /* @__PURE__ */ n(X, { height: "100%", children: /* @__PURE__ */ n(A, { direction: "column", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: H.map((d0) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ n(gr, { item: d0 }) }, d0.id)) }) }) }) })
13344
13344
  ] })
13345
13345
  }
13346
13346
  );
@@ -13419,18 +13419,18 @@ const Lr = ({
13419
13419
  goToPage: q,
13420
13420
  refetch: f,
13421
13421
  isLoading: W,
13422
- isPaginationLoading: N,
13423
- error: y
13422
+ isPaginationLoading: y,
13423
+ error: N
13424
13424
  } = hc({
13425
13425
  pageSize: s,
13426
13426
  courseFilter: O,
13427
13427
  ...i
13428
- }), L = (l == null ? void 0 : l.items) || [], h = M || W, g = b || (y == null ? void 0 : y.message) || null, B = t || (() => f()), C = L, k = U(
13428
+ }), L = (l == null ? void 0 : l.items) || [], h = M || W, g = b || (N == null ? void 0 : N.message) || null, B = t || (() => f()), C = L, x = U(
13429
13429
  (D, H) => {
13430
13430
  H.value && typeof H.value == "string" && p(H.value);
13431
13431
  },
13432
13432
  [p]
13433
- ), x = U(
13433
+ ), k = U(
13434
13434
  (D, H) => {
13435
13435
  H.value && typeof H.value == "string" && a(H.value);
13436
13436
  },
@@ -13451,7 +13451,7 @@ const Lr = ({
13451
13451
  ariaLabel: c.courseWorkPagination
13452
13452
  },
13453
13453
  loadingOverlay: {
13454
- isLoading: N,
13454
+ isLoading: y,
13455
13455
  ariaLabel: c.loadingCourseWork
13456
13456
  },
13457
13457
  children: /* @__PURE__ */ v(A, { direction: "column", gap: "small", height: "100%", children: [
@@ -13460,8 +13460,8 @@ const Lr = ({
13460
13460
  {
13461
13461
  selectedCourse: z,
13462
13462
  selectedDateFilter: r,
13463
- onCourseChange: k,
13464
- onDateFilterChange: x
13463
+ onCourseChange: x,
13464
+ onDateFilterChange: k
13465
13465
  }
13466
13466
  ) }),
13467
13467
  /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: C.length === 0 ? /* @__PURE__ */ n(A, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ n(F, { color: "secondary", children: z === "all" ? c.noUpcomingCourseWork : c.noUpcomingCourseWorkForSelectedCourse }) }) : /* @__PURE__ */ n(X, { height: "100%", children: /* @__PURE__ */ n(A, { direction: "column", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: C.map((D) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ n(gr, { item: D }) }, D.id)) }) }) }) })
@@ -13596,8 +13596,8 @@ function Nq(e = {}) {
13596
13596
  d
13597
13597
  ], {
13598
13598
  data: W,
13599
- isLoading: N,
13600
- error: y,
13599
+ isLoading: y,
13600
+ error: N,
13601
13601
  refetch: L
13602
13602
  } = r1({
13603
13603
  queryKey: f,
@@ -13612,12 +13612,12 @@ function Nq(e = {}) {
13612
13612
  persister: Ae,
13613
13613
  refetchOnMount: !1,
13614
13614
  retry: !1
13615
- }), h = (W == null ? void 0 : W.pageInfo.totalCount) ?? null, g = h != null ? Math.ceil(h / q) : 0, B = U((x) => {
13616
- const D = x - 1;
13615
+ }), h = (W == null ? void 0 : W.pageInfo.totalCount) ?? null, g = h != null ? Math.ceil(h / q) : 0, B = U((k) => {
13616
+ const D = k - 1;
13617
13617
  D >= 0 && z(D);
13618
13618
  }, []), C = U(() => {
13619
13619
  z(0);
13620
- }, []), k = U(async () => (await t.invalidateQueries({
13620
+ }, []), x = U(async () => (await t.invalidateQueries({
13621
13621
  queryKey: [uz]
13622
13622
  }), L()), [t, L]);
13623
13623
  return {
@@ -13627,9 +13627,9 @@ function Nq(e = {}) {
13627
13627
  totalCount: h,
13628
13628
  goToPage: B,
13629
13629
  resetPagination: C,
13630
- refetch: k,
13631
- isLoading: N,
13632
- error: y,
13630
+ refetch: x,
13631
+ isLoading: y,
13632
+ error: N,
13633
13633
  pageSize: q
13634
13634
  };
13635
13635
  }
@@ -13659,34 +13659,34 @@ function yq({
13659
13659
  } = Nq({
13660
13660
  limit: Z2.PEOPLE,
13661
13661
  accountId: r.length > 1 ? O : void 0
13662
- }), N = (s == null ? void 0 : s.data) ?? [], y = !b && !W && (M || f), L = U(
13662
+ }), y = (s == null ? void 0 : s.data) ?? [], N = !b && !W && (M || f), L = U(
13663
13663
  (g) => {
13664
- var x, D;
13665
- const B = r.length > 1 ? (x = a(O)) == null ? void 0 : x.canvasBaseUrl : (D = r[0]) == null ? void 0 : D.canvasBaseUrl;
13664
+ var k, D;
13665
+ const B = r.length > 1 ? (k = a(O)) == null ? void 0 : k.canvasBaseUrl : (D = r[0]) == null ? void 0 : D.canvasBaseUrl;
13666
13666
  if (!B) return;
13667
- const C = g.enrollments[0].user_id, k = new URLSearchParams({
13667
+ const C = g.enrollments[0].user_id, x = new URLSearchParams({
13668
13668
  user_id: C,
13669
13669
  user_name: g.name,
13670
13670
  compose: "true"
13671
13671
  });
13672
13672
  if (g.enrollments.length === 1) {
13673
13673
  const H = g.enrollments[0].course_id;
13674
- H && k.set("context_id", `course_${H}`);
13674
+ H && x.set("context_id", `course_${H}`);
13675
13675
  }
13676
- return `${B}/conversations?${k.toString()}`;
13676
+ return `${B}/conversations?${x.toString()}`;
13677
13677
  },
13678
13678
  [r, a, O]
13679
13679
  );
13680
13680
  return W && !b ? /* @__PURE__ */ n(f1, { widget: e, isEditMode: o, dragHandleProps: c, children: /* @__PURE__ */ n(X, { as: "div", padding: "small", children: /* @__PURE__ */ n(qe, { variant: "error", margin: "0", children: /* @__PURE__ */ v(X, { as: "div", children: [
13681
13681
  z.failedToLoadDirectory,
13682
- /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(G0, { size: "small", onClick: () => q(), "data-testid": "directory-refresh", children: z.refresh }) })
13682
+ /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(j0, { size: "small", onClick: () => q(), "data-testid": "directory-refresh", children: z.refresh }) })
13683
13683
  ] }) }) }) }) : /* @__PURE__ */ n(
13684
13684
  f1,
13685
13685
  {
13686
13686
  widget: e,
13687
13687
  isEditMode: o,
13688
13688
  dragHandleProps: c,
13689
- isLoading: y,
13689
+ isLoading: N,
13690
13690
  error: b,
13691
13691
  onRetry: t,
13692
13692
  loadingText: z.loadingPeopleData,
@@ -13707,7 +13707,7 @@ function yq({
13707
13707
  children: r.map((g) => /* @__PURE__ */ n(E0.Option, { id: g.id, value: g.id, children: g.name }, g.id))
13708
13708
  }
13709
13709
  ) }),
13710
- /* @__PURE__ */ n(A.Item, { shouldGrow: !0, overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(X, { as: "div", children: N.length === 0 ? /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-instructors-message", children: z.noInstructorsFound }) : /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: N.map((g) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ v(
13710
+ /* @__PURE__ */ n(A.Item, { shouldGrow: !0, overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(X, { as: "div", children: y.length === 0 ? /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-instructors-message", children: z.noInstructorsFound }) : /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: y.map((g) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ v(
13711
13711
  A,
13712
13712
  {
13713
13713
  gap: "small",
@@ -13829,7 +13829,7 @@ function Nr(e = "", { enabled: o = !0 } = {}) {
13829
13829
  enabled: o && !!b,
13830
13830
  retry: !1,
13831
13831
  queryFn: async ({ pageParam: d }) => {
13832
- var y, L;
13832
+ var N, L;
13833
13833
  const q = await M(
13834
13834
  Cq,
13835
13835
  {
@@ -13861,7 +13861,7 @@ function Nr(e = "", { enabled: o = !0 } = {}) {
13861
13861
  };
13862
13862
  }
13863
13863
  ),
13864
- hasNextPage: ((y = W == null ? void 0 : W.pageInfo) == null ? void 0 : y.hasNextPage) ?? !1,
13864
+ hasNextPage: ((N = W == null ? void 0 : W.pageInfo) == null ? void 0 : N.hasNextPage) ?? !1,
13865
13865
  endCursor: ((L = W == null ? void 0 : W.pageInfo) == null ? void 0 : L.endCursor) ?? null
13866
13866
  };
13867
13867
  },
@@ -14017,35 +14017,35 @@ function Pq({
14017
14017
  interaction: q = "enabled",
14018
14018
  messages: f,
14019
14019
  inputRef: W,
14020
- "data-testid": N
14020
+ "data-testid": y
14021
14021
  }) {
14022
- const { translations: y, translate: L, announceForScreenReader: h } = Q(), g = h ?? G2, B = a ?? y.searchMultiSelectLoading, C = l ?? O ?? y.searchMultiSelectNoResults, k = i ?? y.searchMultiSelectLoadMore, x = s ?? y.searchMultiSelectMaxSelectionsReached, D = l ?? O ?? y.noResultsAvailable, [H, P] = I(!1), [T, S] = I(null), [_, Z] = I(""), s0 = e0(void 0), l0 = e0(null), u0 = e0(!1), J = e0(null), X0 = qM(), [f0, W0] = I(null), z0 = U(
14023
- (d0) => {
14024
- J.current = d0, W0((d0 == null ? void 0 : d0.closest('[aria-modal="true"], [role="dialog"]')) ?? null), W == null || W(d0);
14022
+ const { translations: N, translate: L, announceForScreenReader: h } = Q(), g = h ?? G2, B = a ?? N.searchMultiSelectLoading, C = l ?? O ?? N.searchMultiSelectNoResults, x = i ?? N.searchMultiSelectLoadMore, k = s ?? N.searchMultiSelectMaxSelectionsReached, D = l ?? O ?? N.noResultsAvailable, [H, P] = I(!1), [T, S] = I(null), [_, Z] = I(""), s0 = e0(void 0), d0 = e0(null), u0 = e0(!1), J = e0(null), X0 = qM(), [f0, W0] = I(null), z0 = U(
14023
+ (A0) => {
14024
+ J.current = A0, W0((A0 == null ? void 0 : A0.closest('[aria-modal="true"], [role="dialog"]')) ?? null), W == null || W(A0);
14025
14025
  },
14026
14026
  [W]
14027
14027
  ), c0 = U(
14028
- (d0) => N === void 0 ? void 0 : `${N}-${d0}`,
14029
- [N]
14030
- ), O0 = e0(/* @__PURE__ */ new Set()), j0 = U((d0, L0) => {
14028
+ (A0) => y === void 0 ? void 0 : `${y}-${A0}`,
14029
+ [y]
14030
+ ), O0 = e0(/* @__PURE__ */ new Set()), U0 = U((A0, L0) => {
14031
14031
  const P1 = setTimeout(() => {
14032
- O0.current.delete(P1), d0();
14032
+ O0.current.delete(P1), A0();
14033
14033
  }, L0);
14034
14034
  O0.current.add(P1);
14035
14035
  }, []);
14036
14036
  r0(
14037
14037
  () => () => {
14038
- for (const d0 of O0.current) clearTimeout(d0);
14038
+ for (const A0 of O0.current) clearTimeout(A0);
14039
14039
  O0.current.clear();
14040
14040
  },
14041
14041
  []
14042
14042
  );
14043
14043
  const w0 = V(() => {
14044
- const d0 = new Set(c.map((L0) => L0.id));
14045
- return e.filter((L0) => !d0.has(L0.id));
14046
- }, [e, c]), U0 = d !== void 0 && c.length >= d ? d : null, j = U(
14047
- (d0) => L(x, { count: d0 }),
14048
- [L, x]
14044
+ const A0 = new Set(c.map((L0) => L0.id));
14045
+ return e.filter((L0) => !A0.has(L0.id));
14046
+ }, [e, c]), $0 = d !== void 0 && c.length >= d ? d : null, j = U(
14047
+ (A0) => L(k, { count: A0 }),
14048
+ [L, k]
14049
14049
  ), m = V(
14050
14050
  () => [
14051
14051
  ...l ? [{ type: "error", text: l }] : [],
@@ -14053,26 +14053,26 @@ function Pq({
14053
14053
  ],
14054
14054
  [l, f]
14055
14055
  ), w = U(() => {
14056
- P(!1), S(null), l0.current = null, u0.current = !1, Z(""), M("");
14056
+ P(!1), S(null), d0.current = null, u0.current = !1, Z(""), M("");
14057
14057
  }, [M]);
14058
14058
  r0(() => {
14059
14059
  if (!H || o) return;
14060
- const d0 = l0.current;
14061
- if (d0) {
14060
+ const A0 = d0.current;
14061
+ if (A0) {
14062
14062
  if (t) {
14063
- d0.wasInFlight = !0;
14063
+ A0.wasInFlight = !0;
14064
14064
  return;
14065
14065
  }
14066
14066
  const L0 = w0.find(
14067
- (P1) => !d0.knownIds.has(P1.id)
14067
+ (P1) => !A0.knownIds.has(P1.id)
14068
14068
  );
14069
- if (!L0 && !d0.wasInFlight) return;
14070
- if (l0.current = null, L0 && S(L0.id), u0.current) {
14069
+ if (!L0 && !A0.wasInFlight) return;
14070
+ if (d0.current = null, L0 && S(L0.id), u0.current) {
14071
14071
  u0.current = !1;
14072
14072
  return;
14073
14073
  }
14074
14074
  g(
14075
- w0.length === 0 ? D : L(y.resultsAvailable, { count: w0.length })
14075
+ w0.length === 0 ? D : L(N.resultsAvailable, { count: w0.length })
14076
14076
  );
14077
14077
  return;
14078
14078
  }
@@ -14083,7 +14083,7 @@ function Pq({
14083
14083
  return s0.current = setTimeout(() => {
14084
14084
  const L0 = w0.length;
14085
14085
  g(
14086
- L0 === 0 ? D : L(y.resultsAvailable, { count: L0 })
14086
+ L0 === 0 ? D : L(N.resultsAvailable, { count: L0 })
14087
14087
  );
14088
14088
  }, Dq), () => clearTimeout(s0.current);
14089
14089
  }, [
@@ -14094,44 +14094,44 @@ function Pq({
14094
14094
  g,
14095
14095
  L,
14096
14096
  D,
14097
- y.resultsAvailable
14097
+ N.resultsAvailable
14098
14098
  ]);
14099
14099
  const E = U(
14100
- (d0) => {
14101
- z(c.filter((L0) => L0.id !== d0.id));
14100
+ (A0) => {
14101
+ z(c.filter((L0) => L0.id !== A0.id));
14102
14102
  },
14103
14103
  [c, z]
14104
14104
  ), $ = U(
14105
- (d0, L0) => {
14105
+ (A0, L0) => {
14106
14106
  u0.current = H && !o;
14107
- const P1 = L(y.searchMultiSelectItemRemoved, { name: d0.label });
14107
+ const P1 = L(N.searchMultiSelectItemRemoved, { name: A0.label });
14108
14108
  if (L0 === 0) {
14109
14109
  g(P1);
14110
14110
  return;
14111
14111
  }
14112
- j0(() => g(P1), L0);
14112
+ U0(() => g(P1), L0);
14113
14113
  },
14114
14114
  [
14115
14115
  H,
14116
14116
  o,
14117
14117
  g,
14118
- j0,
14118
+ U0,
14119
14119
  L,
14120
- y.searchMultiSelectItemRemoved
14120
+ N.searchMultiSelectItemRemoved
14121
14121
  ]
14122
14122
  ), p0 = U(
14123
- (d0) => {
14124
- E(d0), j0(() => {
14123
+ (A0) => {
14124
+ E(A0), U0(() => {
14125
14125
  var L0;
14126
14126
  return (L0 = J.current) == null ? void 0 : L0.focus();
14127
- }, 0), $(d0, iM);
14127
+ }, 0), $(A0, iM);
14128
14128
  },
14129
- [E, j0, $]
14129
+ [E, U0, $]
14130
14130
  ), m0 = U(
14131
- (d0) => {
14132
- z([...c, d0]);
14133
- const L0 = L(y.searchMultiSelectItemSelected, {
14134
- name: d0.label
14131
+ (A0) => {
14132
+ z([...c, A0]);
14133
+ const L0 = L(N.searchMultiSelectItemSelected, {
14134
+ name: A0.label
14135
14135
  });
14136
14136
  if (d !== void 0 && c.length + 1 === d) {
14137
14137
  g(`${L0} ${j(d)}`);
@@ -14146,53 +14146,53 @@ function Pq({
14146
14146
  j,
14147
14147
  g,
14148
14148
  L,
14149
- y.searchMultiSelectItemSelected
14149
+ N.searchMultiSelectItemSelected
14150
14150
  ]
14151
14151
  ), B0 = U(
14152
- (d0) => {
14153
- if (q !== "enabled" || d0.key !== "Backspace" || _ !== "" || c.length === 0) return;
14152
+ (A0) => {
14153
+ if (q !== "enabled" || A0.key !== "Backspace" || _ !== "" || c.length === 0) return;
14154
14154
  S(null);
14155
14155
  const L0 = c[c.length - 1];
14156
14156
  E(L0), $(L0, 0);
14157
14157
  },
14158
14158
  [q, _, c, E, $]
14159
- ), N0 = V(() => c.length === 0 ? null : /* @__PURE__ */ n(X, { as: "div", display: "inline-block", padding: "xx-small", children: c.map((d0) => /* @__PURE__ */ n(
14159
+ ), N0 = V(() => c.length === 0 ? null : /* @__PURE__ */ n(X, { as: "div", display: "inline-block", padding: "xx-small", children: c.map((A0) => /* @__PURE__ */ n(
14160
14160
  gb,
14161
14161
  {
14162
- text: d0.label,
14162
+ text: A0.label,
14163
14163
  dismissible: !0,
14164
14164
  size: "small",
14165
14165
  margin: "0 xx-small xx-small 0",
14166
14166
  disabled: q === "disabled",
14167
14167
  readOnly: q === "readonly",
14168
14168
  onClick: (L0) => {
14169
- L0.stopPropagation(), L0.preventDefault(), p0(d0);
14169
+ L0.stopPropagation(), L0.preventDefault(), p0(A0);
14170
14170
  },
14171
- "aria-label": L(y.searchMultiSelectRemoveItem, { name: d0.label }),
14172
- "data-testid": c0(`tag-${d0.id}`)
14171
+ "aria-label": L(N.searchMultiSelectRemoveItem, { name: A0.label }),
14172
+ "data-testid": c0(`tag-${A0.id}`)
14173
14173
  },
14174
- d0.id
14174
+ A0.id
14175
14175
  )) }), [
14176
14176
  c,
14177
14177
  q,
14178
14178
  p0,
14179
14179
  c0,
14180
14180
  L,
14181
- y.searchMultiSelectRemoveItem
14182
- ]), I0 = (d0 = u2.loading, L0 = "option-loading") => /* @__PURE__ */ n(_1.Option, { id: d0, isDisabled: !0, "data-testid": c0(L0), children: /* @__PURE__ */ v(A, { alignItems: "center", gap: "x-small", children: [
14181
+ N.searchMultiSelectRemoveItem
14182
+ ]), I0 = (A0 = u2.loading, L0 = "option-loading") => /* @__PURE__ */ n(_1.Option, { id: A0, isDisabled: !0, "data-testid": c0(L0), children: /* @__PURE__ */ v(A, { alignItems: "center", gap: "x-small", children: [
14183
14183
  /* @__PURE__ */ n(j1, { size: "x-small", renderTitle: B }),
14184
14184
  /* @__PURE__ */ n(F, { size: "small", children: B })
14185
- ] }) }, d0), i2 = (d0) => /* @__PURE__ */ n(
14185
+ ] }) }, A0), i2 = (A0) => /* @__PURE__ */ n(
14186
14186
  _1.Option,
14187
14187
  {
14188
- id: d0.id,
14189
- isHighlighted: T === d0.id,
14190
- "aria-disabled": U0 !== null ? "true" : void 0,
14191
- children: d0.content ?? d0.label
14188
+ id: A0.id,
14189
+ isHighlighted: T === A0.id,
14190
+ "aria-disabled": $0 !== null ? "true" : void 0,
14191
+ children: A0.content ?? A0.label
14192
14192
  },
14193
- d0.id
14193
+ A0.id
14194
14194
  ), oe = () => o ? I0() : [
14195
- ...U0 !== null ? [
14195
+ ...$0 !== null ? [
14196
14196
  /* @__PURE__ */ n(
14197
14197
  _1.Option,
14198
14198
  {
@@ -14200,7 +14200,7 @@ function Pq({
14200
14200
  isHighlighted: T === u2.maxReached,
14201
14201
  "aria-disabled": "true",
14202
14202
  "data-testid": c0("option-max-reached"),
14203
- children: j(U0)
14203
+ children: j($0)
14204
14204
  },
14205
14205
  u2.maxReached
14206
14206
  )
@@ -14228,7 +14228,7 @@ function Pq({
14228
14228
  id: u2.loadMore,
14229
14229
  isHighlighted: T === u2.loadMore,
14230
14230
  "data-testid": c0("load-more"),
14231
- children: k
14231
+ children: x
14232
14232
  },
14233
14233
  u2.loadMore
14234
14234
  )
@@ -14240,7 +14240,7 @@ function Pq({
14240
14240
  renderLabel: /* @__PURE__ */ n("span", { id: X0, children: p }),
14241
14241
  "aria-labelledby": X0,
14242
14242
  isRequired: u,
14243
- assistiveText: y.typeToSearchArrowKeys,
14243
+ assistiveText: N.typeToSearchArrowKeys,
14244
14244
  inputValue: _,
14245
14245
  placeholder: c.length > 0 ? void 0 : r,
14246
14246
  isShowingOptions: H,
@@ -14248,30 +14248,30 @@ function Pq({
14248
14248
  onBlur: () => S(null),
14249
14249
  onRequestShowOptions: () => P(!0),
14250
14250
  onRequestHideOptions: w,
14251
- onRequestHighlightOption: (d0, { id: L0 }) => {
14251
+ onRequestHighlightOption: (A0, { id: L0 }) => {
14252
14252
  S(L0 ?? null);
14253
14253
  },
14254
- onRequestSelectOption: (d0, { id: L0 }) => {
14254
+ onRequestSelectOption: (A0, { id: L0 }) => {
14255
14255
  if (L0 === u2.loadMore) {
14256
- l0.current = {
14256
+ d0.current = {
14257
14257
  knownIds: new Set(e.map((S1) => S1.id)),
14258
14258
  wasInFlight: !1
14259
14259
  }, clearTimeout(s0.current), g(B), b == null || b();
14260
14260
  return;
14261
14261
  }
14262
14262
  if (!L0 || kq.has(L0)) return;
14263
- if (U0 !== null) {
14264
- g(j(U0));
14263
+ if ($0 !== null) {
14264
+ g(j($0));
14265
14265
  return;
14266
14266
  }
14267
14267
  const P1 = w0.find((S1) => S1.id === L0);
14268
- P1 && (m0(P1), w(), j0(() => {
14268
+ P1 && (m0(P1), w(), U0(() => {
14269
14269
  var S1, F1;
14270
14270
  (S1 = J.current) == null || S1.blur(), (F1 = J.current) == null || F1.focus();
14271
14271
  }, 0));
14272
14272
  },
14273
- onInputChange: (d0, L0) => {
14274
- l0.current = null, u0.current = !1, clearTimeout(s0.current), Z(L0), M(L0), P(!0);
14273
+ onInputChange: (A0, L0) => {
14274
+ d0.current = null, u0.current = !1, clearTimeout(s0.current), Z(L0), M(L0), P(!0);
14275
14275
  },
14276
14276
  onKeyDown: B0,
14277
14277
  renderBeforeInput: N0,
@@ -14279,7 +14279,7 @@ function Pq({
14279
14279
  interaction: q,
14280
14280
  optionsMaxHeight: xq,
14281
14281
  mountNode: f0 ?? void 0,
14282
- "data-testid": N,
14282
+ "data-testid": y,
14283
14283
  children: oe()
14284
14284
  }
14285
14285
  );
@@ -14319,7 +14319,7 @@ function yr({
14319
14319
  "data-testid": u
14320
14320
  }) {
14321
14321
  const { translations: d } = Q(), q = V(() => e.map(yn), [e]), f = V(() => z.map(yn), [z]), W = V(
14322
- () => new Map([...e, ...z].map((N) => [N.id, N])),
14322
+ () => new Map([...e, ...z].map((y) => [y.id, y])),
14323
14323
  [e, z]
14324
14324
  );
14325
14325
  return /* @__PURE__ */ n(
@@ -14331,9 +14331,9 @@ function yr({
14331
14331
  onLoadMore: b,
14332
14332
  isLoadingMore: t,
14333
14333
  selected: f,
14334
- onChange: (N) => p(
14335
- N.flatMap((y) => {
14336
- const L = W.get(y.id);
14334
+ onChange: (y) => p(
14335
+ y.flatMap((N) => {
14336
+ const L = W.get(N.id);
14337
14337
  return L ? [L] : [];
14338
14338
  })
14339
14339
  ),
@@ -14457,16 +14457,16 @@ const Kq = ({
14457
14457
  onSubmit: t,
14458
14458
  isCreating: c
14459
14459
  }) => {
14460
- const { translations: z } = Q(), { locale: p, timezone: r } = R0(), [a, O] = I(""), [i, s] = I(""), [l, u] = I(!1), d = vn({ defaultTime: Hq }), q = vn({ defaultTime: Gq }), [f, W] = I(!1), [N, y] = I(!1), [L, h] = I(!1), [g, B] = I(""), [C, k] = I(""), [x, D] = I(""), [H, P] = I(""), T = e0(null), S = e0(null), _ = e0(null);
14460
+ const { translations: z } = Q(), { locale: p, timezone: r } = R0(), [a, O] = I(""), [i, s] = I(""), [l, u] = I(!1), d = vn({ defaultTime: Hq }), q = vn({ defaultTime: Gq }), [f, W] = I(!1), [y, N] = I(!1), [L, h] = I(!1), [g, B] = I(""), [C, x] = I(""), [k, D] = I(""), [H, P] = I(""), T = e0(null), S = e0(null), _ = e0(null);
14461
14461
  r0(() => {
14462
14462
  if (e) {
14463
14463
  if (b) {
14464
14464
  O(b.title), s(b.message);
14465
14465
  const [j, m] = An(b.startDateTime), [w, E] = An(b.endDateTime);
14466
- d.initFrom(j, m, p, r), q.initFrom(w, E, p, r), W(b.allowComments), y(b.enablePodcast), h(b.allowLiking);
14466
+ d.initFrom(j, m, p, r), q.initFrom(w, E, p, r), W(b.allowComments), N(b.enablePodcast), h(b.allowLiking);
14467
14467
  }
14468
14468
  return u(!0), () => {
14469
- O(""), s(""), u(!1), d.reset(), q.reset(), W(!1), y(!1), h(!1), B(""), k(""), D(""), P("");
14469
+ O(""), s(""), u(!1), d.reset(), q.reset(), W(!1), N(!1), h(!1), B(""), x(""), D(""), P("");
14470
14470
  };
14471
14471
  }
14472
14472
  }, [
@@ -14482,9 +14482,9 @@ const Kq = ({
14482
14482
  const Z = (j, m) => {
14483
14483
  O(m), g && m.trim() && m.length <= Nt && B("");
14484
14484
  }, s0 = (j) => {
14485
- s(j), x && j.trim() && D("");
14486
- }, l0 = (j) => {
14487
- M(j), C && j.length > 0 && k("");
14485
+ s(j), k && j.trim() && D("");
14486
+ }, d0 = (j) => {
14487
+ M(j), C && j.length > 0 && x("");
14488
14488
  }, u0 = U(
14489
14489
  (j, m) => {
14490
14490
  q.onDateChange(j, m), H && P("");
@@ -14503,10 +14503,10 @@ const Kq = ({
14503
14503
  }),
14504
14504
  [q, u0, J]
14505
14505
  ), f0 = (j) => {
14506
- W(j.includes("allowComments")), y(j.includes("enablePodcast")), h(j.includes("allowLiking"));
14506
+ W(j.includes("allowComments")), N(j.includes("enablePodcast")), h(j.includes("allowLiking"));
14507
14507
  }, W0 = () => {
14508
14508
  let j = !1, m = null;
14509
- a.trim() ? a.length > Nt ? (B(z.announcementTitleMaxLength), j = !0, m = T) : B("") : (B(z.announcementTitleRequired), j = !0, m = T), Yq(i) ? (D(z.announcementContentRequired), j = !0, m || (m = _)) : new Blob([i]).size > jq ? (D(z.announcementContentTooLarge), j = !0, m || (m = _)) : D(""), o.length === 0 ? (k(z.announcementCoursesRequired), j = !0, m || (m = S)) : k(""), d.hasInvalidInput && (j = !0, m || (m = d.inputRef)), q.hasInvalidInput && (j = !0, m || (m = q.inputRef));
14509
+ a.trim() ? a.length > Nt ? (B(z.announcementTitleMaxLength), j = !0, m = T) : B("") : (B(z.announcementTitleRequired), j = !0, m = T), Yq(i) ? (D(z.announcementContentRequired), j = !0, m || (m = _)) : new Blob([i]).size > jq ? (D(z.announcementContentTooLarge), j = !0, m || (m = _)) : D(""), o.length === 0 ? (x(z.announcementCoursesRequired), j = !0, m || (m = S)) : x(""), d.hasInvalidInput && (j = !0, m || (m = d.inputRef)), q.hasInvalidInput && (j = !0, m || (m = q.inputRef));
14510
14510
  const w = ln(d.date, d.time), E = ln(q.date, q.time);
14511
14511
  if (w && E && new Date(E) < new Date(w) ? (P(z.announcementEndDateBeforeStart), j = !0, m || (m = q.inputRef)) : P(""), j) {
14512
14512
  queueMicrotask(() => {
@@ -14522,12 +14522,12 @@ const Kq = ({
14522
14522
  startDateTime: w,
14523
14523
  endDateTime: E,
14524
14524
  allowComments: f,
14525
- enablePodcast: N,
14525
+ enablePodcast: y,
14526
14526
  allowLiking: L
14527
14527
  });
14528
- }, z0 = c ? "disabled" : "enabled", c0 = g ? [{ type: "error", text: g }] : [], O0 = C ? [{ type: "error", text: C }] : [], j0 = x ? [{ type: "error", text: x }] : [], w0 = H ? [{ type: "error", text: H }] : [], U0 = [
14528
+ }, z0 = c ? "disabled" : "enabled", c0 = g ? [{ type: "error", text: g }] : [], O0 = C ? [{ type: "error", text: C }] : [], U0 = k ? [{ type: "error", text: k }] : [], w0 = H ? [{ type: "error", text: H }] : [], $0 = [
14529
14529
  f && "allowComments",
14530
- N && "enablePodcast",
14530
+ y && "enablePodcast",
14531
14531
  L && "allowLiking"
14532
14532
  ].filter((j) => !!j);
14533
14533
  return {
@@ -14538,17 +14538,17 @@ const Kq = ({
14538
14538
  startField: d,
14539
14539
  endField: X0,
14540
14540
  interaction: z0,
14541
- checkboxValue: U0,
14541
+ checkboxValue: $0,
14542
14542
  titleMessages: c0,
14543
14543
  courseMessages: O0,
14544
- contentMessages: j0,
14544
+ contentMessages: U0,
14545
14545
  endDateMessages: w0,
14546
14546
  titleRef: T,
14547
14547
  courseInputRef: S,
14548
14548
  messageRef: _,
14549
14549
  onTitleChange: Z,
14550
14550
  onMessageChange: s0,
14551
- onCourseChange: l0,
14551
+ onCourseChange: d0,
14552
14552
  onCheckboxGroupChange: f0,
14553
14553
  handleSubmit: W0
14554
14554
  };
@@ -14659,8 +14659,8 @@ const c5 = ({
14659
14659
  if (!B) return;
14660
14660
  const C = B.querySelector("input");
14661
14661
  if (!C) return;
14662
- const k = B.getBoundingClientRect().top, x = C.getBoundingClientRect();
14663
- q(x.top - k + x.height / 2);
14662
+ const x = B.getBoundingClientRect().top, k = C.getBoundingClientRect();
14663
+ q(k.top - x + k.height / 2);
14664
14664
  });
14665
14665
  const f = Kq({
14666
14666
  open: e,
@@ -14669,10 +14669,10 @@ const c5 = ({
14669
14669
  initialFormState: r,
14670
14670
  onSubmit: b,
14671
14671
  isCreating: t
14672
- }), W = f.selectedCourses.some((B) => B.isPublished === !1), N = e && W, y = e0(i ?? G2), L = e0(O.announcementUnpublishedCourseWarning);
14673
- y.current = i ?? G2, L.current = O.announcementUnpublishedCourseWarning, r0(() => {
14674
- N && y.current(L.current);
14675
- }, [N]);
14672
+ }), W = f.selectedCourses.some((B) => B.isPublished === !1), y = e && W, N = e0(i ?? G2), L = e0(O.announcementUnpublishedCourseWarning);
14673
+ N.current = i ?? G2, L.current = O.announcementUnpublishedCourseWarning, r0(() => {
14674
+ y && N.current(L.current);
14675
+ }, [y]);
14676
14676
  const h = () => {
14677
14677
  t || o();
14678
14678
  }, g = /* @__PURE__ */ n(
@@ -14806,17 +14806,17 @@ const c5 = ({
14806
14806
  match: "element",
14807
14807
  query: { wide: { minWidth: 600 } },
14808
14808
  render: (B, C) => {
14809
- const k = C == null ? void 0 : C.includes("wide");
14810
- return /* @__PURE__ */ v(A, { direction: k ? "row" : "column", gap: "small", alignItems: "start", children: [
14809
+ const x = C == null ? void 0 : C.includes("wide");
14810
+ return /* @__PURE__ */ v(A, { direction: x ? "row" : "column", gap: "small", alignItems: "start", children: [
14811
14811
  /* @__PURE__ */ n(
14812
14812
  A.Item,
14813
14813
  {
14814
14814
  shouldGrow: !0,
14815
14815
  shouldShrink: !0,
14816
- size: k ? "15rem" : void 0,
14816
+ size: x ? "15rem" : void 0,
14817
14817
  overflowY: "visible",
14818
- elementRef: (x) => {
14819
- u.current = x;
14818
+ elementRef: (k) => {
14819
+ u.current = k;
14820
14820
  },
14821
14821
  children: /* @__PURE__ */ n(
14822
14822
  Bn,
@@ -14830,7 +14830,7 @@ const c5 = ({
14830
14830
  )
14831
14831
  }
14832
14832
  ),
14833
- k && /* @__PURE__ */ n(A.Item, { "aria-hidden": "true", children: /* @__PURE__ */ n("div", { style: { paddingTop: `${d}px` }, children: /* @__PURE__ */ n(
14833
+ x && /* @__PURE__ */ n(A.Item, { "aria-hidden": "true", children: /* @__PURE__ */ n("div", { style: { paddingTop: `${d}px` }, children: /* @__PURE__ */ n(
14834
14834
  Rt,
14835
14835
  {
14836
14836
  style: { display: "block", transform: "translateY(-50%)" }
@@ -14841,7 +14841,7 @@ const c5 = ({
14841
14841
  {
14842
14842
  shouldGrow: !0,
14843
14843
  shouldShrink: !0,
14844
- size: k ? "15rem" : void 0,
14844
+ size: x ? "15rem" : void 0,
14845
14845
  overflowY: "visible",
14846
14846
  children: /* @__PURE__ */ n(
14847
14847
  Bn,
@@ -14897,7 +14897,7 @@ const c5 = ({
14897
14897
  ] }),
14898
14898
  /* @__PURE__ */ n(g1.Footer, { children: /* @__PURE__ */ v(A, { justifyItems: "end", gap: "small", children: [
14899
14899
  /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
14900
- G0,
14900
+ j0,
14901
14901
  {
14902
14902
  "data-testid": "announcement-cancel-button",
14903
14903
  onClick: h,
@@ -14906,7 +14906,7 @@ const c5 = ({
14906
14906
  }
14907
14907
  ) }),
14908
14908
  /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
14909
- G0,
14909
+ j0,
14910
14910
  {
14911
14911
  "data-testid": "announcement-send-button",
14912
14912
  onClick: f.handleSubmit,
@@ -14925,16 +14925,16 @@ const c5 = ({
14925
14925
  ...M
14926
14926
  }) => {
14927
14927
  const { translations: b, translate: t } = Q(), { notify: c } = R0(), [z, p] = I([]), [r, a] = I(!1), { error: O, refetch: i, ...s } = Xq(), { mutate: l, isPending: u } = Iq(), d = e0(null), [q, f] = I(""), W = U(
14928
- (y) => {
14929
- f(""), l(y, {
14928
+ (N) => {
14929
+ f(""), l(N, {
14930
14930
  onSuccess: (L) => {
14931
14931
  const h = L.succeededCourseIds.length, g = L.failedCourseIds.length, B = h === 1 ? "announcementCreatedOne" : "announcementCreatedMany", C = g === 1 ? "announcementFailedOne" : "announcementFailedMany";
14932
14932
  if (g === 0)
14933
14933
  d.current = t(B, { count: h }), a(!1), p([]), e == null || e();
14934
14934
  else {
14935
- const k = t(B, { count: h }), x = t(C, { count: g });
14936
- h > 0 && c({ type: "success", message: k }), c({ type: "error", message: x }), f(
14937
- h > 0 ? `${k} ${x}` : x
14935
+ const x = t(B, { count: h }), k = t(C, { count: g });
14936
+ h > 0 && c({ type: "success", message: x }), c({ type: "error", message: k }), f(
14937
+ h > 0 ? `${x} ${k}` : k
14938
14938
  ), p(
14939
14939
  (D) => D.filter((H) => L.failedCourseIds.includes(H.id))
14940
14940
  ), o == null || o(L.failedCourseIds);
@@ -14943,15 +14943,15 @@ const c5 = ({
14943
14943
  // mutationFn uses Promise.allSettled so per-course failures resolve normally;
14944
14944
  // this catches unexpected throws (e.g. from queryClient.invalidateQueries)
14945
14945
  onError: () => {
14946
- const L = y.courseIds.length, g = t(L === 1 ? "announcementFailedOne" : "announcementFailedMany", { count: L });
14947
- c({ type: "error", message: g }), f(g), o == null || o(y.courseIds);
14946
+ const L = N.courseIds.length, g = t(L === 1 ? "announcementFailedOne" : "announcementFailedMany", { count: L });
14947
+ c({ type: "error", message: g }), f(g), o == null || o(N.courseIds);
14948
14948
  }
14949
14949
  });
14950
14950
  },
14951
14951
  [l, e, o, c, t]
14952
- ), N = U(() => {
14953
- const y = d.current;
14954
- y !== null && (d.current = null, c({ type: "success", message: y }));
14952
+ ), y = U(() => {
14953
+ const N = d.current;
14954
+ N !== null && (d.current = null, c({ type: "success", message: N }));
14955
14955
  }, [c]);
14956
14956
  return /* @__PURE__ */ n(
14957
14957
  f1,
@@ -14974,7 +14974,7 @@ const c5 = ({
14974
14974
  }
14975
14975
  ),
14976
14976
  /* @__PURE__ */ n(
14977
- G0,
14977
+ j0,
14978
14978
  {
14979
14979
  color: "primary",
14980
14980
  display: "block",
@@ -14993,7 +14993,7 @@ const c5 = ({
14993
14993
  courseSearch: s,
14994
14994
  open: r,
14995
14995
  onDismiss: () => a(!1),
14996
- onExited: N,
14996
+ onExited: y,
14997
14997
  onSubmit: W,
14998
14998
  isCreating: u,
14999
14999
  selectedCourses: z,
@@ -15187,16 +15187,16 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15187
15187
  optionLayout: s = "inline",
15188
15188
  "data-testid": l
15189
15189
  }) => {
15190
- const { translations: u, translate: d, announceForScreenReader: q } = Q(), [f, W] = I(!1), [N, y] = I(null), [L, h] = I(""), g = e0(void 0), B = e0(void 0), C = e0(void 0), k = e0(null);
15190
+ const { translations: u, translate: d, announceForScreenReader: q } = Q(), [f, W] = I(!1), [y, N] = I(null), [L, h] = I(""), g = e0(void 0), B = e0(void 0), C = e0(void 0), x = e0(null);
15191
15191
  r0(
15192
15192
  () => () => {
15193
15193
  clearTimeout(B.current), clearTimeout(C.current);
15194
15194
  },
15195
15195
  []
15196
15196
  );
15197
- const x = U(
15197
+ const k = U(
15198
15198
  (j) => {
15199
- k.current = j, a == null || a(j);
15199
+ x.current = j, a == null || a(j);
15200
15200
  },
15201
15201
  [a]
15202
15202
  ), D = V(() => new Map(e.map((j) => [j.id, j])), [e]), H = V(
@@ -15275,11 +15275,11 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15275
15275
  (j) => {
15276
15276
  Z(j, iM), clearTimeout(C.current), C.current = setTimeout(() => {
15277
15277
  var m;
15278
- return (m = k.current) == null ? void 0 : m.focus();
15278
+ return (m = x.current) == null ? void 0 : m.focus();
15279
15279
  }, 0);
15280
15280
  },
15281
15281
  [Z]
15282
- ), l0 = V(() => {
15282
+ ), d0 = V(() => {
15283
15283
  const j = _ ? [
15284
15284
  {
15285
15285
  id: H1.all,
@@ -15335,7 +15335,7 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15335
15335
  u.courseRemoved
15336
15336
  ]
15337
15337
  ), J = U(() => {
15338
- W(!1), h(""), y(null);
15338
+ W(!1), h(""), N(null);
15339
15339
  }, []), X0 = () => /* @__PURE__ */ n(_1.Option, { id: H1.loading, isDisabled: !0, children: /* @__PURE__ */ v(A, { alignItems: "center", gap: "x-small", children: [
15340
15340
  /* @__PURE__ */ n(j1, { size: "x-small", renderTitle: u.loadingCourses }),
15341
15341
  /* @__PURE__ */ n(F, { size: "small", children: u.loadingCourses })
@@ -15343,7 +15343,7 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15343
15343
  _1.Option,
15344
15344
  {
15345
15345
  id: H1.all,
15346
- isHighlighted: N === H1.all,
15346
+ isHighlighted: y === H1.all,
15347
15347
  isSelected: _,
15348
15348
  renderAfterLabel: _n,
15349
15349
  children: u.allCourses
@@ -15369,7 +15369,7 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15369
15369
  }
15370
15370
  )
15371
15371
  ] }), O0 = (j) => {
15372
- const m = o.includes(j.id), w = N === j.id;
15372
+ const m = o.includes(j.id), w = y === j.id;
15373
15373
  return /* @__PURE__ */ n(
15374
15374
  _1.Option,
15375
15375
  {
@@ -15381,14 +15381,14 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15381
15381
  },
15382
15382
  j.id
15383
15383
  );
15384
- }, j0 = () => /* @__PURE__ */ n(_1.Option, { id: H1.moreHint, isDisabled: !0, children: d(u.moreTypeToFilter, {
15384
+ }, U0 = () => /* @__PURE__ */ n(_1.Option, { id: H1.moreHint, isDisabled: !0, children: d(u.moreTypeToFilter, {
15385
15385
  count: T.length - it
15386
15386
  }) }, H1.moreHint), w0 = () => z ? X0() : [
15387
15387
  ...i ? [f0()] : [],
15388
15388
  ...S.length === 0 ? [W0()] : [],
15389
15389
  ...S.map(O0),
15390
- ...T.length > it ? [j0()] : []
15391
- ], U0 = _ || H.length > 0;
15390
+ ...T.length > it ? [U0()] : []
15391
+ ], $0 = _ || H.length > 0;
15392
15392
  return /* @__PURE__ */ n(
15393
15393
  _1,
15394
15394
  {
@@ -15396,14 +15396,14 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15396
15396
  isRequired: t,
15397
15397
  assistiveText: u.typeToSearchArrowKeys,
15398
15398
  inputValue: L,
15399
- placeholder: U0 ? void 0 : u.searchByCourseNameOrCode,
15399
+ placeholder: $0 ? void 0 : u.searchByCourseNameOrCode,
15400
15400
  isShowingOptions: f,
15401
- inputRef: x,
15402
- onBlur: () => y(null),
15401
+ inputRef: k,
15402
+ onBlur: () => N(null),
15403
15403
  onRequestShowOptions: () => W(!0),
15404
15404
  onRequestHideOptions: J,
15405
15405
  onRequestHighlightOption: (j, { id: m }) => {
15406
- y(m ?? null);
15406
+ N(m ?? null);
15407
15407
  },
15408
15408
  onRequestSelectOption: (j, { id: m }) => {
15409
15409
  m && m !== H1.moreHint && (Z(m, iM), J());
@@ -15412,7 +15412,7 @@ const vc = ({ icon: e, iconTestId: o, title: M, description: b }) => /* @__PURE_
15412
15412
  h(m), W(!0);
15413
15413
  },
15414
15414
  onKeyDown: u0,
15415
- renderBeforeInput: l0,
15415
+ renderBeforeInput: d0,
15416
15416
  messages: r,
15417
15417
  interaction: p,
15418
15418
  optionsMaxHeight: s === "stacked" ? m5 : void 0,
@@ -15458,24 +15458,24 @@ const st = "term-no-results", N5 = ({
15458
15458
  return f.filter((_) => _.name.toLowerCase().includes(S));
15459
15459
  },
15460
15460
  [f]
15461
- ), N = V(() => W(s), [W, s]);
15461
+ ), y = V(() => W(s), [W, s]);
15462
15462
  r0(() => {
15463
15463
  if (r)
15464
15464
  return clearTimeout(u.current), u.current = setTimeout(() => {
15465
- const T = N.length;
15465
+ const T = y.length;
15466
15466
  p == null || p(
15467
15467
  T === 0 ? c.noResultsAvailable : z(c.resultsAvailable, { count: T })
15468
15468
  );
15469
15469
  }, 300), () => clearTimeout(u.current);
15470
15470
  }, [
15471
- N,
15471
+ y,
15472
15472
  r,
15473
15473
  c.noResultsAvailable,
15474
15474
  c.resultsAvailable,
15475
15475
  z,
15476
15476
  p
15477
15477
  ]);
15478
- const y = U(
15478
+ const N = U(
15479
15479
  (T) => {
15480
15480
  var S;
15481
15481
  return T === n2 ? c.educatorA11yFilterTermsAll : ((S = d.get(T)) == null ? void 0 : S.name) ?? T;
@@ -15483,14 +15483,14 @@ const st = "term-no-results", N5 = ({
15483
15483
  [d, c.educatorA11yFilterTermsAll]
15484
15484
  ), L = U(
15485
15485
  (T) => p == null ? void 0 : p(
15486
- z(c.educatorA11yFilterTermSelected, { name: y(T) })
15486
+ z(c.educatorA11yFilterTermSelected, { name: N(T) })
15487
15487
  ),
15488
- [p, z, c.educatorA11yFilterTermSelected, y]
15488
+ [p, z, c.educatorA11yFilterTermSelected, N]
15489
15489
  ), h = U(
15490
15490
  (T) => p == null ? void 0 : p(
15491
- z(c.educatorA11yFilterTermRemoved, { name: y(T) })
15491
+ z(c.educatorA11yFilterTermRemoved, { name: N(T) })
15492
15492
  ),
15493
- [p, z, c.educatorA11yFilterTermRemoved, y]
15493
+ [p, z, c.educatorA11yFilterTermRemoved, N]
15494
15494
  ), g = U(
15495
15495
  (T) => {
15496
15496
  if (T === n2) {
@@ -15520,7 +15520,7 @@ const st = "term-no-results", N5 = ({
15520
15520
  "data-testid": `term-tag-${T.id}`
15521
15521
  },
15522
15522
  T.id
15523
- )) }), [q, B, z, c.educatorA11yFilterRemoveTerm]), k = U(
15523
+ )) }), [q, B, z, c.educatorA11yFilterRemoveTerm]), x = U(
15524
15524
  (T) => {
15525
15525
  if (T.key === "Backspace" && s === "" && o.length > 0) {
15526
15526
  const S = o[o.length - 1];
@@ -15528,7 +15528,7 @@ const st = "term-no-results", N5 = ({
15528
15528
  }
15529
15529
  },
15530
15530
  [s, o, M, h]
15531
- ), x = U(() => {
15531
+ ), k = U(() => {
15532
15532
  a(!1), l(""), i(null);
15533
15533
  }, []), D = () => /* @__PURE__ */ n(
15534
15534
  _1.Option,
@@ -15540,12 +15540,12 @@ const st = "term-no-results", N5 = ({
15540
15540
  children: c.educatorA11yFilterTermsAll
15541
15541
  },
15542
15542
  n2
15543
- ), H = () => N.length === 0 ? [
15543
+ ), H = () => y.length === 0 ? [
15544
15544
  D(),
15545
15545
  /* @__PURE__ */ n(_1.Option, { id: st, isDisabled: !0, children: c.educatorA11yFilterNoMatchingTerms }, st)
15546
15546
  ] : [
15547
15547
  D(),
15548
- ...N.map((T) => /* @__PURE__ */ n(
15548
+ ...y.map((T) => /* @__PURE__ */ n(
15549
15549
  _1.Option,
15550
15550
  {
15551
15551
  id: T.id,
@@ -15567,18 +15567,18 @@ const st = "term-no-results", N5 = ({
15567
15567
  isShowingOptions: r,
15568
15568
  onBlur: () => i(null),
15569
15569
  onRequestShowOptions: () => a(!0),
15570
- onRequestHideOptions: x,
15570
+ onRequestHideOptions: k,
15571
15571
  onRequestHighlightOption: (T, { id: S }) => {
15572
15572
  i(S ?? null);
15573
15573
  },
15574
15574
  onRequestSelectOption: (T, { id: S }) => {
15575
- S && S !== st && (g(S), x());
15575
+ S && S !== st && (g(S), k());
15576
15576
  },
15577
15577
  onInputChange: (T, S) => {
15578
15578
  const _ = W(S);
15579
15579
  l(S), i(_.length > 0 ? _[0].id : null), a(!0);
15580
15580
  },
15581
- onKeyDown: k,
15581
+ onKeyDown: x,
15582
15582
  renderBeforeInput: C,
15583
15583
  "data-testid": t,
15584
15584
  children: H()
@@ -15667,7 +15667,7 @@ const st = "term-no-results", N5 = ({
15667
15667
  ] }) }),
15668
15668
  /* @__PURE__ */ n(g1.Footer, { themeOverride: { background: "transparent", borderColor: "transparent" }, children: /* @__PURE__ */ v(A, { justifyItems: "end", gap: "small", children: [
15669
15669
  /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
15670
- G0,
15670
+ j0,
15671
15671
  {
15672
15672
  color: "secondary",
15673
15673
  onClick: s,
@@ -15676,7 +15676,7 @@ const st = "term-no-results", N5 = ({
15676
15676
  }
15677
15677
  ) }),
15678
15678
  /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
15679
- G0,
15679
+ j0,
15680
15680
  {
15681
15681
  color: "primary",
15682
15682
  onClick: l,
@@ -15902,7 +15902,7 @@ const I5 = () => {
15902
15902
  description: o.educatorA11yNoMatchesDescription
15903
15903
  }
15904
15904
  ),
15905
- /* @__PURE__ */ n(X, { as: "div", textAlign: "center", padding: "0 0 large 0", children: /* @__PURE__ */ n(G0, { onClick: e, "data-testid": "no-matches-clear-filters-button", children: o.educatorA11yNoMatchesClearFilters }) })
15905
+ /* @__PURE__ */ n(X, { as: "div", textAlign: "center", padding: "0 0 large 0", children: /* @__PURE__ */ n(j0, { onClick: e, "data-testid": "no-matches-clear-filters-button", children: o.educatorA11yNoMatchesClearFilters }) })
15906
15906
  ] });
15907
15907
  }, D5 = ({ valueNow: e, valueMax: o }) => {
15908
15908
  const { translations: M, translate: b, announceForScreenReader: t } = Q(), c = Math.round(Math.min(Math.max(e, 0), o) / o * 100);
@@ -15988,20 +15988,20 @@ const F5 = (e, o, M, b) => {
15988
15988
  isPartialScanAlertDismissed: s,
15989
15989
  onDismissPartialScanAlert: l
15990
15990
  }) => {
15991
- const { translations: u, translate: d, announceForScreenReader: q } = Q(), { locale: f, timezone: W } = R0(), N = P5(e, t, p), y = N !== "scanning" && r > 0 && !a, L = r === 1 ? u.educatorA11yUpdatingAlertOne : d("educatorA11yUpdatingAlertMany", { count: r }), h = N !== "scanning" && i && !s, g = e0(q ?? G2), B = e0(L), C = e0(u.educatorA11yPartialScanAlert);
15991
+ const { translations: u, translate: d, announceForScreenReader: q } = Q(), { locale: f, timezone: W } = R0(), y = P5(e, t, p), N = y !== "scanning" && r > 0 && !a, L = r === 1 ? u.educatorA11yUpdatingAlertOne : d("educatorA11yUpdatingAlertMany", { count: r }), h = y !== "scanning" && i && !s, g = e0(q ?? G2), B = e0(L), C = e0(u.educatorA11yPartialScanAlert);
15992
15992
  g.current = q ?? G2, B.current = L, C.current = u.educatorA11yPartialScanAlert, r0(() => {
15993
- y && g.current(B.current);
15994
- }, [y]), r0(() => {
15993
+ N && g.current(B.current);
15994
+ }, [N]), r0(() => {
15995
15995
  h && g.current(C.current);
15996
15996
  }, [h]);
15997
- const k = e0(null), x = () => queueMicrotask(() => {
15997
+ const x = e0(null), k = () => queueMicrotask(() => {
15998
15998
  var T, S;
15999
- return (S = (T = k.current) == null ? void 0 : T.querySelector("a")) == null ? void 0 : S.focus();
15999
+ return (S = (T = x.current) == null ? void 0 : T.querySelector("a")) == null ? void 0 : S.focus();
16000
16000
  }), D = () => {
16001
- O(), x();
16001
+ O(), k();
16002
16002
  }, H = () => {
16003
- l(), x();
16004
- }, P = N !== "scanning" && /* @__PURE__ */ n(X, { as: "div", "data-testid": "accessibility-last-updated", children: /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: M ? d("educatorA11yLastUpdated", {
16003
+ l(), k();
16004
+ }, P = y !== "scanning" && /* @__PURE__ */ n(X, { as: "div", "data-testid": "accessibility-last-updated", children: /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: M ? d("educatorA11yLastUpdated", {
16005
16005
  timestamp: F5(M, f, W, d)
16006
16006
  }) : u.educatorA11yLastUpdatedNever }) });
16007
16007
  return /* @__PURE__ */ v(A, { direction: "column", gap: "medium", children: [
@@ -16020,7 +16020,7 @@ const F5 = (e, o, M, b) => {
16020
16020
  children: u.educatorA11yPartialScanAlert
16021
16021
  }
16022
16022
  ) }) }),
16023
- y && /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(X, { as: "div", "data-testid": "content-quality-updating-alert", children: /* @__PURE__ */ n(
16023
+ N && /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(X, { as: "div", "data-testid": "content-quality-updating-alert", children: /* @__PURE__ */ n(
16024
16024
  gt,
16025
16025
  {
16026
16026
  variant: "info",
@@ -16039,14 +16039,14 @@ const F5 = (e, o, M, b) => {
16039
16039
  {
16040
16040
  overflowY: "visible",
16041
16041
  elementRef: (T) => {
16042
- k.current = T;
16042
+ x.current = T;
16043
16043
  },
16044
16044
  children: [
16045
- N === "scanning" && p && /* @__PURE__ */ n(D5, { valueNow: p.valueNow, valueMax: p.valueMax }),
16046
- N === "noIssues" && /* @__PURE__ */ n(I5, {}),
16047
- N === "allResolved" && /* @__PURE__ */ n(W5, {}),
16048
- N === "noMatches" && /* @__PURE__ */ n(k5, { onClearFilters: z }),
16049
- N === "populated" && /* @__PURE__ */ n(
16045
+ y === "scanning" && p && /* @__PURE__ */ n(D5, { valueNow: p.valueNow, valueMax: p.valueMax }),
16046
+ y === "noIssues" && /* @__PURE__ */ n(I5, {}),
16047
+ y === "allResolved" && /* @__PURE__ */ n(W5, {}),
16048
+ y === "noMatches" && /* @__PURE__ */ n(k5, { onClearFilters: z }),
16049
+ y === "populated" && /* @__PURE__ */ n(
16050
16050
  E5,
16051
16051
  {
16052
16052
  courses: e,
@@ -16072,12 +16072,12 @@ const F5 = (e, o, M, b) => {
16072
16072
  hasPartialScanFailure: l
16073
16073
  } = s5(), u = o === void 0 ? i : o, [d, q] = I(
16074
16074
  Pt
16075
- ), [f, W] = I(!1), [N, y] = I(!1), [L, h] = I(
16075
+ ), [f, W] = I(!1), [y, N] = I(!1), [L, h] = I(
16076
16076
  null
16077
- ), g = (s == null ? void 0 : s.getTime()) ?? null, B = V(() => t.filter((T) => T.pending).length, [t]), C = e0(null), k = V(
16077
+ ), g = (s == null ? void 0 : s.getTime()) ?? null, B = V(() => t.filter((T) => T.pending).length, [t]), C = e0(null), x = V(
16078
16078
  () => g5(t, d),
16079
16079
  [t, d]
16080
- ), x = L5(d), D = V(() => JSON.stringify(d), [d]), H = U((T) => {
16080
+ ), k = L5(d), D = V(() => JSON.stringify(d), [d]), H = U((T) => {
16081
16081
  C.current = T;
16082
16082
  }, []), P = () => {
16083
16083
  q(Pt), queueMicrotask(() => {
@@ -16098,7 +16098,7 @@ const F5 = (e, o, M, b) => {
16098
16098
  {
16099
16099
  onRefresh: a,
16100
16100
  onOpenFilter: () => W(!0),
16101
- appliedFilterCount: x,
16101
+ appliedFilterCount: k,
16102
16102
  filterButtonElementRef: H,
16103
16103
  refreshDisabled: Xr(u) || O
16104
16104
  }
@@ -16106,17 +16106,17 @@ const F5 = (e, o, M, b) => {
16106
16106
  children: /* @__PURE__ */ n(Fe, { theme: ub, children: /* @__PURE__ */ n(
16107
16107
  U5,
16108
16108
  {
16109
- courses: k,
16109
+ courses: x,
16110
16110
  hasMore: c,
16111
16111
  lastUpdatedAt: s ?? void 0,
16112
16112
  courseBaseUrl: e,
16113
- hasActiveFilters: x > 0,
16113
+ hasActiveFilters: k > 0,
16114
16114
  filterKey: D,
16115
16115
  onClearFilters: P,
16116
16116
  scanProgress: u,
16117
16117
  pendingCount: B,
16118
- isUpdatingAlertDismissed: N,
16119
- onDismissUpdatingAlert: () => y(!0),
16118
+ isUpdatingAlertDismissed: y,
16119
+ onDismissUpdatingAlert: () => N(!0),
16120
16120
  hasPartialScanFailure: l,
16121
16121
  isPartialScanAlertDismissed: L === g,
16122
16122
  onDismissPartialScanAlert: () => h(g)
@@ -16441,7 +16441,7 @@ function kr({
16441
16441
  },
16442
16442
  []
16443
16443
  );
16444
- const N = (T) => M.some((S) => S.id === T), y = (T) => {
16444
+ const y = (T) => M.some((S) => S.id === T), N = (T) => {
16445
16445
  const S = M.find((_) => _.id === T);
16446
16446
  return S && p[S.translationKey];
16447
16447
  }, L = (T, S, _ = 0) => {
@@ -16452,7 +16452,7 @@ function kr({
16452
16452
  return;
16453
16453
  }
16454
16454
  W.current = setTimeout(() => O(Z), _);
16455
- }, h = (T, S = 0) => L(p.searchMultiSelectItemRemoved, y(T), S), g = (T, S = 0) => {
16455
+ }, h = (T, S = 0) => L(p.searchMultiSelectItemRemoved, N(T), S), g = (T, S = 0) => {
16456
16456
  if (T === Cn) {
16457
16457
  e.length > 0 && L(
16458
16458
  p.searchMultiSelectItemSelected,
@@ -16461,9 +16461,9 @@ function kr({
16461
16461
  ), o([]);
16462
16462
  return;
16463
16463
  }
16464
- if (!N(T)) return;
16464
+ if (!y(T)) return;
16465
16465
  const _ = e.includes(T) ? e.filter((Z) => Z !== T) : [...e, T];
16466
- e.includes(T) ? h(T, S) : L(p.searchMultiSelectItemSelected, y(T), S), o(M.filter((Z) => _.includes(Z.id)).map((Z) => Z.id));
16466
+ e.includes(T) ? h(T, S) : L(p.searchMultiSelectItemSelected, N(T), S), o(M.filter((Z) => _.includes(Z.id)).map((Z) => Z.id));
16467
16467
  }, B = (T) => {
16468
16468
  g(T), f.current = setTimeout(() => {
16469
16469
  var S;
@@ -16471,12 +16471,12 @@ function kr({
16471
16471
  }, 0);
16472
16472
  }, C = () => {
16473
16473
  s(!1), u(null);
16474
- }, k = (T) => {
16474
+ }, x = (T) => {
16475
16475
  g(T, iM), C(), f.current = setTimeout(() => {
16476
16476
  var S, _;
16477
16477
  (S = q.current) == null || S.blur(), (_ = q.current) == null || _.focus();
16478
16478
  }, 0);
16479
- }, x = M.filter((T) => e.includes(T.id)), D = x.length === 0 ? null : /* @__PURE__ */ n(X, { as: "span", display: "inline-block", padding: "xx-small 0", children: x.map(({ id: T, translationKey: S }) => {
16479
+ }, k = M.filter((T) => e.includes(T.id)), D = k.length === 0 ? null : /* @__PURE__ */ n(X, { as: "span", display: "inline-block", padding: "xx-small 0", children: k.map(({ id: T, translationKey: S }) => {
16480
16480
  const _ = p[S];
16481
16481
  return /* @__PURE__ */ n(
16482
16482
  gb,
@@ -16494,7 +16494,7 @@ function kr({
16494
16494
  T
16495
16495
  );
16496
16496
  }) }), H = (T) => {
16497
- T.key === "Backspace" && x.length > 0 && (h(x[x.length - 1].id), o(x.slice(0, -1).map((S) => S.id)));
16497
+ T.key === "Backspace" && k.length > 0 && (h(k[k.length - 1].id), o(k.slice(0, -1).map((S) => S.id)));
16498
16498
  }, P = (T, S, _) => /* @__PURE__ */ n(
16499
16499
  _1.Option,
16500
16500
  {
@@ -16518,7 +16518,7 @@ function kr({
16518
16518
  onRequestHideOptions: C,
16519
16519
  onRequestHighlightOption: (T, { id: S }) => u(S ?? null),
16520
16520
  onRequestSelectOption: (T, { id: S }) => {
16521
- S && k(S);
16521
+ S && x(S);
16522
16522
  },
16523
16523
  onKeyDown: H,
16524
16524
  renderBeforeInput: D,
@@ -16575,7 +16575,7 @@ const pW = [
16575
16575
  const { translations: o, translate: M, announceForScreenReader: b } = Q(), [t, c] = I([]), [z, p] = I([]), [r, a] = I([]), { courses: O, isLoading: i, error: s } = Nr(), { totalSubmissions: l } = j5(), u = V(
16576
16576
  () => z.length > 0 ? z.map(Number).sort((u0, J) => u0 - J) : void 0,
16577
16577
  [z]
16578
- ), { items: d, isLoading: q, isPlaceholderData: f, isInitialLoadError: W, hasNextPage: N, refetch: y } = Z5({
16578
+ ), { items: d, isLoading: q, isPlaceholderData: f, isInitialLoadError: W, hasNextPage: y, refetch: N } = Z5({
16579
16579
  perPage: Xn,
16580
16580
  submissionStatus: t.length > 0 ? t : void 0,
16581
16581
  courseIds: u,
@@ -16583,20 +16583,20 @@ const pW = [
16583
16583
  }), L = V(
16584
16584
  () => JSON.stringify({ submissionStatuses: t, courseIds: u, assignmentTypes: r }),
16585
16585
  [t, u, r]
16586
- ), { page: h, totalPages: g, totalItems: B, pageItems: C, setPage: k } = _r(d, {
16586
+ ), { page: h, totalPages: g, totalItems: B, pageItems: C, setPage: x } = _r(d, {
16587
16587
  pageSize: sW,
16588
16588
  windowSize: Xn,
16589
16589
  resetKey: L
16590
- }), x = f, D = B > 0, H = !!N || d.length > B, P = Sr(M, { totalItems: B, isCapped: H }), T = Tb(k, o.educatorTodoListTitle), S = D ? P : o.educatorTodoListNothingToReviewTitle, _ = b ?? G2, Z = e0(L), [s0, l0] = I(L);
16590
+ }), k = f, D = B > 0, H = !!y || d.length > B, P = Sr(M, { totalItems: B, isCapped: H }), T = Tb(x, o.educatorTodoListTitle), S = D ? P : o.educatorTodoListNothingToReviewTitle, _ = b ?? G2, Z = e0(L), [s0, d0] = I(L);
16591
16591
  return r0(() => {
16592
- const u0 = setTimeout(() => l0(L), iM);
16592
+ const u0 = setTimeout(() => d0(L), iM);
16593
16593
  return () => clearTimeout(u0);
16594
16594
  }, [L]), r0(() => {
16595
- Z.current === L || s0 !== L || x || W || (Z.current = L, _(S));
16595
+ Z.current === L || s0 !== L || k || W || (Z.current = L, _(S));
16596
16596
  }, [
16597
16597
  L,
16598
16598
  s0,
16599
- x,
16599
+ k,
16600
16600
  W,
16601
16601
  S,
16602
16602
  _
@@ -16605,7 +16605,7 @@ const pW = [
16605
16605
  {
16606
16606
  isLoading: q,
16607
16607
  error: W ? o.educatorTodoListFailedToLoadItems : null,
16608
- onRetry: y,
16608
+ onRetry: N,
16609
16609
  ...e,
16610
16610
  children: /* @__PURE__ */ n(Fe, { theme: ub, children: /* @__PURE__ */ n(
16611
16611
  nW,
@@ -16628,7 +16628,7 @@ const pW = [
16628
16628
  /* @__PURE__ */ n(A.Item, { overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(rW, { value: r, onChange: a }) })
16629
16629
  ] }),
16630
16630
  summary: D && typeof l == "number" ? /* @__PURE__ */ n(X, { as: "div", "data-testid": "educator-todo-total-submissions", children: /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: M("educatorTodoListTotalSubmissions", { count: l }) }) }) : null,
16631
- footer: D && !x ? /* @__PURE__ */ v(X, { as: "div", textAlign: "center", children: [
16631
+ footer: D && !k ? /* @__PURE__ */ v(X, { as: "div", textAlign: "center", children: [
16632
16632
  g > 1 && /* @__PURE__ */ n(X, { as: "div", "data-testid": "educator-todo-pagination", children: /* @__PURE__ */ n(
16633
16633
  oc,
16634
16634
  {
@@ -16647,7 +16647,7 @@ const pW = [
16647
16647
  ) }),
16648
16648
  /* @__PURE__ */ n(X, { as: "div", padding: "x-small 0 0", "data-testid": "educator-todo-pagination-summary", children: /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: P }) })
16649
16649
  ] }) : null,
16650
- children: /* @__PURE__ */ n(X, { as: "div", minHeight: dt, children: x ? /* @__PURE__ */ n(
16650
+ children: /* @__PURE__ */ n(X, { as: "div", minHeight: dt, children: k ? /* @__PURE__ */ n(
16651
16651
  A,
16652
16652
  {
16653
16653
  justifyItems: "center",
@@ -17035,7 +17035,7 @@ function vW(e = {}) {
17035
17035
  getAccount: l
17036
17036
  } = R0(), u = b ? l(b) : void 0, d = (u == null ? void 0 : u.executeQuery) ?? i, q = (u == null ? void 0 : u.currentUserId) ?? s, f = M, W = t == null ? void 0 : t.join(",");
17037
17037
  r !== b && (a(b), p(0));
17038
- const N = [
17038
+ const y = [
17039
17039
  lz,
17040
17040
  "page",
17041
17041
  z,
@@ -17046,13 +17046,13 @@ function vW(e = {}) {
17046
17046
  q,
17047
17047
  W
17048
17048
  ], {
17049
- data: y,
17049
+ data: N,
17050
17050
  isLoading: L,
17051
17051
  isFetching: h,
17052
17052
  error: g,
17053
17053
  refetch: B
17054
17054
  } = r1({
17055
- queryKey: N,
17055
+ queryKey: y,
17056
17056
  queryFn: () => yW(
17057
17057
  d,
17058
17058
  z,
@@ -17071,7 +17071,7 @@ function vW(e = {}) {
17071
17071
  r0(() => {
17072
17072
  p(0);
17073
17073
  }, [C, W]);
17074
- const k = (y == null ? void 0 : y.pageInfo.totalCount) ?? null, x = k != null ? Math.ceil(k / f) : 0, D = U((S) => {
17074
+ const x = (N == null ? void 0 : N.pageInfo.totalCount) ?? null, k = x != null ? Math.ceil(x / f) : 0, D = U((S) => {
17075
17075
  const _ = S - 1;
17076
17076
  _ >= 0 && p(_);
17077
17077
  }, []), H = U(() => {
@@ -17080,15 +17080,15 @@ function vW(e = {}) {
17080
17080
  queryKey: [lz]
17081
17081
  }), B()), [c, B]);
17082
17082
  return {
17083
- currentPage: y,
17083
+ currentPage: N,
17084
17084
  currentPageIndex: z,
17085
- totalPages: x,
17086
- totalCount: k,
17085
+ totalPages: k,
17086
+ totalCount: x,
17087
17087
  goToPage: D,
17088
17088
  resetPagination: H,
17089
17089
  refetch: P,
17090
17090
  isLoading: L,
17091
- isPaginationLoading: h && !!y,
17091
+ isPaginationLoading: h && !!N,
17092
17092
  error: g,
17093
17093
  pageSize: f
17094
17094
  };
@@ -17158,8 +17158,8 @@ const TW = ({
17158
17158
  if (i !== "all")
17159
17159
  return i === "teacher" ? ["TeacherEnrollment"] : ["TaEnrollment"];
17160
17160
  }, [i]), {
17161
- currentPage: N,
17162
- currentPageIndex: y,
17161
+ currentPage: y,
17162
+ currentPageIndex: N,
17163
17163
  totalPages: L,
17164
17164
  goToPage: h,
17165
17165
  isLoading: g,
@@ -17169,7 +17169,7 @@ const TW = ({
17169
17169
  courseIds: f,
17170
17170
  limit: Z2.PEOPLE,
17171
17171
  enrollmentTypes: W
17172
- }), k = (N == null ? void 0 : N.data) ?? [], x = b || (C ? z.failedToLoadInstructorData : null), D = !x && (M || g), H = (_) => {
17172
+ }), x = (y == null ? void 0 : y.data) ?? [], k = b || (C ? z.failedToLoadInstructorData : null), D = !k && (M || g), H = (_) => {
17173
17173
  const Z = _.enrollments[0];
17174
17174
  !(Z != null && Z.course_id) || !Z.user_id || (u({
17175
17175
  id: Z.user_id,
@@ -17197,11 +17197,11 @@ const TW = ({
17197
17197
  isEditMode: o,
17198
17198
  dragHandleProps: c,
17199
17199
  isLoading: D,
17200
- error: x,
17200
+ error: k,
17201
17201
  onRetry: t,
17202
17202
  loadingText: z.loadingPeopleData,
17203
17203
  pagination: {
17204
- currentPage: y + 1,
17204
+ currentPage: N + 1,
17205
17205
  totalPages: L,
17206
17206
  onPageChange: h,
17207
17207
  ariaLabel: z.instructorsPagination
@@ -17221,7 +17221,7 @@ const TW = ({
17221
17221
  onRoleChange: S
17222
17222
  }
17223
17223
  ),
17224
- /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: /* @__PURE__ */ n(X, { as: "div", padding: "small 0 0 0", children: k.length === 0 ? /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-instructors-message", children: z.noInstructorsFound }) : /* @__PURE__ */ n(X, { as: "div", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: k.map((_) => {
17224
+ /* @__PURE__ */ n(A.Item, { shouldGrow: !0, children: /* @__PURE__ */ n(X, { as: "div", padding: "small 0 0 0", children: x.length === 0 ? /* @__PURE__ */ n(F, { color: "secondary", "data-testid": "no-instructors-message", children: z.noInstructorsFound }) : /* @__PURE__ */ n(X, { as: "div", children: /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: x.map((_) => {
17225
17225
  var Z, s0;
17226
17226
  return /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ v(
17227
17227
  A,
@@ -17269,15 +17269,15 @@ const TW = ({
17269
17269
  as: "ul",
17270
17270
  margin: "0",
17271
17271
  padding: "0",
17272
- elementRef: (l0) => {
17273
- l0 && (l0.style.listStyleType = "disc");
17272
+ elementRef: (d0) => {
17273
+ d0 && (d0.style.listStyleType = "disc");
17274
17274
  },
17275
- children: _.enrollments.map((l0) => {
17276
- const u0 = jo(l0.role, z);
17275
+ children: _.enrollments.map((d0) => {
17276
+ const u0 = jo(d0.role, z);
17277
17277
  return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(F, { size: "small", wrap: "break-word", children: p("roleInCourse", {
17278
17278
  role: u0,
17279
- course: l0.course_name
17280
- }) }) }, l0.id);
17279
+ course: d0.course_name
17280
+ }) }) }, d0.id);
17281
17281
  })
17282
17282
  }
17283
17283
  ) })
@@ -17654,7 +17654,7 @@ function PW(e = {}) {
17654
17654
  e.courseFilter,
17655
17655
  b ?? void 0
17656
17656
  ], O = async () => {
17657
- var x;
17657
+ var k;
17658
17658
  const h = xW(p, c), g = await o(DW, {
17659
17659
  userId: M,
17660
17660
  first: c,
@@ -17666,7 +17666,7 @@ function PW(e = {}) {
17666
17666
  throw new Error(
17667
17667
  `GraphQL query failed: ${g.errors.map((D) => D.message).join(", ")}`
17668
17668
  );
17669
- if (!((x = g == null ? void 0 : g.legacyNode) != null && x.courseWorkSubmissionsConnection))
17669
+ if (!((k = g == null ? void 0 : g.legacyNode) != null && k.courseWorkSubmissionsConnection))
17670
17670
  return {
17671
17671
  submissions: [],
17672
17672
  pageInfo: {
@@ -17724,9 +17724,9 @@ function PW(e = {}) {
17724
17724
  }), q = (i == null ? void 0 : i.pageInfo.totalCount) ?? null, f = q != null ? Math.ceil(q / c) : 0, W = U((h) => {
17725
17725
  const g = h - 1;
17726
17726
  g >= 0 && r(g);
17727
- }, []), N = U(() => {
17727
+ }, []), y = U(() => {
17728
17728
  r(0);
17729
- }, []), y = U(async () => (await t.invalidateQueries({
17729
+ }, []), N = U(async () => (await t.invalidateQueries({
17730
17730
  queryKey: [En]
17731
17731
  }), d()), [t, d]);
17732
17732
  return {
@@ -17735,8 +17735,8 @@ function PW(e = {}) {
17735
17735
  totalPages: f,
17736
17736
  totalCount: q,
17737
17737
  goToPage: W,
17738
- resetPagination: N,
17739
- refetch: y,
17738
+ resetPagination: y,
17739
+ refetch: N,
17740
17740
  isLoading: s,
17741
17741
  isPaginationLoading: l && !!i,
17742
17742
  error: u,
@@ -17955,7 +17955,7 @@ const $W = ({
17955
17955
  isRightColumn: o = !1
17956
17956
  }) => {
17957
17957
  var g;
17958
- const { translations: M, translate: b } = Q(), { sharedCourseData: t } = S0(), { isMobile: c } = m1(), z = c || o, p = e.assignment.htmlUrl, r = e.assignment.course._id, a = e.assignment.name, O = e.assignment.course.name, i = t.find((B) => B.courseId === r), s = (i == null ? void 0 : i.currentGrade) ?? null, l = (i == null ? void 0 : i.gradingScheme) ?? "percentage", u = (i == null ? void 0 : i.restrictQuantitativeData) ?? !1, d = (i == null ? void 0 : i.pointsBasedGradingScheme) ?? !1, q = i == null ? void 0 : i.scalingFactor, { data: f, isLoading: W, error: N } = UW(e._id), y = ((g = f == null ? void 0 : f.rubricAssessments) == null ? void 0 : g[0]) || null, L = (f == null ? void 0 : f.comments) || [], h = (f == null ? void 0 : f.totalCommentsCount) || 0;
17958
+ const { translations: M, translate: b } = Q(), { sharedCourseData: t } = S0(), { isMobile: c } = m1(), z = c || o, p = e.assignment.htmlUrl, r = e.assignment.course._id, a = e.assignment.name, O = e.assignment.course.name, i = t.find((B) => B.courseId === r), s = (i == null ? void 0 : i.currentGrade) ?? null, l = (i == null ? void 0 : i.gradingScheme) ?? "percentage", u = (i == null ? void 0 : i.restrictQuantitativeData) ?? !1, d = (i == null ? void 0 : i.pointsBasedGradingScheme) ?? !1, q = i == null ? void 0 : i.scalingFactor, { data: f, isLoading: W, error: y } = UW(e._id), N = ((g = f == null ? void 0 : f.rubricAssessments) == null ? void 0 : g[0]) || null, L = (f == null ? void 0 : f.comments) || [], h = (f == null ? void 0 : f.totalCommentsCount) || 0;
17959
17959
  return /* @__PURE__ */ n(
17960
17960
  X,
17961
17961
  {
@@ -17988,11 +17988,11 @@ const $W = ({
17988
17988
  size: "small",
17989
17989
  "data-testid": `submission-details-loading-${e._id}`
17990
17990
  }
17991
- ) }) : N ? /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(F, { color: "danger", "data-testid": `submission-details-error-${e._id}`, children: M.errorLoadingSubmissionDetails }) }) : /* @__PURE__ */ v(g2, { children: [
17992
- y && /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(
17991
+ ) }) : y ? /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(F, { color: "danger", "data-testid": `submission-details-error-${e._id}`, children: M.errorLoadingSubmissionDetails }) }) : /* @__PURE__ */ v(g2, { children: [
17992
+ N && /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(
17993
17993
  GW,
17994
17994
  {
17995
- rubricAssessment: y,
17995
+ rubricAssessment: N,
17996
17996
  submissionId: e._id
17997
17997
  }
17998
17998
  ) }),
@@ -18161,10 +18161,10 @@ const $W = ({
18161
18161
  } = PW({
18162
18162
  pageSize: KW,
18163
18163
  courseFilter: p === "all" ? void 0 : p
18164
- }), W = M || (q ? q.message : null), N = M ? !1 : o || u, y = (O == null ? void 0 : O.submissions) || [], L = (C) => {
18164
+ }), W = M || (q ? q.message : null), y = M ? !1 : o || u, N = (O == null ? void 0 : O.submissions) || [], L = (C) => {
18165
18165
  l(C);
18166
- }, h = (C, k) => {
18167
- r(k.value);
18166
+ }, h = (C, x) => {
18167
+ r(x.value);
18168
18168
  }, g = () => {
18169
18169
  b ? b() : f();
18170
18170
  }, B = {
@@ -18179,7 +18179,7 @@ const $W = ({
18179
18179
  widget: e,
18180
18180
  isEditMode: t,
18181
18181
  dragHandleProps: c,
18182
- isLoading: N,
18182
+ isLoading: y,
18183
18183
  error: W,
18184
18184
  onRetry: g,
18185
18185
  loadingText: z.loadingRecentGrades,
@@ -18195,10 +18195,10 @@ const $W = ({
18195
18195
  {
18196
18196
  selectedCourse: p,
18197
18197
  onChange: h,
18198
- disabled: N
18198
+ disabled: y
18199
18199
  }
18200
18200
  ) }),
18201
- /* @__PURE__ */ n(X, { as: "div", "data-testid": "recent-grades-list", children: y.length > 0 ? /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: y.map((C) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ n(YW, { submission: C, isRightColumn: a }) }, C._id)) }) : /* @__PURE__ */ n(X, { as: "div", textAlign: "center", padding: "large", children: z.noRecentGradesAvailable }) })
18201
+ /* @__PURE__ */ n(X, { as: "div", "data-testid": "recent-grades-list", children: N.length > 0 ? /* @__PURE__ */ n(c1, { isUnstyled: !0, margin: "0", children: N.map((C) => /* @__PURE__ */ n(c1.Item, { margin: "0", children: /* @__PURE__ */ n(YW, { submission: C, isRightColumn: a }) }, C._id)) }) : /* @__PURE__ */ n(X, { as: "div", textAlign: "center", padding: "large", children: z.noRecentGradesAvailable }) })
18202
18202
  ]
18203
18203
  }
18204
18204
  );
@@ -18222,7 +18222,7 @@ function E2(e) {
18222
18222
  function Pe(e) {
18223
18223
  return e != null && Object.prototype.toString.call(e) === "[object Object]";
18224
18224
  }
18225
- function $0(e, o) {
18225
+ function H0(e, o) {
18226
18226
  return Object.prototype.hasOwnProperty.call(e, o);
18227
18227
  }
18228
18228
  function Bc(e) {
@@ -18230,7 +18230,7 @@ function Bc(e) {
18230
18230
  return Object.getOwnPropertyNames(e).length === 0;
18231
18231
  var o;
18232
18232
  for (o in e)
18233
- if ($0(e, o))
18233
+ if (H0(e, o))
18234
18234
  return !1;
18235
18235
  return !0;
18236
18236
  }
@@ -18251,8 +18251,8 @@ function Fr(e, o) {
18251
18251
  }
18252
18252
  function ye(e, o) {
18253
18253
  for (var M in o)
18254
- $0(o, M) && (e[M] = o[M]);
18255
- return $0(o, "toString") && (e.toString = o.toString), $0(o, "valueOf") && (e.valueOf = o.valueOf), e;
18254
+ H0(o, M) && (e[M] = o[M]);
18255
+ return H0(o, "toString") && (e.toString = o.toString), H0(o, "valueOf") && (e.valueOf = o.valueOf), e;
18256
18256
  }
18257
18257
  function J2(e, o, M, b) {
18258
18258
  return Oa(e, o, M, b, !0).utc();
@@ -18329,7 +18329,7 @@ function N2(e, o) {
18329
18329
  t += `
18330
18330
  [` + c + "] ";
18331
18331
  for (z in arguments[0])
18332
- $0(arguments[0], z) && (t += z + ": " + arguments[0][z] + ", ");
18332
+ H0(arguments[0], z) && (t += z + ": " + arguments[0][z] + ", ");
18333
18333
  t = t.slice(0, -2);
18334
18334
  } else
18335
18335
  t = arguments[c];
@@ -18356,7 +18356,7 @@ function ee(e) {
18356
18356
  function JW(e) {
18357
18357
  var o, M;
18358
18358
  for (M in e)
18359
- $0(e, M) && (o = e[M], ee(o) ? this[M] = o : this["_" + M] = o);
18359
+ H0(e, M) && (o = e[M], ee(o) ? this[M] = o : this["_" + M] = o);
18360
18360
  this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp(
18361
18361
  (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
18362
18362
  );
@@ -18364,9 +18364,9 @@ function JW(e) {
18364
18364
  function $t(e, o) {
18365
18365
  var M = ye({}, e), b;
18366
18366
  for (b in o)
18367
- $0(o, b) && (Pe(e[b]) && Pe(o[b]) ? (M[b] = {}, ye(M[b], e[b]), ye(M[b], o[b])) : o[b] != null ? M[b] = o[b] : delete M[b]);
18367
+ H0(o, b) && (Pe(e[b]) && Pe(o[b]) ? (M[b] = {}, ye(M[b], e[b]), ye(M[b], o[b])) : o[b] != null ? M[b] = o[b] : delete M[b]);
18368
18368
  for (b in e)
18369
- $0(e, b) && !$0(o, b) && Pe(e[b]) && (M[b] = ye({}, M[b]));
18369
+ H0(e, b) && !H0(o, b) && Pe(e[b]) && (M[b] = ye({}, M[b]));
18370
18370
  return M;
18371
18371
  }
18372
18372
  function Sc(e) {
@@ -18376,7 +18376,7 @@ var Ht;
18376
18376
  Object.keys ? Ht = Object.keys : Ht = function(e) {
18377
18377
  var o, M = [];
18378
18378
  for (o in e)
18379
- $0(e, o) && M.push(o);
18379
+ H0(e, o) && M.push(o);
18380
18380
  return M;
18381
18381
  };
18382
18382
  var ef = {
@@ -18542,7 +18542,7 @@ function y2(e) {
18542
18542
  function Xc(e) {
18543
18543
  var o = {}, M, b;
18544
18544
  for (b in e)
18545
- $0(e, b) && (M = y2(b), M && (o[M] = e[b]));
18545
+ H0(e, b) && (M = y2(b), M && (o[M] = e[b]));
18546
18546
  return o;
18547
18547
  }
18548
18548
  var Af = {
@@ -18566,7 +18566,7 @@ var Af = {
18566
18566
  function lf(e) {
18567
18567
  var o = [], M;
18568
18568
  for (M in e)
18569
- $0(e, M) && o.push({ unit: M, priority: Af[M] });
18569
+ H0(e, M) && o.push({ unit: M, priority: Af[M] });
18570
18570
  return o.sort(function(b, t) {
18571
18571
  return b.priority - t.priority;
18572
18572
  }), o;
@@ -18579,7 +18579,7 @@ function n0(e, o, M) {
18579
18579
  };
18580
18580
  }
18581
18581
  function Wf(e, o) {
18582
- return $0(qb, e) ? qb[e](o._strict, o._locale) : new RegExp(ff(e));
18582
+ return H0(qb, e) ? qb[e](o._strict, o._locale) : new RegExp(ff(e));
18583
18583
  }
18584
18584
  function ff(e) {
18585
18585
  return ie(
@@ -18615,7 +18615,7 @@ function SM(e, o) {
18615
18615
  });
18616
18616
  }
18617
18617
  function mf(e, o, M) {
18618
- o != null && $0(Gt, e) && Gt[e](o, M._a, M, e);
18618
+ o != null && H0(Gt, e) && Gt[e](o, M._a, M, e);
18619
18619
  }
18620
18620
  function kb(e) {
18621
18621
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
@@ -18819,10 +18819,10 @@ function wf() {
18819
18819
  return kc(this.year(), this.month());
18820
18820
  }
18821
18821
  function Ef(e) {
18822
- return this._monthsParseExact ? ($0(this, "_monthsRegex") || Ma.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : ($0(this, "_monthsShortRegex") || (this._monthsShortRegex = Bf), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
18822
+ return this._monthsParseExact ? (H0(this, "_monthsRegex") || Ma.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : (H0(this, "_monthsShortRegex") || (this._monthsShortRegex = Bf), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
18823
18823
  }
18824
18824
  function If(e) {
18825
- return this._monthsParseExact ? ($0(this, "_monthsRegex") || Ma.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : ($0(this, "_monthsRegex") || (this._monthsRegex = Tf), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
18825
+ return this._monthsParseExact ? (H0(this, "_monthsRegex") || Ma.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : (H0(this, "_monthsRegex") || (this._monthsRegex = Tf), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
18826
18826
  }
18827
18827
  function Ma() {
18828
18828
  function e(r, a) {
@@ -19014,13 +19014,13 @@ function c6(e) {
19014
19014
  return this.day() || 7;
19015
19015
  }
19016
19016
  function z6(e) {
19017
- return this._weekdaysParseExact ? ($0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : ($0(this, "_weekdaysRegex") || (this._weekdaysRegex = Kf), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
19017
+ return this._weekdaysParseExact ? (H0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : (H0(this, "_weekdaysRegex") || (this._weekdaysRegex = Kf), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
19018
19018
  }
19019
19019
  function n6(e) {
19020
- return this._weekdaysParseExact ? ($0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : ($0(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Vf), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
19020
+ return this._weekdaysParseExact ? (H0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (H0(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Vf), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
19021
19021
  }
19022
19022
  function p6(e) {
19023
- return this._weekdaysParseExact ? ($0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : ($0(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Qf), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
19023
+ return this._weekdaysParseExact ? (H0(this, "_weekdaysRegex") || xc.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (H0(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = Qf), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
19024
19024
  }
19025
19025
  function xc() {
19026
19026
  function e(O, i) {
@@ -19525,7 +19525,7 @@ var F6 = function() {
19525
19525
  function U6(e) {
19526
19526
  var o, M = !1, b, t = ko.length;
19527
19527
  for (o in e)
19528
- if ($0(e, o) && !(i1.call(ko, o) !== -1 && (e[o] == null || !isNaN(e[o]))))
19528
+ if (H0(e, o) && !(i1.call(ko, o) !== -1 && (e[o] == null || !isNaN(e[o]))))
19529
19529
  return !1;
19530
19530
  for (b = 0; b < t; ++b)
19531
19531
  if (e[ko[b]]) {
@@ -19669,7 +19669,7 @@ function k2(e, o) {
19669
19669
  }) : M == null ? M = {} : typeof M == "object" && ("from" in M || "to" in M) && (z = zm(
19670
19670
  o1(M.from),
19671
19671
  o1(M.to)
19672
- ), M = {}, M.ms = z.milliseconds, M.M = z.months), c = new xb(M), eb(e) && $0(e, "_locale") && (c._locale = e._locale), eb(e) && $0(e, "_isValid") && (c._isValid = e._isValid), c;
19672
+ ), M = {}, M.ms = z.milliseconds, M.M = z.months), c = new xb(M), eb(e) && H0(e, "_locale") && (c._locale = e._locale), eb(e) && H0(e, "_isValid") && (c._isValid = e._isValid), c;
19673
19673
  }
19674
19674
  k2.fn = xb.prototype;
19675
19675
  k2.invalid = H6;
@@ -19733,7 +19733,7 @@ function am(e) {
19733
19733
  "ms"
19734
19734
  ], t, c, z = b.length;
19735
19735
  for (t = 0; t < z; t += 1)
19736
- c = b[t], M = M || $0(e, c);
19736
+ c = b[t], M = M || H0(e, c);
19737
19737
  return o && M;
19738
19738
  }
19739
19739
  function Om(e) {
@@ -19752,7 +19752,7 @@ function im(e) {
19752
19752
  "sameElse"
19753
19753
  ], t, c;
19754
19754
  for (t = 0; t < b.length; t += 1)
19755
- c = b[t], M = M || $0(e, c);
19755
+ c = b[t], M = M || H0(e, c);
19756
19756
  return o && M;
19757
19757
  }
19758
19758
  function sm(e, o) {
@@ -20158,13 +20158,13 @@ function Km() {
20158
20158
  return this.year();
20159
20159
  }
20160
20160
  function Vm(e) {
20161
- return $0(this, "_erasNameRegex") || Kc.call(this), e ? this._erasNameRegex : this._erasRegex;
20161
+ return H0(this, "_erasNameRegex") || Kc.call(this), e ? this._erasNameRegex : this._erasRegex;
20162
20162
  }
20163
20163
  function Qm(e) {
20164
- return $0(this, "_erasAbbrRegex") || Kc.call(this), e ? this._erasAbbrRegex : this._erasRegex;
20164
+ return H0(this, "_erasAbbrRegex") || Kc.call(this), e ? this._erasAbbrRegex : this._erasRegex;
20165
20165
  }
20166
20166
  function Zm(e) {
20167
- return $0(this, "_erasNarrowRegex") || Kc.call(this), e ? this._erasNarrowRegex : this._erasRegex;
20167
+ return H0(this, "_erasNarrowRegex") || Kc.call(this), e ? this._erasNarrowRegex : this._erasRegex;
20168
20168
  }
20169
20169
  function Yc(e, o) {
20170
20170
  return o.erasAbbrRegex(e);
@@ -20454,39 +20454,39 @@ function uh() {
20454
20454
  function ya(e) {
20455
20455
  return e;
20456
20456
  }
20457
- var H0 = Sc.prototype;
20458
- H0.calendar = of;
20459
- H0.longDateFormat = cf;
20460
- H0.invalidDate = nf;
20461
- H0.ordinal = af;
20462
- H0.preparse = ya;
20463
- H0.postformat = ya;
20464
- H0.relativeTime = sf;
20465
- H0.pastFuture = df;
20466
- H0.set = JW;
20467
- H0.eras = Um;
20468
- H0.erasParse = $m;
20469
- H0.erasConvertYear = Hm;
20470
- H0.erasAbbrRegex = Qm;
20471
- H0.erasNameRegex = Vm;
20472
- H0.erasNarrowRegex = Zm;
20473
- H0.months = _f;
20474
- H0.monthsShort = Sf;
20475
- H0.monthsParse = Xf;
20476
- H0.monthsRegex = If;
20477
- H0.monthsShortRegex = Ef;
20478
- H0.week = Df;
20479
- H0.firstDayOfYear = Ff;
20480
- H0.firstDayOfWeek = Pf;
20481
- H0.weekdays = Zf;
20482
- H0.weekdaysMin = e6;
20483
- H0.weekdaysShort = Jf;
20484
- H0.weekdaysParse = M6;
20485
- H0.weekdaysRegex = z6;
20486
- H0.weekdaysShortRegex = n6;
20487
- H0.weekdaysMinRegex = p6;
20488
- H0.isPM = a6;
20489
- H0.meridiem = s6;
20457
+ var G0 = Sc.prototype;
20458
+ G0.calendar = of;
20459
+ G0.longDateFormat = cf;
20460
+ G0.invalidDate = nf;
20461
+ G0.ordinal = af;
20462
+ G0.preparse = ya;
20463
+ G0.postformat = ya;
20464
+ G0.relativeTime = sf;
20465
+ G0.pastFuture = df;
20466
+ G0.set = JW;
20467
+ G0.eras = Um;
20468
+ G0.erasParse = $m;
20469
+ G0.erasConvertYear = Hm;
20470
+ G0.erasAbbrRegex = Qm;
20471
+ G0.erasNameRegex = Vm;
20472
+ G0.erasNarrowRegex = Zm;
20473
+ G0.months = _f;
20474
+ G0.monthsShort = Sf;
20475
+ G0.monthsParse = Xf;
20476
+ G0.monthsRegex = If;
20477
+ G0.monthsShortRegex = Ef;
20478
+ G0.week = Df;
20479
+ G0.firstDayOfYear = Ff;
20480
+ G0.firstDayOfWeek = Pf;
20481
+ G0.weekdays = Zf;
20482
+ G0.weekdaysMin = e6;
20483
+ G0.weekdaysShort = Jf;
20484
+ G0.weekdaysParse = M6;
20485
+ G0.weekdaysRegex = z6;
20486
+ G0.weekdaysShortRegex = n6;
20487
+ G0.weekdaysMinRegex = p6;
20488
+ G0.isPM = a6;
20489
+ G0.meridiem = s6;
20490
20490
  function hb(e, o, M, b) {
20491
20491
  var t = We(), c = J2().set(b, o);
20492
20492
  return t[M](c, e);
@@ -20838,7 +20838,7 @@ function oR() {
20838
20838
  function W(m) {
20839
20839
  m && this._set(f(m));
20840
20840
  }
20841
- function N(m, w) {
20841
+ function y(m, w) {
20842
20842
  var E = w.length;
20843
20843
  if (m < w[0])
20844
20844
  return 0;
@@ -20856,7 +20856,7 @@ function oR() {
20856
20856
  },
20857
20857
  _index: function(m) {
20858
20858
  var w = +m, E = this.untils, $;
20859
- if ($ = N(w, E), $ >= 0)
20859
+ if ($ = y(w, E), $ >= 0)
20860
20860
  return $;
20861
20861
  },
20862
20862
  countries: function() {
@@ -20882,7 +20882,7 @@ function oR() {
20882
20882
  return this.offsets[this._index(m)];
20883
20883
  }
20884
20884
  };
20885
- function y(m, w) {
20885
+ function N(m, w) {
20886
20886
  this.name = m, this.zones = w;
20887
20887
  }
20888
20888
  function L(m) {
@@ -20911,12 +20911,12 @@ function oR() {
20911
20911
  function C(m, w) {
20912
20912
  return m.offsetScore !== w.offsetScore ? m.offsetScore - w.offsetScore : m.abbrScore !== w.abbrScore ? m.abbrScore - w.abbrScore : m.zone.population !== w.zone.population ? w.zone.population - m.zone.population : w.zone.name.localeCompare(m.zone.name);
20913
20913
  }
20914
- function k(m, w) {
20914
+ function x(m, w) {
20915
20915
  var E, $;
20916
20916
  for (u(w), E = 0; E < w.length; E++)
20917
20917
  $ = w[E], p[$] = p[$] || {}, p[$][m] = !0;
20918
20918
  }
20919
- function x(m) {
20919
+ function k(m) {
20920
20920
  var w = m.length, E = {}, $ = [], p0 = {}, m0, B0, N0, I0;
20921
20921
  for (m0 = 0; m0 < w; m0++)
20922
20922
  if (N0 = m[m0].offset, !p0.hasOwnProperty(N0)) {
@@ -20940,7 +20940,7 @@ function oR() {
20940
20940
  }
20941
20941
  } catch {
20942
20942
  }
20943
- var E = B(), $ = E.length, p0 = x(E), m0 = [], B0, N0, I0;
20943
+ var E = B(), $ = E.length, p0 = k(E), m0 = [], B0, N0, I0;
20944
20944
  for (N0 = 0; N0 < p0.length; N0++) {
20945
20945
  for (B0 = new h(S(p0[N0])), I0 = 0; I0 < $; I0++)
20946
20946
  B0.scoreOffsetAt(E[I0]);
@@ -20957,7 +20957,7 @@ function oR() {
20957
20957
  function T(m) {
20958
20958
  var w, E, $, p0;
20959
20959
  for (typeof m == "string" && (m = [m]), w = 0; w < m.length; w++)
20960
- $ = m[w].split("|"), E = $[0], p0 = P(E), b[p0] = m[w], z[p0] = E, k(p0, $[2].split(" "));
20960
+ $ = m[w].split("|"), E = $[0], p0 = P(E), b[p0] = m[w], z[p0] = E, x(p0, $[2].split(" "));
20961
20961
  }
20962
20962
  function S(m, w) {
20963
20963
  m = P(m);
@@ -20978,11 +20978,11 @@ function oR() {
20978
20978
  for (typeof m == "string" && (m = [m]), w = 0; w < m.length; w++)
20979
20979
  E = m[w].split("|"), $ = P(E[0]), p0 = P(E[1]), t[$] = p0, z[$] = E[0], t[p0] = $, z[p0] = E[1];
20980
20980
  }
20981
- function l0(m) {
20981
+ function d0(m) {
20982
20982
  var w, E, $, p0;
20983
20983
  if (!(!m || !m.length))
20984
20984
  for (w = 0; w < m.length; w++)
20985
- p0 = m[w].split("|"), E = p0[0].toUpperCase(), $ = p0[1].split(" "), c[E] = new y(
20985
+ p0 = m[w].split("|"), E = p0[0].toUpperCase(), $ = p0[1].split(" "), c[E] = new N(
20986
20986
  E,
20987
20987
  $
20988
20988
  );
@@ -21002,7 +21002,7 @@ function oR() {
21002
21002
  }) : E;
21003
21003
  }
21004
21004
  function X0(m) {
21005
- T(m.zones), s0(m.links), l0(m.countries), c0.dataVersion = m.version;
21005
+ T(m.zones), s0(m.links), d0(m.countries), c0.dataVersion = m.version;
21006
21006
  }
21007
21007
  function f0(m) {
21008
21008
  return f0.didShowError || (f0.didShowError = !0, z0("moment.tz.zoneExists('" + m + "') has been deprecated in favor of !moment.tz.zone('" + m + "')")), !!S(m);
@@ -21037,7 +21037,7 @@ function oR() {
21037
21037
  if (this._z)
21038
21038
  return this._z.name;
21039
21039
  };
21040
- function j0(m) {
21040
+ function U0(m) {
21041
21041
  return function() {
21042
21042
  return this._z ? this._z.abbr(this) : m.call(this);
21043
21043
  };
@@ -21047,12 +21047,12 @@ function oR() {
21047
21047
  return this._z = null, m.apply(this, arguments);
21048
21048
  };
21049
21049
  }
21050
- function U0(m) {
21050
+ function $0(m) {
21051
21051
  return function() {
21052
21052
  return arguments.length > 0 && (this._z = null), m.apply(this, arguments);
21053
21053
  };
21054
21054
  }
21055
- O0.zoneName = j0(O0.zoneName), O0.zoneAbbr = j0(O0.zoneAbbr), O0.utc = w0(O0.utc), O0.local = w0(O0.local), O0.utcOffset = U0(O0.utcOffset), o.tz.setDefault = function(m) {
21055
+ O0.zoneName = U0(O0.zoneName), O0.zoneAbbr = U0(O0.zoneAbbr), O0.utc = w0(O0.utc), O0.local = w0(O0.local), O0.utcOffset = $0(O0.utcOffset), o.tz.setDefault = function(m) {
21056
21056
  return (O < 2 || O === 2 && i < 9) && z0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js " + o.version + "."), o.defaultZone = m ? S(m) : null, o;
21057
21057
  };
21058
21058
  var j = o.momentProperties;
@@ -21155,18 +21155,18 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21155
21155
  const { translations: a, translate: O } = Q(), { isDark: i } = S0(), s = V(
21156
21156
  () => i ? rR(RM(i)) : {},
21157
21157
  [i]
21158
- ), l = p === "edit", [u, d] = I(""), [q, f] = I(ro.tz(z).endOf("day")), [W, N] = I(""), [y, L] = I(void 0), [h, g] = I(""), [B, C] = I(""), [k, x] = I(""), D = () => {
21158
+ ), l = p === "edit", [u, d] = I(""), [q, f] = I(ro.tz(z).endOf("day")), [W, y] = I(""), [N, L] = I(void 0), [h, g] = I(""), [B, C] = I(""), [x, k] = I(""), D = () => {
21159
21159
  let J = !1;
21160
- u.trim() ? u.length > YM ? (g(O("Title must be %{max} characters or less", { max: YM })), J = !0) : g("") : (g(a.titleIsRequired), J = !0), !q || !q.isValid() ? (C(a.dateIsRequired), J = !0) : C(""), W.length > ft ? (x(
21160
+ u.trim() ? u.length > YM ? (g(O("Title must be %{max} characters or less", { max: YM })), J = !0) : g("") : (g(a.titleIsRequired), J = !0), !q || !q.isValid() ? (C(a.dateIsRequired), J = !0) : C(""), W.length > ft ? (k(
21161
21161
  O("Details must be %{max} characters or less", { max: ft })
21162
- ), J = !0) : x(""), !J && (M({
21162
+ ), J = !0) : k(""), !J && (M({
21163
21163
  title: u.trim(),
21164
21164
  todo_date: (q == null ? void 0 : q.toISOString()) || (/* @__PURE__ */ new Date()).toISOString(),
21165
21165
  details: W.trim() || void 0,
21166
- course_id: y
21166
+ course_id: N
21167
21167
  }), l || H());
21168
21168
  }, H = () => {
21169
- d(""), f(ro.tz(z).endOf("day")), N(""), L(void 0), g(""), C(""), x("");
21169
+ d(""), f(ro.tz(z).endOf("day")), y(""), L(void 0), g(""), C(""), k("");
21170
21170
  }, P = () => {
21171
21171
  H(), o();
21172
21172
  };
@@ -21177,10 +21177,10 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21177
21177
  const J = r.todo_date ? ro.tz(r.todo_date, z) : null;
21178
21178
  f(
21179
21179
  J && J.isValid() ? J : ro.tz(z).endOf("day")
21180
- ), N(r.details || ""), L(r.course_id);
21180
+ ), y(r.details || ""), L(r.course_id);
21181
21181
  } else
21182
- d(""), f(ro.tz(z).endOf("day")), N(""), L(void 0);
21183
- g(""), C(""), x("");
21182
+ d(""), f(ro.tz(z).endOf("day")), y(""), L(void 0);
21183
+ g(""), C(""), k("");
21184
21184
  }
21185
21185
  }, [e, l, r, z]);
21186
21186
  const T = (J, X0) => {
@@ -21192,13 +21192,13 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21192
21192
  }, _ = (J, X0) => J ? O("%{date} is not a valid date.", { date: J }) : a.youMustProvideDateTime, Z = u.trim().length > 0 && q && q.isValid(), s0 = {
21193
21193
  value: "none",
21194
21194
  label: a.optionalAddCourse
21195
- }, l0 = V(
21195
+ }, d0 = V(
21196
21196
  () => (t || []).filter((J) => J.enrollmentType === "StudentEnrollment" || J.is_student).map((J) => ({
21197
21197
  value: J.id,
21198
21198
  label: J.longName || J.long_name || ""
21199
21199
  })),
21200
21200
  [t]
21201
- ), u0 = y || "none";
21201
+ ), u0 = N || "none";
21202
21202
  return /* @__PURE__ */ n(Fe, { theme: s, children: /* @__PURE__ */ v(
21203
21203
  g1,
21204
21204
  {
@@ -21268,7 +21268,7 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21268
21268
  value: u0,
21269
21269
  onChange: S,
21270
21270
  interaction: b ? "disabled" : "enabled",
21271
- children: [s0, ...l0].map((J) => /* @__PURE__ */ n(E0.Option, { id: J.value, value: J.value, children: J.label }, J.value))
21271
+ children: [s0, ...d0].map((J) => /* @__PURE__ */ n(E0.Option, { id: J.value, value: J.value, children: J.label }, J.value))
21272
21272
  }
21273
21273
  ) }),
21274
21274
  /* @__PURE__ */ n(A.Item, { overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(
@@ -21278,9 +21278,9 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21278
21278
  label: a.details,
21279
21279
  value: W,
21280
21280
  onChange: (J) => {
21281
- N(J.target.value), k && J.target.value.length <= ft && x("");
21281
+ y(J.target.value), x && J.target.value.length <= ft && k("");
21282
21282
  },
21283
- messages: k ? [{ type: "error", text: k }] : [],
21283
+ messages: x ? [{ type: "error", text: x }] : [],
21284
21284
  height: "10rem",
21285
21285
  disabled: b,
21286
21286
  maxHeight: "10rem"
@@ -21289,7 +21289,7 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21289
21289
  ] }) }),
21290
21290
  /* @__PURE__ */ n(g1.Footer, { children: /* @__PURE__ */ v(A, { justifyItems: "end", gap: "small", children: [
21291
21291
  /* @__PURE__ */ n(A.Item, { overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(
21292
- G0,
21292
+ j0,
21293
21293
  {
21294
21294
  "data-testid": "create-todo-cancel-button",
21295
21295
  onClick: P,
@@ -21298,7 +21298,7 @@ const ro = /* @__PURE__ */ ki(pR), rR = (e) => ({
21298
21298
  }
21299
21299
  ) }),
21300
21300
  /* @__PURE__ */ n(A.Item, { overflowX: "visible", overflowY: "visible", children: /* @__PURE__ */ n(
21301
- G0,
21301
+ j0,
21302
21302
  {
21303
21303
  "data-testid": "create-todo-submit-button",
21304
21304
  onClick: D,
@@ -21453,7 +21453,7 @@ async function fR(e, o) {
21453
21453
  }
21454
21454
  const Ub = "plannerItems", mR = 100;
21455
21455
  function hR(e = {}) {
21456
- const { perPage: o = 5, startDate: M, endDate: b, order: t = "asc", filter: c, observedUserId: z } = e, { currentUserId: p } = R0(), [r, a] = I(0), [O, i] = I([]), [s, l] = I(null), [u, d] = I(null), [q, f] = I(!1), [W, N] = I(null), y = e0(0), L = V(() => {
21456
+ const { perPage: o = 5, startDate: M, endDate: b, order: t = "asc", filter: c, observedUserId: z } = e, { currentUserId: p } = R0(), [r, a] = I(0), [O, i] = I([]), [s, l] = I(null), [u, d] = I(null), [q, f] = I(!1), [W, y] = I(null), N = e0(0), L = V(() => {
21457
21457
  const c0 = {
21458
21458
  per_page: o,
21459
21459
  order: t
@@ -21464,8 +21464,8 @@ function hR(e = {}) {
21464
21464
  dataUpdatedAt: g,
21465
21465
  isLoading: B,
21466
21466
  isFetching: C,
21467
- error: k,
21468
- refetch: x
21467
+ error: x,
21468
+ refetch: k
21469
21469
  } = r1({
21470
21470
  queryKey: [Ub, p, L],
21471
21471
  queryFn: () => Gn(L),
@@ -21476,33 +21476,33 @@ function hR(e = {}) {
21476
21476
  placeholderData: Q2
21477
21477
  }), [D, H] = I(0);
21478
21478
  r0(() => {
21479
- h && (H(g), y.current += 1, i(h.items), l(h.nextUrl), d(h.totalItems ?? null), f(!1), N(null));
21479
+ h && (H(g), N.current += 1, i(h.items), l(h.nextUrl), d(h.totalItems ?? null), f(!1), y(null));
21480
21480
  }, [h, g]);
21481
21481
  const P = s ? u : O.length, T = P === null ? null : Math.max(Math.ceil(P / o), 1) - 1, S = (r + 1) * o, _ = Math.min(S, P ?? S) - O.length;
21482
21482
  r0(() => {
21483
21483
  h && T !== null && r > T && a(T);
21484
21484
  }, [h, r, T]), r0(() => {
21485
21485
  if (_ <= 0 || !s || q || (W == null ? void 0 : W.url) === s) return;
21486
- const c0 = y.current;
21486
+ const c0 = N.current;
21487
21487
  f(!0), Gn({ ...L, per_page: Math.min(_, mR) }, s).then((O0) => {
21488
- c0 === y.current && (i((j0) => [...j0, ...O0.items]), l(O0.nextUrl));
21488
+ c0 === N.current && (i((U0) => [...U0, ...O0.items]), l(O0.nextUrl));
21489
21489
  }).catch((O0) => {
21490
- c0 === y.current && N({ url: s, error: O0 });
21490
+ c0 === N.current && y({ url: s, error: O0 });
21491
21491
  }).finally(() => {
21492
- c0 === y.current && f(!1);
21492
+ c0 === N.current && f(!1);
21493
21493
  });
21494
21494
  }, [_, s, q, W, L]);
21495
21495
  const Z = U((c0) => {
21496
21496
  a(c0 - 1);
21497
21497
  }, []), s0 = U(() => {
21498
21498
  a(0);
21499
- }, []), l0 = U(() => {
21500
- i([]), l(null), d(null), N(null), a(0), x();
21501
- }, [x]), u0 = U(
21502
- (c0, O0, j0) => {
21499
+ }, []), d0 = U(() => {
21500
+ i([]), l(null), d(null), y(null), a(0), k();
21501
+ }, [k]), u0 = U(
21502
+ (c0, O0, U0) => {
21503
21503
  i(
21504
21504
  (w0) => w0.map(
21505
- (U0) => U0.plannable_id === c0 && U0.plannable_type === O0 ? { ...U0, planner_override: j0 } : U0
21505
+ ($0) => $0.plannable_id === c0 && $0.plannable_type === O0 ? { ...$0, planner_override: U0 } : $0
21506
21506
  )
21507
21507
  );
21508
21508
  },
@@ -21516,8 +21516,8 @@ function hR(e = {}) {
21516
21516
  resetPagination: s0,
21517
21517
  isLoading: B,
21518
21518
  isPaginationLoading: (C || q || J || g !== D) && O.length > 0,
21519
- error: k ?? (W == null ? void 0 : W.error) ?? null,
21520
- refetch: l0,
21519
+ error: x ?? (W == null ? void 0 : W.error) ?? null,
21520
+ refetch: d0,
21521
21521
  updateItemOverride: u0
21522
21522
  };
21523
21523
  }
@@ -21550,7 +21550,7 @@ function LR(e = {}) {
21550
21550
  }),
21551
21551
  onSuccess: (c, z) => {
21552
21552
  var p;
21553
- (p = e.onSuccess) == null || p.call(e, c, z), o.invalidateQueries({ queryKey: [Ub] });
21553
+ (p = e.onSuccess) == null || p.call(e, c, z), z.markedComplete && b({ type: "success", message: M.todoItemMarkedAsDone }), o.invalidateQueries({ queryKey: [Ub] });
21554
21554
  },
21555
21555
  onError: () => {
21556
21556
  b({ type: "error", message: M.failedToUpdateItem });
@@ -21637,18 +21637,18 @@ const SR = ({
21637
21637
  readOnly: b = !1,
21638
21638
  markDoneButtonRef: t
21639
21639
  }) => {
21640
- var T, S;
21641
- const { translations: c, translate: z } = Q(), { locale: p, timezone: r } = R0(), { isDark: a } = S0(), O = RM(a), i = r || Intl.DateTimeFormat().resolvedOptions().timeZone, s = e.plannable_type === "announcement", l = e.plannable_type === "planner_note", u = s ? yR(e.plannable_date, z, p, i) : NR(e.plannable_date, c, z, p, i), d = !s && BR(e.plannable_date), q = !s && TR(e.plannable.lock_at), f = vR(e.plannable_type, c), { toggleComplete: W, isLoading: N } = LR({
21642
- onSuccess: (_, { item: Z }) => {
21643
- o == null || o(Z.plannable_id, Z.plannable_type, _);
21640
+ var S, _;
21641
+ const { translations: c, translate: z } = Q(), { locale: p, timezone: r } = R0(), { isDark: a } = S0(), O = RM(a), i = r || Intl.DateTimeFormat().resolvedOptions().timeZone, s = e.plannable_type === "announcement", l = e.plannable_type === "planner_note", u = s ? yR(e.plannable_date, z, p, i) : NR(e.plannable_date, c, z, p, i), d = !s && BR(e.plannable_date), q = !s && TR(e.plannable.lock_at), f = vR(e.plannable_type, c), W = e0(!1), { toggleComplete: y, isLoading: N } = LR({
21642
+ onSuccess: (Z, { item: s0, markedComplete: d0 }) => {
21643
+ W.current = d0 && !!o, o == null || o(s0.plannable_id, s0.plannable_type, Z);
21644
21644
  }
21645
- }), y = e0(null), L = e0(!1), h = typeof e.submissions == "object", g = e.submissions && h && e.submissions.excused === !0, B = e.planner_override ? e.planner_override.marked_complete : e.submissions && h && e.submissions.submitted && !e.submissions.redo_request, C = g && ((T = e.planner_override) == null ? void 0 : T.marked_complete) !== !1, k = !!(B || C), x = e.course_id || e.plannable.course_id, D = e.plannable.points_possible, H = D != null && D > 0;
21645
+ }), L = e0(null), h = e0(!1), g = typeof e.submissions == "object", B = e.submissions && g && e.submissions.excused === !0, C = e.planner_override ? e.planner_override.marked_complete : e.submissions && g && e.submissions.submitted && !e.submissions.redo_request, x = B && ((S = e.planner_override) == null ? void 0 : S.marked_complete) !== !1, k = !!(C || x), D = e.course_id || e.plannable.course_id, H = e.plannable.points_possible, P = H != null && H > 0;
21646
21646
  r0(() => {
21647
- var _;
21648
- L.current && !N && ((_ = y.current) == null || _.focus()), L.current = N;
21647
+ var Z;
21648
+ h.current && !N && !W.current && ((Z = L.current) == null || Z.focus()), h.current = N;
21649
21649
  }, [N]);
21650
- const P = () => {
21651
- W({
21650
+ const T = () => {
21651
+ W.current = !1, y({
21652
21652
  item: e,
21653
21653
  markedComplete: !k
21654
21654
  });
@@ -21664,7 +21664,7 @@ const SR = ({
21664
21664
  background: "secondary",
21665
21665
  "data-testid": `todo-item-${e.plannable_id}`,
21666
21666
  role: "group",
21667
- "aria-label": ((S = e.plannable) == null ? void 0 : S.title) ?? c.unnamedTodo,
21667
+ "aria-label": ((_ = e.plannable) == null ? void 0 : _.title) ?? c.unnamedTodo,
21668
21668
  themeOverride: {
21669
21669
  backgroundSecondary: O.cardSecondary
21670
21670
  },
@@ -21706,19 +21706,19 @@ const SR = ({
21706
21706
  }
21707
21707
  ) }),
21708
21708
  e.plannable.details && /* @__PURE__ */ n(A.Item, { children: /* @__PURE__ */ n(F, { size: "small", color: "secondary", wrap: "break-word", lineHeight: "condensed", children: e.plannable.details }) }),
21709
- x && e.context_name && /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
21709
+ D && e.context_name && /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ n(
21710
21710
  p1,
21711
21711
  {
21712
- href: `/courses/${x}`,
21712
+ href: `/courses/${D}`,
21713
21713
  isWithinText: !1,
21714
21714
  "data-testid": `todo-item-course-link-${e.plannable_id}`,
21715
21715
  children: /* @__PURE__ */ n(F, { wrap: "break-word", size: "small", color: "secondary", children: e.context_name })
21716
21716
  }
21717
21717
  ) }),
21718
21718
  /* @__PURE__ */ n(A.Item, { overflowY: "visible", children: /* @__PURE__ */ v(F, { size: "small", children: [
21719
- g ? /* @__PURE__ */ n(F, { size: "small", color: "success", children: c.excused }) : q ? /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: c.closed }) : u && /* @__PURE__ */ n(F, { size: "small", color: d ? "danger" : "secondary", children: u }),
21720
- (q || u) && H && /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: " | " }),
21721
- H && /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: z("%{points} points", { points: D }) })
21719
+ B ? /* @__PURE__ */ n(F, { size: "small", color: "success", children: c.excused }) : q ? /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: c.closed }) : u && /* @__PURE__ */ n(F, { size: "small", color: d ? "danger" : "secondary", children: u }),
21720
+ (q || u) && P && /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: " | " }),
21721
+ P && /* @__PURE__ */ n(F, { size: "small", color: "secondary", children: z("%{points} points", { points: H }) })
21722
21722
  ] }) }),
21723
21723
  /* @__PURE__ */ n(A.Item, { margin: "x-small 0 0 0", overflowY: "visible", overflowX: "visible", children: /* @__PURE__ */ n(A, { gap: "small", alignItems: "center", children: /* @__PURE__ */ n(A.Item, { overflowY: "visible", overflowX: "visible", children: N ? /* @__PURE__ */ n(
21724
21724
  j1,
@@ -21728,14 +21728,14 @@ const SR = ({
21728
21728
  "data-testid": `todo-checkbox-loading-${e.plannable_id}`
21729
21729
  }
21730
21730
  ) : /* @__PURE__ */ n(
21731
- G0,
21731
+ j0,
21732
21732
  {
21733
- elementRef: (_) => {
21734
- y.current = _, t == null || t(y.current);
21733
+ elementRef: (Z) => {
21734
+ L.current = Z, t == null || t(L.current);
21735
21735
  },
21736
21736
  color: k ? "success" : "secondary",
21737
21737
  renderIcon: k ? /* @__PURE__ */ n(Zt, {}) : /* @__PURE__ */ n(dO, {}),
21738
- onClick: P,
21738
+ onClick: T,
21739
21739
  "data-testid": `todo-checkbox-${e.plannable_id}`,
21740
21740
  interaction: b ? "disabled" : "enabled",
21741
21741
  themeOverride: a && !k ? {
@@ -21777,14 +21777,14 @@ const XR = ({
21777
21777
  "filter",
21778
21778
  "incomplete_items",
21779
21779
  CR
21780
- ), l = c || Intl.DateTimeFormat().resolvedOptions().timeZone, u = V(() => _R(l), [l]), { mutate: d, isPending: q } = RR(), { mutate: f, isPending: W } = gR(), { sharedCourseData: N, observedUserId: y } = S0(), {
21780
+ ), l = c || Intl.DateTimeFormat().resolvedOptions().timeZone, u = V(() => _R(l), [l]), { mutate: d, isPending: q } = RR(), { mutate: f, isPending: W } = gR(), { sharedCourseData: y, observedUserId: N } = S0(), {
21781
21781
  currentPage: L,
21782
21782
  currentPageIndex: h,
21783
21783
  totalPages: g,
21784
21784
  goToPage: B,
21785
21785
  isLoading: C,
21786
- isPaginationLoading: k,
21787
- error: x,
21786
+ isPaginationLoading: x,
21787
+ error: k,
21788
21788
  refetch: D,
21789
21789
  resetPagination: H,
21790
21790
  updateItemOverride: P
@@ -21793,7 +21793,7 @@ const XR = ({
21793
21793
  startDate: u.startDate,
21794
21794
  endDate: u.endDate,
21795
21795
  filter: i === "all" ? void 0 : i,
21796
- observedUserId: y
21796
+ observedUserId: N
21797
21797
  }), T = e0(/* @__PURE__ */ new Map()), S = e0(null), _ = e0(null);
21798
21798
  I1.useEffect(() => {
21799
21799
  H();
@@ -21802,29 +21802,30 @@ const XR = ({
21802
21802
  }, [i, h]);
21803
21803
  const Z = U(
21804
21804
  (W0, z0, c0) => {
21805
- const O0 = ao({ plannable_id: W0, plannable_type: z0 }), j0 = L.findIndex((w0) => ao(w0) === O0);
21806
- _.current = j0 === -1 ? null : { key: O0, index: j0, sawLoading: !1 }, P(W0, z0, c0);
21805
+ const O0 = ao({ plannable_id: W0, plannable_type: z0 }), U0 = L.findIndex((w0) => ao(w0) === O0);
21806
+ _.current = U0 === -1 ? null : { key: O0, index: U0, sawLoading: !1 }, P(W0, z0, c0);
21807
21807
  },
21808
21808
  [L, P]
21809
21809
  );
21810
21810
  r0(() => {
21811
+ var O0;
21811
21812
  const W0 = _.current;
21812
21813
  if (!W0) return;
21813
- if (k) {
21814
+ if (x) {
21814
21815
  W0.sawLoading = !0;
21815
21816
  return;
21816
21817
  }
21817
- if (L.some((O0) => ao(O0) === W0.key)) {
21818
- W0.sawLoading && (_.current = null);
21818
+ if (L.some((U0) => ao(U0) === W0.key)) {
21819
+ W0.sawLoading && (_.current = null, (O0 = T.current.get(W0.key)) == null || O0.focus());
21819
21820
  return;
21820
21821
  }
21821
21822
  _.current = null;
21822
21823
  const z0 = L[Math.min(W0.index, L.length - 1)], c0 = z0 ? T.current.get(ao(z0)) : S.current;
21823
21824
  c0 == null || c0.focus();
21824
- }, [L, k]);
21825
+ }, [L, x]);
21825
21826
  const s0 = (W0) => (z0) => {
21826
21827
  z0 ? T.current.set(W0, z0) : T.current.delete(W0);
21827
- }, l0 = (W0) => {
21828
+ }, d0 = (W0) => {
21828
21829
  d(W0, {
21829
21830
  onSuccess: () => {
21830
21831
  r(!1), z({
@@ -21869,12 +21870,12 @@ const XR = ({
21869
21870
  } : null,
21870
21871
  [a]
21871
21872
  ), X0 = V(
21872
- () => N.map((W0) => ({
21873
+ () => y.map((W0) => ({
21873
21874
  id: W0.courseId,
21874
21875
  longName: W0.courseName,
21875
21876
  is_student: !0
21876
21877
  })),
21877
- [N]
21878
+ [y]
21878
21879
  ), f0 = () => /* @__PURE__ */ v(X, { as: "div", children: [
21879
21880
  /* @__PURE__ */ n(X, { as: "div", padding: "small 0", borderWidth: "0 0 small 0", children: /* @__PURE__ */ v(
21880
21881
  E0,
@@ -21900,7 +21901,7 @@ const XR = ({
21900
21901
  onItemUpdate: Z,
21901
21902
  markDoneButtonRef: s0(ao(W0)),
21902
21903
  onEdit: O,
21903
- readOnly: !!y
21904
+ readOnly: !!N
21904
21905
  }
21905
21906
  ) }, ao(W0))) }) })
21906
21907
  ] });
@@ -21912,11 +21913,11 @@ const XR = ({
21912
21913
  isEditMode: o,
21913
21914
  dragHandleProps: M,
21914
21915
  isLoading: C,
21915
- error: x ? b.failedToLoadTodoItems : null,
21916
+ error: k ? b.failedToLoadTodoItems : null,
21916
21917
  onRetry: D,
21917
21918
  loadingText: b.loadingTodoItems,
21918
- headerActions: !y && /* @__PURE__ */ n(
21919
- G0,
21919
+ headerActions: !N && /* @__PURE__ */ n(
21920
+ j0,
21920
21921
  {
21921
21922
  size: "small",
21922
21923
  onClick: () => r(!0),
@@ -21934,7 +21935,7 @@ const XR = ({
21934
21935
  ariaLabel: b.todoListPagination
21935
21936
  },
21936
21937
  loadingOverlay: {
21937
- isLoading: k,
21938
+ isLoading: x,
21938
21939
  ariaLabel: b.loadingTodoItems
21939
21940
  },
21940
21941
  children: f0()
@@ -21947,7 +21948,7 @@ const XR = ({
21947
21948
  onDismiss: () => {
21948
21949
  r(!1), O(null);
21949
21950
  },
21950
- onSubmit: a ? u0 : l0,
21951
+ onSubmit: a ? u0 : d0,
21951
21952
  isCreating: a ? W : q,
21952
21953
  courses: X0,
21953
21954
  locale: t,
@@ -22164,8 +22165,8 @@ function PR({
22164
22165
  currentPage: q,
22165
22166
  currentPageIndex: f,
22166
22167
  totalPages: W,
22167
- goToPage: N,
22168
- resetPagination: y,
22168
+ goToPage: y,
22169
+ resetPagination: N,
22169
22170
  refetch: L,
22170
22171
  isLoading: h,
22171
22172
  error: g
@@ -22173,20 +22174,20 @@ function PR({
22173
22174
  pageSize: d,
22174
22175
  accountIds: l,
22175
22176
  ...u
22176
- }), B = (q == null ? void 0 : q.items) || [], C = M || h, k = t || (() => L()), x = U(
22177
+ }), B = (q == null ? void 0 : q.items) || [], C = M || h, x = t || (() => L()), k = U(
22177
22178
  (H, P) => {
22178
- P.value && typeof P.value == "string" && (O(P.value), y());
22179
+ P.value && typeof P.value == "string" && (O(P.value), N());
22179
22180
  },
22180
- [O, y]
22181
+ [O, N]
22181
22182
  ), D = U(
22182
22183
  (H, P) => {
22183
- P.value && typeof P.value == "string" && (s(P.value), y());
22184
+ P.value && typeof P.value == "string" && (s(P.value), N());
22184
22185
  },
22185
- [s, y]
22186
+ [s, N]
22186
22187
  );
22187
22188
  return g && !b ? /* @__PURE__ */ n(f1, { widget: e, isEditMode: o, children: /* @__PURE__ */ n(X, { as: "div", padding: "small", children: /* @__PURE__ */ n(qe, { variant: "error", margin: "0", children: /* @__PURE__ */ v(X, { as: "div", children: [
22188
22189
  c.failedToLoadMyCourseWork,
22189
- /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(G0, { size: "small", onClick: () => L(), "data-testid": "upcoming-work-refresh", children: c.refresh }) })
22190
+ /* @__PURE__ */ n(X, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ n(j0, { size: "small", onClick: () => L(), "data-testid": "upcoming-work-refresh", children: c.refresh }) })
22190
22191
  ] }) }) }) }) : /* @__PURE__ */ n(
22191
22192
  f1,
22192
22193
  {
@@ -22194,11 +22195,11 @@ function PR({
22194
22195
  isEditMode: o,
22195
22196
  isLoading: C,
22196
22197
  error: b ? c.failedToLoadMyCourseWork : null,
22197
- onRetry: k,
22198
+ onRetry: x,
22198
22199
  pagination: {
22199
22200
  currentPage: f + 1,
22200
22201
  totalPages: W,
22201
- onPageChange: N,
22202
+ onPageChange: y,
22202
22203
  isLoading: h,
22203
22204
  ariaLabel: c.courseWorkPagination
22204
22205
  },
@@ -22208,7 +22209,7 @@ function PR({
22208
22209
  {
22209
22210
  selectedTimeFilter: a,
22210
22211
  selectedAccountId: r ? i : void 0,
22211
- onTimeFilterChange: x,
22212
+ onTimeFilterChange: k,
22212
22213
  onAccountChange: r ? D : void 0
22213
22214
  }
22214
22215
  ) }),
@@ -22366,7 +22367,7 @@ const Ca = {
22366
22367
  padding: "small 0 0 0",
22367
22368
  themeOverride: { borderColorPrimary: a.border },
22368
22369
  children: /* @__PURE__ */ n(
22369
- G0,
22370
+ j0,
22370
22371
  {
22371
22372
  size: "small",
22372
22373
  onClick: b,
@@ -22518,13 +22519,13 @@ const Ca = {
22518
22519
  onAddWidgetClick: M
22519
22520
  }) => {
22520
22521
  const { config: b, moveWidgetToPosition: t } = No(), { translations: c } = Q(), { isMobile: z, isTablet: p } = m1(), { isDark: r } = S0(), a = e || b, O = z || p, i = !!o, [s, l] = I(!1), [u, d] = I(null), q = Hd($d(Ac, { activationConstraint: { distance: 8 } })), f = (B) => {
22521
- const { active: C, over: k } = B, x = YR(
22522
+ const { active: C, over: x } = B, k = YR(
22522
22523
  a.widgets,
22523
22524
  String(C.id),
22524
- k ? String(k.id) : null
22525
+ x ? String(x.id) : null
22525
22526
  );
22526
- x && t(x.widgetId, x.col, x.row);
22527
- }, W = a.widgets.filter((B) => B.position.col === L1).sort((B, C) => B.position.row - C.position.row), N = a.widgets.filter((B) => B.position.col === q1).sort((B, C) => B.position.row - C.position.row), y = (B, C) => {
22527
+ k && t(k.widgetId, k.col, k.row);
22528
+ }, W = a.widgets.filter((B) => B.position.col === L1).sort((B, C) => B.position.row - C.position.row), y = a.widgets.filter((B) => B.position.col === q1).sort((B, C) => B.position.row - C.position.row), N = (B, C) => {
22528
22529
  if (M) {
22529
22530
  M(B, C);
22530
22531
  return;
@@ -22533,9 +22534,9 @@ const Ca = {
22533
22534
  }, L = () => {
22534
22535
  l(!1), d(null);
22535
22536
  }, h = (B, C) => i ? /* @__PURE__ */ n(ZR, { col: B, row: C, isEditMode: i, isDark: r, children: /* @__PURE__ */ n(
22536
- G0,
22537
+ j0,
22537
22538
  {
22538
- onClick: () => y(B, C),
22539
+ onClick: () => N(B, C),
22539
22540
  display: "block",
22540
22541
  textAlign: "center",
22541
22542
  withBackground: !1,
@@ -22552,10 +22553,10 @@ const Ca = {
22552
22553
  }
22553
22554
  ) }) : null, g = (B, C) => /* @__PURE__ */ v(QR, { col: C, isEditMode: i, children: [
22554
22555
  h(C, 1),
22555
- B.map((k) => /* @__PURE__ */ v(I1.Fragment, { children: [
22556
- /* @__PURE__ */ n(VR, { widget: k, isEditMode: i }),
22557
- h(C, k.position.row + 1)
22558
- ] }, k.id))
22556
+ B.map((x) => /* @__PURE__ */ v(I1.Fragment, { children: [
22557
+ /* @__PURE__ */ n(VR, { widget: x, isEditMode: i }),
22558
+ h(C, x.position.row + 1)
22559
+ ] }, x.id))
22559
22560
  ] });
22560
22561
  return /* @__PURE__ */ n(ZA, { sensors: q, collisionDetection: KR, onDragEnd: f, children: /* @__PURE__ */ v(X, { as: "div", padding: z ? "0" : "medium", children: [
22561
22562
  O ? /* @__PURE__ */ v(
@@ -22569,7 +22570,7 @@ const Ca = {
22569
22570
  alignItems: "stretch",
22570
22571
  children: [
22571
22572
  /* @__PURE__ */ n(A.Item, { "data-testid": "widget-column-1-stacked", width: "100%", children: g(W, L1) }),
22572
- /* @__PURE__ */ n(A.Item, { "data-testid": "widget-column-2-stacked", width: "100%", children: g(N, q1) })
22573
+ /* @__PURE__ */ n(A.Item, { "data-testid": "widget-column-2-stacked", width: "100%", children: g(y, q1) })
22573
22574
  ]
22574
22575
  }
22575
22576
  ) : /* @__PURE__ */ v(
@@ -22582,7 +22583,7 @@ const Ca = {
22582
22583
  alignItems: "start",
22583
22584
  children: [
22584
22585
  /* @__PURE__ */ n(A.Item, { shouldGrow: !0, shouldShrink: !0, "data-testid": "widget-column-1", width: "66%", children: g(W, L1) }),
22585
- /* @__PURE__ */ n(A.Item, { shouldGrow: !0, shouldShrink: !0, "data-testid": "widget-column-2", width: "33%", children: g(N, q1) })
22586
+ /* @__PURE__ */ n(A.Item, { shouldGrow: !0, shouldShrink: !0, "data-testid": "widget-column-2", width: "33%", children: g(y, q1) })
22586
22587
  ]
22587
22588
  }
22588
22589
  ),
@@ -22767,8 +22768,8 @@ function pg({
22767
22768
  ) })
22768
22769
  ] }),
22769
22770
  /* @__PURE__ */ v(g1.Footer, { children: [
22770
- /* @__PURE__ */ n(G0, { "data-testid": "close-modal", onClick: o, margin: "0 x-small 0 0", children: t.close }),
22771
- /* @__PURE__ */ n(G0, { "data-testid": "add-student-btn", onClick: i, color: "primary", children: t.addStudentModalPairButton })
22771
+ /* @__PURE__ */ n(j0, { "data-testid": "close-modal", onClick: o, margin: "0 x-small 0 0", children: t.close }),
22772
+ /* @__PURE__ */ n(j0, { "data-testid": "add-student-btn", onClick: i, color: "primary", children: t.addStudentModalPairButton })
22772
22773
  ] })
22773
22774
  ]
22774
22775
  }
@@ -22806,12 +22807,12 @@ function ag() {
22806
22807
  g === mt ? s(!0) : f(g);
22807
22808
  },
22808
22809
  [f]
22809
- ), N = U(
22810
+ ), y = U(
22810
22811
  (h) => {
22811
22812
  M && (jn(M.id, h), sessionStorage.setItem("autoFocusObserverPicker", "true"), window.location.reload());
22812
22813
  },
22813
22814
  [M]
22814
- ), y = (h) => {
22815
+ ), N = (h) => {
22815
22816
  if (!h) return;
22816
22817
  const g = h.avatarUrl && !h.avatarUrl.includes("avatar-50.png") ? h.avatarUrl : void 0;
22817
22818
  return /* @__PURE__ */ n(fM, { name: h.name, src: g, size: "xx-small", margin: "auto 0" });
@@ -22824,7 +22825,7 @@ function ag() {
22824
22825
  {
22825
22826
  id: g.id,
22826
22827
  value: g.id,
22827
- renderBeforeLabel: y(g),
22828
+ renderBeforeLabel: N(g),
22828
22829
  children: g.name
22829
22830
  },
22830
22831
  g.id
@@ -22863,7 +22864,7 @@ function ag() {
22863
22864
  onInputChange: (h) => r(h.target.value),
22864
22865
  onOptionSelected: W,
22865
22866
  selectedOptionId: a == null ? void 0 : a.id,
22866
- renderBeforeInput: y(a),
22867
+ renderBeforeInput: N(a),
22867
22868
  shouldNotWrap: !0,
22868
22869
  children: L
22869
22870
  }
@@ -22874,7 +22875,7 @@ function ag() {
22874
22875
  open: i,
22875
22876
  handleClose: () => s(!1),
22876
22877
  currentUserId: M.id,
22877
- onStudentPaired: N
22878
+ onStudentPaired: y
22878
22879
  }
22879
22880
  )
22880
22881
  ] }) : z.length === 1 && z[0].id !== M.id ? /* @__PURE__ */ n(X, { as: "div", textAlign: "end", children: /* @__PURE__ */ n(
@@ -22884,7 +22885,7 @@ function ag() {
22884
22885
  observedUser: z[0].name
22885
22886
  }),
22886
22887
  children: /* @__PURE__ */ v(F, { as: "div", "data-testid": "observed-student-label", children: [
22887
- y(z[0]),
22888
+ N(z[0]),
22888
22889
  " ",
22889
22890
  z[0].name
22890
22891
  ] })
@@ -22916,7 +22917,7 @@ const Ea = ({
22916
22917
  }) => {
22917
22918
  const { translations: o } = Q(), { currentUserId: M } = R0(), [b, t] = I(!1);
22918
22919
  return /* @__PURE__ */ n(
22919
- G0,
22920
+ j0,
22920
22921
  {
22921
22922
  onClick: async () => {
22922
22923
  t(!0);
@@ -22938,19 +22939,19 @@ const Ea = ({
22938
22939
  [r, b]
22939
22940
  );
22940
22941
  Ii(b, p);
22941
- const { isMobile: O } = m1(), { isEditMode: i, isDirty: s, isSaving: l, saveError: u, enterEditMode: d, exitEditMode: q, clearError: f } = hM(), { resetConfig: W, saveLayout: N } = No(), y = e0(null), L = e0(null), h = e0(i);
22942
+ const { isMobile: O } = m1(), { isEditMode: i, isDirty: s, isSaving: l, saveError: u, enterEditMode: d, exitEditMode: q, clearError: f } = hM(), { resetConfig: W, saveLayout: y } = No(), N = e0(null), L = e0(null), h = e0(i);
22942
22943
  Ve(() => {
22943
- var k, x;
22944
- !h.current && i && ((k = L.current) == null || k.focus()), h.current && !i && ((x = y.current) == null || x.focus()), h.current = i;
22944
+ var x, k;
22945
+ !h.current && i && ((x = L.current) == null || x.focus()), h.current && !i && ((k = N.current) == null || k.focus()), h.current = i;
22945
22946
  }, [i]), r0(() => {
22946
22947
  if (!s) return;
22947
- const k = (x) => {
22948
- x.preventDefault(), x.returnValue = "";
22948
+ const x = (k) => {
22949
+ k.preventDefault(), k.returnValue = "";
22949
22950
  };
22950
- return window.addEventListener("beforeunload", k), () => window.removeEventListener("beforeunload", k);
22951
+ return window.addEventListener("beforeunload", x), () => window.removeEventListener("beforeunload", x);
22951
22952
  }, [s]);
22952
22953
  const g = () => {
22953
- N();
22954
+ y();
22954
22955
  }, B = () => {
22955
22956
  W(), q();
22956
22957
  }, C = t != null && t.display_name ? o("Hello, %{name}!", { name: t.display_name }) : e.dashboard;
@@ -22992,10 +22993,10 @@ const Ea = ({
22992
22993
  M.widget_dashboard_dark_mode && /* @__PURE__ */ n(A.Item, { align: O ? "stretch" : void 0, children: /* @__PURE__ */ n(rs, { display: O ? "block" : "inline-block" }) }),
22993
22994
  i ? /* @__PURE__ */ n(A.Item, { align: O ? "stretch" : void 0, children: /* @__PURE__ */ v(A, { gap: "small", direction: O ? "column" : "row", children: [
22994
22995
  /* @__PURE__ */ n(A.Item, { align: O ? "stretch" : void 0, children: /* @__PURE__ */ n(
22995
- G0,
22996
+ j0,
22996
22997
  {
22997
- elementRef: (k) => {
22998
- L.current = k;
22998
+ elementRef: (x) => {
22999
+ L.current = x;
22999
23000
  },
23000
23001
  onClick: B,
23001
23002
  display: O ? "block" : "inline-block",
@@ -23004,7 +23005,7 @@ const Ea = ({
23004
23005
  }
23005
23006
  ) }),
23006
23007
  /* @__PURE__ */ n(A.Item, { align: O ? "stretch" : void 0, children: /* @__PURE__ */ n(
23007
- G0,
23008
+ j0,
23008
23009
  {
23009
23010
  color: "primary",
23010
23011
  onClick: g,
@@ -23015,10 +23016,10 @@ const Ea = ({
23015
23016
  }
23016
23017
  ) })
23017
23018
  ] }) }) : /* @__PURE__ */ n(A.Item, { align: O ? "stretch" : void 0, children: /* @__PURE__ */ n(
23018
- G0,
23019
+ j0,
23019
23020
  {
23020
- elementRef: (k) => {
23021
- y.current = k;
23021
+ elementRef: (x) => {
23022
+ N.current = x;
23022
23023
  },
23023
23024
  onClick: d,
23024
23025
  display: O ? "block" : "inline-block",
@@ -23048,9 +23049,9 @@ const Ea = ({
23048
23049
  };
23049
23050
  return window.addEventListener("beforeunload", L), () => window.removeEventListener("beforeunload", L);
23050
23051
  }, [p]);
23051
- const N = () => {
23052
+ const y = () => {
23052
23053
  u();
23053
- }, y = () => {
23054
+ }, N = () => {
23054
23055
  l(), i();
23055
23056
  };
23056
23057
  return /* @__PURE__ */ n(Fe, { theme: Xi, children: /* @__PURE__ */ v(X, { as: "div", "data-testid": "educator-widget-dashboard", children: [
@@ -23081,22 +23082,22 @@ const Ea = ({
23081
23082
  b && /* @__PURE__ */ n(A.Item, { align: c ? "stretch" : void 0, children: /* @__PURE__ */ n(Ea, { display: c ? "block" : "inline-block" }) }),
23082
23083
  z ? /* @__PURE__ */ v(g2, { children: [
23083
23084
  /* @__PURE__ */ n(A.Item, { align: c ? "stretch" : void 0, children: /* @__PURE__ */ n(
23084
- G0,
23085
+ j0,
23085
23086
  {
23086
23087
  elementRef: (L) => {
23087
23088
  q.current = L;
23088
23089
  },
23089
- onClick: y,
23090
+ onClick: N,
23090
23091
  display: c ? "block" : "inline-block",
23091
23092
  "data-testid": "cancel-customize-button",
23092
23093
  children: e.cancel
23093
23094
  }
23094
23095
  ) }),
23095
23096
  /* @__PURE__ */ n(A.Item, { align: c ? "stretch" : void 0, children: /* @__PURE__ */ n(
23096
- G0,
23097
+ j0,
23097
23098
  {
23098
23099
  color: "primary",
23099
- onClick: N,
23100
+ onClick: y,
23100
23101
  display: c ? "block" : "inline-block",
23101
23102
  interaction: r ? "disabled" : "enabled",
23102
23103
  "data-testid": "save-customize-button",
@@ -23104,7 +23105,7 @@ const Ea = ({
23104
23105
  }
23105
23106
  ) })
23106
23107
  ] }) : /* @__PURE__ */ n(A.Item, { align: c ? "stretch" : void 0, children: /* @__PURE__ */ n(
23107
- G0,
23108
+ j0,
23108
23109
  {
23109
23110
  elementRef: (L) => {
23110
23111
  d.current = L;