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