@instructure/platform-modules 1.4.0 → 1.6.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.
Files changed (38) hide show
  1. package/dist/analytics/context.d.ts +15 -0
  2. package/dist/analytics/context.d.ts.map +1 -0
  3. package/dist/analytics/index.d.ts +3 -0
  4. package/dist/analytics/index.d.ts.map +1 -0
  5. package/dist/analytics/types.d.ts +13 -0
  6. package/dist/analytics/types.d.ts.map +1 -0
  7. package/dist/components/ModuleCard.d.ts +1 -2
  8. package/dist/components/ModuleCard.d.ts.map +1 -1
  9. package/dist/components/ModuleCard.stories.d.ts +2 -0
  10. package/dist/components/ModuleCard.stories.d.ts.map +1 -1
  11. package/dist/components/ModuleItemRow.d.ts +1 -2
  12. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  13. package/dist/components/ModulesList.d.ts +0 -2
  14. package/dist/components/ModulesList.d.ts.map +1 -1
  15. package/dist/components/ModulesList.stories.d.ts +2 -1
  16. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  17. package/dist/components/StatusPill.d.ts +2 -0
  18. package/dist/components/StatusPill.d.ts.map +1 -1
  19. package/dist/components/index.d.ts +2 -2
  20. package/dist/components/index.d.ts.map +1 -1
  21. package/dist/components/labels.d.ts +4 -0
  22. package/dist/components/labels.d.ts.map +1 -1
  23. package/dist/components/useTitleLinkVariant.d.ts +2 -0
  24. package/dist/components/useTitleLinkVariant.d.ts.map +1 -0
  25. package/dist/config/filters.d.ts +1 -1
  26. package/dist/config/filters.d.ts.map +1 -1
  27. package/dist/config/schemas.d.ts.map +1 -1
  28. package/dist/config/types.d.ts +5 -0
  29. package/dist/config/types.d.ts.map +1 -1
  30. package/dist/index.d.ts +3 -2
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1435 -1337
  33. package/dist/types/index.d.ts +0 -1
  34. package/dist/types/index.d.ts.map +1 -1
  35. package/locales/en.json +2 -0
  36. package/package.json +1 -1
  37. package/dist/types/navigation.d.ts +0 -7
  38. package/dist/types/navigation.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,37 +1,37 @@
1
1
  import { z as m } from "zod";
2
- import { gql as xe } from "graphql-tag";
3
- import { jsx as l, jsxs as C, Fragment as vt } from "react/jsx-runtime";
4
- import { createContext as en, useContext as tn, useMemo as N, isValidElement as nn, useCallback as U, useRef as $, useState as V, useEffect as Z, useId as st, memo as on, Fragment as sn } from "react";
5
- import { PlugInstUIIcon as ro, ExternalLinkInstUIIcon as io, FileInstUIIcon as lo, FileTextInstUIIcon as ao, MessagesSquareInstUIIcon as co, RocketInstUIIcon as uo, FilePenLineInstUIIcon as mo, LockInstUIIcon as rn, CircleAlertInstUIIcon as Pe, CircleCheckInstUIIcon as ln, ClockFadingInstUIIcon as an, CircleDashedInstUIIcon as cn, CornerDownRightInstUIIcon as po, IconArrowOpenUpLine as fo, IconArrowOpenDownLine as go } from "@instructure/ui-icons";
6
- import { useQueryClient as ht, useInfiniteQuery as It, keepPreviousData as ho, InfiniteQueryObserver as Io } from "@tanstack/react-query";
7
- import bo from "p-limit";
8
- import { Button as ve, IconButton as Mo } from "@instructure/ui-buttons/v11_7";
9
- import { Flex as E } from "@instructure/ui-flex/v11_7";
10
- import { Text as v } from "@instructure/ui-text/v11_7";
11
- import { View as T } from "@instructure/ui-view/v11_7";
12
- import { TruncateWithTooltip as yo, politeAnnounce as pe, getLiveRegion as un } from "@instructure/platform-instui-bindings";
13
- import { Alert as dn } from "@instructure/ui-alerts/v11_7";
14
- import { Heading as mn } from "@instructure/ui-heading/v11_7";
15
- import { ProgressBar as So } from "@instructure/ui-progress/v11_7";
16
- import { Spinner as rt } from "@instructure/ui-spinner/v11_7";
17
- import { Tooltip as pn } from "@instructure/ui-tooltip/v11_7";
18
- import { useTheme as fn } from "@instructure/emotion";
19
- import { ScreenReaderContent as it } from "@instructure/ui-a11y-content";
20
- import { Link as _o } from "@instructure/ui-link/v11_7";
21
- import { isValid as lt, colorToRGB as at, overlayColors as To, alpha as Eo, color2hex as gn, contrast as oe, darken as Co, lighten as wo } from "@instructure/ui-color-utils";
22
- import { Pill as Po } from "@instructure/ui-pill/v11_7";
23
- import { WithBreakpoints as vo } from "@instructure/platform-with-breakpoints";
24
- const Ao = m.object({
2
+ import { jsx as i, jsxs as T, Fragment as Dt } from "react/jsx-runtime";
3
+ import { createContext as yt, useContext as Mt, useRef as z, useMemo as N, isValidElement as an, useCallback as U, useState as oe, useEffect as se, useId as lt, memo as cn, Fragment as un } from "react";
4
+ import { gql as Ne } from "graphql-tag";
5
+ import { PlugInstUIIcon as ho, ExternalLinkInstUIIcon as Io, FileInstUIIcon as bo, FileTextInstUIIcon as yo, MessagesSquareInstUIIcon as Mo, RocketInstUIIcon as So, FilePenLineInstUIIcon as _o, LockInstUIIcon as dn, CircleAlertInstUIIcon as Re, CircleCheckInstUIIcon as mn, ClockFadingInstUIIcon as pn, CircleDashedInstUIIcon as gn, CalendarInstUIIcon as To, CornerDownRightInstUIIcon as Eo, IconArrowOpenUpLine as Co, IconArrowOpenDownLine as wo } from "@instructure/ui-icons";
6
+ import { useQueryClient as St, useInfiniteQuery as _t, keepPreviousData as vo, InfiniteQueryObserver as Po } from "@tanstack/react-query";
7
+ import Ao from "p-limit";
8
+ import { Button as ke, IconButton as xo } from "@instructure/ui-buttons/v11_7";
9
+ import { Flex as S } from "@instructure/ui-flex/v11_7";
10
+ import { Text as x } from "@instructure/ui-text/v11_7";
11
+ import { View as C } from "@instructure/ui-view/v11_7";
12
+ import { politeAnnounce as Ie, getLiveRegion as fn, TruncateWithTooltip as Lo } from "@instructure/platform-instui-bindings";
13
+ import { Alert as hn } from "@instructure/ui-alerts/v11_7";
14
+ import { Heading as In } from "@instructure/ui-heading/v11_7";
15
+ import { Link as bn } from "@instructure/ui-link/v11_7";
16
+ import { ProgressBar as Ro } from "@instructure/ui-progress/v11_7";
17
+ import { Spinner as at } from "@instructure/ui-spinner/v11_7";
18
+ import { Tooltip as yn } from "@instructure/ui-tooltip/v11_7";
19
+ import { useTheme as Mn } from "@instructure/emotion";
20
+ import { ScreenReaderContent as ct } from "@instructure/ui-a11y-content";
21
+ import { isValid as ut, colorToRGB as dt, overlayColors as ko, alpha as Do, color2hex as Sn, contrast as ce, darken as No, lighten as Oo } from "@instructure/ui-color-utils";
22
+ import { Pill as qo } from "@instructure/ui-pill/v11_7";
23
+ import { WithBreakpoints as Fo } from "@instructure/platform-with-breakpoints";
24
+ const Uo = m.object({
25
25
  target: m.enum(["module", "item"]),
26
26
  field: m.string(),
27
27
  op: m.enum(["eq", "contains"]),
28
28
  value: m.union([m.string(), m.boolean()])
29
29
  }).strict();
30
- function xo(e, t) {
30
+ function zo(e, t) {
31
31
  const n = e == null ? void 0 : e[t.target];
32
32
  return !n || !Object.prototype.hasOwnProperty.call(n, t.field) ? !1 : n[t.field].includes(t.op);
33
33
  }
34
- const Lo = m.enum([
34
+ const $o = m.enum([
35
35
  "assignment",
36
36
  "quiz",
37
37
  "discussion",
@@ -40,7 +40,7 @@ const Lo = m.enum([
40
40
  "external_url",
41
41
  "external_tool",
42
42
  "sub_header"
43
- ]), Ro = m.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), ko = m.enum([
43
+ ]), Bo = m.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), Go = m.enum([
44
44
  "not_started",
45
45
  "in_progress",
46
46
  "complete",
@@ -48,7 +48,7 @@ const Lo = m.enum([
48
48
  "incomplete",
49
49
  "missing_and_incomplete",
50
50
  "locked"
51
- ]), No = m.enum([
51
+ ]), jo = m.enum([
52
52
  "must_view",
53
53
  "must_mark_done",
54
54
  "must_contribute",
@@ -56,97 +56,115 @@ const Lo = m.enum([
56
56
  "min_score",
57
57
  "min_percentage",
58
58
  "unknown"
59
- ]), Do = m.object({
60
- status: ko.optional(),
59
+ ]), Yo = m.object({
60
+ status: Go.optional(),
61
61
  requirementsMet: m.number(),
62
62
  requirementCount: m.number(),
63
63
  percentComplete: m.number().min(0).max(100),
64
64
  nextDueAt: m.string().nullish(),
65
65
  missingCount: m.number(),
66
66
  incompleteCount: m.number()
67
- }), hn = m.object({
67
+ }), _n = m.object({
68
68
  itemId: m.string(),
69
- type: No,
69
+ type: jo,
70
70
  minScore: m.number().nullish(),
71
71
  minPercentage: m.number().nullish()
72
- }), In = m.object({
72
+ }), Tn = m.object({
73
73
  id: m.string(),
74
74
  moduleId: m.string(),
75
75
  title: m.string(),
76
- type: Lo,
76
+ type: $o,
77
77
  position: m.number(),
78
78
  indent: m.number(),
79
79
  published: m.boolean(),
80
80
  url: m.string().nullish(),
81
81
  newTab: m.boolean().nullish(),
82
- completionRequirement: hn.nullish(),
82
+ completionRequirement: _n.nullish(),
83
83
  dueAt: m.string().nullish(),
84
- status: Ro.optional(),
84
+ status: Bo.optional(),
85
85
  pointsPossible: m.number().nullish(),
86
86
  extensions: m.record(m.unknown()).optional()
87
- }), Oo = m.object({
87
+ }), Ho = m.object({
88
88
  id: m.string(),
89
89
  name: m.string()
90
- }), qo = m.object({
90
+ }), Ko = m.object({
91
91
  id: m.string(),
92
92
  name: m.string(),
93
93
  position: m.number(),
94
94
  published: m.boolean(),
95
95
  itemCount: m.number(),
96
- items: m.array(In).optional(),
96
+ items: m.array(Tn).optional(),
97
97
  unlockAt: m.string().nullish(),
98
- prerequisiteModules: m.array(Oo),
98
+ prerequisiteModules: m.array(Ho),
99
99
  requirementCount: m.number().nullish(),
100
100
  requireSequentialProgress: m.boolean(),
101
- completionRequirements: m.array(hn).optional(),
102
- progress: Do.optional(),
101
+ completionRequirements: m.array(_n).optional(),
102
+ progress: Yo.optional(),
103
103
  collapsed: m.boolean().nullish(),
104
104
  extensions: m.record(m.unknown()).optional()
105
- }), bn = m.object({
105
+ }), En = m.object({
106
106
  hasNextPage: m.boolean(),
107
107
  endCursor: m.string().nullable()
108
108
  }).refine((e) => !e.hasNextPage || e.endCursor !== null, {
109
109
  message: 'hasNextPage is true but endCursor is null: there is another page and no cursor to ask for it with, which renders a "Load more" that can never load.',
110
110
  path: ["endCursor"]
111
- }), Fo = m.object({
112
- modules: m.array(qo),
113
- pageInfo: bn
114
- }), Uo = m.object({
115
- items: m.array(In),
116
- pageInfo: bn
117
- }), Mn = "career.estimatedDurationMinutes";
118
- function zo(e) {
111
+ }), Wo = m.object({
112
+ modules: m.array(Ko),
113
+ pageInfo: En
114
+ }), Qo = m.object({
115
+ items: m.array(Tn),
116
+ pageInfo: En
117
+ }), Cn = "career.estimatedDurationMinutes";
118
+ function Vo(e) {
119
119
  var n;
120
- const t = (n = e.extensions) == null ? void 0 : n[Mn];
120
+ const t = (n = e.extensions) == null ? void 0 : n[Cn];
121
121
  return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
122
122
  }
123
- function bt(e, t) {
124
- return t == null ? e : { ...e, [Mn]: t };
123
+ function Tt(e, t) {
124
+ return t == null ? e : { ...e, [Cn]: t };
125
125
  }
126
- const ct = 100, Mt = 2e3;
127
- class $o extends Error {
126
+ const wn = yt(null), Zo = () => {
127
+ };
128
+ function lc({
129
+ host: e,
130
+ onEvent: t,
131
+ children: n
132
+ }) {
133
+ const o = z(t);
134
+ o.current = t;
135
+ const s = N(
136
+ () => (r) => o.current({ event: r, host: e }),
137
+ [e]
138
+ );
139
+ return /* @__PURE__ */ i(wn.Provider, { value: s, children: n });
140
+ }
141
+ function Je() {
142
+ return Mt(wn) ?? Zo;
143
+ }
144
+ const mt = 100, Et = 2e3;
145
+ class Xo extends Error {
128
146
  constructor(t, n) {
129
147
  super(
130
148
  `This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
131
149
  ), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
132
150
  }
133
151
  }
134
- const Bo = (e) => `offset:${e}`, Go = (e) => {
152
+ const Jo = (e) => `offset:${e}`, es = (e) => {
135
153
  if (!e) return 0;
136
154
  const t = Number.parseInt(e.replace("offset:", ""), 10);
137
155
  return Number.isFinite(t) && t >= 0 ? t : 0;
138
- }, At = (e) => {
156
+ }, Nt = (e) => {
139
157
  if (e != null && e.aborted)
140
158
  throw new DOMException("The operation was aborted.", "AbortError");
141
159
  };
142
- function xt(e, t, n) {
143
- const o = Go(t), s = e.slice(o, o + n), r = o + s.length, i = r < e.length;
160
+ function Ot(e, t, n) {
161
+ const o = es(t), s = e.slice(o, o + n), r = o + s.length, l = r < e.length;
144
162
  return {
145
163
  slice: s,
146
- pageInfo: { hasNextPage: i, endCursor: i ? Bo(r) : null }
164
+ pageInfo: { hasNextPage: l, endCursor: l ? Jo(r) : null }
147
165
  };
148
166
  }
149
- const jo = /* @__PURE__ */ new Map([
167
+ const ts = /* @__PURE__ */ new Map([
150
168
  ["COMPLETED", (e) => {
151
169
  var t;
152
170
  return ((t = e.progress) == null ? void 0 : t.status) === "complete";
@@ -166,55 +184,55 @@ const jo = /* @__PURE__ */ new Map([
166
184
  return ((t = e.progress) == null ? void 0 : t.status) !== "complete" && ((n = e.progress) == null ? void 0 : n.status) !== "in_progress";
167
185
  }
168
186
  ]
169
- ]), Yo = { module: { completionStatus: ["eq"] } };
170
- function Wo(e) {
187
+ ]), ns = { module: { completionStatus: ["eq"] } };
188
+ function os(e) {
171
189
  if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
172
190
  throw new Error(
173
191
  `in-memory adapter cannot compile ${e.target}.${e.field} ${e.op}`
174
192
  );
175
- const t = typeof e.value == "string" ? jo.get(e.value) : void 0;
193
+ const t = typeof e.value == "string" ? ts.get(e.value) : void 0;
176
194
  if (!t) throw new Error(`unknown completionStatus "${String(e.value)}"`);
177
195
  return t;
178
196
  }
179
- function Wa(e, t = {}) {
197
+ function ac(e, t = {}) {
180
198
  const n = (s) => e.itemsByModuleId[s] ?? [], o = (s) => {
181
199
  if (s !== e.courseId)
182
- throw new $o(e.courseId, s);
200
+ throw new Xo(e.courseId, s);
183
201
  };
184
202
  return {
185
- capabilities: Yo,
203
+ capabilities: ns,
186
204
  async listModules({
187
205
  courseId: s,
188
206
  cursor: r,
189
- pageSize: i,
207
+ pageSize: l,
190
208
  includeItems: a,
191
209
  filter: d,
192
- inlineItemsFirst: u,
193
- signal: c
210
+ inlineItemsFirst: c,
211
+ signal: u
194
212
  }) {
195
- var w;
196
- At(c), o(s), (w = t.onRequest) == null || w.call(t, "listModules", { operation: "listModules", courseId: s });
197
- const p = d ? e.modules.filter(Wo(d)) : e.modules, { slice: f, pageInfo: y } = xt(p, r, i), g = Math.min(u ?? ct, ct);
198
- return { modules: f.map((x) => {
199
- const _ = n(x.id), A = a && _.length <= g;
200
- return { ...x, itemCount: _.length, items: A ? _ : void 0 };
201
- }), pageInfo: y };
213
+ var P;
214
+ Nt(u), o(s), (P = t.onRequest) == null || P.call(t, "listModules", { operation: "listModules", courseId: s });
215
+ const p = d ? e.modules.filter(os(d)) : e.modules, { slice: g, pageInfo: b } = Ot(p, r, l), f = Math.min(c ?? mt, mt);
216
+ return { modules: g.map((E) => {
217
+ const A = n(E.id), k = a && A.length <= f;
218
+ return { ...E, itemCount: A.length, items: k ? A : void 0 };
219
+ }), pageInfo: b };
202
220
  },
203
221
  async listModuleItems({
204
222
  courseId: s,
205
223
  moduleId: r,
206
- cursor: i,
224
+ cursor: l,
207
225
  pageSize: a,
208
226
  signal: d
209
227
  }) {
210
228
  var p;
211
- At(d), o(s), (p = t.onRequest) == null || p.call(t, "listModuleItems", { operation: "listModuleItems", courseId: s, moduleId: r });
212
- const { slice: u, pageInfo: c } = xt(n(r), i, a);
213
- return { items: u, pageInfo: c };
229
+ Nt(d), o(s), (p = t.onRequest) == null || p.call(t, "listModuleItems", { operation: "listModuleItems", courseId: s, moduleId: r });
230
+ const { slice: c, pageInfo: u } = Ot(n(r), l, a);
231
+ return { items: c, pageInfo: u };
214
232
  }
215
233
  };
216
234
  }
217
- class yn extends Error {
235
+ class vn extends Error {
218
236
  constructor(t, n, o) {
219
237
  const s = t === "module" ? "module" : "module item";
220
238
  super(
@@ -222,11 +240,11 @@ class yn extends Error {
222
240
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = o;
223
241
  }
224
242
  }
225
- function Sn(e, t, n) {
243
+ function Pn(e, t, n) {
226
244
  if (e != null) return e;
227
- throw new yn(t, n, "published");
245
+ throw new vn(t, n, "published");
228
246
  }
229
- function Ho(e, t) {
247
+ function ss(e, t) {
230
248
  if (e.onUnsupportedItem) {
231
249
  e.onUnsupportedItem(t);
232
250
  return;
@@ -235,7 +253,7 @@ function Ho(e, t) {
235
253
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
236
254
  );
237
255
  }
238
- const Ko = {
256
+ const rs = {
239
257
  Assignment: "assignment",
240
258
  Quiz: "quiz",
241
259
  Discussion: "discussion",
@@ -247,21 +265,21 @@ const Ko = {
247
265
  SubHeader: "sub_header",
248
266
  PeerReviewSubAssignment: "assignment"
249
267
  };
250
- function Qo(e) {
268
+ function is(e) {
251
269
  const t = e == null ? void 0 : e.__typename;
252
270
  if (!t) return null;
253
- const n = Ko[t];
271
+ const n = rs[t];
254
272
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
255
273
  }
256
- const Vo = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
257
- function Zo(e) {
274
+ const ls = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
275
+ function as(e) {
258
276
  if (!e) return null;
259
- const t = Vo.exec(e);
277
+ const t = ls.exec(e);
260
278
  if (!t) return null;
261
- const [, n, o, s, r, i] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(s ?? 0) * 60 + Number(r ?? 0) + Number(i ?? 0) / 60;
279
+ const [, n, o, s, r, l] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(s ?? 0) * 60 + Number(r ?? 0) + Number(l ?? 0) / 60;
262
280
  return Math.round(a);
263
281
  }
264
- const Xo = /* @__PURE__ */ new Set([
282
+ const cs = /* @__PURE__ */ new Set([
265
283
  "must_view",
266
284
  "must_mark_done",
267
285
  "must_contribute",
@@ -269,42 +287,42 @@ const Xo = /* @__PURE__ */ new Set([
269
287
  "min_score",
270
288
  "min_percentage"
271
289
  ]);
272
- function Jo(e) {
273
- return Xo.has(e) ? e : "unknown";
290
+ function us(e) {
291
+ return cs.has(e) ? e : "unknown";
274
292
  }
275
- function es(e) {
293
+ function ds(e) {
276
294
  return {
277
295
  itemId: String(e.id),
278
- type: Jo(e.type),
296
+ type: us(e.type),
279
297
  minScore: e.minScore ?? null,
280
298
  minPercentage: e.minPercentage ?? null
281
299
  };
282
300
  }
283
- function _n(e) {
301
+ function An(e) {
284
302
  return {
285
303
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
286
304
  endCursor: (e == null ? void 0 : e.endCursor) ?? null
287
305
  };
288
306
  }
289
- const ts = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
290
- function ns(e) {
307
+ const ms = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
308
+ function ps(e) {
291
309
  var t;
292
310
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
293
311
  if (n) return n;
294
312
  return null;
295
313
  }
296
- function Tn(e, t) {
314
+ function xn(e, t) {
297
315
  if (!e) return;
298
316
  const n = new Map(t.map((r) => [r.itemId, r.type])), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
299
317
  for (const r of e.requirementsMet ?? []) {
300
318
  if (!r) continue;
301
- const i = String(r.id);
302
- n.get(i) === r.type && o.add(i);
319
+ const l = String(r.id);
320
+ n.get(l) === r.type && o.add(l);
303
321
  }
304
322
  for (const r of e.incompleteRequirements ?? []) {
305
323
  if (!r) continue;
306
- const i = String(r.id);
307
- n.get(i) === r.type && ts.has(r.type) && s.set(i, r.score ?? null);
324
+ const l = String(r.id);
325
+ n.get(l) === r.type && ms.has(r.type) && s.set(l, r.score ?? null);
308
326
  }
309
327
  return {
310
328
  locked: e.locked === !0 || e.workflowState === "locked",
@@ -315,7 +333,7 @@ function Tn(e, t) {
315
333
  incompleteRequirementScores: s
316
334
  };
317
335
  }
318
- const os = {
336
+ const gs = {
319
337
  LOCKED: "locked",
320
338
  MISSING: "missing",
321
339
  INCOMPLETE: "incomplete",
@@ -323,11 +341,11 @@ const os = {
323
341
  IN_PROGRESS: "in_progress",
324
342
  NOT_STARTED: "not_started"
325
343
  };
326
- function ss(e) {
344
+ function fs(e) {
327
345
  if (e != null)
328
- return os[e];
346
+ return gs[e];
329
347
  }
330
- const rs = {
348
+ const hs = {
331
349
  LOCKED: "locked",
332
350
  MISSING: "missing",
333
351
  MISSING_AND_INCOMPLETE: "missing_and_incomplete",
@@ -336,58 +354,58 @@ const rs = {
336
354
  IN_PROGRESS: "in_progress",
337
355
  NOT_STARTED: "not_started"
338
356
  };
339
- function is(e) {
357
+ function Is(e) {
340
358
  if (e != null)
341
- return rs[e];
359
+ return hs[e];
342
360
  }
343
- function ls(e, t, n) {
361
+ function bs(e, t, n) {
344
362
  var a, d;
345
363
  if (!n) return;
346
- const o = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, o), r = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, i = [...n.incompleteRequirementScores.values()].filter(
347
- (u) => u != null
364
+ const o = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, o), r = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
365
+ (c) => c != null
348
366
  ).length;
349
367
  return {
350
- status: is(e.moduleStatus) ?? (n.locked ? "locked" : void 0),
368
+ status: Is(e.moduleStatus) ?? (n.locked ? "locked" : void 0),
351
369
  requirementsMet: s,
352
370
  requirementCount: o,
353
371
  percentComplete: o > 0 ? Math.round(s / o * 100) : 0,
354
372
  nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
355
373
  missingCount: r,
356
- incompleteCount: i
374
+ incompleteCount: l
357
375
  };
358
376
  }
359
- function as(e, t, n, o = {}, s) {
360
- var u, c, p;
361
- const r = String(e._id), i = Qo(e.content);
362
- if (!i)
363
- return Ho(o, { id: r, typename: ((u = e.content) == null ? void 0 : u.__typename) ?? null }), null;
364
- const a = ns(e.content), d = n.get(r) ?? null;
377
+ function ys(e, t, n, o = {}, s) {
378
+ var c, u, p;
379
+ const r = String(e._id), l = is(e.content);
380
+ if (!l)
381
+ return ss(o, { id: r, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
382
+ const a = ps(e.content), d = n.get(r) ?? null;
365
383
  return {
366
384
  id: r,
367
385
  moduleId: t,
368
386
  title: e.title ?? "",
369
- type: i,
387
+ type: l,
370
388
  position: e.position ?? 0,
371
389
  indent: e.indent ?? 0,
372
- published: Sn(e.published, "moduleItem", r),
390
+ published: Pn(e.published, "moduleItem", r),
373
391
  url: e.url ?? null,
374
392
  newTab: e.newTab ?? !1,
375
393
  completionRequirement: d,
376
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((c = e.content) == null ? void 0 : c.dueAt) ?? null,
377
- status: s ? ss(e.moduleItemStatus) ?? (s.locked ? "locked" : void 0) : void 0,
394
+ dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((u = e.content) == null ? void 0 : u.dueAt) ?? null,
395
+ status: s ? fs(e.moduleItemStatus) ?? (s.locked ? "locked" : void 0) : void 0,
378
396
  pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
379
- extensions: bt(
397
+ extensions: Tt(
380
398
  void 0,
381
- Zo(e.estimatedDuration)
399
+ as(e.estimatedDuration)
382
400
  )
383
401
  };
384
402
  }
385
- function En(e, t, n, o, s) {
403
+ function Ln(e, t, n, o, s) {
386
404
  const r = [];
387
- for (const i of e ?? []) {
388
- if (!i) continue;
389
- const a = as(
390
- i,
405
+ for (const l of e ?? []) {
406
+ if (!l) continue;
407
+ const a = ys(
408
+ l,
391
409
  t,
392
410
  n,
393
411
  o,
@@ -397,26 +415,26 @@ function En(e, t, n, o, s) {
397
415
  }
398
416
  return r;
399
417
  }
400
- function Cn(e) {
418
+ function Rn(e) {
401
419
  const t = [], n = /* @__PURE__ */ new Map();
402
420
  for (const o of e ?? []) {
403
421
  if (!o) continue;
404
- const s = es(o);
422
+ const s = ds(o);
405
423
  t.push(s), n.set(s.itemId, s);
406
424
  }
407
425
  return { list: t, byItemId: n };
408
426
  }
409
- function cs(e, t = {}) {
410
- var u, c;
427
+ function Ms(e, t = {}) {
428
+ var c, u;
411
429
  const n = String(e._id);
412
430
  if (e.moduleItemsTotalCount == null)
413
- throw new yn("module", n, "moduleItemsTotalCount");
414
- const { list: o, byItemId: s } = Cn(e.completionRequirements), r = e.moduleItemsConnection, i = r != null && !((u = r.pageInfo) != null && u.hasNextPage), a = Tn(e.progression, o), d = i ? En(r.nodes, n, s, t, a) : void 0;
431
+ throw new vn("module", n, "moduleItemsTotalCount");
432
+ const { list: o, byItemId: s } = Rn(e.completionRequirements), r = e.moduleItemsConnection, l = r != null && !((c = r.pageInfo) != null && c.hasNextPage), a = xn(e.progression, o), d = l ? Ln(r.nodes, n, s, t, a) : void 0;
415
433
  return {
416
434
  id: n,
417
435
  name: e.name ?? "",
418
436
  position: e.position ?? 0,
419
- published: Sn(e.published, "module", n),
437
+ published: Pn(e.published, "module", n),
420
438
  itemCount: e.moduleItemsTotalCount,
421
439
  items: d,
422
440
  unlockAt: e.unlockAt ?? null,
@@ -426,30 +444,30 @@ function cs(e, t = {}) {
426
444
  requirementCount: e.requirementCount ?? null,
427
445
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
428
446
  completionRequirements: o,
429
- progress: ls(e, o, a),
430
- collapsed: ((c = e.progression) == null ? void 0 : c.collapsed) ?? null
447
+ progress: bs(e, o, a),
448
+ collapsed: ((u = e.progression) == null ? void 0 : u.collapsed) ?? null
431
449
  };
432
450
  }
433
- function us(e, t = {}) {
451
+ function Ss(e, t = {}) {
434
452
  var s;
435
453
  const n = (s = e == null ? void 0 : e.legacyNode) == null ? void 0 : s.modulesConnection, o = [];
436
454
  for (const r of (n == null ? void 0 : n.nodes) ?? [])
437
- r && o.push(cs(r, t));
438
- return { modules: o, pageInfo: _n(n == null ? void 0 : n.pageInfo) };
455
+ r && o.push(Ms(r, t));
456
+ return { modules: o, pageInfo: An(n == null ? void 0 : n.pageInfo) };
439
457
  }
440
- function ds(e, t, n = {}) {
441
- const o = e == null ? void 0 : e.legacyNode, { list: s, byItemId: r } = Cn(o == null ? void 0 : o.completionRequirements), i = o == null ? void 0 : o.moduleItemsConnection, a = Tn(o == null ? void 0 : o.progression, s);
458
+ function _s(e, t, n = {}) {
459
+ const o = e == null ? void 0 : e.legacyNode, { list: s, byItemId: r } = Rn(o == null ? void 0 : o.completionRequirements), l = o == null ? void 0 : o.moduleItemsConnection, a = xn(o == null ? void 0 : o.progression, s);
442
460
  return {
443
- items: En(i == null ? void 0 : i.nodes, t, r, n, a),
444
- pageInfo: _n(i == null ? void 0 : i.pageInfo)
461
+ items: Ln(l == null ? void 0 : l.nodes, t, r, n, a),
462
+ pageInfo: An(l == null ? void 0 : l.pageInfo)
445
463
  };
446
464
  }
447
- const ms = xe`
465
+ const Ts = Ne`
448
466
  fragment PlatformModulesSubmissionFields on Submission {
449
467
  _id
450
468
  cachedDueDate
451
469
  }
452
- `, wn = xe`
470
+ `, kn = Ne`
453
471
  fragment PlatformModulesItemFields on ModuleItem {
454
472
  _id
455
473
  title
@@ -497,8 +515,8 @@ const ms = xe`
497
515
  }
498
516
  }
499
517
  }
500
- ${ms}
501
- `, Pn = xe`
518
+ ${Ts}
519
+ `, Dn = Ne`
502
520
  fragment PlatformModulesProgressionFields on ModuleProgression {
503
521
  workflowState
504
522
  completed
@@ -518,7 +536,7 @@ const ms = xe`
518
536
  score
519
537
  }
520
538
  }
521
- `, ps = xe`
539
+ `, Es = Ne`
522
540
  query PlatformModulesGetModules(
523
541
  $courseId: ID!
524
542
  $first: Int!
@@ -578,9 +596,9 @@ const ms = xe`
578
596
  }
579
597
  }
580
598
  }
581
- ${wn}
582
- ${Pn}
583
- `, fs = xe`
599
+ ${kn}
600
+ ${Dn}
601
+ `, Cs = Ne`
584
602
  query PlatformModulesGetModuleItems(
585
603
  $moduleId: ID!
586
604
  $first: Int!
@@ -611,150 +629,150 @@ const ms = xe`
611
629
  }
612
630
  }
613
631
  }
614
- ${wn}
615
- ${Pn}
632
+ ${kn}
633
+ ${Dn}
616
634
  `;
617
- function vn() {
635
+ function Nn() {
618
636
  return new DOMException("The operation was aborted.", "AbortError");
619
637
  }
620
- function We(e) {
621
- if (e != null && e.aborted) throw vn();
638
+ function He(e) {
639
+ if (e != null && e.aborted) throw Nn();
622
640
  }
623
- function Lt(e, t) {
641
+ function qt(e, t) {
624
642
  return t ? new Promise((n, o) => {
625
- const s = () => o(vn());
643
+ const s = () => o(Nn());
626
644
  t.addEventListener("abort", s, { once: !0 }), e.then(n, o).finally(() => t.removeEventListener("abort", s));
627
645
  }) : e;
628
646
  }
629
- const Rt = [
647
+ const Ft = [
630
648
  "COMPLETED",
631
649
  "INCOMPLETE",
632
650
  "IN_PROGRESS",
633
651
  "NOT_STARTED"
634
- ], gs = {
652
+ ], ws = {
635
653
  module: { completionStatus: ["eq"] }
636
654
  };
637
- function hs(e) {
655
+ function vs(e) {
638
656
  if (!e) return null;
639
657
  if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
640
658
  throw new Error(
641
659
  `Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". Only module.completionStatus eq is compiled here.`
642
660
  );
643
661
  const t = e.value;
644
- if (!Rt.includes(t))
662
+ if (!Ft.includes(t))
645
663
  throw new Error(
646
- `"${e.value}" is not a ModuleCompletionStatus (${Rt.join(", ")}).`
664
+ `"${e.value}" is not a ModuleCompletionStatus (${Ft.join(", ")}).`
647
665
  );
648
666
  return { completionStatus: t };
649
667
  }
650
- function Ha({
668
+ function cc({
651
669
  executeQuery: e,
652
- inlineItemLimit: t = ct,
653
- nodeBudget: n = Mt,
670
+ inlineItemLimit: t = mt,
671
+ nodeBudget: n = Et,
654
672
  onUnsupportedItem: o,
655
673
  studentId: s,
656
674
  validate: r = !0,
657
- capabilities: i = gs
675
+ capabilities: l = ws
658
676
  }) {
659
677
  const a = s != null, d = { onUnsupportedItem: o };
660
678
  return {
661
679
  inlineNodeBudget: n,
662
- capabilities: i,
680
+ capabilities: l,
663
681
  async listModules({
664
- courseId: u,
665
- cursor: c,
682
+ courseId: c,
683
+ cursor: u,
666
684
  pageSize: p,
667
- includeItems: f,
668
- filter: y,
669
- inlineItemsFirst: g,
670
- inlineFirst: b,
671
- signal: w
685
+ includeItems: g,
686
+ filter: b,
687
+ inlineItemsFirst: f,
688
+ inlineFirst: y,
689
+ signal: P
672
690
  }) {
673
- We(w);
674
- const x = f ? Math.min(b ?? p, p) : p, _ = Math.min(g ?? t, t), A = Math.max(1, Math.min(_, Math.floor(n / x))), q = await Lt(
675
- e(ps, {
676
- courseId: u,
677
- first: x,
678
- after: c ?? null,
679
- includeItems: f,
680
- itemsFirst: A,
691
+ He(P);
692
+ const E = g ? Math.min(y ?? p, p) : p, A = Math.min(f ?? t, t), k = Math.max(1, Math.min(A, Math.floor(n / E))), q = await qt(
693
+ e(Es, {
694
+ courseId: c,
695
+ first: E,
696
+ after: u ?? null,
697
+ includeItems: g,
698
+ itemsFirst: k,
681
699
  includeSubmissions: a,
682
700
  studentId: s ?? null,
683
- filter: hs(y)
701
+ filter: vs(b)
684
702
  }),
685
- w
703
+ P
686
704
  );
687
- We(w);
688
- const B = us(q, d);
689
- return r ? Fo.parse(B) : B;
705
+ He(P);
706
+ const $ = Ss(q, d);
707
+ return r ? Wo.parse($) : $;
690
708
  },
691
709
  async listModuleItems({
692
- moduleId: u,
693
- cursor: c,
710
+ moduleId: c,
711
+ cursor: u,
694
712
  pageSize: p,
695
- signal: f
713
+ signal: g
696
714
  }) {
697
- We(f);
698
- const y = await Lt(
699
- e(fs, {
700
- moduleId: u,
715
+ He(g);
716
+ const b = await qt(
717
+ e(Cs, {
718
+ moduleId: c,
701
719
  first: p,
702
- after: c ?? null,
720
+ after: u ?? null,
703
721
  includeSubmissions: a,
704
722
  studentId: s ?? null
705
723
  }),
706
- f
724
+ g
707
725
  );
708
- We(f);
709
- const g = ds(y, u, d);
710
- return r ? Uo.parse(g) : g;
726
+ He(g);
727
+ const f = _s(b, c, d);
728
+ return r ? Qo.parse(f) : f;
711
729
  }
712
730
  };
713
731
  }
714
- const ge = ["platform-modules"], Le = {
715
- all: ge,
716
- course: (e) => [...ge, e],
717
- list: (e, t = {}) => [...ge, e, "list", t],
718
- items: (e, t, n = {}) => [...ge, e, "module", t, "items", n]
732
+ const ye = ["platform-modules"], Oe = {
733
+ all: ye,
734
+ course: (e) => [...ye, e],
735
+ list: (e, t = {}) => [...ye, e, "list", t],
736
+ items: (e, t, n = {}) => [...ye, e, "module", t, "items", n]
719
737
  };
720
- function Is(e) {
721
- return [...ge, e, "list"];
738
+ function Ps(e) {
739
+ return [...ye, e, "list"];
722
740
  }
723
- function ut(e, t) {
724
- return [...ge, e, "module", t, "items"];
741
+ function pt(e, t) {
742
+ return [...ye, e, "module", t, "items"];
725
743
  }
726
- function bs(e, t, n, o) {
727
- const s = o ? Le.items(t, n, o) : ut(t, n);
744
+ function As(e, t, n, o) {
745
+ const s = o ? Oe.items(t, n, o) : pt(t, n);
728
746
  return e.invalidateQueries({ queryKey: s });
729
747
  }
730
- function kt(e, t, n) {
731
- const o = n ? Le.list(t, n) : Is(t);
748
+ function Ut(e, t, n) {
749
+ const o = n ? Oe.list(t, n) : Ps(t);
732
750
  return e.invalidateQueries({ queryKey: o });
733
751
  }
734
- function Ka(e, t) {
735
- return e.invalidateQueries({ queryKey: Le.course(t) });
752
+ function uc(e, t) {
753
+ return e.invalidateQueries({ queryKey: Oe.course(t) });
736
754
  }
737
755
  const Qe = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
738
756
  function Ve(e, t) {
739
757
  const n = Object.entries(t ?? {}).filter(([, o]) => o !== void 0);
740
758
  return { ...e, ...Object.fromEntries(n) };
741
759
  }
742
- function me(e, t = {}) {
760
+ function he(e, t = {}) {
743
761
  const n = Object.keys(e).map((s) => [
744
762
  s,
745
763
  Ve(e[s], Qe(t, s) ? t[s] : void 0)
746
764
  ]), o = Object.keys(t).filter((s) => !Qe(e, s)).sort().map((s) => [s, Ve({}, t[s])]);
747
765
  return Object.fromEntries([...n, ...o]);
748
766
  }
749
- function he(e, t) {
767
+ function Me(e, t) {
750
768
  if (!(!Qe(e, t) || e[t].hidden))
751
769
  return e[t];
752
770
  }
753
- function Je(e) {
754
- return Object.keys(e).filter((t) => he(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
771
+ function et(e) {
772
+ return Object.keys(e).filter((t) => Me(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
755
773
  }
756
- const Qa = 1e3;
757
- function Ms({
774
+ const dc = 1e3;
775
+ function xs({
758
776
  queryClient: e,
759
777
  courseId: t,
760
778
  module: n,
@@ -765,159 +783,161 @@ function Ms({
765
783
  item: o,
766
784
  invalidateModuleItems: async (s) => {
767
785
  await Promise.all([
768
- bs(e, t, s),
769
- kt(e, t)
786
+ As(e, t, s),
787
+ Ut(e, t)
770
788
  ]);
771
789
  },
772
- invalidateModuleList: () => kt(e, t)
790
+ invalidateModuleList: () => Ut(e, t)
773
791
  };
774
792
  }
775
- function Va(e, t) {
776
- return Je(e).filter(
793
+ function mc(e, t) {
794
+ return et(e).filter(
777
795
  (n) => n.visible == null || n.visible(t) === !0
778
796
  );
779
797
  }
780
- const ys = "Course modules", Ss = { one: "%{count} module loaded", other: "%{count} modules loaded" }, _s = "Expand all modules", Ts = "Collapse all modules", Es = { one: "Loading items in %{count} module…", other: "Loading items in %{count} modules…" }, Cs = "All items loaded", ws = { one: "%{count} module expanded", other: "%{count} modules expanded" }, Ps = { one: "%{count} module collapsed", other: "%{count} modules collapsed" }, vs = "This filter runs on the modules loaded so far — load more to filter the rest of the course.", As = "Modules failed to load: %{message}", xs = "Loading modules", Ls = "This course has no modules.", Rs = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, ks = "No modules match this filter.", Ns = "Clear filters", Ds = "Loading more modules…", Os = "Load more modules (%{count} loaded)", qs = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Fs = "Filter", Us = "All", zs = "In progress", $s = "Complete", Bs = "Due this week", Gs = "Missing", js = "Locked until %{name} is completed.", Ys = "Locked until %{prerequisites} are completed.", Ws = "%{count} prerequisites", Hs = "%{label}. %{name}", Ks = "%{name} progress", Qs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Vs = "Items failed to load: %{message}", Zs = "Loading items", Xs = "Loading…", Js = "No items.", er = "Loading more items…", tr = "Load more items (%{loaded} of %{count} loaded)", nr = "(unpublished)", or = "Collapse %{name}", sr = "Expand %{name}", rr = "Not started", ir = "In progress", lr = "All completed", ar = "%{count} Missing", cr = "%{count} Incomplete", ur = "%{missing} & %{incomplete}", dr = "Locked", mr = "Not started", pr = "In progress", fr = "Completed", gr = "Incomplete", hr = "Missing", Ir = "Locked", br = "Assignment", Mr = "Quiz", yr = "Discussion", Sr = "Page", _r = "File", Tr = "External URL", Er = "External tool", Cr = "Text header", wr = "Item type", Pr = "Due date", vr = "Points", Ar = "Requirement", xr = "Estimated duration", Lr = "Publish state", Rr = "View the item", kr = "Submit the assignment", Nr = "Contribute to the page", Dr = "Mark as done", Or = "Score at least the minimum", qr = "Score at least %{count}", Fr = "Score at least the minimum percentage", Ur = "Score at least %{count}%", zr = "Complete the requirement", $r = "today, %{time}", Br = "yesterday, %{time}", Gr = "tomorrow, %{time}", jr = "%{date}, %{time}", Yr = "%{time} (%{zone})", Wr = "Due %{when}", Hr = "Will unlock on %{when}", Kr = "Unlocked on %{when}", Qr = { one: "%{count} pt", other: "%{count} pts" }, Vr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, Zr = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, Xr = "%{percent}%", Jr = { one: "%{completedModules} of %{totalModules} module complete", other: "%{completedModules} of %{totalModules} modules complete" }, ei = "(%{itemsSummary})", ti = { one: "%{completedItems} of %{totalItems} item", other: "%{completedItems} of %{totalItems} items" }, ni = "Module progress", oi = "%{name}: %{status}", si = "%{count} min", ri = "Unpublished", ii = "Untitled item", li = "opens in a new window", ai = {
781
- pageTitle: ys,
782
- modulesLoadedAnnouncement: Ss,
783
- expandAllModules: _s,
784
- collapseAllModules: Ts,
785
- expandAllLoadingItems: Es,
786
- expandAllItemsLoaded: Cs,
787
- modulesExpandedAnnouncement: ws,
788
- modulesCollapsedAnnouncement: Ps,
789
- filterScopeHint: vs,
790
- modulesLoadErrorAlert: As,
791
- modulesLoadingSpinnerLabel: xs,
792
- noModulesEmptyState: Ls,
793
- filteredEmptyState: Rs,
794
- noFilterMatches: ks,
795
- clearFilters: Ns,
796
- loadMoreModulesLoading: Ds,
797
- loadMoreModules: Os,
798
- allModulesLoaded: qs,
799
- filterGroupLabel: Fs,
800
- filterAll: Us,
801
- filterInProgress: zs,
802
- filterComplete: $s,
803
- filterDueThisWeek: Bs,
804
- filterMissing: Gs,
805
- lockedByPrerequisiteByline: js,
806
- lockedByPrerequisitesByline: Ys,
807
- lockedByPrerequisitesCount: Ws,
808
- moduleNameWithLabel: Hs,
809
- moduleProgressScreenReaderLabel: Ks,
810
- itemsLoadedAnnouncement: Qs,
811
- itemsLoadErrorAlert: Vs,
812
- itemsLoadingSpinnerLabel: Zs,
813
- itemsLoadingText: Xs,
814
- noItemsEmptyState: Js,
815
- loadMoreItemsLoading: er,
816
- loadMoreItems: tr,
817
- moduleUnpublishedBadge: nr,
818
- collapseModule: or,
819
- expandModule: sr,
820
- moduleStatusNotStarted: rr,
821
- moduleStatusInProgress: ir,
822
- moduleStatusComplete: lr,
823
- moduleStatusMissing: ar,
824
- moduleStatusIncomplete: cr,
825
- moduleStatusMissingAndIncomplete: ur,
826
- moduleStatusLocked: dr,
827
- itemStatusNotStarted: mr,
828
- itemStatusInProgress: pr,
829
- itemStatusComplete: fr,
830
- itemStatusIncomplete: gr,
831
- itemStatusMissing: hr,
832
- itemStatusLocked: Ir,
833
- itemTypeAssignment: br,
834
- itemTypeQuiz: Mr,
835
- itemTypeDiscussion: yr,
836
- itemTypePage: Sr,
837
- itemTypeFile: _r,
838
- itemTypeExternalUrl: Tr,
839
- itemTypeExternalTool: Er,
840
- itemTypeSubHeader: Cr,
841
- metaFieldTypeLabel: wr,
842
- metaFieldDueAtLabel: Pr,
843
- metaFieldPointsLabel: vr,
844
- metaFieldRequirementLabel: Ar,
845
- metaFieldDurationLabel: xr,
846
- metaFieldPublishStateLabel: Lr,
847
- requirementMustView: Rr,
848
- requirementMustSubmit: kr,
849
- requirementMustContribute: Nr,
850
- requirementMustMarkDone: Dr,
851
- requirementMinScoreUnknown: Or,
852
- requirementMinScore: qr,
853
- requirementMinPercentageUnknown: Fr,
854
- requirementMinPercentage: Ur,
855
- requirementUnknown: zr,
856
- dateTimeToday: $r,
857
- dateTimeYesterday: Br,
858
- dateTimeTomorrow: Gr,
859
- dateTimeWithDate: jr,
860
- timeWithZone: Yr,
861
- dueByline: Wr,
862
- unlockByline: Hr,
863
- unlockedByline: Kr,
864
- pointsAbbreviated: Qr,
865
- progressSummary: Vr,
866
- progressScreenReaderValue: Zr,
867
- moduleProgressOverviewPercentLabel: Xr,
868
- moduleProgressOverviewSummary: Jr,
869
- moduleProgressOverviewDetail: ei,
870
- moduleProgressOverviewItemsSummary: ti,
871
- moduleProgressOverviewGroupLabel: ni,
872
- moduleProgressSegmentLabel: oi,
873
- durationMinutes: si,
874
- itemUnpublishedLabel: ri,
875
- itemUntitled: ii,
876
- opensInNewWindow: li
877
- }, ci = /%\{(\w+)\}/g, ui = ai, Ie = "en-US", di = /* @__PURE__ */ new Map(), mi = /* @__PURE__ */ new Map();
878
- function An(e, t, n) {
798
+ const Ls = "Course modules", Rs = { one: "%{count} module loaded", other: "%{count} modules loaded" }, ks = "Expand all modules", Ds = "Collapse all modules", Ns = { one: "Loading items in %{count} module…", other: "Loading items in %{count} modules…" }, Os = "All items loaded", qs = { one: "%{count} module expanded", other: "%{count} modules expanded" }, Fs = { one: "%{count} module collapsed", other: "%{count} modules collapsed" }, Us = "This filter runs on the modules loaded so far — load more to filter the rest of the course.", zs = "Modules failed to load: %{message}", $s = "Loading modules", Bs = "This course has no modules.", Gs = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, js = "No modules match this filter.", Ys = "Clear filters", Hs = "Loading more modules…", Ks = "Load more modules (%{count} loaded)", Ws = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Qs = "Filter", Vs = "All", Zs = "In progress", Xs = "Complete", Js = "Due this week", er = "Missing", tr = "Locked until %{name} is completed.", nr = "Locked until %{prerequisites} are completed.", or = "%{count} prerequisites", sr = "%{label}. %{name}", rr = "%{name} progress", ir = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, lr = "Items failed to load: %{message}", ar = "Loading items", cr = "Loading…", ur = "No items.", dr = "Loading more items…", mr = "Load more items (%{loaded} of %{count} loaded)", pr = "(unpublished)", gr = "Collapse %{name}", fr = "Expand %{name}", hr = "Not started", Ir = "In progress", br = "All completed", yr = "%{count} Missing", Mr = "%{count} Incomplete", Sr = "%{missing} & %{incomplete}", _r = "Locked", Tr = "Due soon", Er = "Not started", Cr = "In progress", wr = "Completed", vr = "Incomplete", Pr = "Missing", Ar = "Locked", xr = "Due soon", Lr = "Assignment", Rr = "Quiz", kr = "Discussion", Dr = "Page", Nr = "File", Or = "External URL", qr = "External tool", Fr = "Text header", Ur = "Item type", zr = "Due date", $r = "Points", Br = "Requirement", Gr = "Estimated duration", jr = "Publish state", Yr = "View the item", Hr = "Submit the assignment", Kr = "Contribute to the page", Wr = "Mark as done", Qr = "Score at least the minimum", Vr = "Score at least %{count}", Zr = "Score at least the minimum percentage", Xr = "Score at least %{count}%", Jr = "Complete the requirement", ei = "today, %{time}", ti = "yesterday, %{time}", ni = "tomorrow, %{time}", oi = "%{date}, %{time}", si = "%{time} (%{zone})", ri = "Due %{when}", ii = "Will unlock on %{when}", li = "Unlocked on %{when}", ai = { one: "%{count} pt", other: "%{count} pts" }, ci = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, ui = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, di = "%{percent}%", mi = { one: "%{completedModules} of %{totalModules} module complete", other: "%{completedModules} of %{totalModules} modules complete" }, pi = "(%{itemsSummary})", gi = { one: "%{completedItems} of %{totalItems} item", other: "%{completedItems} of %{totalItems} items" }, fi = "Module progress", hi = "%{name}: %{status}", Ii = "%{count} min", bi = "Unpublished", yi = "Untitled item", Mi = "opens in a new window", Si = {
799
+ pageTitle: Ls,
800
+ modulesLoadedAnnouncement: Rs,
801
+ expandAllModules: ks,
802
+ collapseAllModules: Ds,
803
+ expandAllLoadingItems: Ns,
804
+ expandAllItemsLoaded: Os,
805
+ modulesExpandedAnnouncement: qs,
806
+ modulesCollapsedAnnouncement: Fs,
807
+ filterScopeHint: Us,
808
+ modulesLoadErrorAlert: zs,
809
+ modulesLoadingSpinnerLabel: $s,
810
+ noModulesEmptyState: Bs,
811
+ filteredEmptyState: Gs,
812
+ noFilterMatches: js,
813
+ clearFilters: Ys,
814
+ loadMoreModulesLoading: Hs,
815
+ loadMoreModules: Ks,
816
+ allModulesLoaded: Ws,
817
+ filterGroupLabel: Qs,
818
+ filterAll: Vs,
819
+ filterInProgress: Zs,
820
+ filterComplete: Xs,
821
+ filterDueThisWeek: Js,
822
+ filterMissing: er,
823
+ lockedByPrerequisiteByline: tr,
824
+ lockedByPrerequisitesByline: nr,
825
+ lockedByPrerequisitesCount: or,
826
+ moduleNameWithLabel: sr,
827
+ moduleProgressScreenReaderLabel: rr,
828
+ itemsLoadedAnnouncement: ir,
829
+ itemsLoadErrorAlert: lr,
830
+ itemsLoadingSpinnerLabel: ar,
831
+ itemsLoadingText: cr,
832
+ noItemsEmptyState: ur,
833
+ loadMoreItemsLoading: dr,
834
+ loadMoreItems: mr,
835
+ moduleUnpublishedBadge: pr,
836
+ collapseModule: gr,
837
+ expandModule: fr,
838
+ moduleStatusNotStarted: hr,
839
+ moduleStatusInProgress: Ir,
840
+ moduleStatusComplete: br,
841
+ moduleStatusMissing: yr,
842
+ moduleStatusIncomplete: Mr,
843
+ moduleStatusMissingAndIncomplete: Sr,
844
+ moduleStatusLocked: _r,
845
+ moduleStatusDueSoon: Tr,
846
+ itemStatusNotStarted: Er,
847
+ itemStatusInProgress: Cr,
848
+ itemStatusComplete: wr,
849
+ itemStatusIncomplete: vr,
850
+ itemStatusMissing: Pr,
851
+ itemStatusLocked: Ar,
852
+ itemStatusDueSoon: xr,
853
+ itemTypeAssignment: Lr,
854
+ itemTypeQuiz: Rr,
855
+ itemTypeDiscussion: kr,
856
+ itemTypePage: Dr,
857
+ itemTypeFile: Nr,
858
+ itemTypeExternalUrl: Or,
859
+ itemTypeExternalTool: qr,
860
+ itemTypeSubHeader: Fr,
861
+ metaFieldTypeLabel: Ur,
862
+ metaFieldDueAtLabel: zr,
863
+ metaFieldPointsLabel: $r,
864
+ metaFieldRequirementLabel: Br,
865
+ metaFieldDurationLabel: Gr,
866
+ metaFieldPublishStateLabel: jr,
867
+ requirementMustView: Yr,
868
+ requirementMustSubmit: Hr,
869
+ requirementMustContribute: Kr,
870
+ requirementMustMarkDone: Wr,
871
+ requirementMinScoreUnknown: Qr,
872
+ requirementMinScore: Vr,
873
+ requirementMinPercentageUnknown: Zr,
874
+ requirementMinPercentage: Xr,
875
+ requirementUnknown: Jr,
876
+ dateTimeToday: ei,
877
+ dateTimeYesterday: ti,
878
+ dateTimeTomorrow: ni,
879
+ dateTimeWithDate: oi,
880
+ timeWithZone: si,
881
+ dueByline: ri,
882
+ unlockByline: ii,
883
+ unlockedByline: li,
884
+ pointsAbbreviated: ai,
885
+ progressSummary: ci,
886
+ progressScreenReaderValue: ui,
887
+ moduleProgressOverviewPercentLabel: di,
888
+ moduleProgressOverviewSummary: mi,
889
+ moduleProgressOverviewDetail: pi,
890
+ moduleProgressOverviewItemsSummary: gi,
891
+ moduleProgressOverviewGroupLabel: fi,
892
+ moduleProgressSegmentLabel: hi,
893
+ durationMinutes: Ii,
894
+ itemUnpublishedLabel: bi,
895
+ itemUntitled: yi,
896
+ opensInNewWindow: Mi
897
+ }, _i = /%\{(\w+)\}/g, Ti = Si, Se = "en-US", Ei = /* @__PURE__ */ new Map(), Ci = /* @__PURE__ */ new Map();
898
+ function On(e, t, n) {
879
899
  const o = e.get(t);
880
900
  if (o) return o;
881
901
  const s = n();
882
902
  return e.set(t, s), s;
883
903
  }
884
- function pi(e, t, n) {
885
- return n ? e.replace(ci, (o, s) => {
904
+ function wi(e, t, n) {
905
+ return n ? e.replace(_i, (o, s) => {
886
906
  if (!Object.prototype.hasOwnProperty.call(n, s)) return o;
887
907
  const r = n[s];
888
- return typeof r == "number" && Number.isFinite(r) ? An(mi, t, () => new Intl.NumberFormat(t)).format(r) : String(r);
908
+ return typeof r == "number" && Number.isFinite(r) ? On(Ci, t, () => new Intl.NumberFormat(t)).format(r) : String(r);
889
909
  }) : e;
890
910
  }
891
- function fi(e, t, n) {
911
+ function vi(e, t, n) {
892
912
  const o = n == null ? void 0 : n.count;
893
913
  if (typeof o == "number" && Number.isFinite(o)) {
894
- const s = An(di, t, () => new Intl.PluralRules(t)).select(o), r = e[s];
914
+ const s = On(Ei, t, () => new Intl.PluralRules(t)).select(o), r = e[s];
895
915
  if (typeof r == "string") return r;
896
916
  }
897
917
  return typeof e.other == "string" ? e.other : void 0;
898
918
  }
899
- function Nt(e, t, n) {
919
+ function zt(e, t, n) {
900
920
  if (typeof e == "string") return e;
901
921
  if (e !== null && typeof e == "object")
902
- return fi(e, t, n);
922
+ return vi(e, t, n);
903
923
  }
904
- const Dt = /* @__PURE__ */ new Set();
905
- function gi(e) {
906
- Dt.has(e) || (Dt.add(e), console.warn(
924
+ const $t = /* @__PURE__ */ new Set();
925
+ function Pi(e) {
926
+ $t.has(e) || ($t.add(e), console.warn(
907
927
  `[platform-modules] no translation for "${e}"; it will render as itself. Add it to the catalog passed to ModulesI18nProvider.`
908
928
  ));
909
929
  }
910
- function hi(e, t, n, o, s) {
911
- const r = Nt(e == null ? void 0 : e[t], n, s);
930
+ function Ai(e, t, n, o, s) {
931
+ const r = zt(e == null ? void 0 : e[t], n, s);
912
932
  if (typeof r == "string") return r;
913
- const i = Nt(ui[t], n, s);
914
- return typeof i == "string" ? i : (o && gi(t), t);
933
+ const l = zt(Ti[t], n, s);
934
+ return typeof l == "string" ? l : (o && Pi(t), t);
915
935
  }
916
- function xn(e, t = Ie, n = !1) {
917
- return (o, s) => pi(hi(e, o, t, n, s), t, s);
936
+ function qn(e, t = Se, n = !1) {
937
+ return (o, s) => wi(Ai(e, o, t, n, s), t, s);
918
938
  }
919
- const Ii = xn(), bi = { t: Ii, locale: Ie }, Ln = en(null);
920
- function Za({
939
+ const xi = qn(), Li = { t: xi, locale: Se }, Fn = yt(null);
940
+ function pc({
921
941
  translations: e,
922
942
  locale: t,
923
943
  timezone: n,
@@ -925,26 +945,26 @@ function Za({
925
945
  children: s
926
946
  }) {
927
947
  const r = N(() => {
928
- const i = t ?? Ie;
948
+ const l = t ?? Se;
929
949
  return {
930
- t: xn(e, i, o),
931
- locale: i,
950
+ t: qn(e, l, o),
951
+ locale: l,
932
952
  timezone: n
933
953
  };
934
954
  }, [e, t, n, o]);
935
- return /* @__PURE__ */ l(Ln.Provider, { value: r, children: s });
955
+ return /* @__PURE__ */ i(Fn.Provider, { value: r, children: s });
936
956
  }
937
- function j() {
938
- return tn(Ln) ?? bi;
957
+ function H() {
958
+ return Mt(Fn) ?? Li;
939
959
  }
940
- const Mi = 864e5, yi = "en-US", Ot = /* @__PURE__ */ new Map(), qt = /* @__PURE__ */ new Map();
941
- function Si(e) {
942
- const t = qt.get(e);
960
+ const Ri = 864e5, ki = "en-US", Bt = /* @__PURE__ */ new Map(), Gt = /* @__PURE__ */ new Map();
961
+ function Di(e) {
962
+ const t = Gt.get(e);
943
963
  if (t) return t;
944
964
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
945
- return qt.set(e, n), n;
965
+ return Gt.set(e, n), n;
946
966
  }
947
- function Ft(e, t) {
967
+ function jt(e, t) {
948
968
  return {
949
969
  time: new Intl.DateTimeFormat(e, {
950
970
  hour: "numeric",
@@ -959,7 +979,7 @@ function Ft(e, t) {
959
979
  timeZone: t
960
980
  }),
961
981
  zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
962
- civilDay: new Intl.DateTimeFormat(yi, {
982
+ civilDay: new Intl.DateTimeFormat(ki, {
963
983
  year: "numeric",
964
984
  month: "numeric",
965
985
  day: "numeric",
@@ -967,57 +987,65 @@ function Ft(e, t) {
967
987
  })
968
988
  };
969
989
  }
970
- function Rn(e, t) {
971
- const n = t || void 0, o = `${e}|${n ?? ""}`, s = Ot.get(o);
990
+ function Un(e, t) {
991
+ const n = t || void 0, o = `${e}|${n ?? ""}`, s = Bt.get(o);
972
992
  if (s) return s;
973
993
  let r;
974
994
  try {
975
- r = Ft(e, n);
995
+ r = jt(e, n);
976
996
  } catch {
977
997
  console.warn(
978
998
  `[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
979
- ), r = Ft(e, void 0);
999
+ ), r = jt(e, void 0);
980
1000
  }
981
- return Ot.set(o, r), r;
1001
+ return Bt.set(o, r), r;
982
1002
  }
983
- function Ut(e, t) {
984
- return new Date(dt(e, t)).getUTCFullYear();
1003
+ function Yt(e, t) {
1004
+ return new Date(gt(e, t)).getUTCFullYear();
985
1005
  }
986
- function _i(e, t) {
1006
+ function Ni(e, t) {
987
1007
  var o;
988
1008
  const n = (o = e.zone) == null ? void 0 : o.formatToParts(t).find((s) => s.type === "timeZoneName");
989
1009
  return (n == null ? void 0 : n.value) ?? null;
990
1010
  }
991
- function dt(e, t) {
1011
+ function gt(e, t) {
992
1012
  const n = e.civilDay.formatToParts(t), o = (s) => {
993
1013
  var r;
994
- return Number((r = n.find((i) => i.type === s)) == null ? void 0 : r.value);
1014
+ return Number((r = n.find((l) => l.type === s)) == null ? void 0 : r.value);
995
1015
  };
996
1016
  return Date.UTC(o("year"), o("month") - 1, o("day"));
997
1017
  }
998
- function Ti(e, t, n) {
999
- return kn(Rn(Ie, n), e, t);
1018
+ function Oi(e, t, n) {
1019
+ return $n(Un(Se, n), e, t);
1000
1020
  }
1001
- function kn(e, t, n) {
1002
- return Math.round((dt(e, t) - dt(e, n)) / Mi);
1021
+ const zn = 7;
1022
+ function Ct(e, t, n) {
1023
+ if (!e) return !1;
1024
+ const o = new Date(e);
1025
+ if (Number.isNaN(o.getTime())) return !1;
1026
+ const s = Oi(o, t, n);
1027
+ return s >= 0 && s < zn;
1003
1028
  }
1004
- function Ei(e, t, n, { locale: o = Ie, timezone: s } = {}) {
1029
+ function $n(e, t, n) {
1030
+ return Math.round((gt(e, t) - gt(e, n)) / Ri);
1031
+ }
1032
+ function qi(e, t, n, { locale: o = Se, timezone: s } = {}) {
1005
1033
  const r = new Date(t);
1006
1034
  if (Number.isNaN(r.getTime())) return t;
1007
- const i = Rn(o, s), a = _i(i, r), d = i.time.format(r), u = a ? e("timeWithZone", { time: d, zone: a }) : d, c = kn(i, r, n);
1008
- if (c === 0) return e("dateTimeToday", { time: u });
1009
- if (c === -1) return e("dateTimeYesterday", { time: u });
1010
- if (c === 1) return e("dateTimeTomorrow", { time: u });
1011
- const f = Ut(i, r) === Ut(i, n) ? i.day.format(r) : i.dayYear.format(r);
1012
- return e("dateTimeWithDate", { date: f, time: u });
1035
+ const l = Un(o, s), a = Ni(l, r), d = l.time.format(r), c = a ? e("timeWithZone", { time: d, zone: a }) : d, u = $n(l, r, n);
1036
+ if (u === 0) return e("dateTimeToday", { time: c });
1037
+ if (u === -1) return e("dateTimeYesterday", { time: c });
1038
+ if (u === 1) return e("dateTimeTomorrow", { time: c });
1039
+ const g = Yt(l, r) === Yt(l, n) ? l.day.format(r) : l.dayYear.format(r);
1040
+ return e("dateTimeWithDate", { date: g, time: c });
1013
1041
  }
1014
- function Ci(e, t = Ie) {
1015
- return !Number.isInteger(e) || e < 1 ? null : Si(t).format(e);
1042
+ function Fi(e, t = Se) {
1043
+ return !Number.isInteger(e) || e < 1 ? null : Di(t).format(e);
1016
1044
  }
1017
- function wi(e, t) {
1045
+ function Ui(e, t) {
1018
1046
  return t == null ? null : e("pointsAbbreviated", { count: t });
1019
1047
  }
1020
- function Pi(e, t) {
1048
+ function zi(e, t) {
1021
1049
  switch (t.type) {
1022
1050
  case "must_view":
1023
1051
  return e("requirementMustView");
@@ -1035,13 +1063,13 @@ function Pi(e, t) {
1035
1063
  return e("requirementUnknown");
1036
1064
  }
1037
1065
  }
1038
- function vi(e, t, n, o) {
1066
+ function $i(e, t, n, o) {
1039
1067
  return e("progressSummary", { percent: t, met: n, count: o });
1040
1068
  }
1041
- function Ai(e, t, n, o) {
1069
+ function Bi(e, t, n, o) {
1042
1070
  return e("progressScreenReaderValue", { percent: t, met: n, count: o });
1043
1071
  }
1044
- const X = "all", xi = 7, Li = {
1072
+ const re = "all", gc = zn, Gi = {
1045
1073
  all: {
1046
1074
  label: "filterAll",
1047
1075
  order: 10,
@@ -1070,13 +1098,8 @@ const X = "all", xi = 7, Li = {
1070
1098
  label: "filterDueThisWeek",
1071
1099
  order: 40,
1072
1100
  predicate: (e, { today: t, timezone: n }) => {
1073
- var i;
1074
- const o = (i = e.progress) == null ? void 0 : i.nextDueAt;
1075
- if (!o) return !1;
1076
- const s = new Date(o);
1077
- if (Number.isNaN(s.getTime())) return !1;
1078
- const r = Ti(s, t, n);
1079
- return r >= 0 && r < xi;
1101
+ var o;
1102
+ return Ct((o = e.progress) == null ? void 0 : o.nextDueAt, t, n);
1080
1103
  }
1081
1104
  },
1082
1105
  missing: {
@@ -1088,24 +1111,24 @@ const X = "all", xi = 7, Li = {
1088
1111
  }
1089
1112
  }
1090
1113
  };
1091
- function yt(e) {
1114
+ function wt(e) {
1092
1115
  if (!(!e || e.clientOnly))
1093
1116
  return e.query;
1094
1117
  }
1095
- function mt(e) {
1096
- return e !== void 0 && yt(e) === void 0;
1097
- }
1098
- const Ri = {
1099
- moduleLabel: (e, t, { locale: n }) => Ci(e, n),
1100
- dateTime: (e, t, { t: n, locale: o, timezone: s }) => Ei(n, e, t, { locale: o, timezone: s }),
1101
- points: (e, { t }) => wi(t, e),
1102
- progress: (e, t, n, { t: o }) => vi(o, e, t, n)
1103
- }, ki = "type", Ni = {
1118
+ function ft(e) {
1119
+ return e !== void 0 && wt(e) === void 0;
1120
+ }
1121
+ const ji = {
1122
+ moduleLabel: (e, t, { locale: n }) => Fi(e, n),
1123
+ dateTime: (e, t, { t: n, locale: o, timezone: s }) => qi(n, e, t, { locale: o, timezone: s }),
1124
+ points: (e, { t }) => Ui(t, e),
1125
+ progress: (e, t, n, { t: o }) => $i(o, e, t, n)
1126
+ }, Yi = "type", Hi = {
1104
1127
  type: {
1105
1128
  label: "metaFieldTypeLabel",
1106
1129
  order: 10,
1107
1130
  render: ({ item: e, t, config: n }) => {
1108
- const o = he(n.itemTypes, e.type);
1131
+ const o = Me(n.itemTypes, e.type);
1109
1132
  return o ? t(o.label) : null;
1110
1133
  }
1111
1134
  },
@@ -1122,13 +1145,13 @@ const Ri = {
1122
1145
  requirement: {
1123
1146
  label: "metaFieldRequirementLabel",
1124
1147
  order: 40,
1125
- render: ({ item: e, t }) => e.completionRequirement ? Pi(t, e.completionRequirement) : null
1148
+ render: ({ item: e, t }) => e.completionRequirement ? zi(t, e.completionRequirement) : null
1126
1149
  },
1127
1150
  estimatedDuration: {
1128
1151
  label: "metaFieldDurationLabel",
1129
1152
  order: 50,
1130
1153
  render: ({ item: e, t }) => {
1131
- const n = zo(e);
1154
+ const n = Vo(e);
1132
1155
  return n === null ? null : t("durationMinutes", { count: n });
1133
1156
  }
1134
1157
  },
@@ -1137,135 +1160,139 @@ const Ri = {
1137
1160
  order: 60,
1138
1161
  render: ({ item: e, t }) => e.published ? null : t("itemUnpublishedLabel")
1139
1162
  }
1140
- }, ne = { size: "md", color: "mutedColor" }, Di = {
1163
+ }, ae = { size: "md", color: "mutedColor" }, Ki = {
1141
1164
  assignment: {
1142
1165
  label: "itemTypeAssignment",
1143
1166
  order: 10,
1144
- icon: /* @__PURE__ */ l(mo, { ...ne })
1167
+ icon: /* @__PURE__ */ i(_o, { ...ae })
1145
1168
  },
1146
- quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ l(uo, { ...ne }) },
1169
+ quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ i(So, { ...ae }) },
1147
1170
  discussion: {
1148
1171
  label: "itemTypeDiscussion",
1149
1172
  order: 30,
1150
- icon: /* @__PURE__ */ l(co, { ...ne })
1173
+ icon: /* @__PURE__ */ i(Mo, { ...ae })
1151
1174
  },
1152
- page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ l(ao, { ...ne }) },
1153
- file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ l(lo, { ...ne }) },
1175
+ page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ i(yo, { ...ae }) },
1176
+ file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ i(bo, { ...ae }) },
1154
1177
  external_url: {
1155
1178
  label: "itemTypeExternalUrl",
1156
1179
  order: 60,
1157
- icon: /* @__PURE__ */ l(io, { ...ne })
1180
+ icon: /* @__PURE__ */ i(Io, { ...ae })
1158
1181
  },
1159
1182
  external_tool: {
1160
1183
  label: "itemTypeExternalTool",
1161
1184
  order: 70,
1162
- icon: /* @__PURE__ */ l(ro, { ...ne })
1185
+ icon: /* @__PURE__ */ i(ho, { ...ae })
1163
1186
  },
1164
1187
  sub_header: { label: "itemTypeSubHeader", order: 80, icon: null }
1165
- }, et = {
1166
- formatters: Ri,
1167
- itemTypes: Di,
1188
+ }, tt = {
1189
+ formatters: ji,
1190
+ itemTypes: Ki,
1168
1191
  itemStatuses: {},
1169
- itemMeta: Ni,
1170
- filters: Li,
1192
+ itemMeta: Hi,
1193
+ filters: Gi,
1171
1194
  moduleActions: {},
1172
1195
  itemActions: {},
1173
1196
  navigation: {}
1174
1197
  };
1175
- Object.freeze(et);
1176
- for (const e of Object.values(et)) {
1198
+ Object.freeze(tt);
1199
+ for (const e of Object.values(tt)) {
1177
1200
  Object.freeze(e);
1178
1201
  for (const t of Object.values(e)) Object.freeze(t);
1179
1202
  }
1180
- function Oi(e, t) {
1181
- return Je(e).filter((n) => {
1182
- const o = yt(n);
1183
- return o !== void 0 && !xo(t, o);
1203
+ function Wi(e, t) {
1204
+ return et(e).filter((n) => {
1205
+ const o = wt(n);
1206
+ return o !== void 0 && !zo(t, o);
1184
1207
  }).map((n) => n.key);
1185
1208
  }
1186
- function zt(e) {
1209
+ function Ht(e) {
1187
1210
  return `[platform-modules] the adapter cannot serve filter(s): ${e.join(", ")}. Add the field to the adapter's capabilities, or set clientOnly on the entry.`;
1188
1211
  }
1189
- function qi(e, t) {
1190
- const n = Oi(e, t);
1212
+ function Qi(e, t) {
1213
+ const n = Wi(e, t);
1191
1214
  if (n.length === 0) return e;
1192
1215
  if (process.env.NODE_ENV !== "production")
1193
- throw new Error(zt(n));
1194
- console.warn(zt(n));
1216
+ throw new Error(Ht(n));
1217
+ console.warn(Ht(n));
1195
1218
  const o = Object.fromEntries(n.map((s) => [s, { ...e[s], hidden: !0 }]));
1196
1219
  return { ...e, ...o };
1197
1220
  }
1198
- const Nn = en(null);
1199
- function Xa({ value: e, children: t }) {
1200
- return /* @__PURE__ */ l(Nn.Provider, { value: e, children: t });
1221
+ const Bn = yt(null);
1222
+ function fc({ value: e, children: t }) {
1223
+ return /* @__PURE__ */ i(Bn.Provider, { value: e, children: t });
1201
1224
  }
1202
- function Re() {
1203
- return tn(Nn) ?? et;
1225
+ function _e() {
1226
+ return Mt(Bn) ?? tt;
1204
1227
  }
1205
- function Ja(e) {
1206
- return he(Re().itemMeta, e) !== void 0;
1228
+ function hc(e) {
1229
+ return Me(_e().itemMeta, e) !== void 0;
1207
1230
  }
1208
- const ke = m.object({
1231
+ const qe = m.object({
1209
1232
  label: m.string(),
1210
1233
  order: m.number(),
1211
1234
  hidden: m.boolean().optional()
1212
1235
  });
1213
- function fe(e) {
1236
+ function be(e) {
1214
1237
  return m.record(m.string(), e);
1215
1238
  }
1216
- const Fi = fe(ke.strict()), Dn = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || nn(e) || Array.isArray(e) && e.every(Dn), Ui = (e) => {
1239
+ const Vi = be(qe.strict()), Gn = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || an(e) || Array.isArray(e) && e.every(Gn), Zi = (e) => {
1217
1240
  var t;
1218
1241
  return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
1219
- }, zi = ke.extend({
1220
- icon: m.custom(Dn, { message: "icon must be a ReactNode" }),
1221
- renderIcon: m.custom(Ui, {
1242
+ }, Xi = qe.extend({
1243
+ icon: m.custom(Gn, { message: "icon must be a ReactNode" }),
1244
+ renderIcon: m.custom(Zi, {
1222
1245
  message: "renderIcon must be a function of the item, not a React component"
1223
1246
  })
1224
- }).strict(), On = (e) => {
1247
+ }).strict(), jn = (e) => {
1225
1248
  var t;
1226
1249
  return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
1227
- }, $t = (e) => e == null || On(e), Bt = ke.extend({
1228
- onSelect: m.custom(On, {
1250
+ }, Kt = (e) => e == null || jn(e), Wt = qe.extend({
1251
+ onSelect: m.custom(jn, {
1229
1252
  message: "onSelect must be a function taking an ActionContext"
1230
1253
  }),
1231
- visible: m.custom($t, {
1254
+ visible: m.custom(Kt, {
1232
1255
  message: "visible must be a function taking an ActionContext, not a React component"
1233
1256
  }),
1234
- renderModal: m.custom($t, {
1257
+ renderModal: m.custom(Kt, {
1235
1258
  message: "renderModal must be a function taking an ActionContext, not a React component"
1236
1259
  })
1237
1260
  }).strict();
1238
- function He() {
1261
+ function Ke() {
1239
1262
  return m.custom((e) => typeof e == "function", {
1240
1263
  message: "Expected a function"
1241
1264
  });
1242
1265
  }
1243
- const $i = ke.extend({
1266
+ const Ji = qe.extend({
1244
1267
  render: m.custom((e) => typeof e == "function", {
1245
1268
  message: "render must be a function taking a MetaFieldContext"
1246
1269
  })
1247
- }).strict(), Bi = ke.extend({
1270
+ }).strict(), el = qe.extend({
1248
1271
  predicate: m.custom((e) => typeof e == "function", {
1249
1272
  message: "predicate must be a function of the module and a FilterContext"
1250
1273
  }),
1251
- query: Ao.optional(),
1274
+ query: Uo.optional(),
1252
1275
  clientOnly: m.boolean().optional()
1253
- }).strict(), Gi = m.object({
1276
+ }).strict(), rt = () => m.custom((e) => typeof e == "function", { message: "Expected a function" }).optional(), tl = m.object({
1277
+ getItemHref: rt(),
1278
+ getModuleHref: rt(),
1279
+ onItemClick: rt()
1280
+ }).strict(), nl = m.object({
1254
1281
  formatters: m.object({
1255
- moduleLabel: He(),
1256
- dateTime: He(),
1257
- points: He(),
1258
- progress: He()
1282
+ moduleLabel: Ke(),
1283
+ dateTime: Ke(),
1284
+ points: Ke(),
1285
+ progress: Ke()
1259
1286
  }).strict(),
1260
- itemTypes: fe(zi),
1261
- itemStatuses: Fi,
1262
- itemMeta: fe($i),
1263
- filters: fe(Bi),
1264
- moduleActions: fe(Bt),
1265
- itemActions: fe(Bt),
1266
- navigation: m.object({}).strict()
1287
+ itemTypes: be(Xi),
1288
+ itemStatuses: Vi,
1289
+ itemMeta: be(Ji),
1290
+ filters: be(el),
1291
+ moduleActions: be(Wt),
1292
+ itemActions: be(Wt),
1293
+ navigation: tl
1267
1294
  });
1268
- function ji(e, t = {}) {
1295
+ function ol(e, t = {}) {
1269
1296
  const n = Object.keys(t).filter((s) => !Qe(e, s));
1270
1297
  if (n.length > 0)
1271
1298
  throw new Error(
@@ -1273,132 +1300,132 @@ function ji(e, t = {}) {
1273
1300
  );
1274
1301
  const o = {
1275
1302
  formatters: Ve(e.formatters, t.formatters),
1276
- itemTypes: me(e.itemTypes, t.itemTypes),
1277
- itemStatuses: me(e.itemStatuses, t.itemStatuses),
1278
- itemMeta: me(e.itemMeta, t.itemMeta),
1279
- filters: me(e.filters, t.filters),
1280
- moduleActions: me(e.moduleActions, t.moduleActions),
1281
- itemActions: me(e.itemActions, t.itemActions),
1303
+ itemTypes: he(e.itemTypes, t.itemTypes),
1304
+ itemStatuses: he(e.itemStatuses, t.itemStatuses),
1305
+ itemMeta: he(e.itemMeta, t.itemMeta),
1306
+ filters: he(e.filters, t.filters),
1307
+ moduleActions: he(e.moduleActions, t.moduleActions),
1308
+ itemActions: he(e.itemActions, t.itemActions),
1282
1309
  navigation: Ve(e.navigation, t.navigation)
1283
1310
  };
1284
- return Gi.parse(o), o;
1311
+ return nl.parse(o), o;
1285
1312
  }
1286
- function ec(e = {}) {
1287
- return ji(et, e);
1313
+ function Ic(e = {}) {
1314
+ return ol(tt, e);
1288
1315
  }
1289
- function tc(e) {
1290
- const t = ht();
1316
+ function bc(e) {
1317
+ const t = St();
1291
1318
  return U(
1292
- (n, o) => Ms({ queryClient: t, courseId: e, module: n, item: o }),
1319
+ (n, o) => xs({ queryClient: t, courseId: e, module: n, item: o }),
1293
1320
  [t, e]
1294
1321
  );
1295
1322
  }
1296
- function Ne() {
1297
- const { formatters: e } = Re(), { t, locale: n, timezone: o } = j();
1323
+ function Fe() {
1324
+ const { formatters: e } = _e(), { t, locale: n, timezone: o } = H();
1298
1325
  return N(() => {
1299
- const s = { t, locale: n, timezone: o }, r = (i, a) => e.dateTime(i, a, s);
1326
+ const s = { t, locale: n, timezone: o }, r = (l, a) => e.dateTime(l, a, s);
1300
1327
  return {
1301
- moduleLabel: (i, a) => e.moduleLabel(i, a, s) || null,
1302
- dueByline: (i, a) => t("dueByline", { when: r(i, a) }),
1303
- unlockByline: (i, a) => t("unlockByline", { when: r(i, a) }),
1304
- unlockedByline: (i, a) => t("unlockedByline", { when: r(i, a) }),
1305
- points: (i) => e.points(i, s),
1306
- progress: (i, a, d) => e.progress(i, a, d, s)
1328
+ moduleLabel: (l, a) => e.moduleLabel(l, a, s) || null,
1329
+ dueByline: (l, a) => t("dueByline", { when: r(l, a) }),
1330
+ unlockByline: (l, a) => t("unlockByline", { when: r(l, a) }),
1331
+ unlockedByline: (l, a) => t("unlockedByline", { when: r(l, a) }),
1332
+ points: (l) => e.points(l, s),
1333
+ progress: (l, a, d) => e.progress(l, a, d, s)
1307
1334
  };
1308
1335
  }, [e, t, n, o]);
1309
1336
  }
1310
- const St = 100, qn = 100, Fn = 100, Yi = 4, tt = 5 * 60 * 1e3, Un = 20, Ze = { hasNextPage: !1, endCursor: null };
1311
- function zn(e) {
1337
+ const vt = 100, Yn = 100, Hn = 100, sl = 4, nt = 5 * 60 * 1e3, Kn = 20, Ze = { hasNextPage: !1, endCursor: null };
1338
+ function Wn(e) {
1312
1339
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
1313
1340
  }
1314
- function $n(e) {
1341
+ function Qn(e) {
1315
1342
  const {
1316
1343
  courseId: t,
1317
1344
  adapter: n,
1318
1345
  pageSize: o,
1319
1346
  includeItems: s,
1320
1347
  filter: r,
1321
- inlineItemsFirst: i,
1348
+ inlineItemsFirst: l,
1322
1349
  inlineFirst: a,
1323
1350
  view: d,
1324
- staleTime: u,
1325
- enabled: c
1351
+ staleTime: c,
1352
+ enabled: u
1326
1353
  } = e;
1327
1354
  return {
1328
1355
  // `inlineItemsFirst` is deliberately out of the key: it is derived from this very list.
1329
- queryKey: Le.list(t, { view: d, pageSize: o, includeItems: s, filter: r }),
1356
+ queryKey: Oe.list(t, { view: d, pageSize: o, includeItems: s, filter: r }),
1330
1357
  initialPageParam: null,
1331
- queryFn: ({ pageParam: p, signal: f }) => n.listModules({
1358
+ queryFn: ({ pageParam: p, signal: g }) => n.listModules({
1332
1359
  courseId: t,
1333
1360
  cursor: p,
1334
1361
  pageSize: o,
1335
1362
  includeItems: s,
1336
1363
  filter: r,
1337
- inlineItemsFirst: i,
1364
+ inlineItemsFirst: l,
1338
1365
  inlineFirst: a,
1339
- signal: f
1366
+ signal: g
1340
1367
  }),
1341
- getNextPageParam: zn,
1342
- enabled: c,
1343
- staleTime: u,
1368
+ getNextPageParam: Wn,
1369
+ enabled: u,
1370
+ staleTime: c,
1344
1371
  refetchOnWindowFocus: !1
1345
1372
  };
1346
1373
  }
1347
- function Bn(e) {
1348
- const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime: i, enabled: a, limit: d } = e;
1374
+ function Vn(e) {
1375
+ const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime: l, enabled: a, limit: d } = e;
1349
1376
  return {
1350
- queryKey: Le.items(t, n, { view: r, pageSize: s }),
1377
+ queryKey: Oe.items(t, n, { view: r, pageSize: s }),
1351
1378
  initialPageParam: null,
1352
- queryFn: ({ pageParam: u, signal: c }) => {
1353
- const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: u, pageSize: s, signal: c });
1379
+ queryFn: ({ pageParam: c, signal: u }) => {
1380
+ const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: s, signal: u });
1354
1381
  return d ? d(() => {
1355
- if (c.aborted)
1382
+ if (u.aborted)
1356
1383
  throw new DOMException("The operation was aborted.", "AbortError");
1357
1384
  return p();
1358
1385
  }) : p();
1359
1386
  },
1360
- getNextPageParam: zn,
1387
+ getNextPageParam: Wn,
1361
1388
  enabled: a,
1362
- staleTime: i,
1389
+ staleTime: l,
1363
1390
  refetchOnWindowFocus: !1
1364
1391
  };
1365
1392
  }
1366
- function Wi(e) {
1367
- var x;
1393
+ function rl(e) {
1394
+ var E;
1368
1395
  const {
1369
1396
  courseId: t,
1370
1397
  adapter: n,
1371
- pageSize: o = St,
1398
+ pageSize: o = vt,
1372
1399
  includeItems: s = !1,
1373
1400
  filter: r,
1374
- inlineItemsFirst: i,
1401
+ inlineItemsFirst: l,
1375
1402
  inlineFirst: a,
1376
1403
  view: d,
1377
- staleTime: u = tt,
1378
- enabled: c = !0
1379
- } = e, p = It({
1380
- ...$n({
1404
+ staleTime: c = nt,
1405
+ enabled: u = !0
1406
+ } = e, p = _t({
1407
+ ...Qn({
1381
1408
  courseId: t,
1382
1409
  adapter: n,
1383
1410
  pageSize: o,
1384
1411
  includeItems: s,
1385
1412
  filter: r,
1386
- inlineItemsFirst: i,
1413
+ inlineItemsFirst: l,
1387
1414
  inlineFirst: a,
1388
1415
  view: d,
1389
- staleTime: u,
1390
- enabled: c
1416
+ staleTime: c,
1417
+ enabled: u
1391
1418
  }),
1392
1419
  // `useItemsMode` shares `modulesQueryOptions`, and `inlineFirst` is out of that key.
1393
- placeholderData: ho
1394
- }), f = (x = p.data) == null ? void 0 : x.pages, y = N(() => (f ?? []).flatMap((_) => _.modules), [f]), g = f && f.length > 0 ? f[f.length - 1].pageInfo : Ze, b = p.fetchNextPage, w = U(() => {
1395
- b();
1396
- }, [b]);
1420
+ placeholderData: vo
1421
+ }), g = (E = p.data) == null ? void 0 : E.pages, b = N(() => (g ?? []).flatMap((A) => A.modules), [g]), f = g && g.length > 0 ? g[g.length - 1].pageInfo : Ze, y = p.fetchNextPage, P = U(() => {
1422
+ y();
1423
+ }, [y]);
1397
1424
  return {
1398
- modules: y,
1399
- pageInfo: g,
1400
- hasNextPage: g.hasNextPage,
1401
- fetchNextPage: w,
1425
+ modules: b,
1426
+ pageInfo: f,
1427
+ hasNextPage: f.hasNextPage,
1428
+ fetchNextPage: P,
1402
1429
  isLoading: p.isLoading,
1403
1430
  isFetchingNextPage: p.isFetchingNextPage,
1404
1431
  isPending: p.isPending,
@@ -1406,42 +1433,42 @@ function Wi(e) {
1406
1433
  error: p.error
1407
1434
  };
1408
1435
  }
1409
- function nc(e) {
1410
- var b;
1436
+ function yc(e) {
1437
+ var y;
1411
1438
  const {
1412
1439
  courseId: t,
1413
1440
  moduleId: n,
1414
1441
  adapter: o,
1415
- pageSize: s = qn,
1442
+ pageSize: s = Yn,
1416
1443
  view: r,
1417
- enabled: i = !0,
1418
- staleTime: a = tt,
1444
+ enabled: l = !0,
1445
+ staleTime: a = nt,
1419
1446
  limit: d
1420
- } = e, u = It(
1421
- Bn({
1447
+ } = e, c = _t(
1448
+ Vn({
1422
1449
  courseId: t,
1423
1450
  moduleId: n,
1424
1451
  adapter: o,
1425
1452
  pageSize: s,
1426
1453
  view: r,
1427
1454
  staleTime: a,
1428
- enabled: i,
1455
+ enabled: l,
1429
1456
  limit: d
1430
1457
  })
1431
- ), c = (b = u.data) == null ? void 0 : b.pages, p = N(() => (c ?? []).flatMap((w) => w.items), [c]), f = c && c.length > 0 ? c[c.length - 1].pageInfo : Ze, y = u.fetchNextPage, g = U(() => {
1432
- y();
1433
- }, [y]);
1458
+ ), u = (y = c.data) == null ? void 0 : y.pages, p = N(() => (u ?? []).flatMap((P) => P.items), [u]), g = u && u.length > 0 ? u[u.length - 1].pageInfo : Ze, b = c.fetchNextPage, f = U(() => {
1459
+ b();
1460
+ }, [b]);
1434
1461
  return {
1435
1462
  items: p,
1436
- pageInfo: f,
1437
- hasNextPage: f.hasNextPage,
1438
- fetchNextPage: g,
1439
- isLoading: u.isLoading,
1440
- isFetchingNextPage: u.isFetchingNextPage,
1441
- error: u.error
1463
+ pageInfo: g,
1464
+ hasNextPage: g.hasNextPage,
1465
+ fetchNextPage: f,
1466
+ isLoading: c.isLoading,
1467
+ isFetchingNextPage: c.isFetchingNextPage,
1468
+ error: c.error
1442
1469
  };
1443
1470
  }
1444
- function Hi(e, t, n = Mt) {
1471
+ function il(e, t, n = Et) {
1445
1472
  if (e.pageInfo.hasNextPage) return "onDemand";
1446
1473
  let o = 0, s = 0;
1447
1474
  for (const r of e.modules) {
@@ -1450,31 +1477,31 @@ function Hi(e, t, n = Mt) {
1450
1477
  }
1451
1478
  return o > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(s, 1) <= n ? "inline" : "onDemand";
1452
1479
  }
1453
- function Ki(e) {
1454
- var y;
1480
+ function ll(e) {
1481
+ var b;
1455
1482
  const {
1456
1483
  courseId: t,
1457
1484
  adapter: n,
1458
1485
  mode: o = "auto",
1459
- inlineThreshold: s = Fn,
1460
- nodeBudget: r = n.inlineNodeBudget ?? Mt,
1461
- pageSize: i = St,
1486
+ inlineThreshold: s = Hn,
1487
+ nodeBudget: r = n.inlineNodeBudget ?? Et,
1488
+ pageSize: l = vt,
1462
1489
  filter: a,
1463
1490
  view: d,
1464
- staleTime: u = tt
1465
- } = e, c = o === "auto", p = It(
1466
- $n({
1491
+ staleTime: c = nt
1492
+ } = e, u = o === "auto", p = _t(
1493
+ Qn({
1467
1494
  courseId: t,
1468
1495
  adapter: n,
1469
- pageSize: i,
1496
+ pageSize: l,
1470
1497
  includeItems: !1,
1471
1498
  filter: a,
1472
1499
  view: d,
1473
- staleTime: u,
1474
- enabled: c
1500
+ staleTime: c,
1501
+ enabled: u
1475
1502
  })
1476
1503
  );
1477
- if (!c)
1504
+ if (!u)
1478
1505
  return {
1479
1506
  resolvedMode: o,
1480
1507
  isResolving: !1,
@@ -1490,278 +1517,278 @@ function Ki(e) {
1490
1517
  error: p.error,
1491
1518
  inlineShape: null
1492
1519
  };
1493
- const f = (y = p.data) == null ? void 0 : y.pages[0];
1494
- return f ? {
1495
- resolvedMode: Hi(f, s, r),
1520
+ const g = (b = p.data) == null ? void 0 : b.pages[0];
1521
+ return g ? {
1522
+ resolvedMode: il(g, s, r),
1496
1523
  isResolving: !1,
1497
1524
  probed: !0,
1498
1525
  error: null,
1499
- inlineShape: Qi(f)
1526
+ inlineShape: al(g)
1500
1527
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
1501
1528
  }
1502
- function Qi(e) {
1529
+ function al(e) {
1503
1530
  let t = 1;
1504
1531
  for (const n of e.modules)
1505
1532
  n.itemCount > t && (t = n.itemCount);
1506
1533
  return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
1507
1534
  }
1508
- const Gt = "\0", Vi = /* @__PURE__ */ new Map();
1509
- function Zi(e, t, n = Un) {
1510
- const o = ht(), s = $(/* @__PURE__ */ new Map()), [r, i] = V(Vi), a = e.join(Gt), d = N(() => a === "" ? [] : a.split(Gt), [a]);
1511
- Z(() => {
1512
- const c = s.current, p = () => {
1513
- i((g) => {
1514
- const b = /* @__PURE__ */ new Map();
1515
- let w = g.size !== c.size;
1516
- for (const [x, _] of c) {
1517
- const A = _.getCurrentResult();
1518
- b.set(x, A), !w && g.get(x) !== A && (w = !0);
1535
+ const Qt = "\0", cl = /* @__PURE__ */ new Map();
1536
+ function ul(e, t, n = Kn) {
1537
+ const o = St(), s = z(/* @__PURE__ */ new Map()), [r, l] = oe(cl), a = e.join(Qt), d = N(() => a === "" ? [] : a.split(Qt), [a]);
1538
+ se(() => {
1539
+ const u = s.current, p = () => {
1540
+ l((f) => {
1541
+ const y = /* @__PURE__ */ new Map();
1542
+ let P = f.size !== u.size;
1543
+ for (const [E, A] of u) {
1544
+ const k = A.getCurrentResult();
1545
+ y.set(E, k), !P && f.get(E) !== k && (P = !0);
1519
1546
  }
1520
- return w ? b : g;
1547
+ return P ? y : f;
1521
1548
  });
1522
- }, f = new Set(d);
1523
- for (const g of d) {
1524
- if (c.has(g)) continue;
1525
- const b = new Io(
1549
+ }, g = new Set(d);
1550
+ for (const f of d) {
1551
+ if (u.has(f)) continue;
1552
+ const y = new Po(
1526
1553
  o,
1527
- t(g, !0)
1554
+ t(f, !0)
1528
1555
  );
1529
- c.set(g, b), b.subscribe(p);
1556
+ u.set(f, y), y.subscribe(p);
1530
1557
  }
1531
- for (const [g, b] of c)
1532
- b.setOptions(t(g, f.has(g)));
1533
- for (const g of d) {
1534
- const b = c.get(g);
1535
- b && (c.delete(g), c.set(g, b));
1558
+ for (const [f, y] of u)
1559
+ y.setOptions(t(f, g.has(f)));
1560
+ for (const f of d) {
1561
+ const y = u.get(f);
1562
+ y && (u.delete(f), u.set(f, y));
1536
1563
  }
1537
- let y = c.size - f.size;
1538
- if (y > n)
1539
- for (const [g, b] of c) {
1540
- if (y <= n) break;
1541
- f.has(g) || (b.destroy(), c.delete(g), y -= 1);
1564
+ let b = u.size - g.size;
1565
+ if (b > n)
1566
+ for (const [f, y] of u) {
1567
+ if (b <= n) break;
1568
+ g.has(f) || (y.destroy(), u.delete(f), b -= 1);
1542
1569
  }
1543
1570
  p();
1544
- }, [o, t, d, n]), Z(() => {
1545
- const c = s.current;
1571
+ }, [o, t, d, n]), se(() => {
1572
+ const u = s.current;
1546
1573
  return () => {
1547
- for (const p of c.values()) p.destroy();
1548
- c.clear();
1574
+ for (const p of u.values()) p.destroy();
1575
+ u.clear();
1549
1576
  };
1550
1577
  }, []);
1551
- const u = U((c) => {
1578
+ const c = U((u) => {
1552
1579
  var p;
1553
- (p = s.current.get(c)) == null || p.fetchNextPage();
1580
+ (p = s.current.get(u)) == null || p.fetchNextPage();
1554
1581
  }, []);
1555
- return { results: r, fetchNextPage: u };
1582
+ return { results: r, fetchNextPage: c };
1556
1583
  }
1557
- const Xi = [], Ji = () => {
1584
+ const dl = [], ml = () => {
1558
1585
  };
1559
- function oc(e) {
1560
- var Te, Ge;
1586
+ function Mc(e) {
1587
+ var Pe, Ge;
1561
1588
  const {
1562
1589
  courseId: t,
1563
1590
  adapter: n,
1564
1591
  view: o,
1565
1592
  itemsMode: s = "auto",
1566
- inlineThreshold: r = Fn,
1567
- pageSize: i = St,
1568
- itemPageSize: a = qn,
1569
- itemConcurrency: d = Yi,
1570
- retainCollapsedLimit: u = Un,
1571
- staleTime: c = tt,
1593
+ inlineThreshold: r = Hn,
1594
+ pageSize: l = vt,
1595
+ itemPageSize: a = Yn,
1596
+ itemConcurrency: d = sl,
1597
+ retainCollapsedLimit: c = Kn,
1598
+ staleTime: u = nt,
1572
1599
  initialExpandedModuleIds: p,
1573
- initialFilter: f = X
1574
- } = e, y = ht(), g = Re(), [b, w] = V(f), x = N(
1575
- () => qi(g.filters, n.capabilities),
1576
- [g.filters, n.capabilities]
1577
- ), _ = he(x, b), A = yt(_), q = Ki({
1600
+ initialFilter: g = re
1601
+ } = e, b = St(), f = _e(), [y, P] = oe(g), E = N(
1602
+ () => Qi(f.filters, n.capabilities),
1603
+ [f.filters, n.capabilities]
1604
+ ), A = Me(E, y), k = wt(A), q = ll({
1578
1605
  courseId: t,
1579
1606
  adapter: n,
1580
1607
  mode: s,
1581
1608
  inlineThreshold: r,
1582
- pageSize: i,
1583
- filter: A,
1609
+ pageSize: l,
1610
+ filter: k,
1584
1611
  view: o,
1585
- staleTime: c
1586
- }), B = q.resolvedMode, L = Wi({
1612
+ staleTime: u
1613
+ }), $ = q.resolvedMode, v = rl({
1587
1614
  courseId: t,
1588
1615
  adapter: n,
1589
- pageSize: i,
1590
- filter: A,
1616
+ pageSize: l,
1617
+ filter: k,
1591
1618
  view: o,
1592
- staleTime: c,
1593
- includeItems: B === "inline",
1594
- inlineItemsFirst: (Te = q.inlineShape) == null ? void 0 : Te.maxItemCount,
1619
+ staleTime: u,
1620
+ includeItems: $ === "inline",
1621
+ inlineItemsFirst: (Pe = q.inlineShape) == null ? void 0 : Pe.maxItemCount,
1595
1622
  inlineFirst: (Ge = q.inlineShape) == null ? void 0 : Ge.moduleCount,
1596
- enabled: B !== null
1597
- }), [k, G] = V(
1623
+ enabled: $ !== null
1624
+ }), [j, D] = oe(
1598
1625
  () => p ?? []
1599
- ), J = p === void 0, F = $(!1), D = b !== X && _ !== void 0;
1600
- Z(() => {
1601
- !J || F.current || D || L.isPlaceholderData || G((h) => {
1626
+ ), F = p === void 0, Y = z(!1), B = y !== re && A !== void 0;
1627
+ se(() => {
1628
+ !F || Y.current || B || v.isPlaceholderData || D((h) => {
1602
1629
  const M = new Set(h), I = [...h];
1603
- for (const R of L.modules)
1630
+ for (const R of v.modules)
1604
1631
  R.collapsed === !1 && !M.has(R.id) && I.push(R.id);
1605
1632
  return I.length === h.length ? h : I;
1606
1633
  });
1607
- }, [L.modules, L.isPlaceholderData, J, D]);
1608
- const Y = N(() => {
1634
+ }, [v.modules, v.isPlaceholderData, F, B]);
1635
+ const K = N(() => {
1609
1636
  const h = /* @__PURE__ */ new Map();
1610
- for (const M of L.modules) h.set(M.id, M);
1637
+ for (const M of v.modules) h.set(M.id, M);
1611
1638
  return h;
1612
- }, [L.modules]), se = N(
1613
- () => k.filter((h) => {
1614
- const M = Y.get(h);
1639
+ }, [v.modules]), V = N(
1640
+ () => j.filter((h) => {
1641
+ const M = K.get(h);
1615
1642
  return M !== void 0 && M.items === void 0;
1616
1643
  }),
1617
- [k, Y]
1618
- ), De = N(() => new Set(se), [se]), Oe = N(() => bo(d), [d]), Me = U(
1619
- (h, M) => Bn({
1644
+ [j, K]
1645
+ ), Z = N(() => new Set(V), [V]), W = N(() => Ao(d), [d]), w = U(
1646
+ (h, M) => Vn({
1620
1647
  courseId: t,
1621
1648
  moduleId: h,
1622
1649
  adapter: n,
1623
1650
  pageSize: a,
1624
1651
  view: o,
1625
- staleTime: c,
1652
+ staleTime: u,
1626
1653
  enabled: M,
1627
- limit: Oe
1654
+ limit: W
1628
1655
  }),
1629
- [t, n, a, o, c, Oe]
1630
- ), ee = Zi(se, Me, u), ye = ee.fetchNextPage, qe = $(/* @__PURE__ */ new Map()), re = U(
1656
+ [t, n, a, o, u, W]
1657
+ ), Q = ul(V, w, c), ie = Q.fetchNextPage, ue = z(/* @__PURE__ */ new Map()), Ee = U(
1631
1658
  (h) => {
1632
- let M = qe.current.get(h);
1633
- return M || (M = () => ye(h), qe.current.set(h, M)), M;
1659
+ let M = ue.current.get(h);
1660
+ return M || (M = () => ie(h), ue.current.set(h, M)), M;
1634
1661
  },
1635
- [ye]
1636
- ), ie = U((h) => {
1637
- F.current = !0, G(
1662
+ [ie]
1663
+ ), L = U((h) => {
1664
+ Y.current = !0, D(
1638
1665
  (M) => M.includes(h) ? M : [...M, h]
1639
1666
  );
1640
- }, []), P = U(
1667
+ }, []), X = U(
1641
1668
  (h) => {
1642
- F.current = !0, G((M) => M.filter((I) => I !== h)), y.cancelQueries({ queryKey: ut(t, h) });
1669
+ Y.current = !0, D((M) => M.filter((I) => I !== h)), b.cancelQueries({ queryKey: pt(t, h) });
1643
1670
  },
1644
- [y, t]
1645
- ), Fe = U((h) => {
1646
- F.current = !0, G((M) => {
1671
+ [b, t]
1672
+ ), Ce = U((h) => {
1673
+ Y.current = !0, D((M) => {
1647
1674
  const I = new Set(M), R = h.filter((O) => !I.has(O));
1648
1675
  return R.length === 0 ? M : [...M, ...R];
1649
1676
  });
1650
1677
  }, []), Ue = U(
1651
1678
  (h) => {
1652
- F.current = !0;
1679
+ Y.current = !0;
1653
1680
  const M = new Set(h);
1654
- G((I) => {
1681
+ D((I) => {
1655
1682
  const R = I.filter((O) => !M.has(O));
1656
1683
  return R.length === I.length ? I : R;
1657
1684
  });
1658
1685
  for (const I of M)
1659
- y.cancelQueries({ queryKey: ut(t, I) });
1686
+ b.cancelQueries({ queryKey: pt(t, I) });
1660
1687
  },
1661
- [y, t]
1662
- ), W = $(k);
1663
- W.current = k;
1664
- const Se = U(() => {
1665
- F.current = !0;
1666
- for (const h of W.current) P(h);
1667
- }, [P]), le = $(b);
1668
- le.current = b;
1669
- const H = $(null), ze = U(
1688
+ [b, t]
1689
+ ), J = z(j);
1690
+ J.current = j;
1691
+ const we = U(() => {
1692
+ Y.current = !0;
1693
+ for (const h of J.current) X(h);
1694
+ }, [X]), de = z(y);
1695
+ de.current = y;
1696
+ const ee = z(null), ze = U(
1670
1697
  (h) => {
1671
- if (h === le.current) return;
1672
- if (le.current = h, h !== X && he(x, h) !== void 0) {
1673
- H.current === null && (H.current = W.current);
1674
- const I = F.current;
1675
- for (const R of W.current) P(R);
1676
- F.current = I;
1677
- } else H.current !== null && (G(H.current), W.current = H.current, H.current = null);
1678
- w(h);
1698
+ if (h === de.current) return;
1699
+ if (de.current = h, h !== re && Me(E, h) !== void 0) {
1700
+ ee.current === null && (ee.current = J.current);
1701
+ const I = Y.current;
1702
+ for (const R of J.current) X(R);
1703
+ Y.current = I;
1704
+ } else ee.current !== null && (D(ee.current), J.current = ee.current, ee.current = null);
1705
+ P(h);
1679
1706
  },
1680
- [x, P]
1681
- ), ae = U(
1707
+ [E, X]
1708
+ ), me = U(
1682
1709
  (h) => {
1683
- W.current.includes(h) ? P(h) : ie(h);
1710
+ J.current.includes(h) ? X(h) : L(h);
1684
1711
  },
1685
- [P, ie]
1686
- ), $e = ee.results, Be = $(/* @__PURE__ */ new Map()), _e = U(
1712
+ [X, L]
1713
+ ), $e = Q.results, Be = z(/* @__PURE__ */ new Map()), ve = U(
1687
1714
  (h) => {
1688
- var ue;
1689
- const M = Y.get(h), I = $e.get(h), R = De.has(h), O = Be.current.get(h);
1715
+ var ge;
1716
+ const M = K.get(h), I = $e.get(h), R = Z.has(h), O = Be.current.get(h);
1690
1717
  if (O && O.items === (M == null ? void 0 : M.items) && O.result === I && O.active === R)
1691
1718
  return O.value;
1692
- const ce = (Q) => (Be.current.set(h, { items: M == null ? void 0 : M.items, result: I, active: R, value: Q }), Q);
1719
+ const pe = (ne) => (Be.current.set(h, { items: M == null ? void 0 : M.items, result: I, active: R, value: ne }), ne);
1693
1720
  if ((M == null ? void 0 : M.items) !== void 0)
1694
- return ce({
1721
+ return pe({
1695
1722
  items: M.items,
1696
1723
  pageInfo: Ze,
1697
1724
  hasNextPage: !1,
1698
- fetchNextPage: Ji,
1725
+ fetchNextPage: ml,
1699
1726
  isLoading: !1,
1700
1727
  isFetchingNextPage: !1,
1701
1728
  error: null,
1702
1729
  source: "inline"
1703
1730
  });
1704
- const K = (ue = I == null ? void 0 : I.data) == null ? void 0 : ue.pages, te = K ? K.flatMap((Q) => Q.items) : Xi, Ee = K && K.length > 0 ? K[K.length - 1].pageInfo : Ze;
1705
- return ce({
1706
- items: te,
1707
- pageInfo: Ee,
1708
- hasNextPage: Ee.hasNextPage,
1709
- fetchNextPage: re(h),
1731
+ const te = (ge = I == null ? void 0 : I.data) == null ? void 0 : ge.pages, le = te ? te.flatMap((ne) => ne.items) : dl, Ae = te && te.length > 0 ? te[te.length - 1].pageInfo : Ze;
1732
+ return pe({
1733
+ items: le,
1734
+ pageInfo: Ae,
1735
+ hasNextPage: Ae.hasNextPage,
1736
+ fetchNextPage: Ee(h),
1710
1737
  isLoading: I ? I.isLoading : R,
1711
1738
  isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
1712
1739
  error: (I == null ? void 0 : I.error) ?? null,
1713
1740
  source: "onDemand"
1714
1741
  });
1715
1742
  },
1716
- [Y, $e, re, De]
1743
+ [K, $e, Ee, Z]
1717
1744
  );
1718
1745
  return {
1719
- modules: L.modules,
1720
- pageInfo: L.pageInfo,
1721
- hasNextPage: L.hasNextPage,
1722
- fetchNextPage: L.fetchNextPage,
1723
- isLoading: (q.isResolving || L.isPending) && !L.isPlaceholderData,
1724
- isRefreshing: L.isPlaceholderData,
1725
- isFetchingNextPage: L.isFetchingNextPage,
1726
- error: L.error ?? q.error,
1727
- itemsMode: B,
1728
- getItems: _e,
1729
- expandModule: ie,
1730
- collapseModule: P,
1731
- expandModules: Fe,
1746
+ modules: v.modules,
1747
+ pageInfo: v.pageInfo,
1748
+ hasNextPage: v.hasNextPage,
1749
+ fetchNextPage: v.fetchNextPage,
1750
+ isLoading: (q.isResolving || v.isPending) && !v.isPlaceholderData,
1751
+ isRefreshing: v.isPlaceholderData,
1752
+ isFetchingNextPage: v.isFetchingNextPage,
1753
+ error: v.error ?? q.error,
1754
+ itemsMode: $,
1755
+ getItems: ve,
1756
+ expandModule: L,
1757
+ collapseModule: X,
1758
+ expandModules: Ce,
1732
1759
  collapseModules: Ue,
1733
- collapseAllModules: Se,
1734
- toggleModule: ae,
1735
- expandedModuleIds: k,
1736
- filter: b,
1760
+ collapseAllModules: we,
1761
+ toggleModule: me,
1762
+ expandedModuleIds: j,
1763
+ filter: y,
1737
1764
  setFilter: ze,
1738
- filterEntry: _,
1739
- filterPredicate: mt(_) ? _ == null ? void 0 : _.predicate : void 0,
1740
- filterResultsArePartial: b !== X && mt(_) && L.hasNextPage
1765
+ filterEntry: A,
1766
+ filterPredicate: ft(A) ? A == null ? void 0 : A.predicate : void 0,
1767
+ filterResultsArePartial: y !== re && ft(A) && v.hasNextPage
1741
1768
  };
1742
1769
  }
1743
- function el({ value: e, onChange: t, describedBy: n }) {
1744
- const { t: o } = j(), s = Re(), r = N(() => Je(s.filters), [s.filters]), i = st();
1745
- return /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 0 0", children: [
1746
- /* @__PURE__ */ l(T, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ l(v, { size: "medium", weight: "bold", id: i, children: o("filterGroupLabel") }) }),
1747
- /* @__PURE__ */ l(
1748
- E,
1770
+ function pl({ value: e, onChange: t, describedBy: n }) {
1771
+ const { t: o } = H(), s = _e(), r = N(() => et(s.filters), [s.filters]), l = lt();
1772
+ return /* @__PURE__ */ T(C, { as: "div", margin: "medium 0 0 0", children: [
1773
+ /* @__PURE__ */ i(C, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ i(x, { size: "medium", weight: "bold", id: l, children: o("filterGroupLabel") }) }),
1774
+ /* @__PURE__ */ i(
1775
+ S,
1749
1776
  {
1750
1777
  gap: "space4",
1751
1778
  wrap: "wrap",
1752
1779
  as: "div",
1753
1780
  role: "group",
1754
- "aria-labelledby": i,
1781
+ "aria-labelledby": l,
1755
1782
  "data-testid": "filter-chips",
1756
1783
  children: r.map((a) => {
1757
1784
  const d = a.key === e;
1758
- return /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
1759
- ve,
1785
+ return /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(
1786
+ ke,
1760
1787
  {
1761
1788
  size: "medium",
1762
1789
  color: d ? "primary" : "secondary",
1763
1790
  "aria-pressed": d,
1764
- "aria-describedby": a.key !== X && mt(a) ? n : void 0,
1791
+ "aria-describedby": a.key !== re && ft(a) ? n : void 0,
1765
1792
  onClick: () => t(a.key),
1766
1793
  "data-testid": `filter-chip-${a.key}`,
1767
1794
  themeOverride: { borderRadius: "0.5rem" },
@@ -1773,12 +1800,12 @@ function el({ value: e, onChange: t, describedBy: n }) {
1773
1800
  )
1774
1801
  ] });
1775
1802
  }
1776
- const tl = 20, nl = 4.5, jt = 7, ol = 5, sl = 20, Gn = "#000000", jn = "#FFFFFF", Yn = {
1803
+ const gl = 20, fl = 4.5, Vt = 7, hl = 5, Il = 20, Zn = "#000000", Xn = "#FFFFFF", Jn = {
1777
1804
  primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
1778
1805
  info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
1779
1806
  success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
1780
1807
  warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
1781
- }, rl = {
1808
+ }, bl = {
1782
1809
  card: {
1783
1810
  primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
1784
1811
  info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
@@ -1792,96 +1819,114 @@ const tl = 20, nl = 4.5, jt = 7, ol = 5, sl = 20, Gn = "#000000", jn = "#FFFFFF"
1792
1819
  warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
1793
1820
  }
1794
1821
  };
1795
- function il(e, t) {
1796
- const n = To(
1797
- at(e),
1798
- at(Eo(t, tl))
1822
+ function yl(e, t) {
1823
+ const n = ko(
1824
+ dt(e),
1825
+ dt(Do(t, gl))
1799
1826
  );
1800
- return gn(n);
1827
+ return Sn(n);
1801
1828
  }
1802
- function ll(e, t, n) {
1803
- const o = oe(n, t) >= jt ? jt : nl;
1804
- return Math.min(o, Math.max(oe(e, Gn), oe(e, jn)));
1829
+ function Ml(e, t, n) {
1830
+ const o = ce(n, t) >= Vt ? Vt : fl;
1831
+ return Math.min(o, Math.max(ce(e, Zn), ce(e, Xn)));
1805
1832
  }
1806
- function al(e, t, n) {
1807
- const o = ll(e, t, n);
1808
- if (oe(e, t) >= o) return t;
1809
- const s = oe(e, Gn) > oe(e, jn) ? Co : wo;
1833
+ function Sl(e, t, n) {
1834
+ const o = Ml(e, t, n);
1835
+ if (ce(e, t) >= o) return t;
1836
+ const s = ce(e, Zn) > ce(e, Xn) ? No : Oo;
1810
1837
  let r = t;
1811
- for (let i = 0; i < sl && oe(e, r) < o; i++)
1812
- r = s(r, ol);
1813
- return gn(r);
1838
+ for (let l = 0; l < Il && ce(e, r) < o; l++)
1839
+ r = s(r, hl);
1840
+ return Sn(r);
1814
1841
  }
1815
- function cl(e) {
1816
- return lt(e) && at(e).a === 1;
1842
+ function _l(e) {
1843
+ return ut(e) && dt(e).a === 1;
1817
1844
  }
1818
- function Yt(e, t) {
1845
+ function Zt(e, t) {
1819
1846
  var n;
1820
1847
  return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
1821
1848
  }
1822
- function Wt(e, t, n, o) {
1823
- var i, a, d, u;
1824
- const s = rl[n][e], r = t;
1849
+ function Xt(e, t, n, o) {
1850
+ var l, a, d, c;
1851
+ const s = bl[n][e], r = t;
1825
1852
  try {
1826
- const c = r == null ? void 0 : r.newTheme, p = (i = c == null ? void 0 : c.semantics) == null ? void 0 : i.call(c, c.primitives);
1853
+ const u = r == null ? void 0 : r.newTheme, p = (l = u == null ? void 0 : u.semantics) == null ? void 0 : l.call(u, u.primitives);
1827
1854
  if (!p) return s;
1828
- const { semantic: f } = Yn[e], y = Yt((u = (d = (a = r == null ? void 0 : r.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : d.color) == null ? void 0 : u.background, n) ?? Yt(p.color.background, n) ?? "", g = o.stroke ?? p.color.stroke[f], b = o.label ?? p.color.text[f];
1829
- if (!cl(y) || !lt(g) || !lt(b)) return s;
1830
- const w = il(y, g);
1831
- return { fill: w, stroke: g, text: al(w, b, y) };
1855
+ const { semantic: g } = Jn[e], b = Zt((c = (d = (a = r == null ? void 0 : r.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : d.color) == null ? void 0 : c.background, n) ?? Zt(p.color.background, n) ?? "", f = o.stroke ?? p.color.stroke[g], y = o.label ?? p.color.text[g];
1856
+ if (!_l(b) || !ut(f) || !ut(y)) return s;
1857
+ const P = yl(b, f);
1858
+ return { fill: P, stroke: f, text: Sl(P, y, b) };
1832
1859
  } catch {
1833
1860
  return s;
1834
1861
  }
1835
1862
  }
1836
- const Ht = /* @__PURE__ */ new WeakMap();
1837
- function ul(e, t, n, o = {}) {
1863
+ const Jt = /* @__PURE__ */ new WeakMap();
1864
+ function eo(e, t, n, o = {}) {
1838
1865
  if (typeof t != "object" || t === null)
1839
- return Wt(e, t, n, o);
1840
- let s = Ht.get(t);
1841
- s === void 0 && (s = /* @__PURE__ */ new Map(), Ht.set(t, s));
1842
- const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, i = s.get(r);
1843
- if (i !== void 0) return i;
1844
- const a = Wt(e, t, n, o);
1866
+ return Xt(e, t, n, o);
1867
+ let s = Jt.get(t);
1868
+ s === void 0 && (s = /* @__PURE__ */ new Map(), Jt.set(t, s));
1869
+ const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, l = s.get(r);
1870
+ if (l !== void 0) return l;
1871
+ const a = Xt(e, t, n, o);
1845
1872
  return s.set(r, a), a;
1846
1873
  }
1847
- function Ke(e, t) {
1848
- const { textKey: n, borderKey: o } = Yn[e];
1874
+ function We(e, t) {
1875
+ const { textKey: n, borderKey: o } = Jn[e];
1849
1876
  return (s, r) => {
1850
- const i = s, { fill: a, stroke: d, text: u } = ul(e, r, t, {
1851
- stroke: i == null ? void 0 : i[o],
1852
- label: i == null ? void 0 : i[n]
1877
+ const l = s, { fill: a, stroke: d, text: c } = eo(e, r, t, {
1878
+ stroke: l == null ? void 0 : l[o],
1879
+ label: l == null ? void 0 : l[n]
1853
1880
  });
1854
- return { backgroundColor: a, [n]: u, [o]: d };
1881
+ return { backgroundColor: a, [n]: c, [o]: d };
1855
1882
  };
1856
1883
  }
1857
- function Kt(e) {
1884
+ function en(e) {
1858
1885
  return {
1859
- primary: Ke("primary", e),
1860
- info: Ke("info", e),
1861
- success: Ke("success", e),
1862
- warning: Ke("warning", e)
1886
+ primary: We("primary", e),
1887
+ info: We("info", e),
1888
+ success: We("success", e),
1889
+ warning: We("warning", e)
1890
+ };
1891
+ }
1892
+ const Tl = {
1893
+ card: en("card"),
1894
+ row: en("row")
1895
+ }, El = "#9242B4", Cl = "#9E58BD";
1896
+ function tn(e) {
1897
+ return (t, n) => {
1898
+ var l, a, d, c;
1899
+ const { fill: o, stroke: s, text: r } = eo("primary", n, e, {
1900
+ stroke: ((a = (l = n.colors) == null ? void 0 : l.contrasts) == null ? void 0 : a.violet4570) ?? Cl,
1901
+ label: ((c = (d = n.colors) == null ? void 0 : d.contrasts) == null ? void 0 : c.violet5790) ?? El
1902
+ });
1903
+ return { backgroundColor: o, baseTextColor: r, baseBorderColor: s };
1863
1904
  };
1864
1905
  }
1865
- const dl = {
1866
- card: Kt("card"),
1867
- row: Kt("row")
1868
- }, ml = {
1869
- not_started: { tone: "primary", icon: /* @__PURE__ */ l(cn, { size: "sm" }) },
1870
- in_progress: { tone: "info", icon: /* @__PURE__ */ l(an, { size: "sm" }) },
1871
- complete: { tone: "success", icon: /* @__PURE__ */ l(ln, { size: "sm" }) },
1872
- missing: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1873
- incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1874
- missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1875
- locked: { tone: "primary", icon: /* @__PURE__ */ l(rn, { size: "sm" }) }
1876
- }, pl = {
1877
- not_started: { tone: "primary", icon: /* @__PURE__ */ l(cn, { size: "sm" }) },
1878
- in_progress: { tone: "info", icon: /* @__PURE__ */ l(an, { size: "sm" }) },
1879
- complete: { tone: "success", icon: /* @__PURE__ */ l(ln, { size: "sm" }) },
1880
- incomplete: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1881
- missing: { tone: "warning", icon: /* @__PURE__ */ l(Pe, { size: "sm" }) },
1882
- locked: { tone: "primary", icon: /* @__PURE__ */ l(rn, { size: "sm" }) }
1906
+ const to = {
1907
+ tone: "primary",
1908
+ icon: /* @__PURE__ */ i(To, { size: "sm" }),
1909
+ themes: {
1910
+ card: tn("card"),
1911
+ row: tn("row")
1912
+ }
1913
+ }, wl = {
1914
+ not_started: { tone: "primary", icon: /* @__PURE__ */ i(gn, { size: "sm" }) },
1915
+ in_progress: { tone: "info", icon: /* @__PURE__ */ i(pn, { size: "sm" }) },
1916
+ complete: { tone: "success", icon: /* @__PURE__ */ i(mn, { size: "sm" }) },
1917
+ missing: { tone: "warning", icon: /* @__PURE__ */ i(Re, { size: "sm" }) },
1918
+ incomplete: { tone: "warning", icon: /* @__PURE__ */ i(Re, { size: "sm" }) },
1919
+ missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ i(Re, { size: "sm" }) },
1920
+ locked: { tone: "primary", icon: /* @__PURE__ */ i(dn, { size: "sm" }) }
1921
+ }, vl = {
1922
+ not_started: { tone: "primary", icon: /* @__PURE__ */ i(gn, { size: "sm" }) },
1923
+ in_progress: { tone: "info", icon: /* @__PURE__ */ i(pn, { size: "sm" }) },
1924
+ complete: { tone: "success", icon: /* @__PURE__ */ i(mn, { size: "sm" }) },
1925
+ incomplete: { tone: "warning", icon: /* @__PURE__ */ i(Re, { size: "sm" }) },
1926
+ missing: { tone: "warning", icon: /* @__PURE__ */ i(Re, { size: "sm" }) },
1927
+ locked: { tone: "primary", icon: /* @__PURE__ */ i(dn, { size: "sm" }) }
1883
1928
  };
1884
- function Wn(e, t, n, o) {
1929
+ function no(e, t, n, o) {
1885
1930
  switch (t) {
1886
1931
  case "not_started":
1887
1932
  return e("moduleStatusNotStarted");
@@ -1902,7 +1947,7 @@ function Wn(e, t, n, o) {
1902
1947
  return e("moduleStatusLocked");
1903
1948
  }
1904
1949
  }
1905
- function fl(e, t) {
1950
+ function Pl(e, t) {
1906
1951
  switch (t) {
1907
1952
  case "not_started":
1908
1953
  return e("itemStatusNotStarted");
@@ -1918,87 +1963,95 @@ function fl(e, t) {
1918
1963
  return e("itemStatusLocked");
1919
1964
  }
1920
1965
  }
1921
- function Hn(e, t, n, o) {
1922
- return /* @__PURE__ */ l(
1923
- Po,
1966
+ function ot(e, t, n, o) {
1967
+ var s;
1968
+ return /* @__PURE__ */ i(
1969
+ qo,
1924
1970
  {
1925
1971
  color: e.tone,
1926
1972
  renderIcon: e.icon,
1927
- themeOverride: dl[o][e.tone],
1973
+ themeOverride: ((s = e.themes) == null ? void 0 : s[o]) ?? Tl[o][e.tone],
1928
1974
  "data-testid": n,
1929
1975
  children: t
1930
1976
  }
1931
1977
  );
1932
1978
  }
1933
- function gl({
1979
+ function Al({
1934
1980
  status: e,
1935
1981
  missingCount: t,
1936
1982
  incompleteCount: n
1937
1983
  }) {
1938
- const { t: o } = j();
1939
- return Hn(
1940
- ml[e],
1941
- Wn(o, e, t, n),
1984
+ const { t: o } = H();
1985
+ return ot(
1986
+ wl[e],
1987
+ no(o, e, t, n),
1942
1988
  "module-status-pill",
1943
1989
  "card"
1944
1990
  );
1945
1991
  }
1946
- function hl({ status: e }) {
1947
- const { t } = j();
1948
- return Hn(
1949
- pl[e],
1950
- fl(t, e),
1992
+ function xl({ status: e }) {
1993
+ const { t } = H();
1994
+ return ot(
1995
+ vl[e],
1996
+ Pl(t, e),
1951
1997
  "item-status-pill",
1952
1998
  "row"
1953
1999
  );
1954
2000
  }
1955
- const Kn = 2.75, ot = `${Kn}rem`, Il = { lineHeight: 0, display: "block" }, bl = {
2001
+ function Ll() {
2002
+ const { t: e } = H();
2003
+ return ot(to, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
2004
+ }
2005
+ function Rl() {
2006
+ const { t: e } = H();
2007
+ return ot(to, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
2008
+ }
2009
+ function oo() {
2010
+ const e = Mn();
2011
+ return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
2012
+ }
2013
+ const so = 2.75, it = `${so}rem`, kl = { lineHeight: 0, display: "block" }, Dl = {
1956
2014
  display: "inline-block",
1957
2015
  paddingLeft: "0.5rem",
1958
2016
  marginLeft: "0.5rem"
1959
- }, Ml = "#D7DADE", yl = "#6A7883", Qn = { fontSize: 0 };
1960
- function pt(e) {
1961
- return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(pt) : nn(e) && e.type === sn ? pt(e.props.children) : !1;
2017
+ }, Nl = "#D7DADE", Ol = "#6A7883", ro = { fontSize: 0 };
2018
+ function ht(e) {
2019
+ return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(ht) : an(e) && e.type === un ? ht(e.props.children) : !1;
1962
2020
  }
1963
- const Sl = {
2021
+ const ql = {
1964
2022
  contentVisibility: "auto",
1965
2023
  containIntrinsicSize: "auto 4.25rem"
1966
- }, _l = "0.5rem";
1967
- function Tl() {
1968
- const e = fn();
1969
- return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
1970
- }
1971
- function Vn(e, t) {
2024
+ }, Fl = "0.5rem";
2025
+ function io(e, t) {
1972
2026
  var o, s;
1973
- const n = fn();
2027
+ const n = Mn();
1974
2028
  return ("colors" in n ? (s = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : s[e] : void 0) ?? t;
1975
2029
  }
1976
- function Zn() {
1977
- const e = Vn("grey1424", Ml);
2030
+ function lo() {
2031
+ const e = io("grey1424", Nl);
1978
2032
  return N(
1979
- () => ({ ...bl, borderLeft: `1px solid ${e}` }),
2033
+ () => ({ ...Dl, borderLeft: `1px solid ${e}` }),
1980
2034
  [e]
1981
2035
  );
1982
2036
  }
1983
- function El({
2037
+ function Ul({
1984
2038
  item: e,
1985
2039
  today: t,
1986
- navigation: n,
1987
- attachedAbove: o,
1988
- attachedBelow: s
2040
+ attachedAbove: n,
2041
+ attachedBelow: o
1989
2042
  }) {
1990
- var F;
1991
- const { t: r, locale: i, timezone: a } = j(), d = Tl(), u = Vn("grey4570", yl), c = Zn(), p = Ne(), f = Re(), y = N(() => Je(f.itemMeta), [f.itemMeta]), g = e.title || r("itemUntitled");
2043
+ var W;
2044
+ const { t: s, locale: r, timezone: l } = H(), a = Je(), d = oo(), c = io("grey4570", Ol), u = lo(), p = z(null), g = Fe(), b = _e(), { navigation: f } = b, y = N(() => et(b.itemMeta), [b.itemMeta]), P = e.title || s("itemUntitled");
1992
2045
  if (e.type === "sub_header")
1993
- return /* @__PURE__ */ l(
1994
- T,
2046
+ return /* @__PURE__ */ i(
2047
+ C,
1995
2048
  {
1996
2049
  as: "div",
1997
2050
  padding: "x-small small",
1998
2051
  margin: "x-small 0 0 0",
1999
2052
  "data-testid": `module-item-${e.id}`,
2000
- children: /* @__PURE__ */ l(
2001
- v,
2053
+ children: /* @__PURE__ */ i(
2054
+ x,
2002
2055
  {
2003
2056
  size: "small",
2004
2057
  weight: "bold",
@@ -2006,102 +2059,125 @@ function El({
2006
2059
  letterSpacing: "expanded",
2007
2060
  "data-testid": "module-item-title",
2008
2061
  "data-sub-header": "true",
2009
- children: g
2062
+ children: P
2010
2063
  }
2011
2064
  )
2012
2065
  }
2013
2066
  );
2014
- const b = ((F = n == null ? void 0 : n.getItemHref) == null ? void 0 : F.call(n, e)) ?? e.url ?? null, w = e.status === "locked", x = n == null ? void 0 : n.onItemClick, _ = x ? (D) => x(e, D) : void 0, A = he(f.itemTypes, e.type), q = A != null && A.renderIcon ? A.renderIcon({ item: e }) : A == null ? void 0 : A.icon, B = { item: e, t: r, today: t, locale: i, timezone: a, formatters: p, config: f }, L = y.map((D) => ({ key: D.key, node: D.render(B) })).filter((D) => !pt(D.node)), k = L.some((D) => D.key === ki), G = o ? "none" : "large", J = s ? "none" : "large";
2015
- return /* @__PURE__ */ l("div", { style: { ...Sl, marginTop: o ? void 0 : _l }, children: /* @__PURE__ */ l(
2016
- T,
2067
+ const E = ((W = f.getItemHref) == null ? void 0 : W.call(f, e)) ?? e.url ?? null, A = e.status === "locked", k = A ? null : E, q = e.status !== void 0 && e.status !== "complete" && !A && Ct(e.dueAt, t, l), $ = f.onItemClick, v = (w) => {
2068
+ a(`item-click-${e.type}`), $ == null || $(e, w);
2069
+ }, j = (w) => {
2070
+ var ie;
2071
+ const Q = p.current;
2072
+ !Q || Q.contains(w.target) || (ie = window.getSelection()) != null && ie.toString().trim() || Q.dispatchEvent(
2073
+ new window.MouseEvent("click", {
2074
+ bubbles: !0,
2075
+ cancelable: !0,
2076
+ ctrlKey: w.ctrlKey,
2077
+ metaKey: w.metaKey,
2078
+ shiftKey: w.shiftKey,
2079
+ altKey: w.altKey
2080
+ })
2081
+ );
2082
+ }, D = Me(b.itemTypes, e.type), F = D != null && D.renderIcon ? D.renderIcon({ item: e }) : D == null ? void 0 : D.icon, Y = { item: e, t: s, today: t, locale: r, timezone: l, formatters: g, config: b }, B = y.map((w) => ({ key: w.key, node: w.render(Y) })).filter((w) => !ht(w.node)), K = B.some((w) => w.key === Yi), V = n ? "none" : "large", Z = o ? "none" : "large";
2083
+ return /* @__PURE__ */ i("div", { style: { ...ql, marginTop: n ? void 0 : Fl }, children: /* @__PURE__ */ i(
2084
+ C,
2017
2085
  {
2018
2086
  as: "div",
2019
2087
  background: "secondary",
2020
- borderRadius: `${G} ${G} ${J} ${J}`,
2088
+ borderRadius: `${V} ${V} ${Z} ${Z}`,
2021
2089
  padding: "small",
2090
+ cursor: k ? "pointer" : void 0,
2091
+ onClick: k ? j : void 0,
2022
2092
  "data-testid": `module-item-${e.id}`,
2023
- children: /* @__PURE__ */ l("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * Kn}rem` }, children: /* @__PURE__ */ C(E, { alignItems: "center", gap: "mediumSmall", children: [
2024
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(E, { alignItems: "center", children: [
2025
- e.indent > 0 ? /* @__PURE__ */ l(E.Item, { size: ot, textAlign: "center", "data-testid": "item-nest-arrow", children: /* @__PURE__ */ l("span", { style: { color: u }, children: /* @__PURE__ */ l(po, { size: "md", color: "inherit" }) }) }) : null,
2026
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
2027
- T,
2093
+ children: /* @__PURE__ */ i("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * so}rem` }, children: /* @__PURE__ */ T(S, { alignItems: "center", gap: "mediumSmall", children: [
2094
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(S, { alignItems: "center", children: [
2095
+ e.indent > 0 ? /* @__PURE__ */ i(S.Item, { size: it, textAlign: "center", "data-testid": "item-nest-arrow", children: /* @__PURE__ */ i("span", { style: { color: c }, children: /* @__PURE__ */ i(Eo, { size: "md", color: "inherit" }) }) }) : null,
2096
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(
2097
+ C,
2028
2098
  {
2029
2099
  as: "div",
2030
2100
  background: "primary",
2031
2101
  borderWidth: "small",
2032
2102
  borderRadius: "large",
2033
- width: ot,
2034
- height: ot,
2035
- children: /* @__PURE__ */ l(E, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ C(E.Item, { children: [
2036
- /* @__PURE__ */ l("span", { style: Il, "data-testid": "item-type-icon", children: q }),
2037
- A && !k ? /* @__PURE__ */ l(it, { children: r(A.label) }) : null
2103
+ width: it,
2104
+ height: it,
2105
+ children: /* @__PURE__ */ i(S, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ T(S.Item, { children: [
2106
+ /* @__PURE__ */ i("span", { style: kl, "data-testid": "item-type-icon", children: F }),
2107
+ D && !K ? /* @__PURE__ */ i(ct, { children: s(D.label) }) : null
2038
2108
  ] }) })
2039
2109
  }
2040
2110
  ) })
2041
2111
  ] }) }),
2042
- /* @__PURE__ */ C(E.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2043
- /* @__PURE__ */ l(T, { as: "div", children: w || !b ? /* @__PURE__ */ l(
2044
- v,
2045
- {
2046
- weight: "bold",
2047
- size: "medium",
2048
- lineHeight: "condensed",
2049
- color: w ? "secondary" : "primary",
2050
- "data-testid": "module-item-title",
2051
- "data-locked": w ? "true" : void 0,
2052
- children: g
2053
- }
2054
- ) : /* @__PURE__ */ C(
2055
- _o,
2112
+ /* @__PURE__ */ T(S.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2113
+ /* @__PURE__ */ i(C, { as: "div", children: k ? /* @__PURE__ */ T(
2114
+ bn,
2056
2115
  {
2057
- href: b,
2058
- onClick: _,
2116
+ href: k,
2117
+ elementRef: (w) => {
2118
+ p.current = w;
2119
+ },
2120
+ onClick: v,
2059
2121
  forceButtonRole: !1,
2060
2122
  variant: d,
2061
2123
  target: e.newTab ? "_blank" : void 0,
2062
2124
  rel: e.newTab ? "noopener noreferrer" : void 0,
2063
2125
  children: [
2064
- /* @__PURE__ */ l(
2065
- v,
2126
+ /* @__PURE__ */ i(
2127
+ x,
2066
2128
  {
2067
2129
  weight: "bold",
2068
2130
  size: "medium",
2069
2131
  lineHeight: "condensed",
2070
2132
  color: "primary",
2071
2133
  "data-testid": "module-item-title",
2072
- children: g
2134
+ children: P
2073
2135
  }
2074
2136
  ),
2075
- e.newTab ? /* @__PURE__ */ l(it, { children: ` ${r("opensInNewWindow")}` }) : null
2137
+ e.newTab ? /* @__PURE__ */ i(ct, { children: ` ${s("opensInNewWindow")}` }) : null
2076
2138
  ]
2077
2139
  }
2140
+ ) : /* @__PURE__ */ i(
2141
+ x,
2142
+ {
2143
+ weight: "bold",
2144
+ size: "medium",
2145
+ lineHeight: "condensed",
2146
+ color: A ? "secondary" : "primary",
2147
+ "data-testid": "module-item-title",
2148
+ "data-locked": A ? "true" : void 0,
2149
+ children: P
2150
+ }
2078
2151
  ) }),
2079
- /* @__PURE__ */ l(T, { as: "div", children: /* @__PURE__ */ l(v, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: L.map((D, Y) => /* @__PURE__ */ C(sn, { children: [
2080
- Y > 0 ? /* @__PURE__ */ l("span", { style: Qn, children: " " }) : null,
2081
- /* @__PURE__ */ l("span", { style: Y > 0 ? c : void 0, children: D.node })
2082
- ] }, D.key)) }) })
2152
+ /* @__PURE__ */ i(C, { as: "div", children: /* @__PURE__ */ i(x, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: B.map((w, Q) => /* @__PURE__ */ T(un, { children: [
2153
+ Q > 0 ? /* @__PURE__ */ i("span", { style: ro, children: " " }) : null,
2154
+ /* @__PURE__ */ i("span", { style: Q > 0 ? u : void 0, children: w.node })
2155
+ ] }, w.key)) }) })
2083
2156
  ] }),
2084
- e.status ? /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(hl, { status: e.status }) }) : null
2157
+ q || e.status ? /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(S, { alignItems: "center", gap: "x-small", children: [
2158
+ q ? /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(Rl, {}) }) : null,
2159
+ e.status ? /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(xl, { status: e.status }) }) : null
2160
+ ] }) }) : null
2085
2161
  ] }) })
2086
2162
  }
2087
2163
  ) });
2088
2164
  }
2089
- const Cl = on(El), Qt = "\0", wl = { textDecoration: "underline dotted", cursor: "help" };
2090
- function Pl({ names: e }) {
2091
- const { t } = j();
2092
- if (e.length === 1) return /* @__PURE__ */ l(vt, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
2165
+ const zl = cn(Ul), nn = "\0", $l = { textDecoration: "underline dotted", cursor: "help" };
2166
+ function Bl({ names: e }) {
2167
+ const { t } = H();
2168
+ if (e.length === 1) return /* @__PURE__ */ i(Dt, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
2093
2169
  const n = t("lockedByPrerequisitesByline", {
2094
2170
  count: e.length,
2095
- prerequisites: Qt
2096
- }), [o, ...s] = n.split(Qt), r = s.length > 0 ? s.join("") : null;
2097
- return /* @__PURE__ */ C(vt, { children: [
2171
+ prerequisites: nn
2172
+ }), [o, ...s] = n.split(nn), r = s.length > 0 ? s.join("") : null;
2173
+ return /* @__PURE__ */ T(Dt, { children: [
2098
2174
  r === null ? null : o,
2099
- /* @__PURE__ */ l(pn, { renderTip: e.join(", "), children: /* @__PURE__ */ l(
2175
+ /* @__PURE__ */ i(yn, { renderTip: e.join(", "), children: /* @__PURE__ */ i(
2100
2176
  "span",
2101
2177
  {
2102
2178
  tabIndex: 0,
2103
- style: wl,
2104
- onClick: (i) => i.stopPropagation(),
2179
+ style: $l,
2180
+ onClick: (l) => l.stopPropagation(),
2105
2181
  "data-testid": "module-byline-prerequisites",
2106
2182
  children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
2107
2183
  }
@@ -2109,38 +2185,38 @@ function Pl({ names: e }) {
2109
2185
  r
2110
2186
  ] });
2111
2187
  }
2112
- function vl({ module: e, today: t }) {
2113
- var c;
2114
- const n = Ne(), o = Zn(), s = ((c = e.progress) == null ? void 0 : c.status) === "locked", r = e.unlockAt ?? null, i = e.prerequisiteModules.map((p) => p.name.trim()).filter((p) => p !== ""), a = r !== null && new Date(r) > t;
2188
+ function Gl({ module: e, today: t }) {
2189
+ var u;
2190
+ const n = Fe(), o = lo(), s = ((u = e.progress) == null ? void 0 : u.status) === "locked", r = e.unlockAt ?? null, l = e.prerequisiteModules.map((p) => p.name.trim()).filter((p) => p !== ""), a = r !== null && new Date(r) > t;
2115
2191
  let d = null;
2116
2192
  r !== null && a && (s || !e.progress) ? d = n.unlockByline(r, t) : r !== null && !a && !e.progress && (d = n.unlockedByline(r, t));
2117
- const u = s && i.length > 0;
2118
- return d === null && !u ? null : /* @__PURE__ */ l(T, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ C(v, { size: "small", color: "secondary", "data-testid": "module-byline", children: [
2193
+ const c = s && l.length > 0;
2194
+ return d === null && !c ? null : /* @__PURE__ */ i(C, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ T(x, { size: "small", color: "secondary", "data-testid": "module-byline", children: [
2119
2195
  d,
2120
- d !== null && u ? /* @__PURE__ */ l("span", { style: Qn, children: " " }) : null,
2121
- u ? /* @__PURE__ */ l("span", { style: d !== null ? o : void 0, children: /* @__PURE__ */ l(Pl, { names: i }) }) : null
2196
+ d !== null && c ? /* @__PURE__ */ i("span", { style: ro, children: " " }) : null,
2197
+ c ? /* @__PURE__ */ i("span", { style: d !== null ? o : void 0, children: /* @__PURE__ */ i(Bl, { names: l }) }) : null
2122
2198
  ] }) });
2123
2199
  }
2124
- const Al = "#273540", xl = "#D7DADE", Ll = "0.5rem", Rl = (e, t) => {
2125
- var n, o, s, r, i;
2200
+ const jl = "#273540", Yl = "#D7DADE", Hl = "0.5rem", Kl = (e, t) => {
2201
+ var n, o, s, r, l;
2126
2202
  return {
2127
- meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? Al,
2128
- borderRadius: String(((s = t.borders) == null ? void 0 : s.radiusLarge) ?? Ll),
2129
- borderColor: ((i = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : i.grey1424) ?? xl,
2203
+ meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? jl,
2204
+ borderRadius: String(((s = t.borders) == null ? void 0 : s.radiusLarge) ?? Hl),
2205
+ borderColor: ((l = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : l.grey1424) ?? Yl,
2130
2206
  trackBottomBorderColor: "transparent"
2131
2207
  };
2132
- }, kl = "66.667%", Nl = "8rem", Dl = 2;
2133
- function Ol({
2208
+ }, Wl = "66.667%", Ql = "8rem", Vl = 2;
2209
+ function Zl({
2134
2210
  module: e,
2135
2211
  breakpoints: t
2136
2212
  }) {
2137
- const { t: n } = j(), o = Ne(), s = e.progress;
2213
+ const { t: n } = H(), o = Fe(), s = e.progress;
2138
2214
  if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
2139
- const r = t.mobileOnly, i = Object.keys(t).length === 0 || t.desktop === !0;
2140
- return /* @__PURE__ */ C(
2141
- E,
2215
+ const r = t.mobileOnly, l = Object.keys(t).length === 0 || t.desktop === !0;
2216
+ return /* @__PURE__ */ T(
2217
+ S,
2142
2218
  {
2143
- width: i ? kl : "100%",
2219
+ width: l ? Wl : "100%",
2144
2220
  direction: r ? "column" : "row",
2145
2221
  alignItems: r ? "stretch" : "center",
2146
2222
  wrap: "wrap",
@@ -2148,8 +2224,8 @@ function Ol({
2148
2224
  margin: "small 0 0 0",
2149
2225
  "data-testid": "module-progress",
2150
2226
  children: [
2151
- /* @__PURE__ */ l(E.Item, { size: r ? void 0 : Nl, shouldGrow: !0, children: /* @__PURE__ */ l(
2152
- So,
2227
+ /* @__PURE__ */ i(S.Item, { size: r ? void 0 : Ql, shouldGrow: !0, children: /* @__PURE__ */ i(
2228
+ Ro,
2153
2229
  {
2154
2230
  size: "x-small",
2155
2231
  meterColor: "brand",
@@ -2157,16 +2233,16 @@ function Ol({
2157
2233
  valueMax: s.requirementCount,
2158
2234
  shouldAnimate: !1,
2159
2235
  screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
2160
- formatScreenReaderValue: () => Ai(
2236
+ formatScreenReaderValue: () => Bi(
2161
2237
  n,
2162
2238
  s.percentComplete,
2163
2239
  s.requirementsMet,
2164
2240
  s.requirementCount
2165
2241
  ),
2166
- themeOverride: Rl
2242
+ themeOverride: Kl
2167
2243
  }
2168
2244
  ) }),
2169
- /* @__PURE__ */ l(E.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: o.progress(
2245
+ /* @__PURE__ */ i(S.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(x, { size: "small", color: "secondary", children: o.progress(
2170
2246
  s.percentComplete,
2171
2247
  s.requirementsMet,
2172
2248
  s.requirementCount
@@ -2175,45 +2251,44 @@ function Ol({
2175
2251
  }
2176
2252
  );
2177
2253
  }
2178
- const Vt = (e) => `platform-modules-panel-${e}`;
2179
- function ft(e) {
2254
+ const on = (e) => `platform-modules-panel-${e}`;
2255
+ function It(e) {
2180
2256
  return e !== void 0 && e.type !== "sub_header";
2181
2257
  }
2182
- function Zt(e) {
2183
- return ft(e) && e.indent > 0;
2258
+ function sn(e) {
2259
+ return It(e) && e.indent > 0;
2184
2260
  }
2185
- function ql({
2261
+ function Xl({
2186
2262
  module: e,
2187
2263
  state: t,
2188
2264
  today: n,
2189
- navigation: o,
2190
- showDiagnostics: s
2265
+ showDiagnostics: o
2191
2266
  }) {
2192
- const { t: r } = j(), i = $(null), a = t.items.length, d = !t.isLoading && !t.isFetchingNextPage;
2193
- return Z(() => {
2194
- !d || a === 0 || i.current !== a && (i.current = a, pe(
2195
- r("itemsLoadedAnnouncement", {
2267
+ const { t: s } = H(), r = Je(), l = z(null), a = t.items.length, d = !t.isLoading && !t.isFetchingNextPage;
2268
+ return se(() => {
2269
+ !d || a === 0 || l.current !== a && (l.current = a, Ie(
2270
+ s("itemsLoadedAnnouncement", {
2196
2271
  loaded: a,
2197
2272
  count: e.itemCount,
2198
2273
  name: e.name
2199
2274
  })
2200
2275
  ));
2201
- }, [d, a, e.itemCount, e.name, r]), t.error ? /* @__PURE__ */ l(T, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2202
- dn,
2276
+ }, [d, a, e.itemCount, e.name, s]), t.error ? /* @__PURE__ */ i(C, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2277
+ hn,
2203
2278
  {
2204
2279
  variant: "error",
2205
2280
  margin: "0",
2206
- liveRegion: un,
2281
+ liveRegion: fn,
2207
2282
  liveRegionPoliteness: "assertive",
2208
2283
  "data-testid": "items-error",
2209
- children: r("itemsLoadErrorAlert", { message: t.error.message })
2284
+ children: s("itemsLoadErrorAlert", { message: t.error.message })
2210
2285
  }
2211
- ) }) : t.isLoading ? /* @__PURE__ */ C(T, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
2212
- /* @__PURE__ */ l(rt, { size: "x-small", renderTitle: r("itemsLoadingSpinnerLabel") }),
2286
+ ) }) : t.isLoading ? /* @__PURE__ */ T(C, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
2287
+ /* @__PURE__ */ i(at, { size: "x-small", renderTitle: s("itemsLoadingSpinnerLabel") }),
2213
2288
  " ",
2214
- /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: r("itemsLoadingText") })
2215
- ] }) : /* @__PURE__ */ C(T, { as: "div", margin: "small 0 0 0", children: [
2216
- s ? /* @__PURE__ */ C(v, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
2289
+ /* @__PURE__ */ i(x, { size: "small", color: "secondary", children: s("itemsLoadingText") })
2290
+ ] }) : /* @__PURE__ */ T(C, { as: "div", margin: "small 0 0 0", children: [
2291
+ o ? /* @__PURE__ */ T(x, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
2217
2292
  "items source: ",
2218
2293
  t.source,
2219
2294
  " · loaded ",
@@ -2221,24 +2296,25 @@ function ql({
2221
2296
  " of ",
2222
2297
  e.itemCount
2223
2298
  ] }) : null,
2224
- t.items.length === 0 ? /* @__PURE__ */ l(T, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: r("noItemsEmptyState") }) }) : /* @__PURE__ */ l("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((u, c) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
2225
- Cl,
2299
+ t.items.length === 0 ? /* @__PURE__ */ i(C, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(x, { size: "small", color: "secondary", children: s("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((c, u) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
2300
+ zl,
2226
2301
  {
2227
- item: u,
2302
+ item: c,
2228
2303
  today: n,
2229
- navigation: o,
2230
- attachedAbove: Zt(u) && ft(t.items[c - 1]),
2231
- attachedBelow: ft(u) && Zt(t.items[c + 1])
2304
+ attachedAbove: sn(c) && It(t.items[u - 1]),
2305
+ attachedBelow: It(c) && sn(t.items[u + 1])
2232
2306
  }
2233
- ) }, u.id)) }),
2234
- t.hasNextPage ? /* @__PURE__ */ l(T, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ l(
2235
- ve,
2307
+ ) }, c.id)) }),
2308
+ t.hasNextPage ? /* @__PURE__ */ i(C, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
2309
+ ke,
2236
2310
  {
2237
2311
  size: "small",
2238
- onClick: t.fetchNextPage,
2312
+ onClick: () => {
2313
+ r("load-more-items"), t.fetchNextPage();
2314
+ },
2239
2315
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
2240
2316
  "data-testid": "load-more-items",
2241
- children: t.isFetchingNextPage ? r("loadMoreItemsLoading") : r("loadMoreItems", {
2317
+ children: t.isFetchingNextPage ? s("loadMoreItemsLoading") : s("loadMoreItems", {
2242
2318
  loaded: t.items.length,
2243
2319
  count: e.itemCount
2244
2320
  })
@@ -2246,32 +2322,43 @@ function ql({
2246
2322
  ) }) : null
2247
2323
  ] });
2248
2324
  }
2249
- function Fl({
2325
+ function Jl({
2250
2326
  module: e,
2251
2327
  expanded: t,
2252
2328
  onToggle: n,
2253
2329
  itemsState: o,
2254
2330
  today: s,
2255
- navigation: r,
2256
- showDiagnostics: i = !1,
2257
- headingLevel: a = "h3",
2258
- moduleLabel: d,
2259
- breakpoints: u = {}
2331
+ showDiagnostics: r = !1,
2332
+ headingLevel: l = "h3",
2333
+ moduleLabel: a,
2334
+ breakpoints: d = {}
2260
2335
  }) {
2261
- var _, A;
2262
- const { t: c } = j(), p = Ne(), f = ((_ = e.progress) == null ? void 0 : _.status) === "locked", y = d === void 0 ? p.moduleLabel(e.position, e) : d, g = (y == null ? void 0 : y.trim()) || null, b = u.mobileOnly === !0, w = () => {
2263
- var q;
2264
- (q = window.getSelection()) != null && q.toString().trim() || n(e.id);
2265
- }, x = (A = e.progress) != null && A.status ? /* @__PURE__ */ l(
2266
- gl,
2336
+ var K, V, Z, W;
2337
+ const { t: c, timezone: u } = H(), p = Je(), g = Fe(), { navigation: b } = _e(), f = oo(), y = ((K = e.progress) == null ? void 0 : K.status) === "locked", P = y ? null : ((V = b.getModuleHref) == null ? void 0 : V.call(b, e)) ?? null, E = a === void 0 ? g.moduleLabel(e.position, e) : a, A = (E == null ? void 0 : E.trim()) || null, k = A ? c("moduleNameWithLabel", { label: A, name: e.name }) : e.name, $ = /* @__PURE__ */ i(
2338
+ In,
2339
+ {
2340
+ level: l,
2341
+ variant: "titleCardRegular",
2342
+ color: y ? "secondary" : "primary",
2343
+ "aria-label": k,
2344
+ "data-testid": "module-name",
2345
+ children: /* @__PURE__ */ i(Lo, { linesAllowed: Vl, children: k })
2346
+ }
2347
+ ), v = d.mobileOnly === !0, j = () => {
2348
+ p(t ? "module-collapse" : "module-expand"), n(e.id);
2349
+ }, D = () => {
2350
+ var w;
2351
+ (w = window.getSelection()) != null && w.toString().trim() || j();
2352
+ }, F = (Z = e.progress) != null && Z.status ? /* @__PURE__ */ i(
2353
+ Al,
2267
2354
  {
2268
2355
  status: e.progress.status,
2269
2356
  missingCount: e.progress.missingCount,
2270
2357
  incompleteCount: e.progress.incompleteCount
2271
2358
  }
2272
- ) : null;
2273
- return /* @__PURE__ */ C(
2274
- T,
2359
+ ) : null, B = ((W = e.progress) == null ? void 0 : W.status) !== void 0 && e.progress.status !== "complete" && !y && Ct(e.progress.nextDueAt, s, u) ? /* @__PURE__ */ i(Ll, {}) : null;
2360
+ return /* @__PURE__ */ T(
2361
+ C,
2275
2362
  {
2276
2363
  as: "div",
2277
2364
  background: "primary",
@@ -2282,73 +2369,80 @@ function Fl({
2282
2369
  margin: "0 0 small 0",
2283
2370
  "data-testid": `module-card-${e.id}`,
2284
2371
  children: [
2285
- /* @__PURE__ */ l(T, { as: "div", cursor: "pointer", children: /* @__PURE__ */ C(
2286
- E,
2372
+ /* @__PURE__ */ i(C, { as: "div", cursor: "pointer", children: /* @__PURE__ */ T(
2373
+ S,
2287
2374
  {
2288
2375
  alignItems: "start",
2289
2376
  gap: "mediumSmall",
2290
- onClick: w,
2377
+ onClick: D,
2291
2378
  "data-testid": "module-header",
2292
2379
  children: [
2293
- /* @__PURE__ */ C(E.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2294
- /* @__PURE__ */ C(T, { as: "div", children: [
2295
- /* @__PURE__ */ l(
2296
- mn,
2380
+ /* @__PURE__ */ T(S.Item, { shouldGrow: !0, shouldShrink: !0, children: [
2381
+ /* @__PURE__ */ T(C, { as: "div", children: [
2382
+ /* @__PURE__ */ i(C, { as: "div", children: P ? /* @__PURE__ */ i(
2383
+ bn,
2297
2384
  {
2298
- level: a,
2299
- variant: "titleCardRegular",
2300
- color: f ? "secondary" : "primary",
2301
- "data-testid": "module-name",
2302
- children: /* @__PURE__ */ l(yo, { linesAllowed: Dl, children: g ? c("moduleNameWithLabel", { label: g, name: e.name }) : e.name })
2385
+ href: P,
2386
+ display: "inline-block",
2387
+ forceButtonRole: !1,
2388
+ variant: f,
2389
+ "aria-label": k,
2390
+ onClick: (w) => w.stopPropagation(),
2391
+ children: $
2303
2392
  }
2304
- ),
2305
- e.published ? null : /* @__PURE__ */ C(v, { size: "x-small", color: "secondary", children: [
2393
+ ) : $ }),
2394
+ e.published ? null : /* @__PURE__ */ T(x, { size: "x-small", color: "secondary", children: [
2306
2395
  " ",
2307
2396
  c("moduleUnpublishedBadge")
2308
2397
  ] })
2309
2398
  ] }),
2310
- /* @__PURE__ */ l(vl, { module: e, today: s }),
2311
- b && x ? /* @__PURE__ */ l(T, { as: "div", margin: "x-small 0 0 0", children: x }) : null,
2312
- /* @__PURE__ */ l(Ol, { module: e, breakpoints: u })
2399
+ /* @__PURE__ */ i(Gl, { module: e, today: s }),
2400
+ v && (F || B) ? /* @__PURE__ */ i(C, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ T(S, { gap: "x-small", wrap: "wrap", children: [
2401
+ B ? /* @__PURE__ */ i(S.Item, { children: B }) : null,
2402
+ F ? /* @__PURE__ */ i(S.Item, { children: F }) : null
2403
+ ] }) }) : null,
2404
+ /* @__PURE__ */ i(Zl, { module: e, breakpoints: d })
2313
2405
  ] }),
2314
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(E, { alignItems: "center", gap: "mediumSmall", children: [
2315
- !b && x ? /* @__PURE__ */ l(E.Item, { children: x }) : null,
2316
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(
2317
- Mo,
2406
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(S, { alignItems: "center", gap: "mediumSmall", children: [
2407
+ !v && (B || F) ? /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(S, { alignItems: "center", gap: "x-small", children: [
2408
+ B ? /* @__PURE__ */ i(S.Item, { children: B }) : null,
2409
+ F ? /* @__PURE__ */ i(S.Item, { children: F }) : null
2410
+ ] }) }) : null,
2411
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(
2412
+ xo,
2318
2413
  {
2319
2414
  size: "medium",
2320
2415
  withBorder: !0,
2321
2416
  withBackground: !1,
2322
2417
  screenReaderLabel: t ? c("collapseModule", { name: e.name }) : c("expandModule", { name: e.name }),
2323
2418
  "aria-expanded": t,
2324
- "aria-controls": Vt(e.id),
2325
- onClick: (q) => {
2326
- q.stopPropagation(), n(e.id);
2419
+ "aria-controls": on(e.id),
2420
+ onClick: (w) => {
2421
+ w.stopPropagation(), j();
2327
2422
  },
2328
2423
  "data-testid": `toggle-module-${e.id}`,
2329
- children: t ? /* @__PURE__ */ l(fo, {}) : /* @__PURE__ */ l(go, {})
2424
+ children: t ? /* @__PURE__ */ i(Co, {}) : /* @__PURE__ */ i(wo, {})
2330
2425
  }
2331
2426
  ) })
2332
2427
  ] }) })
2333
2428
  ]
2334
2429
  }
2335
2430
  ) }),
2336
- /* @__PURE__ */ l("div", { id: Vt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ l(
2337
- ql,
2431
+ /* @__PURE__ */ i("div", { id: on(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
2432
+ Xl,
2338
2433
  {
2339
2434
  module: e,
2340
2435
  state: o,
2341
2436
  today: s,
2342
- navigation: r,
2343
- showDiagnostics: i
2437
+ showDiagnostics: r
2344
2438
  }
2345
2439
  ) : null })
2346
2440
  ]
2347
2441
  }
2348
2442
  );
2349
2443
  }
2350
- const Ul = on(Fl);
2351
- function zl(e) {
2444
+ const ea = cn(Jl);
2445
+ function ta(e) {
2352
2446
  switch (e) {
2353
2447
  case "complete":
2354
2448
  return "complete";
@@ -2364,11 +2458,11 @@ function zl(e) {
2364
2458
  return "inProgress";
2365
2459
  }
2366
2460
  }
2367
- function $l(e) {
2368
- var i, a, d;
2461
+ function na(e) {
2462
+ var l, a, d;
2369
2463
  let t = 0, n = 0, o = 0;
2370
- for (const u of e)
2371
- ((i = u.progress) == null ? void 0 : i.status) === "complete" && (t += 1), n += ((a = u.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((d = u.progress) == null ? void 0 : d.requirementsMet) ?? 0;
2464
+ for (const c of e)
2465
+ ((l = c.progress) == null ? void 0 : l.status) === "complete" && (t += 1), n += ((a = c.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((d = c.progress) == null ? void 0 : d.requirementsMet) ?? 0;
2372
2466
  const s = e.length, r = s === 0 ? 0 : t === s ? 100 : Math.floor(t / s * 100);
2373
2467
  return {
2374
2468
  totalModules: s,
@@ -2378,30 +2472,30 @@ function $l(e) {
2378
2472
  percent: r
2379
2473
  };
2380
2474
  }
2381
- const Bl = "1.75rem", Gl = "4px", jl = "4px", Yl = "6.5rem";
2382
- function Wl({
2475
+ const oa = "1.75rem", sa = "4px", ra = "4px", ia = "6.5rem";
2476
+ function la({
2383
2477
  module: e,
2384
2478
  onClick: t
2385
2479
  }) {
2386
- var c, p, f, y;
2387
- const { t: n } = j(), s = Ne().moduleLabel(e.position, e), r = s ? n("moduleNameWithLabel", { label: s, name: e.name }) : e.name, i = ((c = e.progress) == null ? void 0 : c.status) ?? "not_started", a = zl(i), d = n("moduleProgressSegmentLabel", {
2480
+ var u, p, g, b;
2481
+ const { t: n } = H(), s = Fe().moduleLabel(e.position, e), r = s ? n("moduleNameWithLabel", { label: s, name: e.name }) : e.name, l = ((u = e.progress) == null ? void 0 : u.status) ?? "not_started", a = ta(l), d = n("moduleProgressSegmentLabel", {
2388
2482
  name: r,
2389
- status: Wn(
2483
+ status: no(
2390
2484
  n,
2391
- i,
2485
+ l,
2392
2486
  ((p = e.progress) == null ? void 0 : p.missingCount) ?? 0,
2393
- ((f = e.progress) == null ? void 0 : f.incompleteCount) ?? 0
2487
+ ((g = e.progress) == null ? void 0 : g.incompleteCount) ?? 0
2394
2488
  )
2395
- }), u = a === "complete" ? 100 : a === "inProgress" ? ((y = e.progress) == null ? void 0 : y.percentComplete) ?? 0 : 0;
2396
- return /* @__PURE__ */ l(E.Item, { shouldShrink: !0, width: Yl, children: /* @__PURE__ */ l(pn, { renderTip: r, children: () => /* @__PURE__ */ C(
2397
- T,
2489
+ }), c = a === "complete" ? 100 : a === "inProgress" ? ((b = e.progress) == null ? void 0 : b.percentComplete) ?? 0 : 0;
2490
+ return /* @__PURE__ */ i(S.Item, { shouldShrink: !0, width: ia, children: /* @__PURE__ */ i(yn, { renderTip: r, children: () => /* @__PURE__ */ T(
2491
+ C,
2398
2492
  {
2399
2493
  as: "button",
2400
2494
  type: "button",
2401
2495
  display: "block",
2402
2496
  width: "100%",
2403
- height: Bl,
2404
- borderRadius: Gl,
2497
+ height: oa,
2498
+ borderRadius: sa,
2405
2499
  borderWidth: a === "complete" ? "none" : "small",
2406
2500
  borderColor: "secondary",
2407
2501
  background: a === "locked" ? "secondary" : "primary",
@@ -2412,44 +2506,44 @@ function Wl({
2412
2506
  onClick: t ? () => t(e.id) : void 0,
2413
2507
  "data-testid": `modules-progress-segment-${e.id}`,
2414
2508
  children: [
2415
- u > 0 ? /* @__PURE__ */ l(
2416
- T,
2509
+ c > 0 ? /* @__PURE__ */ i(
2510
+ C,
2417
2511
  {
2418
2512
  as: "div",
2419
2513
  position: "absolute",
2420
2514
  insetInlineStart: "0",
2421
2515
  insetInlineEnd: "0",
2422
2516
  insetBlockEnd: "0",
2423
- height: `${u}%`,
2517
+ height: `${c}%`,
2424
2518
  background: "brand"
2425
2519
  }
2426
2520
  ) : null,
2427
- /* @__PURE__ */ l(it, { children: d })
2521
+ /* @__PURE__ */ i(ct, { children: d })
2428
2522
  ]
2429
2523
  }
2430
2524
  ) }) });
2431
2525
  }
2432
- function Hl({
2526
+ function aa({
2433
2527
  modules: e,
2434
2528
  onModuleClick: t
2435
2529
  }) {
2436
- const { t: n } = j(), o = N(() => $l(e), [e]);
2530
+ const { t: n } = H(), o = N(() => na(e), [e]);
2437
2531
  if (!e.some((a) => a.progress !== void 0) || o.totalModules === 0) return null;
2438
2532
  const r = n("moduleProgressOverviewSummary", {
2439
2533
  count: o.totalModules,
2440
2534
  completedModules: o.completedModules,
2441
2535
  totalModules: o.totalModules
2442
- }), i = o.totalItems > 0 ? n("moduleProgressOverviewDetail", {
2536
+ }), l = o.totalItems > 0 ? n("moduleProgressOverviewDetail", {
2443
2537
  itemsSummary: n("moduleProgressOverviewItemsSummary", {
2444
2538
  count: o.totalItems,
2445
2539
  completedItems: o.completedItems,
2446
2540
  totalItems: o.totalItems
2447
2541
  })
2448
2542
  }) : null;
2449
- return /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 small 0", "data-testid": "modules-progress-overview", children: [
2450
- /* @__PURE__ */ l(E, { wrap: "wrap", children: /* @__PURE__ */ C(E.Item, { children: [
2451
- /* @__PURE__ */ l(T, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ l(
2452
- v,
2543
+ return /* @__PURE__ */ T(C, { as: "div", margin: "medium 0 small 0", "data-testid": "modules-progress-overview", children: [
2544
+ /* @__PURE__ */ i(S, { wrap: "wrap", children: /* @__PURE__ */ T(S.Item, { children: [
2545
+ /* @__PURE__ */ i(C, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ i(
2546
+ x,
2453
2547
  {
2454
2548
  size: "large",
2455
2549
  weight: "bold",
@@ -2458,29 +2552,29 @@ function Hl({
2458
2552
  children: n("moduleProgressOverviewPercentLabel", { percent: o.percent })
2459
2553
  }
2460
2554
  ) }),
2461
- /* @__PURE__ */ l(v, { size: "medium", "data-testid": "modules-progress-overview-summary", children: i ? `${r} ${i}` : r })
2555
+ /* @__PURE__ */ i(x, { size: "medium", "data-testid": "modules-progress-overview-summary", children: l ? `${r} ${l}` : r })
2462
2556
  ] }) }),
2463
- /* @__PURE__ */ l(
2464
- E,
2557
+ /* @__PURE__ */ i(
2558
+ S,
2465
2559
  {
2466
2560
  margin: "xx-small 0 0 0",
2467
- gap: jl,
2561
+ gap: ra,
2468
2562
  role: "group",
2469
2563
  "aria-label": n("moduleProgressOverviewGroupLabel"),
2470
2564
  "data-testid": "modules-progress-overview-segments",
2471
- children: e.map((a) => /* @__PURE__ */ l(Wl, { module: a, onClick: t }, a.id))
2565
+ children: e.map((a) => /* @__PURE__ */ i(la, { module: a, onClick: t }, a.id))
2472
2566
  }
2473
2567
  )
2474
2568
  ] });
2475
2569
  }
2476
- function Kl({
2570
+ function ca({
2477
2571
  counts: e,
2478
2572
  itemsMode: t,
2479
2573
  loadedModules: n
2480
2574
  }) {
2481
2575
  const o = e.listModules + e.listModuleItems;
2482
- return /* @__PURE__ */ l(
2483
- T,
2576
+ return /* @__PURE__ */ i(
2577
+ C,
2484
2578
  {
2485
2579
  as: "div",
2486
2580
  background: "secondary",
@@ -2489,25 +2583,25 @@ function Kl({
2489
2583
  padding: "x-small small",
2490
2584
  margin: "0 0 small 0",
2491
2585
  "data-testid": "dev-diagnostics",
2492
- children: /* @__PURE__ */ C(E, { gap: "medium", wrap: "wrap", children: [
2493
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ l(v, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
2494
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "request-count-list-modules", children: [
2586
+ children: /* @__PURE__ */ T(S, { gap: "medium", wrap: "wrap", children: [
2587
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(x, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
2588
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "request-count-list-modules", children: [
2495
2589
  "listModules: ",
2496
2590
  e.listModules
2497
2591
  ] }) }),
2498
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
2592
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
2499
2593
  "listModuleItems: ",
2500
2594
  e.listModuleItems
2501
2595
  ] }) }),
2502
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
2596
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
2503
2597
  "total: ",
2504
2598
  o
2505
2599
  ] }) }),
2506
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "resolved-items-mode", children: [
2600
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "resolved-items-mode", children: [
2507
2601
  "itemsMode: ",
2508
2602
  t ?? "probing…"
2509
2603
  ] }) }),
2510
- /* @__PURE__ */ l(E.Item, { children: /* @__PURE__ */ C(v, { size: "x-small", "data-testid": "modules-loaded-count", children: [
2604
+ /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "modules-loaded-count", children: [
2511
2605
  "modules loaded: ",
2512
2606
  n
2513
2607
  ] }) })
@@ -2515,190 +2609,191 @@ function Kl({
2515
2609
  }
2516
2610
  );
2517
2611
  }
2518
- const Ql = 200;
2519
- function Vl({
2612
+ const ua = 200;
2613
+ function da({
2520
2614
  data: e,
2521
2615
  courseName: t,
2522
2616
  courseContext: n,
2523
2617
  today: o,
2524
2618
  requestCounts: s,
2525
2619
  showDiagnostics: r = s !== void 0,
2526
- navigation: i,
2527
- as: a = "div",
2528
- headingLevel: d = "h2",
2529
- breakpoints: u = {}
2620
+ as: l = "div",
2621
+ headingLevel: a = "h2",
2622
+ breakpoints: d = {}
2530
2623
  }) {
2531
- const { miniTablet: c, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: b, ICEDesktop: w } = u, x = N(
2532
- () => ({ miniTablet: c, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: b, ICEDesktop: w }),
2533
- [c, p, f, y, g, b, w]
2624
+ const { miniTablet: c, tablet: u, desktop: p, desktopNavOpen: g, desktopOnly: b, mobileOnly: f, ICEDesktop: y } = d, P = N(
2625
+ () => ({ miniTablet: c, tablet: u, desktop: p, desktopNavOpen: g, desktopOnly: b, mobileOnly: f, ICEDesktop: y }),
2626
+ [c, u, p, g, b, f, y]
2534
2627
  ), {
2535
- modules: _,
2628
+ modules: E,
2536
2629
  hasNextPage: A,
2537
- fetchNextPage: q,
2538
- isFetchingNextPage: B,
2539
- isLoading: L,
2540
- isRefreshing: k,
2541
- error: G,
2542
- itemsMode: J,
2630
+ fetchNextPage: k,
2631
+ isFetchingNextPage: q,
2632
+ isLoading: $,
2633
+ isRefreshing: v,
2634
+ error: j,
2635
+ itemsMode: D,
2543
2636
  expandedModuleIds: F,
2544
- expandModule: D,
2545
- collapseModule: Y,
2546
- toggleModule: se,
2547
- expandModules: De,
2548
- collapseModules: Oe,
2549
- getItems: Me,
2550
- filter: ee,
2551
- setFilter: ye,
2552
- filterEntry: qe,
2553
- filterPredicate: re,
2554
- filterResultsArePartial: ie
2555
- } = e, { t: P, timezone: Fe } = j(), Ue = t ?? P("pageTitle"), W = $(null), Se = $(/* @__PURE__ */ new Map()), le = st(), H = st(), ze = b === !0, ae = $(!1), $e = U((S) => {
2556
- var z;
2557
- (z = Se.current.get(S)) == null || z.scrollIntoView({ behavior: "smooth", block: "start" });
2558
- }, []), [Be] = V(() => /* @__PURE__ */ new Date()), _e = o ?? Be, [Te, Ge] = V(null);
2559
- Z(() => {
2560
- !A && !k && ee === X && Ge(_);
2561
- }, [A, k, ee, _]), Z(() => {
2562
- var S;
2563
- !ae.current || B || k || (ae.current = !1, pe(P("modulesLoadedAnnouncement", { count: _.length })), (S = W.current) == null || S.focus());
2564
- }, [B, k, _.length, P]);
2637
+ expandModule: Y,
2638
+ collapseModule: B,
2639
+ toggleModule: K,
2640
+ expandModules: V,
2641
+ collapseModules: Z,
2642
+ getItems: W,
2643
+ filter: w,
2644
+ setFilter: Q,
2645
+ filterEntry: ie,
2646
+ filterPredicate: ue,
2647
+ filterResultsArePartial: Ee
2648
+ } = e, { t: L, timezone: X } = H(), Ce = Je(), Ue = t ?? L("pageTitle"), J = z(null), we = z(/* @__PURE__ */ new Map()), de = lt(), ee = lt(), ze = f === !0, me = z(!1), $e = U((_) => {
2649
+ var G;
2650
+ (G = we.current.get(_)) == null || G.scrollIntoView({ behavior: "smooth", block: "start" });
2651
+ }, []), [Be] = oe(() => /* @__PURE__ */ new Date()), ve = o ?? Be, [Pe, Ge] = oe(null);
2652
+ se(() => {
2653
+ !A && !v && w === re && Ge(E);
2654
+ }, [A, v, w, E]), se(() => {
2655
+ var _;
2656
+ !me.current || q || v || (me.current = !1, Ie(L("modulesLoadedAnnouncement", { count: E.length })), (_ = J.current) == null || _.focus());
2657
+ }, [q, v, E.length, L]);
2565
2658
  const h = N(
2566
- () => _.filter(
2567
- (S) => re === void 0 || re(S, { today: _e, timezone: Fe })
2659
+ () => E.filter(
2660
+ (_) => ue === void 0 || ue(_, { today: ve, timezone: X })
2568
2661
  ),
2569
- [_, re, _e, Fe]
2570
- ), M = $({
2662
+ [E, ue, ve, X]
2663
+ ), M = z({
2571
2664
  rows: h,
2572
2665
  expanded: F,
2573
2666
  items: /* @__PURE__ */ new Map()
2574
- }), [I, R] = V(null);
2575
- k ? I === null && R(M.current) : (M.current = {
2667
+ }), [I, R] = oe(null);
2668
+ v ? I === null && R(M.current) : (M.current = {
2576
2669
  rows: h,
2577
2670
  expanded: F,
2578
- items: new Map(F.map((S) => [S, Me(S)]))
2671
+ items: new Map(F.map((_) => [_, W(_)]))
2579
2672
  }, I !== null && R(null));
2580
- const O = (I == null ? void 0 : I.rows) ?? h, ce = (I == null ? void 0 : I.expanded) ?? F, K = N(() => new Set(ce), [ce]), te = N(
2581
- () => O.filter((S) => K.has(S.id)).map((S) => S.id),
2582
- [O, K]
2583
- ), Ee = te.length > 0, [ue, Q] = V(!1), Ce = te.filter((S) => Me(S).isLoading).length, je = ue ? Ce : 0, de = $(!1);
2584
- Z(() => {
2585
- if (ue) {
2586
- if (Ce > 0 && !de.current) {
2587
- de.current = !0, pe(P("expandAllLoadingItems", { count: Ce }));
2673
+ const O = (I == null ? void 0 : I.rows) ?? h, pe = (I == null ? void 0 : I.expanded) ?? F, te = N(() => new Set(pe), [pe]), le = N(
2674
+ () => O.filter((_) => te.has(_.id)).map((_) => _.id),
2675
+ [O, te]
2676
+ ), Ae = le.length > 0, [ge, ne] = oe(!1), xe = le.filter((_) => W(_).isLoading).length, je = ge ? xe : 0, fe = z(!1);
2677
+ se(() => {
2678
+ if (ge) {
2679
+ if (xe > 0 && !fe.current) {
2680
+ fe.current = !0, Ie(L("expandAllLoadingItems", { count: xe }));
2588
2681
  return;
2589
2682
  }
2590
- Ce === 0 && de.current && (de.current = !1, Q(!1), pe(P("expandAllItemsLoaded")));
2683
+ xe === 0 && fe.current && (fe.current = !1, ne(!1), Ie(L("expandAllItemsLoaded")));
2591
2684
  }
2592
- }, [ue, Ce, P]);
2593
- const eo = () => {
2594
- if (Ee) {
2595
- const z = new Set(te);
2596
- Q(!1), de.current = !1, Oe(te), I !== null && R({ ...I, expanded: I.expanded.filter((Ye) => !z.has(Ye)) }), pe(P("modulesCollapsedAnnouncement", { count: te.length }));
2685
+ }, [ge, xe, L]);
2686
+ const uo = () => {
2687
+ if (Ae) {
2688
+ Ce("collapse-all");
2689
+ const G = new Set(le);
2690
+ ne(!1), fe.current = !1, Z(le), I !== null && R({ ...I, expanded: I.expanded.filter((Ye) => !G.has(Ye)) }), Ie(L("modulesCollapsedAnnouncement", { count: le.length }));
2597
2691
  return;
2598
2692
  }
2599
- const S = O.map((z) => z.id);
2600
- Q(!0), de.current = !1, De(S), I !== null && R({ ...I, expanded: S }), pe(P("modulesExpandedAnnouncement", { count: S.length }));
2601
- }, Tt = $(I);
2602
- Tt.current = I;
2603
- const to = U(
2604
- (S) => {
2605
- const z = Tt.current;
2606
- if (z === null) {
2607
- se(S);
2693
+ Ce("expand-all");
2694
+ const _ = O.map((G) => G.id);
2695
+ ne(!0), fe.current = !1, V(_), I !== null && R({ ...I, expanded: _ }), Ie(L("modulesExpandedAnnouncement", { count: _.length }));
2696
+ }, At = z(I);
2697
+ At.current = I;
2698
+ const mo = U(
2699
+ (_) => {
2700
+ const G = At.current;
2701
+ if (G === null) {
2702
+ K(_);
2608
2703
  return;
2609
2704
  }
2610
- const Ye = z.expanded.includes(S);
2705
+ const Ye = G.expanded.includes(_);
2611
2706
  R({
2612
- ...z,
2613
- expanded: Ye ? z.expanded.filter((so) => so !== S) : [...z.expanded, S]
2614
- }), Ye ? Y(S) : D(S);
2707
+ ...G,
2708
+ expanded: Ye ? G.expanded.filter((fo) => fo !== _) : [...G.expanded, _]
2709
+ }), Ye ? B(_) : Y(_);
2615
2710
  },
2616
- [se, Y, D]
2617
- ), [no, Et] = V(!1);
2618
- Z(() => {
2619
- if (!k) {
2620
- Et(!1);
2711
+ [K, B, Y]
2712
+ ), [po, xt] = oe(!1);
2713
+ se(() => {
2714
+ if (!v) {
2715
+ xt(!1);
2621
2716
  return;
2622
2717
  }
2623
- const S = setTimeout(() => Et(!0), Ql);
2624
- return () => clearTimeout(S);
2625
- }, [k]);
2626
- const Ct = qe !== void 0 && ee !== X, wt = L || k && O.length === 0, Pt = O.length === 0 && !wt && !G, oo = Pt && Ct;
2627
- return /* @__PURE__ */ C(T, { as: a, display: "block", "data-testid": "modules-list", children: [
2628
- n ? /* @__PURE__ */ C(T, { as: "div", children: [
2629
- /* @__PURE__ */ l(v, { size: "small", color: "brand", children: n }),
2630
- /* @__PURE__ */ C(v, { size: "small", color: "secondary", children: [
2718
+ const _ = setTimeout(() => xt(!0), ua);
2719
+ return () => clearTimeout(_);
2720
+ }, [v]);
2721
+ const Lt = ie !== void 0 && w !== re, Rt = $ || v && O.length === 0, kt = O.length === 0 && !Rt && !j, go = kt && Lt;
2722
+ return /* @__PURE__ */ T(C, { as: l, display: "block", "data-testid": "modules-list", children: [
2723
+ n ? /* @__PURE__ */ T(C, { as: "div", children: [
2724
+ /* @__PURE__ */ i(x, { size: "small", color: "brand", children: n }),
2725
+ /* @__PURE__ */ T(x, { size: "small", color: "secondary", children: [
2631
2726
  " ",
2632
2727
  "/",
2633
2728
  " "
2634
2729
  ] }),
2635
- /* @__PURE__ */ l(v, { size: "small", color: "secondary", children: Ue })
2730
+ /* @__PURE__ */ i(x, { size: "small", color: "secondary", children: Ue })
2636
2731
  ] }) : null,
2637
- /* @__PURE__ */ l(mn, { level: d, margin: "x-small 0 medium 0", children: Ue }),
2638
- Te ? /* @__PURE__ */ l(Hl, { modules: Te, onModuleClick: $e }) : null,
2639
- r && s ? /* @__PURE__ */ l(
2640
- Kl,
2732
+ /* @__PURE__ */ i(In, { level: a, margin: "x-small 0 medium 0", children: Ue }),
2733
+ Pe ? /* @__PURE__ */ i(aa, { modules: Pe, onModuleClick: $e }) : null,
2734
+ r && s ? /* @__PURE__ */ i(
2735
+ ca,
2641
2736
  {
2642
2737
  counts: s,
2643
- itemsMode: J,
2644
- loadedModules: _.length
2738
+ itemsMode: D,
2739
+ loadedModules: E.length
2645
2740
  }
2646
2741
  ) : null,
2647
- /* @__PURE__ */ l(E, { justifyItems: "end", "data-testid": "modules-controls", children: /* @__PURE__ */ l(E.Item, { shouldGrow: ze, children: /* @__PURE__ */ l(
2648
- ve,
2742
+ /* @__PURE__ */ i(S, { justifyItems: "end", "data-testid": "modules-controls", children: /* @__PURE__ */ i(S.Item, { shouldGrow: ze, children: /* @__PURE__ */ i(
2743
+ ke,
2649
2744
  {
2650
2745
  display: ze ? "block" : "inline-block",
2651
- onClick: eo,
2746
+ onClick: uo,
2652
2747
  interaction: O.length === 0 ? "disabled" : "enabled",
2653
- renderIcon: je > 0 ? /* @__PURE__ */ l(rt, { size: "x-small", renderTitle: P("itemsLoadingSpinnerLabel") }) : void 0,
2654
- "aria-describedby": je > 0 ? H : void 0,
2748
+ renderIcon: je > 0 ? /* @__PURE__ */ i(at, { size: "x-small", renderTitle: L("itemsLoadingSpinnerLabel") }) : void 0,
2749
+ "aria-describedby": je > 0 ? ee : void 0,
2655
2750
  "data-testid": "expand-collapse-all",
2656
- children: P(Ee ? "collapseAllModules" : "expandAllModules")
2751
+ children: L(Ae ? "collapseAllModules" : "expandAllModules")
2657
2752
  }
2658
2753
  ) }) }),
2659
- je > 0 ? /* @__PURE__ */ l(T, { as: "div", margin: "xx-small 0 0 0", textAlign: "end", children: /* @__PURE__ */ l(
2660
- v,
2754
+ je > 0 ? /* @__PURE__ */ i(C, { as: "div", margin: "xx-small 0 0 0", textAlign: "end", children: /* @__PURE__ */ i(
2755
+ x,
2661
2756
  {
2662
2757
  size: "x-small",
2663
2758
  color: "secondary",
2664
- id: H,
2759
+ id: ee,
2665
2760
  "data-testid": "expand-all-loading-hint",
2666
- children: P("expandAllLoadingItems", { count: je })
2761
+ children: L("expandAllLoadingItems", { count: je })
2667
2762
  }
2668
2763
  ) }) : null,
2669
- /* @__PURE__ */ l(
2670
- el,
2764
+ /* @__PURE__ */ i(
2765
+ pl,
2671
2766
  {
2672
- value: ee,
2673
- onChange: ye,
2674
- describedBy: ie ? le : void 0
2767
+ value: w,
2768
+ onChange: Q,
2769
+ describedBy: Ee ? de : void 0
2675
2770
  }
2676
2771
  ),
2677
- ie ? /* @__PURE__ */ l(T, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ l(
2678
- v,
2772
+ Ee ? /* @__PURE__ */ i(C, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ i(
2773
+ x,
2679
2774
  {
2680
2775
  size: "x-small",
2681
2776
  color: "secondary",
2682
- id: le,
2777
+ id: de,
2683
2778
  "data-testid": "filter-partial-hint",
2684
- children: P("filterScopeHint")
2779
+ children: L("filterScopeHint")
2685
2780
  }
2686
2781
  ) }) : null,
2687
- /* @__PURE__ */ C(T, { as: "div", margin: "medium 0 0 0", children: [
2688
- G ? /* @__PURE__ */ l(
2689
- dn,
2782
+ /* @__PURE__ */ T(C, { as: "div", margin: "medium 0 0 0", children: [
2783
+ j ? /* @__PURE__ */ i(
2784
+ hn,
2690
2785
  {
2691
2786
  variant: "error",
2692
2787
  margin: "0 0 small 0",
2693
- liveRegion: un,
2788
+ liveRegion: fn,
2694
2789
  liveRegionPoliteness: "assertive",
2695
2790
  "data-testid": "modules-error",
2696
- children: P("modulesLoadErrorAlert", { message: G.message })
2791
+ children: L("modulesLoadErrorAlert", { message: j.message })
2697
2792
  }
2698
2793
  ) : null,
2699
- wt ? /* @__PURE__ */ l(T, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ l(rt, { renderTitle: P("modulesLoadingSpinnerLabel") }) }) : null,
2700
- Pt && !Ct ? /* @__PURE__ */ l(
2701
- T,
2794
+ Rt ? /* @__PURE__ */ i(C, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ i(at, { renderTitle: L("modulesLoadingSpinnerLabel") }) }) : null,
2795
+ kt && !Lt ? /* @__PURE__ */ i(
2796
+ C,
2702
2797
  {
2703
2798
  as: "div",
2704
2799
  background: "secondary",
@@ -2706,11 +2801,11 @@ function Vl({
2706
2801
  padding: "large",
2707
2802
  textAlign: "center",
2708
2803
  "data-testid": "modules-empty",
2709
- children: /* @__PURE__ */ l(v, { color: "secondary", children: P("noModulesEmptyState") })
2804
+ children: /* @__PURE__ */ i(x, { color: "secondary", children: L("noModulesEmptyState") })
2710
2805
  }
2711
2806
  ) : null,
2712
- oo ? /* @__PURE__ */ C(
2713
- T,
2807
+ go ? /* @__PURE__ */ T(
2808
+ C,
2714
2809
  {
2715
2810
  as: "div",
2716
2811
  background: "secondary",
@@ -2719,81 +2814,80 @@ function Vl({
2719
2814
  textAlign: "center",
2720
2815
  "data-testid": "modules-filtered-empty",
2721
2816
  children: [
2722
- /* @__PURE__ */ l(T, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ l(v, { color: "secondary", children: _.length === 0 ? P("noFilterMatches") : P("filteredEmptyState", { count: _.length }) }) }),
2723
- /* @__PURE__ */ l(
2724
- ve,
2817
+ /* @__PURE__ */ i(C, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(x, { color: "secondary", children: E.length === 0 ? L("noFilterMatches") : L("filteredEmptyState", { count: E.length }) }) }),
2818
+ /* @__PURE__ */ i(
2819
+ ke,
2725
2820
  {
2726
2821
  size: "small",
2727
2822
  onClick: () => {
2728
- ye(X), ae.current = !0;
2823
+ Q(re), me.current = !0;
2729
2824
  },
2730
- children: P("clearFilters")
2825
+ children: L("clearFilters")
2731
2826
  }
2732
2827
  )
2733
2828
  ]
2734
2829
  }
2735
2830
  ) : null,
2736
- /* @__PURE__ */ l(
2831
+ /* @__PURE__ */ i(
2737
2832
  "ul",
2738
2833
  {
2739
- style: { listStyle: "none", margin: 0, padding: 0, opacity: no ? 0.5 : 1 },
2740
- "aria-busy": k,
2834
+ style: { listStyle: "none", margin: 0, padding: 0, opacity: po ? 0.5 : 1 },
2835
+ "aria-busy": v,
2741
2836
  "data-testid": "modules-stack",
2742
- children: O.map((S) => /* @__PURE__ */ l(
2837
+ children: O.map((_) => /* @__PURE__ */ i(
2743
2838
  "li",
2744
2839
  {
2745
- ref: (z) => {
2746
- z ? Se.current.set(S.id, z) : Se.current.delete(S.id);
2840
+ ref: (G) => {
2841
+ G ? we.current.set(_.id, G) : we.current.delete(_.id);
2747
2842
  },
2748
- children: /* @__PURE__ */ l(
2749
- Ul,
2843
+ children: /* @__PURE__ */ i(
2844
+ ea,
2750
2845
  {
2751
- module: S,
2752
- expanded: ce.includes(S.id),
2753
- onToggle: to,
2754
- itemsState: (I == null ? void 0 : I.items.get(S.id)) ?? Me(S.id),
2755
- today: _e,
2846
+ module: _,
2847
+ expanded: pe.includes(_.id),
2848
+ onToggle: mo,
2849
+ itemsState: (I == null ? void 0 : I.items.get(_.id)) ?? W(_.id),
2850
+ today: ve,
2756
2851
  showDiagnostics: r,
2757
- navigation: i,
2758
- headingLevel: d === "h1" ? "h2" : "h3",
2759
- breakpoints: x
2852
+ headingLevel: a === "h1" ? "h2" : "h3",
2853
+ breakpoints: P
2760
2854
  }
2761
2855
  )
2762
2856
  },
2763
- S.id
2857
+ _.id
2764
2858
  ))
2765
2859
  }
2766
2860
  )
2767
2861
  ] }),
2768
- A ? /* @__PURE__ */ l(T, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2769
- ve,
2862
+ A ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2863
+ ke,
2770
2864
  {
2771
2865
  color: "primary",
2772
2866
  onClick: () => {
2773
- ae.current = !0, q();
2867
+ Ce("load-more-modules"), me.current = !0, k();
2774
2868
  },
2775
- interaction: B || k ? "disabled" : "enabled",
2869
+ interaction: q || v ? "disabled" : "enabled",
2776
2870
  "data-testid": "load-more-modules",
2777
- children: B ? P("loadMoreModulesLoading") : P("loadMoreModules", { count: _.length })
2871
+ children: q ? L("loadMoreModulesLoading") : L("loadMoreModules", { count: E.length })
2778
2872
  }
2779
- ) }) : _.length > 0 ? /* @__PURE__ */ l(T, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ l(
2780
- v,
2873
+ ) }) : E.length > 0 ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2874
+ x,
2781
2875
  {
2782
2876
  size: "x-small",
2783
2877
  color: "secondary",
2784
2878
  "data-testid": "modules-all-loaded",
2785
- elementRef: (S) => {
2786
- W.current = S;
2879
+ elementRef: (_) => {
2880
+ J.current = _;
2787
2881
  },
2788
2882
  tabIndex: -1,
2789
- children: P("allModulesLoaded", { count: _.length })
2883
+ children: L("allModulesLoaded", { count: E.length })
2790
2884
  }
2791
2885
  ) }) : null
2792
2886
  ] });
2793
2887
  }
2794
- const sc = vo(
2795
- Vl
2796
- ), Ae = [
2888
+ const Sc = Fo(
2889
+ da
2890
+ ), De = [
2797
2891
  "assignment",
2798
2892
  "quiz",
2799
2893
  "discussion",
@@ -2802,7 +2896,7 @@ const sc = vo(
2802
2896
  "external_url",
2803
2897
  "external_tool",
2804
2898
  "sub_header"
2805
- ], gt = [
2899
+ ], bt = [
2806
2900
  "not_started",
2807
2901
  "in_progress",
2808
2902
  "complete",
@@ -2810,28 +2904,28 @@ const sc = vo(
2810
2904
  "incomplete",
2811
2905
  "missing_and_incomplete",
2812
2906
  "locked"
2813
- ], Xn = [
2907
+ ], ao = [
2814
2908
  "must_view",
2815
2909
  "must_submit",
2816
2910
  "must_contribute",
2817
2911
  "must_mark_done",
2818
2912
  "min_score",
2819
2913
  "min_percentage"
2820
- ], Zl = ["assignment", "quiz", "discussion"], Xl = ["external_url", "external_tool"], Jl = ["assignment", "quiz", "discussion"], ea = Date.UTC(2025, 0, 6), ta = 864e5, be = "1", Jn = (e) => new Date(ea + e * ta).toISOString(), Xe = [
2914
+ ], ma = ["assignment", "quiz", "discussion"], pa = ["external_url", "external_tool"], ga = ["assignment", "quiz", "discussion"], fa = Date.UTC(2025, 0, 6), ha = 864e5, Te = "1", co = (e) => new Date(fa + e * ha).toISOString(), Xe = [
2821
2915
  "min_score",
2822
2916
  "min_percentage"
2823
- ], na = Xn.filter(
2917
+ ], Ia = ao.filter(
2824
2918
  (e) => !Xe.includes(e)
2825
- ), oa = [
2919
+ ), ba = [
2826
2920
  "in_progress",
2827
2921
  "incomplete",
2828
2922
  "missing_and_incomplete"
2829
- ], sa = (e, t, n, o) => {
2830
- const s = n ? Xn : na, r = n && o ? Xe[t % Xe.length] : s[Math.floor(t / 3) % s.length];
2923
+ ], ya = (e, t, n, o) => {
2924
+ const s = n ? ao : Ia, r = n && o ? Xe[t % Xe.length] : s[Math.floor(t / 3) % s.length];
2831
2925
  return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
2832
- }, ra = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, _t = (e) => gt[(e - 1) % gt.length], ia = (e, t) => !Jl.includes(e) || e === "discussion" && Math.floor(t / Ae.length) % 2 === 1 ? null : 5 + t % 4 * 5, la = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, aa = (e, t, n, o) => {
2926
+ }, Ma = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, Pt = (e) => bt[(e - 1) % bt.length], Sa = (e, t) => !ga.includes(e) || e === "discussion" && Math.floor(t / De.length) % 2 === 1 ? null : 5 + t % 4 * 5, _a = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, Ta = (e, t, n, o) => {
2833
2927
  if (e === "locked") return "locked";
2834
- if (la(e, t, n, o)) return "missing";
2928
+ if (_a(e, t, n, o)) return "missing";
2835
2929
  if (!n) return;
2836
2930
  const s = t && Xe.includes(n.type);
2837
2931
  switch (e) {
@@ -2848,37 +2942,37 @@ const sc = vo(
2848
2942
  default:
2849
2943
  return e;
2850
2944
  }
2851
- }, ca = (e) => e.status === "complete", ua = (e, t, n, o, s, r, i, a) => {
2852
- const d = String(e), u = Ae[o % Ae.length], c = u === "sub_header", p = Zl.includes(u) && (o % 4 === 0 || s === "missing");
2945
+ }, Ea = (e) => e.status === "complete", Ca = (e, t, n, o, s, r, l, a) => {
2946
+ const d = String(e), c = De[o % De.length], u = c === "sub_header", p = ma.includes(c) && (o % 4 === 0 || s === "missing");
2853
2947
  return {
2854
2948
  id: n,
2855
2949
  moduleId: d,
2856
- title: `${u} ${t + 1}`,
2857
- type: u,
2950
+ title: `${c} ${t + 1}`,
2951
+ type: c,
2858
2952
  position: t + 1,
2859
2953
  indent: t % 5 === 4 ? 1 : 0,
2860
2954
  published: a === "teacher" ? o % 7 !== 0 : !0,
2861
- url: c ? null : `/courses/${be}/modules/items/${n}`,
2862
- newTab: Xl.includes(u) && o % 2 === 0,
2863
- completionRequirement: i,
2864
- dueAt: p ? Jn(o % 90) : null,
2955
+ url: u ? null : `/courses/${Te}/modules/items/${n}`,
2956
+ newTab: pa.includes(c) && o % 2 === 0,
2957
+ completionRequirement: l,
2958
+ dueAt: p ? co(o % 90) : null,
2865
2959
  status: s,
2866
2960
  pointsPossible: r,
2867
- extensions: bt(
2961
+ extensions: Tt(
2868
2962
  void 0,
2869
2963
  o % 37 === 0 ? 5 + o % 4 * 10 : null
2870
2964
  )
2871
2965
  };
2872
- }, da = (e, t, n, o) => {
2873
- const s = _t(e), r = oa.includes(s), i = [];
2966
+ }, wa = (e, t, n, o) => {
2967
+ const s = Pt(e), r = ba.includes(s), l = [];
2874
2968
  let a = 0;
2875
2969
  for (let d = 0; d < t; d += 1) {
2876
- const u = n + d, c = Ae[u % Ae.length], p = ia(c, u), f = p !== null, y = f ? a++ : d, g = String(e * 1e3 + d + 1), b = ra(c, u, f, r) ? sa(g, u, f, r) : null, w = aa(s, f, b, y);
2877
- i.push(ua(e, d, g, u, w, p, b, o));
2970
+ const c = n + d, u = De[c % De.length], p = Sa(u, c), g = p !== null, b = g ? a++ : d, f = String(e * 1e3 + d + 1), y = Ma(u, c, g, r) ? ya(f, c, g, r) : null, P = Ta(s, g, y, b);
2971
+ l.push(Ca(e, d, f, c, P, p, y, o));
2878
2972
  }
2879
- return i;
2880
- }, ma = (e, t, n, o) => {
2881
- const s = _t(e);
2973
+ return l;
2974
+ }, va = (e, t, n, o) => {
2975
+ const s = Pt(e);
2882
2976
  if (s === "locked" || s === "not_started") return s;
2883
2977
  if (t.length === 0) return "not_started";
2884
2978
  if (!t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 || s === "incomplete" && o === 0) return "in_progress";
@@ -2888,36 +2982,36 @@ const sc = vo(
2888
2982
  if (o === 0) return "missing";
2889
2983
  }
2890
2984
  return s;
2891
- }, pa = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, fa = (e, t, n) => {
2892
- const o = t.filter((u) => u.completionRequirement), s = n ?? o.length, r = Math.min(o.filter(ca).length, s), i = t.filter((u) => u.status === "missing").length, a = t.filter((u) => u.status === "incomplete").length;
2985
+ }, Pa = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, Aa = (e, t, n) => {
2986
+ const o = t.filter((c) => c.completionRequirement), s = n ?? o.length, r = Math.min(o.filter(Ea).length, s), l = t.filter((c) => c.status === "missing").length, a = t.filter((c) => c.status === "incomplete").length;
2893
2987
  return {
2894
- status: ma(e, t, i, a),
2988
+ status: va(e, t, l, a),
2895
2989
  requirementsMet: r,
2896
2990
  requirementCount: s,
2897
2991
  percentComplete: s > 0 ? Math.round(r / s * 100) : 0,
2898
- nextDueAt: pa(t),
2899
- missingCount: i,
2992
+ nextDueAt: Pa(t),
2993
+ missingCount: l,
2900
2994
  incompleteCount: a
2901
2995
  };
2902
- }, ga = (e, t, n) => {
2903
- const o = _t(e), s = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
2996
+ }, xa = (e, t, n) => {
2997
+ const o = Pt(e), s = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
2904
2998
  return {
2905
2999
  id: String(e),
2906
3000
  name: `Module ${e}`,
2907
3001
  position: e,
2908
3002
  published: n === "teacher" ? e % 4 !== 0 : !0,
2909
3003
  itemCount: t.length,
2910
- unlockAt: e % 5 === 0 ? Jn(e) : null,
3004
+ unlockAt: e % 5 === 0 ? co(e) : null,
2911
3005
  prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2912
3006
  requirementCount: s,
2913
3007
  requireSequentialProgress: e % 6 === 0,
2914
3008
  completionRequirements: t.flatMap(
2915
3009
  (r) => r.completionRequirement ? [r.completionRequirement] : []
2916
3010
  ),
2917
- progress: fa(e, t, s)
3011
+ progress: Aa(e, t, s)
2918
3012
  };
2919
3013
  };
2920
- function ha(e) {
3014
+ function La(e) {
2921
3015
  return {
2922
3016
  courseId: e.courseId,
2923
3017
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -2929,32 +3023,32 @@ function ha(e) {
2929
3023
  )
2930
3024
  };
2931
3025
  }
2932
- function nt(e, t = {}) {
2933
- const n = t.view ?? "student", o = t.courseId ?? be, s = [], r = {};
2934
- let i = 0;
2935
- e.forEach((d, u) => {
2936
- const c = u + 1, p = da(c, d, i, n);
2937
- i += d, s.push(ga(c, p, n)), r[String(c)] = p;
3026
+ function st(e, t = {}) {
3027
+ const n = t.view ?? "student", o = t.courseId ?? Te, s = [], r = {};
3028
+ let l = 0;
3029
+ e.forEach((d, c) => {
3030
+ const u = c + 1, p = wa(u, d, l, n);
3031
+ l += d, s.push(xa(u, p, n)), r[String(u)] = p;
2938
3032
  });
2939
3033
  const a = { courseId: o, modules: s, itemsByModuleId: r };
2940
- return n === "teacher" ? ha(a) : a;
3034
+ return n === "teacher" ? La(a) : a;
2941
3035
  }
2942
- const we = (e) => `/courses/${be}/modules/items/${e}`, Xt = "2099-08-31T06:59:00Z", Ia = "2020-01-06T07:00:00Z", ba = gt.length, Ma = 8, ya = 120, Sa = 25, _a = 250, Jt = 8;
2943
- function rc() {
2944
- return nt(Array.from({ length: ba }, () => Ma));
3036
+ const Le = (e) => `/courses/${Te}/modules/items/${e}`, rn = "2099-08-31T06:59:00Z", Ra = "2020-01-06T07:00:00Z", ka = bt.length, Da = 8, Na = 120, Oa = 25, qa = 250, ln = 8;
3037
+ function _c() {
3038
+ return st(Array.from({ length: ka }, () => Da));
2945
3039
  }
2946
- function ic() {
2947
- return nt(Array.from({ length: ya }, () => Sa));
3040
+ function Tc() {
3041
+ return st(Array.from({ length: Na }, () => Oa));
2948
3042
  }
2949
- function lc() {
2950
- return nt([
2951
- Jt,
2952
- _a,
2953
- Jt
3043
+ function Ec() {
3044
+ return st([
3045
+ ln,
3046
+ qa,
3047
+ ln
2954
3048
  ]);
2955
3049
  }
2956
- function ac() {
2957
- const e = (s, r, i) => ({
3050
+ function Cc() {
3051
+ const e = (s, r, l) => ({
2958
3052
  id: String(s),
2959
3053
  name: r,
2960
3054
  position: s,
@@ -2970,29 +3064,29 @@ function ac() {
2970
3064
  missingCount: 0,
2971
3065
  incompleteCount: 0
2972
3066
  },
2973
- ...i
3067
+ ...l
2974
3068
  }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, o = [
2975
- e(1, "Locked by a future date", { unlockAt: Xt }),
3069
+ e(1, "Locked by a future date", { unlockAt: rn }),
2976
3070
  e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2977
3071
  e(3, "Locked by several prerequisites", {
2978
3072
  prerequisiteModules: [t, n]
2979
3073
  }),
2980
3074
  e(4, "Locked by a date and a prerequisite", {
2981
- unlockAt: Xt,
3075
+ unlockAt: rn,
2982
3076
  prerequisiteModules: [t]
2983
3077
  }),
2984
- e(5, "Locked, and the unlock date has passed", { unlockAt: Ia })
3078
+ e(5, "Locked, and the unlock date has passed", { unlockAt: Ra })
2985
3079
  ];
2986
3080
  return {
2987
- courseId: be,
3081
+ courseId: Te,
2988
3082
  modules: o,
2989
3083
  itemsByModuleId: Object.fromEntries(o.map((s) => [s.id, []]))
2990
3084
  };
2991
3085
  }
2992
- function cc() {
2993
- return nt([]);
3086
+ function wc() {
3087
+ return st([]);
2994
3088
  }
2995
- function uc() {
3089
+ function vc() {
2996
3090
  const t = [
2997
3091
  {
2998
3092
  title: "Every fact: type, due date, points, requirement",
@@ -3021,7 +3115,7 @@ function uc() {
3021
3115
  title: "Career item carrying an estimated duration",
3022
3116
  type: "external_tool",
3023
3117
  completionRequirement: { itemId: "5", type: "must_view" },
3024
- extensions: bt(void 0, 45)
3118
+ extensions: Tt(void 0, 45)
3025
3119
  },
3026
3120
  { title: "A file, ungradeable, so no points at all", type: "file" },
3027
3121
  { title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
@@ -3044,12 +3138,12 @@ function uc() {
3044
3138
  indent: 0,
3045
3139
  published: !0,
3046
3140
  newTab: !1,
3047
- url: we(o + 1),
3141
+ url: Le(o + 1),
3048
3142
  status: "not_started",
3049
3143
  ...n
3050
3144
  }));
3051
3145
  return {
3052
- courseId: be,
3146
+ courseId: Te,
3053
3147
  modules: [
3054
3148
  {
3055
3149
  id: "1",
@@ -3064,13 +3158,13 @@ function uc() {
3064
3158
  itemsByModuleId: { 1: t }
3065
3159
  };
3066
3160
  }
3067
- function dc() {
3161
+ function Pc() {
3068
3162
  const t = [
3069
- { title: "Reading: limits from the left and the right", type: "page", url: we(1) },
3163
+ { title: "Reading: limits from the left and the right", type: "page", url: Le(1) },
3070
3164
  {
3071
3165
  title: "Desmos: interactive limit explorer",
3072
3166
  type: "external_url",
3073
- url: we(2),
3167
+ url: Le(2),
3074
3168
  newTab: !0
3075
3169
  },
3076
3170
  { title: "Practice", type: "sub_header", url: null },
@@ -3078,9 +3172,9 @@ function dc() {
3078
3172
  {
3079
3173
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
3080
3174
  type: "assignment",
3081
- url: we(5)
3175
+ url: Le(5)
3082
3176
  },
3083
- { title: "Unit test", type: "quiz", url: we(6), status: "locked" }
3177
+ { title: "Unit test", type: "quiz", url: Le(6), status: "locked" }
3084
3178
  ].map((n, o) => ({
3085
3179
  id: String(o + 1),
3086
3180
  moduleId: "1",
@@ -3092,7 +3186,7 @@ function dc() {
3092
3186
  ...n
3093
3187
  }));
3094
3188
  return {
3095
- courseId: be,
3189
+ courseId: Te,
3096
3190
  modules: [
3097
3191
  {
3098
3192
  id: "1",
@@ -3108,97 +3202,101 @@ function dc() {
3108
3202
  };
3109
3203
  }
3110
3204
  export {
3111
- Qa as ACTION_ORDER_LTI_FLOOR,
3112
- X as ALL_FILTER,
3113
- Bt as ActionEntrySchema,
3114
- hn as CompletionRequirementSchema,
3115
- No as CompletionRequirementTypeSchema,
3116
- Fn as DEFAULT_INLINE_THRESHOLD,
3117
- Yi as DEFAULT_ITEM_CONCURRENCY,
3118
- qn as DEFAULT_ITEM_PAGE_SIZE,
3119
- Ie as DEFAULT_LOCALE,
3120
- St as DEFAULT_PAGE_SIZE,
3121
- Un as DEFAULT_RETAIN_COLLAPSED_LIMIT,
3122
- tt as DEFAULT_STALE_TIME_MS,
3123
- xi as DUE_THIS_WEEK_DAYS,
3124
- Mn as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
3125
- be as FIXTURE_COURSE_ID,
3126
- el as FilterChips,
3127
- Ao as FilterClauseSchema,
3128
- Bi as FilterEntrySchema,
3129
- ps as GET_MODULES,
3130
- fs as GET_MODULE_ITEMS,
3131
- ct as INLINE_ITEM_LIMIT,
3132
- Mt as INLINE_QUERY_NODE_BUDGET,
3133
- $o as InMemoryCourseMismatchError,
3134
- zi as ItemTypeEntrySchema,
3135
- $i as MetaFieldEntrySchema,
3136
- Ul as ModuleCard,
3137
- Cl as ModuleItemRow,
3138
- In as ModuleItemSchema,
3139
- hl as ModuleItemStatusPill,
3140
- Ro as ModuleItemStatusSchema,
3141
- Lo as ModuleItemTypeSchema,
3142
- Uo as ModuleItemsPageSchema,
3143
- Do as ModuleProgressSchema,
3144
- qo as ModuleSchema,
3145
- gl as ModuleStatusPill,
3146
- ko as ModuleStatusSchema,
3147
- Xa as ModulesConfigProvider,
3148
- Gi as ModulesConfigSchema,
3149
- Za as ModulesI18nProvider,
3150
- sc as ModulesList,
3151
- Fo as ModulesPageSchema,
3152
- Hl as ModulesProgressBar,
3153
- bn as PageInfoSchema,
3154
- yn as PartialCanvasResponseError,
3155
- Oo as PrerequisiteModuleSchema,
3156
- ke as RegistryEntrySchema,
3157
- ki as TYPE_FIELD,
3158
- Li as baseFilters,
3159
- et as baseModulesConfig,
3160
- nt as buildFixture,
3161
- cc as courseEmpty,
3162
- lc as courseFatModule,
3163
- dc as courseItemLinks,
3164
- uc as courseItemRowVariants,
3165
- ic as courseLarge,
3166
- ac as courseLockReasons,
3167
- rc as courseSmall,
3168
- Ms as createActionContext,
3169
- Ha as createCanvasGraphqlAdapter,
3170
- Wa as createInMemoryAdapter,
3171
- xn as createTranslate,
3172
- Ri as defaultFormatters,
3173
- Ii as defaultTranslate,
3174
- yt as filterClauseOf,
3175
- zo as getEstimatedDurationMinutes,
3176
- qi as hideUnservableFilters,
3177
- Ka as invalidateCourse,
3178
- bs as invalidateModuleItems,
3179
- kt as invalidateModuleList,
3180
- mt as isPredicateServed,
3181
- me as mergeRegistry,
3182
- fl as moduleItemStatusLabel,
3183
- ut as moduleItemsPrefix,
3184
- Wn as moduleStatusLabel,
3185
- Le as modulesKeys,
3186
- Is as modulesListPrefix,
3187
- ec as partialModulesConfig,
3188
- fe as registrySchema,
3189
- ji as resolveModulesConfig,
3190
- xo as servesClause,
3191
- Oi as unservableFilters,
3192
- tc as useActionContext,
3193
- Ja as useFieldVisible,
3194
- Ne as useFormatters,
3195
- nc as useModuleItems,
3196
- Wi as useModules,
3197
- Re as useModulesConfig,
3198
- j as useModulesI18n,
3199
- oc as useModulesPageData,
3200
- Va as visibleActions,
3201
- Je as visibleEntries,
3202
- he as visibleEntry,
3203
- bt as withEstimatedDurationMinutes
3205
+ dc as ACTION_ORDER_LTI_FLOOR,
3206
+ re as ALL_FILTER,
3207
+ Wt as ActionEntrySchema,
3208
+ _n as CompletionRequirementSchema,
3209
+ jo as CompletionRequirementTypeSchema,
3210
+ Hn as DEFAULT_INLINE_THRESHOLD,
3211
+ sl as DEFAULT_ITEM_CONCURRENCY,
3212
+ Yn as DEFAULT_ITEM_PAGE_SIZE,
3213
+ Se as DEFAULT_LOCALE,
3214
+ vt as DEFAULT_PAGE_SIZE,
3215
+ Kn as DEFAULT_RETAIN_COLLAPSED_LIMIT,
3216
+ nt as DEFAULT_STALE_TIME_MS,
3217
+ gc as DUE_THIS_WEEK_DAYS,
3218
+ Cn as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
3219
+ Te as FIXTURE_COURSE_ID,
3220
+ pl as FilterChips,
3221
+ Uo as FilterClauseSchema,
3222
+ el as FilterEntrySchema,
3223
+ Es as GET_MODULES,
3224
+ Cs as GET_MODULE_ITEMS,
3225
+ mt as INLINE_ITEM_LIMIT,
3226
+ Et as INLINE_QUERY_NODE_BUDGET,
3227
+ Xo as InMemoryCourseMismatchError,
3228
+ Rl as ItemDueSoonPill,
3229
+ Xi as ItemTypeEntrySchema,
3230
+ Ji as MetaFieldEntrySchema,
3231
+ ea as ModuleCard,
3232
+ Ll as ModuleDueSoonPill,
3233
+ zl as ModuleItemRow,
3234
+ Tn as ModuleItemSchema,
3235
+ xl as ModuleItemStatusPill,
3236
+ Bo as ModuleItemStatusSchema,
3237
+ $o as ModuleItemTypeSchema,
3238
+ Qo as ModuleItemsPageSchema,
3239
+ Yo as ModuleProgressSchema,
3240
+ Ko as ModuleSchema,
3241
+ Al as ModuleStatusPill,
3242
+ Go as ModuleStatusSchema,
3243
+ lc as ModulesAnalyticsProvider,
3244
+ fc as ModulesConfigProvider,
3245
+ nl as ModulesConfigSchema,
3246
+ pc as ModulesI18nProvider,
3247
+ Sc as ModulesList,
3248
+ Wo as ModulesPageSchema,
3249
+ aa as ModulesProgressBar,
3250
+ En as PageInfoSchema,
3251
+ vn as PartialCanvasResponseError,
3252
+ Ho as PrerequisiteModuleSchema,
3253
+ qe as RegistryEntrySchema,
3254
+ Yi as TYPE_FIELD,
3255
+ Gi as baseFilters,
3256
+ tt as baseModulesConfig,
3257
+ st as buildFixture,
3258
+ wc as courseEmpty,
3259
+ Ec as courseFatModule,
3260
+ Pc as courseItemLinks,
3261
+ vc as courseItemRowVariants,
3262
+ Tc as courseLarge,
3263
+ Cc as courseLockReasons,
3264
+ _c as courseSmall,
3265
+ xs as createActionContext,
3266
+ cc as createCanvasGraphqlAdapter,
3267
+ ac as createInMemoryAdapter,
3268
+ qn as createTranslate,
3269
+ ji as defaultFormatters,
3270
+ xi as defaultTranslate,
3271
+ wt as filterClauseOf,
3272
+ Vo as getEstimatedDurationMinutes,
3273
+ Qi as hideUnservableFilters,
3274
+ uc as invalidateCourse,
3275
+ As as invalidateModuleItems,
3276
+ Ut as invalidateModuleList,
3277
+ ft as isPredicateServed,
3278
+ he as mergeRegistry,
3279
+ Pl as moduleItemStatusLabel,
3280
+ pt as moduleItemsPrefix,
3281
+ no as moduleStatusLabel,
3282
+ Oe as modulesKeys,
3283
+ Ps as modulesListPrefix,
3284
+ Ic as partialModulesConfig,
3285
+ be as registrySchema,
3286
+ ol as resolveModulesConfig,
3287
+ zo as servesClause,
3288
+ Wi as unservableFilters,
3289
+ bc as useActionContext,
3290
+ hc as useFieldVisible,
3291
+ Fe as useFormatters,
3292
+ yc as useModuleItems,
3293
+ rl as useModules,
3294
+ Je as useModulesAnalytics,
3295
+ _e as useModulesConfig,
3296
+ H as useModulesI18n,
3297
+ Mc as useModulesPageData,
3298
+ mc as visibleActions,
3299
+ et as visibleEntries,
3300
+ Me as visibleEntry,
3301
+ Tt as withEstimatedDurationMinutes
3204
3302
  };