@instructure/platform-modules 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +5 -5
  2. package/dist/adapters/canvasGraphql/index.d.ts +7 -33
  3. package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
  4. package/dist/adapters/canvasGraphql/normalize.d.ts +45 -187
  5. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  6. package/dist/adapters/canvasGraphql/queries.d.ts +8 -36
  7. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  8. package/dist/adapters/inMemory.d.ts +4 -28
  9. package/dist/adapters/inMemory.d.ts.map +1 -1
  10. package/dist/adapters/limits.d.ts +17 -74
  11. package/dist/adapters/limits.d.ts.map +1 -1
  12. package/dist/adapters/types.d.ts +10 -40
  13. package/dist/adapters/types.d.ts.map +1 -1
  14. package/dist/cache/invalidate.d.ts +0 -23
  15. package/dist/cache/invalidate.d.ts.map +1 -1
  16. package/dist/cache/keys.d.ts +3 -44
  17. package/dist/cache/keys.d.ts.map +1 -1
  18. package/dist/components/FilterChips.d.ts +5 -9
  19. package/dist/components/FilterChips.d.ts.map +1 -1
  20. package/dist/components/ModuleCard.d.ts +10 -25
  21. package/dist/components/ModuleCard.d.ts.map +1 -1
  22. package/dist/components/ModuleCard.stories.d.ts +15 -0
  23. package/dist/components/ModuleCard.stories.d.ts.map +1 -1
  24. package/dist/components/ModuleItemRow.d.ts +1 -1
  25. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  26. package/dist/components/ModuleNumberBadge.d.ts.map +1 -1
  27. package/dist/components/ModulesList.d.ts +2 -23
  28. package/dist/components/ModulesList.d.ts.map +1 -1
  29. package/dist/components/ModulesList.stories.d.ts +28 -87
  30. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  31. package/dist/components/StatusPill.d.ts +0 -3
  32. package/dist/components/StatusPill.d.ts.map +1 -1
  33. package/dist/components/index.d.ts +1 -1
  34. package/dist/components/index.d.ts.map +1 -1
  35. package/dist/components/labels.d.ts +28 -45
  36. package/dist/components/labels.d.ts.map +1 -1
  37. package/dist/config/context.d.ts +0 -1
  38. package/dist/config/context.d.ts.map +1 -1
  39. package/dist/config/registry.d.ts +5 -13
  40. package/dist/config/registry.d.ts.map +1 -1
  41. package/dist/config/types.d.ts +0 -3
  42. package/dist/config/types.d.ts.map +1 -1
  43. package/dist/fixtures/generate.d.ts +6 -17
  44. package/dist/fixtures/generate.d.ts.map +1 -1
  45. package/dist/fixtures/index.d.ts +1 -1
  46. package/dist/fixtures/index.d.ts.map +1 -1
  47. package/dist/fixtures/scenarios.d.ts +7 -32
  48. package/dist/fixtures/scenarios.d.ts.map +1 -1
  49. package/dist/hooks/constants.d.ts +5 -22
  50. package/dist/hooks/constants.d.ts.map +1 -1
  51. package/dist/hooks/queryOptions.d.ts +3 -24
  52. package/dist/hooks/queryOptions.d.ts.map +1 -1
  53. package/dist/hooks/useItemsMode.d.ts +3 -52
  54. package/dist/hooks/useItemsMode.d.ts.map +1 -1
  55. package/dist/hooks/useModuleItemQueries.d.ts +1 -39
  56. package/dist/hooks/useModuleItemQueries.d.ts.map +1 -1
  57. package/dist/hooks/useModuleItems.d.ts +1 -1
  58. package/dist/hooks/useModules.d.ts +1 -1
  59. package/dist/hooks/useModulesPageData.d.ts +3 -29
  60. package/dist/hooks/useModulesPageData.d.ts.map +1 -1
  61. package/dist/i18n.d.ts +14 -21
  62. package/dist/i18n.d.ts.map +1 -1
  63. package/dist/index.d.ts +3 -10
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +1208 -1071
  66. package/dist/types/domain.d.ts +25 -80
  67. package/dist/types/domain.d.ts.map +1 -1
  68. package/dist/types/enums.d.ts +10 -41
  69. package/dist/types/enums.d.ts.map +1 -1
  70. package/dist/types/extensions.d.ts +0 -21
  71. package/dist/types/extensions.d.ts.map +1 -1
  72. package/dist/types/index.d.ts +2 -2
  73. package/dist/types/index.d.ts.map +1 -1
  74. package/dist/types/navigation.d.ts +1 -1
  75. package/dist/types/schemas.d.ts +5 -26
  76. package/dist/types/schemas.d.ts.map +1 -1
  77. package/locales/en.json +7 -8
  78. package/package.json +22 -19
package/dist/index.js CHANGED
@@ -1,25 +1,26 @@
1
- import { z as d } from "zod";
2
- import { gql as ee } from "graphql-tag";
3
- import { jsx as o, jsxs as _ } from "react/jsx-runtime";
4
- import { createContext as Be, useContext as Ge, useMemo as N, useCallback as D, useRef as $, useState as Z, useEffect as de, useId as je, memo as Ye } from "react";
5
- import { useInfiniteQuery as Te, useQueryClient as We, InfiniteQueryObserver as Rt } from "@tanstack/react-query";
6
- import Ft from "p-limit";
7
- import { Button as X, IconButton as zt } from "@instructure/ui-buttons";
1
+ import { z as m } from "zod";
2
+ import { gql as oe } from "graphql-tag";
3
+ import { jsx as i, jsxs as _ } from "react/jsx-runtime";
4
+ import { createContext as Ye, useContext as Qe, useMemo as v, useCallback as k, useRef as O, useState as te, useEffect as he, useId as He, memo as Ke } from "react";
5
+ import { useInfiniteQuery as xe, useQueryClient as Ze, InfiniteQueryObserver as Bt } from "@tanstack/react-query";
6
+ import Gt from "p-limit";
7
+ import { Button as ne, IconButton as jt } from "@instructure/ui-buttons";
8
8
  import { Flex as T } from "@instructure/ui-flex";
9
- import { Text as b } from "@instructure/ui-text";
9
+ import { Text as M } from "@instructure/ui-text";
10
10
  import { View as y } from "@instructure/ui-view";
11
- import { politeAnnounce as Qe, getLiveRegion as He } from "@instructure/platform-instui-bindings";
12
- import { Alert as Ke } from "@instructure/ui-alerts";
13
- import { Heading as Ve } from "@instructure/ui-heading";
14
- import { IconLockLine as Ze, IconWarningLine as Xe, IconCheckLine as me, IconClockLine as Je, IconArrowNestLine as Ut, IconEmptyLine as Ot, IconLtiLine as $t, IconLinkLine as Bt, IconAttachMediaLine as Gt, IconDocumentLine as jt, IconDiscussionLine as Yt, IconQuizLine as Wt, IconAssignmentLine as Qt, IconArrowOpenUpLine as Ht, IconArrowOpenDownLine as et, IconSearchLine as Kt } from "@instructure/ui-icons";
15
- import { ProgressBar as Vt } from "@instructure/ui-progress";
16
- import { Spinner as tt } from "@instructure/ui-spinner";
17
- import { ScreenReaderContent as Zt } from "@instructure/ui-a11y-content";
18
- import { Link as Xt } from "@instructure/ui-link";
19
- import { Pill as Jt } from "@instructure/ui-pill";
20
- import { Menu as Me } from "@instructure/ui-menu";
21
- import { TextInput as en } from "@instructure/ui-text-input";
22
- const tn = d.enum([
11
+ import { politeAnnounce as Ve, getLiveRegion as Xe } from "@instructure/platform-instui-bindings";
12
+ import { Alert as Je } from "@instructure/ui-alerts";
13
+ import { Heading as et } from "@instructure/ui-heading";
14
+ import { IconLockLine as tt, IconWarningLine as nt, IconCheckLine as se, IconClockLine as st, IconArrowNestLine as Wt, IconEmptyLine as Yt, IconLtiLine as Qt, IconLinkLine as Ht, IconAttachMediaLine as Kt, IconDocumentLine as Zt, IconDiscussionLine as Vt, IconQuizLine as Xt, IconAssignmentLine as Jt, IconArrowOpenUpLine as en, IconArrowOpenDownLine as rt, IconSearchLine as tn } from "@instructure/ui-icons";
15
+ import { ProgressBar as nn } from "@instructure/ui-progress/v11_7";
16
+ import { Spinner as ot } from "@instructure/ui-spinner";
17
+ import { ScreenReaderContent as sn } from "@instructure/ui-a11y-content";
18
+ import { Link as rn } from "@instructure/ui-link";
19
+ import { Pill as on } from "@instructure/ui-pill";
20
+ import { WithBreakpoints as ln } from "@instructure/platform-with-breakpoints";
21
+ import { Menu as Te } from "@instructure/ui-menu";
22
+ import { TextInput as an } from "@instructure/ui-text-input";
23
+ const un = m.enum([
23
24
  "assignment",
24
25
  "quiz",
25
26
  "discussion",
@@ -28,7 +29,16 @@ const tn = d.enum([
28
29
  "external_url",
29
30
  "external_tool",
30
31
  "sub_header"
31
- ]), nn = d.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), sn = d.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), rn = d.enum([
32
+ ]), cn = m.enum([
33
+ "not_started",
34
+ "in_progress",
35
+ "complete",
36
+ "submitted",
37
+ "graded",
38
+ "excused",
39
+ "missing",
40
+ "locked"
41
+ ]), dn = m.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), mn = m.enum([
32
42
  "must_view",
33
43
  "must_mark_done",
34
44
  "must_contribute",
@@ -36,128 +46,131 @@ const tn = d.enum([
36
46
  "min_score",
37
47
  "min_percentage",
38
48
  "unknown"
39
- ]), on = d.object({
40
- status: sn,
41
- requirementsMet: d.number(),
42
- requirementCount: d.number(),
43
- percentComplete: d.number().min(0).max(100),
44
- latestDueAt: d.string().nullish(),
45
- missingCount: d.number()
46
- }), nt = d.object({
47
- itemId: d.string(),
48
- type: rn,
49
- minScore: d.number().nullish(),
50
- minPercentage: d.number().nullish()
51
- }), st = d.object({
52
- id: d.string(),
53
- moduleId: d.string(),
54
- title: d.string(),
55
- type: tn,
56
- position: d.number(),
57
- indent: d.number(),
58
- published: d.boolean(),
59
- url: d.string().nullish(),
60
- newTab: d.boolean().nullish(),
61
- completionRequirement: nt.nullish(),
62
- dueAt: d.string().nullish(),
63
- status: nn.optional(),
64
- pointsPossible: d.number().nullish(),
65
- extensions: d.record(d.unknown()).optional()
66
- }), ln = d.object({
67
- id: d.string(),
68
- name: d.string(),
69
- position: d.number(),
70
- published: d.boolean(),
71
- itemCount: d.number(),
72
- items: d.array(st).optional(),
73
- unlockAt: d.string().nullish(),
74
- prerequisiteModuleIds: d.array(d.string()),
75
- requirementCount: d.number().nullish(),
76
- requireSequentialProgress: d.boolean(),
77
- completionRequirements: d.array(nt).optional(),
78
- progress: on.optional(),
79
- extensions: d.record(d.unknown()).optional()
80
- }), rt = d.object({
81
- hasNextPage: d.boolean(),
82
- endCursor: d.string().nullable()
49
+ ]), gn = m.object({
50
+ status: dn,
51
+ requirementsMet: m.number(),
52
+ requirementCount: m.number(),
53
+ percentComplete: m.number().min(0).max(100),
54
+ latestDueAt: m.string().nullish(),
55
+ missingCount: m.number()
56
+ }), it = m.object({
57
+ itemId: m.string(),
58
+ type: mn,
59
+ minScore: m.number().nullish(),
60
+ minPercentage: m.number().nullish()
61
+ }), lt = m.object({
62
+ id: m.string(),
63
+ moduleId: m.string(),
64
+ title: m.string(),
65
+ type: un,
66
+ position: m.number(),
67
+ indent: m.number(),
68
+ published: m.boolean(),
69
+ url: m.string().nullish(),
70
+ newTab: m.boolean().nullish(),
71
+ completionRequirement: it.nullish(),
72
+ dueAt: m.string().nullish(),
73
+ status: cn.optional(),
74
+ pointsPossible: m.number().nullish(),
75
+ extensions: m.record(m.unknown()).optional()
76
+ }), pn = m.object({
77
+ id: m.string(),
78
+ name: m.string()
79
+ }), fn = m.object({
80
+ id: m.string(),
81
+ name: m.string(),
82
+ position: m.number(),
83
+ published: m.boolean(),
84
+ itemCount: m.number(),
85
+ items: m.array(lt).optional(),
86
+ unlockAt: m.string().nullish(),
87
+ prerequisiteModules: m.array(pn),
88
+ requirementCount: m.number().nullish(),
89
+ requireSequentialProgress: m.boolean(),
90
+ completionRequirements: m.array(it).optional(),
91
+ progress: gn.optional(),
92
+ extensions: m.record(m.unknown()).optional()
93
+ }), at = m.object({
94
+ hasNextPage: m.boolean(),
95
+ endCursor: m.string().nullable()
83
96
  }).refine((e) => !e.hasNextPage || e.endCursor !== null, {
84
97
  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.',
85
98
  path: ["endCursor"]
86
- }), an = d.object({
87
- modules: d.array(ln),
88
- pageInfo: rt
89
- }), un = d.object({
90
- items: d.array(st),
91
- pageInfo: rt
92
- }), ot = "career.estimatedDurationMinutes";
93
- function cn(e) {
99
+ }), hn = m.object({
100
+ modules: m.array(fn),
101
+ pageInfo: at
102
+ }), bn = m.object({
103
+ items: m.array(lt),
104
+ pageInfo: at
105
+ }), ut = "career.estimatedDurationMinutes";
106
+ function In(e) {
94
107
  var n;
95
- const t = (n = e.extensions) == null ? void 0 : n[ot];
108
+ const t = (n = e.extensions) == null ? void 0 : n[ut];
96
109
  return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
97
110
  }
98
- function it(e, t) {
99
- return t == null ? e : { ...e, [ot]: t };
111
+ function ct(e, t) {
112
+ return t == null ? e : { ...e, [ut]: t };
100
113
  }
101
- const Se = 100, we = 2e3;
102
- class dn extends Error {
114
+ const we = 100, Le = 2e3;
115
+ class Mn extends Error {
103
116
  constructor(t, n) {
104
117
  super(
105
118
  `This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
106
119
  ), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
107
120
  }
108
121
  }
109
- const mn = (e) => `offset:${e}`, gn = (e) => {
122
+ const Sn = (e) => `offset:${e}`, yn = (e) => {
110
123
  if (!e) return 0;
111
124
  const t = Number.parseInt(e.replace("offset:", ""), 10);
112
125
  return Number.isFinite(t) && t >= 0 ? t : 0;
113
- }, Ce = (e) => {
126
+ }, ve = (e) => {
114
127
  if (e != null && e.aborted)
115
128
  throw new DOMException("The operation was aborted.", "AbortError");
116
129
  };
117
- function Le(e, t, n) {
118
- const s = gn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
130
+ function ke(e, t, n) {
131
+ const s = yn(t), r = e.slice(s, s + n), o = s + r.length, l = o < e.length;
119
132
  return {
120
133
  slice: r,
121
- pageInfo: { hasNextPage: u, endCursor: u ? mn(i) : null }
134
+ pageInfo: { hasNextPage: l, endCursor: l ? Sn(o) : null }
122
135
  };
123
136
  }
124
- function Qo(e, t = {}) {
137
+ function Si(e, t = {}) {
125
138
  const n = (r) => e.itemsByModuleId[r] ?? [], s = (r) => {
126
139
  if (r !== e.courseId)
127
- throw new dn(e.courseId, r);
140
+ throw new Mn(e.courseId, r);
128
141
  };
129
142
  return {
130
143
  async listModules({
131
144
  courseId: r,
132
- cursor: i,
133
- pageSize: u,
134
- includeItems: a,
145
+ cursor: o,
146
+ pageSize: l,
147
+ includeItems: u,
135
148
  inlineItemsFirst: c,
136
149
  signal: g
137
150
  }) {
138
- var f;
139
- Ce(g), s(r), (f = t.onRequest) == null || f.call(t, "listModules", { operation: "listModules", courseId: r });
140
- const { slice: l, pageInfo: m } = Le(e.modules, i, u), M = Math.min(c ?? Se, Se);
141
- return { modules: l.map((h) => {
142
- const P = n(h.id), C = a && P.length <= M;
143
- return { ...h, itemCount: P.length, items: C ? P : void 0 };
144
- }), pageInfo: m };
151
+ var p;
152
+ ve(g), s(r), (p = t.onRequest) == null || p.call(t, "listModules", { operation: "listModules", courseId: r });
153
+ const { slice: a, pageInfo: d } = ke(e.modules, o, l), h = Math.min(c ?? we, we);
154
+ return { modules: a.map((f) => {
155
+ const w = n(f.id), L = u && w.length <= h;
156
+ return { ...f, itemCount: w.length, items: L ? w : void 0 };
157
+ }), pageInfo: d };
145
158
  },
146
159
  async listModuleItems({
147
160
  courseId: r,
148
- moduleId: i,
149
- cursor: u,
150
- pageSize: a,
161
+ moduleId: o,
162
+ cursor: l,
163
+ pageSize: u,
151
164
  signal: c
152
165
  }) {
153
- var m;
154
- Ce(c), s(r), (m = t.onRequest) == null || m.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: i });
155
- const { slice: g, pageInfo: l } = Le(n(i), u, a);
156
- return { items: g, pageInfo: l };
166
+ var d;
167
+ ve(c), s(r), (d = t.onRequest) == null || d.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: o });
168
+ const { slice: g, pageInfo: a } = ke(n(o), l, u);
169
+ return { items: g, pageInfo: a };
157
170
  }
158
171
  };
159
172
  }
160
- class lt extends Error {
173
+ class dt extends Error {
161
174
  constructor(t, n, s) {
162
175
  const r = t === "module" ? "module" : "module item";
163
176
  super(
@@ -165,11 +178,11 @@ class lt extends Error {
165
178
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
166
179
  }
167
180
  }
168
- function at(e, t, n) {
181
+ function mt(e, t, n) {
169
182
  if (e != null) return e;
170
- throw new lt(t, n, "published");
183
+ throw new dt(t, n, "published");
171
184
  }
172
- function fn(e, t) {
185
+ function _n(e, t) {
173
186
  if (e.onUnsupportedItem) {
174
187
  e.onUnsupportedItem(t);
175
188
  return;
@@ -178,7 +191,7 @@ function fn(e, t) {
178
191
  `[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
179
192
  );
180
193
  }
181
- const hn = {
194
+ const Tn = {
182
195
  Assignment: "assignment",
183
196
  Quiz: "quiz",
184
197
  Discussion: "discussion",
@@ -190,27 +203,24 @@ const hn = {
190
203
  ModuleExternalTool: "external_tool",
191
204
  ExternalTool: "external_tool",
192
205
  SubHeader: "sub_header",
193
- // `PeerReviewSubAssignmentType < Types::AssignmentType` on master, so it
194
- // inherits `ModuleItemInterface` and is assignment-shaped down to
195
- // `pointsPossible`, `dueAt` and `submissionsConnection`. It was being dropped
196
- // for no better reason than not being listed.
206
+ // Inherits `ModuleItemInterface` from `Types::AssignmentType`.
197
207
  PeerReviewSubAssignment: "assignment"
198
208
  };
199
- function pn(e) {
209
+ function wn(e) {
200
210
  const t = e == null ? void 0 : e.__typename;
201
211
  if (!t) return null;
202
- const n = hn[t];
212
+ const n = Tn[t];
203
213
  return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
204
214
  }
205
- const In = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
206
- function bn(e) {
215
+ const Pn = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
216
+ function En(e) {
207
217
  if (!e) return null;
208
- const t = In.exec(e);
218
+ const t = Pn.exec(e);
209
219
  if (!t) return null;
210
- const [, n, s, r, i, u] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(i ?? 0) + Number(u ?? 0) / 60;
211
- return Math.round(a);
220
+ const [, n, s, r, o, l] = t, u = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(o ?? 0) + Number(l ?? 0) / 60;
221
+ return Math.round(u);
212
222
  }
213
- const Mn = /* @__PURE__ */ new Set([
223
+ const Cn = /* @__PURE__ */ new Set([
214
224
  "must_view",
215
225
  "must_mark_done",
216
226
  "must_contribute",
@@ -218,37 +228,37 @@ const Mn = /* @__PURE__ */ new Set([
218
228
  "min_score",
219
229
  "min_percentage"
220
230
  ]);
221
- function Sn(e) {
222
- return Mn.has(e) ? e : "unknown";
231
+ function xn(e) {
232
+ return Cn.has(e) ? e : "unknown";
223
233
  }
224
- function yn(e) {
234
+ function Ln(e) {
225
235
  return {
226
236
  itemId: String(e.id),
227
- type: Sn(e.type),
237
+ type: xn(e.type),
228
238
  minScore: e.minScore ?? null,
229
239
  minPercentage: e.minPercentage ?? null
230
240
  };
231
241
  }
232
- function ut(e) {
242
+ function gt(e) {
233
243
  return {
234
244
  hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
235
245
  endCursor: (e == null ? void 0 : e.endCursor) ?? null
236
246
  };
237
247
  }
238
- const _n = /* @__PURE__ */ new Set(["graded"]), Tn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), wn = /* @__PURE__ */ new Set(["graded", "excused"]);
239
- function ct(e) {
248
+ const An = /* @__PURE__ */ new Set(["graded"]), vn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), kn = /* @__PURE__ */ new Set(["graded"]);
249
+ function pt(e) {
240
250
  var t;
241
251
  for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
242
252
  if (n) return n;
243
253
  return null;
244
254
  }
245
- function dt(e, t) {
255
+ function ft(e, t) {
246
256
  if (!e) return;
247
257
  const n = new Map(t.map((r) => [r.itemId, r.type])), s = /* @__PURE__ */ new Set();
248
258
  for (const r of e.requirementsMet ?? []) {
249
259
  if (!r) continue;
250
- const i = String(r.id);
251
- n.get(i) === r.type && s.add(i);
260
+ const o = String(r.id);
261
+ n.get(o) === r.type && s.add(o);
252
262
  }
253
263
  return {
254
264
  locked: e.locked === !0 || e.workflowState === "locked",
@@ -258,131 +268,134 @@ function dt(e, t) {
258
268
  requirementsMetItemIds: s
259
269
  };
260
270
  }
261
- function Pn(e, t, n) {
271
+ function Nn(e, t, n, s = !0) {
262
272
  if (n.locked) return "locked";
263
- const s = ct(e);
264
- if (s) {
265
- if (s.missing === !0) return "missing";
266
- if (_n.has(s.state ?? "") || wn.has(s.gradingStatus ?? ""))
273
+ const r = pt(e);
274
+ if (r) {
275
+ if (r.gradingStatus === "excused") return "excused";
276
+ if (r.missing === !0) return "missing";
277
+ if (An.has(r.state ?? "") || kn.has(r.gradingStatus ?? ""))
267
278
  return "graded";
268
- if (s.submittedAt != null || Tn.has(s.state ?? ""))
279
+ if (r.submittedAt != null || vn.has(r.state ?? ""))
269
280
  return "submitted";
270
- if ((s.attempt ?? 0) > 0) return "in_progress";
281
+ if ((r.attempt ?? 0) > 0) return "in_progress";
271
282
  }
272
- return n.requirementsMetItemIds.has(t) ? "in_progress" : "not_started";
283
+ return n.requirementsMetItemIds.has(t) ? s ? "complete" : "in_progress" : "not_started";
273
284
  }
274
- const En = (e) => e.pointsPossible != null;
275
- function xn(e, t, n, s) {
285
+ const Dn = (e) => e.pointsPossible != null;
286
+ function qn(e, t, n, s) {
276
287
  if (e.locked) return "locked";
277
288
  if (t > 0 && !e.completed) return "missing";
278
289
  if (e.completed) {
279
- const r = (s ?? []).filter(En);
280
- return r.length > 0 && r.every((u) => u.status === "graded") ? "all_graded" : "all_submitted";
290
+ const r = (s ?? []).filter((l) => Dn(l) && l.status !== "excused");
291
+ return r.length > 0 && r.every((l) => l.status === "graded") ? "all_graded" : "all_submitted";
281
292
  }
282
293
  return e.started || n > 0 ? "in_progress" : "not_started";
283
294
  }
284
- function Cn(e, t, n, s) {
285
- var a, c;
295
+ function Rn(e, t, n, s) {
296
+ var u, c;
286
297
  if (!n) return;
287
- const r = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, r), u = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0;
298
+ const r = e.requirementCount ?? t.length, o = Math.min(n.requirementsMetItemIds.size, r), l = ((u = e.submissionStatistics) == null ? void 0 : u.missingAssignmentCount) ?? 0;
288
299
  return {
289
- status: xn(n, u, i, s),
290
- requirementsMet: i,
300
+ status: qn(n, l, o, s),
301
+ requirementsMet: o,
291
302
  requirementCount: r,
292
- percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
303
+ percentComplete: r > 0 ? Math.round(o / r * 100) : 0,
293
304
  latestDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.latestDueAt) ?? null,
294
- missingCount: u
305
+ missingCount: l
295
306
  };
296
307
  }
297
- function Ln(e, t, n, s = {}, r) {
298
- var c, g, l;
299
- const i = String(e._id), u = pn(e.content);
300
- if (!u)
301
- return fn(s, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
302
- const a = ct(e.content);
308
+ function Fn(e, t, n, s = {}, r) {
309
+ var c, g, a;
310
+ const o = String(e._id), l = wn(e.content);
311
+ if (!l)
312
+ return _n(s, { id: o, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
313
+ const u = pt(e.content);
303
314
  return {
304
- id: i,
315
+ id: o,
305
316
  moduleId: t,
306
317
  title: e.title ?? "",
307
- type: u,
318
+ type: l,
308
319
  position: e.position ?? 0,
309
320
  indent: e.indent ?? 0,
310
- published: at(e.published, "moduleItem", i),
321
+ published: mt(e.published, "moduleItem", o),
311
322
  url: e.url ?? null,
312
323
  newTab: e.newTab ?? !1,
313
- completionRequirement: n.get(i) ?? null,
314
- dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
315
- status: r ? Pn(e.content, i, r) : void 0,
316
- pointsPossible: ((l = e.content) == null ? void 0 : l.pointsPossible) ?? null,
324
+ completionRequirement: n.get(o) ?? null,
325
+ dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
326
+ status: r ? Nn(e.content, o, r, s.submissionsIncluded ?? !0) : void 0,
327
+ pointsPossible: ((a = e.content) == null ? void 0 : a.pointsPossible) ?? null,
317
328
  // Career-only, so it rides in `extensions` rather than widening the shared
318
329
  // model. Absent entirely for a Canvas LMS item, which is every item here.
319
- extensions: it(
330
+ extensions: ct(
320
331
  void 0,
321
- bn(e.estimatedDuration)
332
+ En(e.estimatedDuration)
322
333
  )
323
334
  };
324
335
  }
325
- function mt(e, t, n, s, r) {
326
- const i = [];
327
- for (const u of e ?? []) {
328
- if (!u) continue;
329
- const a = Ln(
330
- u,
336
+ function ht(e, t, n, s, r) {
337
+ const o = [];
338
+ for (const l of e ?? []) {
339
+ if (!l) continue;
340
+ const u = Fn(
341
+ l,
331
342
  t,
332
343
  n,
333
344
  s,
334
345
  r
335
346
  );
336
- a && i.push(a);
347
+ u && o.push(u);
337
348
  }
338
- return i;
349
+ return o;
339
350
  }
340
- function gt(e) {
351
+ function bt(e) {
341
352
  const t = [], n = /* @__PURE__ */ new Map();
342
353
  for (const s of e ?? []) {
343
354
  if (!s) continue;
344
- const r = yn(s);
355
+ const r = Ln(s);
345
356
  t.push(r), n.set(r.itemId, r);
346
357
  }
347
358
  return { list: t, byItemId: n };
348
359
  }
349
- function An(e, t = {}) {
360
+ function On(e, t = {}) {
350
361
  var g;
351
362
  const n = String(e._id);
352
363
  if (e.moduleItemsTotalCount == null)
353
- throw new lt("module", n, "moduleItemsTotalCount");
354
- const { list: s, byItemId: r } = gt(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((g = i.pageInfo) != null && g.hasNextPage), a = dt(e.progression, s), c = u ? mt(i.nodes, n, r, t, a) : void 0;
364
+ throw new dt("module", n, "moduleItemsTotalCount");
365
+ const { list: s, byItemId: r } = bt(e.completionRequirements), o = e.moduleItemsConnection, l = o != null && !((g = o.pageInfo) != null && g.hasNextPage), u = ft(e.progression, s), c = l ? ht(o.nodes, n, r, t, u) : void 0;
355
366
  return {
356
367
  id: n,
357
368
  name: e.name ?? "",
358
369
  position: e.position ?? 0,
359
- published: at(e.published, "module", n),
370
+ published: mt(e.published, "module", n),
360
371
  itemCount: e.moduleItemsTotalCount,
361
372
  items: c,
362
373
  unlockAt: e.unlockAt ?? null,
363
- prerequisiteModuleIds: (e.prerequisites ?? []).filter((l) => l != null).map((l) => String(l.id)),
374
+ prerequisiteModules: (e.prerequisites ?? []).filter(
375
+ (a) => a != null
376
+ ).map((a) => ({ id: String(a.id), name: a.name ?? "" })),
364
377
  requirementCount: e.requirementCount ?? null,
365
378
  requireSequentialProgress: e.requireSequentialProgress ?? !1,
366
379
  completionRequirements: s,
367
380
  // Derived after the items so `all_graded` can see them when they are inline.
368
- progress: Cn(e, s, a, c)
381
+ progress: Rn(e, s, u, c)
369
382
  };
370
383
  }
371
- function vn(e, t = {}) {
384
+ function Un(e, t = {}) {
372
385
  var r;
373
386
  const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, s = [];
374
- for (const i of (n == null ? void 0 : n.nodes) ?? [])
375
- i && s.push(An(i, t));
376
- return { modules: s, pageInfo: ut(n == null ? void 0 : n.pageInfo) };
387
+ for (const o of (n == null ? void 0 : n.nodes) ?? [])
388
+ o && s.push(On(o, t));
389
+ return { modules: s, pageInfo: gt(n == null ? void 0 : n.pageInfo) };
377
390
  }
378
- function Nn(e, t, n = {}) {
379
- const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = gt(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = dt(s == null ? void 0 : s.progression, r);
391
+ function zn(e, t, n = {}) {
392
+ const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: o } = bt(s == null ? void 0 : s.completionRequirements), l = s == null ? void 0 : s.moduleItemsConnection, u = ft(s == null ? void 0 : s.progression, r);
380
393
  return {
381
- items: mt(u == null ? void 0 : u.nodes, t, i, n, a),
382
- pageInfo: ut(u == null ? void 0 : u.pageInfo)
394
+ items: ht(l == null ? void 0 : l.nodes, t, o, n, u),
395
+ pageInfo: gt(l == null ? void 0 : l.pageInfo)
383
396
  };
384
397
  }
385
- const Dn = ee`
398
+ const $n = oe`
386
399
  fragment PlatformModulesSubmissionFields on Submission {
387
400
  _id
388
401
  state
@@ -392,7 +405,7 @@ const Dn = ee`
392
405
  missing
393
406
  cachedDueDate
394
407
  }
395
- `, ft = ee`
408
+ `, It = oe`
396
409
  fragment PlatformModulesItemFields on ModuleItem {
397
410
  _id
398
411
  title
@@ -439,8 +452,8 @@ const Dn = ee`
439
452
  }
440
453
  }
441
454
  }
442
- ${Dn}
443
- `, ht = ee`
455
+ ${$n}
456
+ `, Mt = oe`
444
457
  fragment PlatformModulesProgressionFields on ModuleProgression {
445
458
  workflowState
446
459
  completed
@@ -453,7 +466,7 @@ const Dn = ee`
453
466
  minPercentage
454
467
  }
455
468
  }
456
- `, kn = ee`
469
+ `, Bn = oe`
457
470
  query PlatformModulesGetModules(
458
471
  $courseId: ID!
459
472
  $first: Int!
@@ -477,6 +490,7 @@ const Dn = ee`
477
490
  requireSequentialProgress
478
491
  prerequisites {
479
492
  id
493
+ name
480
494
  }
481
495
  completionRequirements {
482
496
  id
@@ -509,9 +523,9 @@ const Dn = ee`
509
523
  }
510
524
  }
511
525
  }
512
- ${ft}
513
- ${ht}
514
- `, qn = ee`
526
+ ${It}
527
+ ${Mt}
528
+ `, Gn = oe`
515
529
  query PlatformModulesGetModuleItems(
516
530
  $moduleId: ID!
517
531
  $first: Int!
@@ -542,85 +556,83 @@ const Dn = ee`
542
556
  }
543
557
  }
544
558
  }
545
- ${ft}
546
- ${ht}
559
+ ${It}
560
+ ${Mt}
547
561
  `;
548
- function pt() {
562
+ function St() {
549
563
  return new DOMException("The operation was aborted.", "AbortError");
550
564
  }
551
- function ue(e) {
552
- if (e != null && e.aborted) throw pt();
565
+ function pe(e) {
566
+ if (e != null && e.aborted) throw St();
553
567
  }
554
- function Ae(e, t) {
568
+ function Ne(e, t) {
555
569
  return t ? new Promise((n, s) => {
556
- const r = () => s(pt());
570
+ const r = () => s(St());
557
571
  t.addEventListener("abort", r, { once: !0 }), e.then(n, s).finally(() => t.removeEventListener("abort", r));
558
572
  }) : e;
559
573
  }
560
- function Ho({
574
+ function yi({
561
575
  executeQuery: e,
562
- inlineItemLimit: t = Se,
563
- nodeBudget: n = we,
576
+ inlineItemLimit: t = we,
577
+ nodeBudget: n = Le,
564
578
  onUnsupportedItem: s,
565
579
  studentId: r,
566
- validate: i = !0
580
+ validate: o = !0
567
581
  }) {
568
- const u = { onUnsupportedItem: s }, a = r != null;
582
+ const l = r != null, u = { onUnsupportedItem: s, submissionsIncluded: l };
569
583
  return {
570
- // Declared so `resolveItemsMode` bounds the query by *this* transport's
571
- // limit rather than assuming one. @see ModulesDataAdapter.inlineNodeBudget
572
584
  inlineNodeBudget: n,
573
585
  async listModules({
574
586
  courseId: c,
575
587
  cursor: g,
576
- pageSize: l,
577
- includeItems: m,
578
- inlineItemsFirst: M,
579
- inlineFirst: p,
580
- signal: f
588
+ pageSize: a,
589
+ includeItems: d,
590
+ inlineItemsFirst: h,
591
+ inlineFirst: I,
592
+ signal: p
581
593
  }) {
582
- ue(f);
583
- const h = m ? Math.min(p ?? l, l) : l, P = Math.min(M ?? t, t), C = Math.max(1, Math.min(P, Math.floor(n / h))), v = await Ae(
584
- e(kn, {
594
+ pe(p);
595
+ const f = d ? Math.min(I ?? a, a) : a, w = Math.min(h ?? t, t), L = Math.max(1, Math.min(w, Math.floor(n / f))), A = await Ne(
596
+ e(Bn, {
585
597
  courseId: c,
586
- first: h,
598
+ first: f,
587
599
  // Pass through what the caller was given; never derive an offset.
588
600
  after: g ?? null,
589
- includeItems: m,
590
- itemsFirst: C,
591
- includeSubmissions: a,
601
+ includeItems: d,
602
+ itemsFirst: L,
603
+ includeSubmissions: l,
592
604
  studentId: r ?? null
593
605
  }),
594
- f
606
+ p
595
607
  );
596
- ue(f);
597
- const A = vn(v, u);
598
- return i ? an.parse(A) : A;
608
+ pe(p);
609
+ const P = Un(A, u);
610
+ return o ? hn.parse(P) : P;
599
611
  },
600
612
  async listModuleItems({
601
613
  moduleId: c,
602
614
  cursor: g,
603
- pageSize: l,
604
- signal: m
615
+ pageSize: a,
616
+ signal: d
605
617
  }) {
606
- ue(m);
607
- const M = await Ae(
608
- e(qn, {
618
+ pe(d);
619
+ const h = await Ne(
620
+ e(Gn, {
609
621
  moduleId: c,
610
- first: l,
622
+ first: a,
611
623
  after: g ?? null,
612
- includeSubmissions: a,
624
+ includeSubmissions: l,
613
625
  studentId: r ?? null
614
626
  }),
615
- m
627
+ d
616
628
  );
617
- ue(m);
618
- const p = Nn(M, c, u);
619
- return i ? un.parse(p) : p;
629
+ pe(d);
630
+ const I = zn(h, c, u);
631
+ return o ? bn.parse(I) : I;
620
632
  }
621
633
  };
622
634
  }
623
- const he = {
635
+ const Me = {
624
636
  formatters: {},
625
637
  itemTypes: {},
626
638
  itemStatuses: {},
@@ -630,242 +642,240 @@ const he = {
630
642
  itemActions: {},
631
643
  navigation: {}
632
644
  };
633
- Object.freeze(he);
634
- for (const e of Object.values(he))
645
+ Object.freeze(Me);
646
+ for (const e of Object.values(Me))
635
647
  Object.freeze(e);
636
- const It = Be(null);
637
- function Ko({ value: e, children: t }) {
638
- return /* @__PURE__ */ o(It.Provider, { value: e, children: t });
648
+ const yt = Ye(null);
649
+ function _i({ value: e, children: t }) {
650
+ return /* @__PURE__ */ i(yt.Provider, { value: e, children: t });
639
651
  }
640
- function Vo() {
641
- return Ge(It) ?? he;
652
+ function Ti() {
653
+ return Qe(yt) ?? Me;
642
654
  }
643
- const ye = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
644
- function ge(e, t) {
655
+ const Pe = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
656
+ function be(e, t) {
645
657
  const n = Object.entries(t ?? {}).filter(([, s]) => s !== void 0);
646
658
  return { ...e, ...Object.fromEntries(n) };
647
659
  }
648
- function Y(e, t = {}) {
660
+ function W(e, t = {}) {
649
661
  const n = Object.keys(e).map((r) => [
650
662
  r,
651
- ge(e[r], ye(t, r) ? t[r] : void 0)
652
- ]), s = Object.keys(t).filter((r) => !ye(e, r)).sort().map((r) => [r, ge({}, t[r])]);
663
+ be(e[r], Pe(t, r) ? t[r] : void 0)
664
+ ]), s = Object.keys(t).filter((r) => !Pe(e, r)).sort().map((r) => [r, be({}, t[r])]);
653
665
  return Object.fromEntries([...n, ...s]);
654
666
  }
655
- function Zo(e) {
667
+ function wi(e) {
656
668
  return Object.keys(e).filter((t) => !e[t].hidden).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
657
669
  }
658
- const Rn = d.object({
670
+ const jn = m.object({
659
671
  /** Resolved through `t` at render. */
660
- label: d.string(),
672
+ label: m.string(),
661
673
  /** Sort position, ascending. The base spaces its values (10, 20, 30…) so a host can insert between two built-ins. */
662
- order: d.number(),
674
+ order: m.number(),
663
675
  /** How a host removes an entry. Stays in the resolved registry; `visibleEntries` filters it at read time. */
664
- hidden: d.boolean().optional()
676
+ hidden: m.boolean().optional()
665
677
  });
666
- function Fn(e) {
667
- return d.record(d.string(), e);
668
- }
669
- const W = Fn(Rn.strict()), zn = d.object({
670
- formatters: d.object({}).strict(),
671
- itemTypes: W,
672
- itemStatuses: W,
673
- itemMeta: W,
674
- filters: W,
675
- moduleActions: W,
676
- itemActions: W,
677
- navigation: d.object({}).strict()
678
+ function Wn(e) {
679
+ return m.record(m.string(), e);
680
+ }
681
+ const Y = Wn(jn.strict()), Yn = m.object({
682
+ formatters: m.object({}).strict(),
683
+ itemTypes: Y,
684
+ itemStatuses: Y,
685
+ itemMeta: Y,
686
+ filters: Y,
687
+ moduleActions: Y,
688
+ itemActions: Y,
689
+ navigation: m.object({}).strict()
678
690
  });
679
- function Un(e, t = {}) {
680
- const n = Object.keys(t).filter((r) => !ye(e, r));
691
+ function Qn(e, t = {}) {
692
+ const n = Object.keys(t).filter((r) => !Pe(e, r));
681
693
  if (n.length > 0)
682
694
  throw new Error(
683
695
  `Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
684
696
  );
685
697
  const s = {
686
- formatters: ge(e.formatters, t.formatters),
687
- itemTypes: Y(e.itemTypes, t.itemTypes),
688
- itemStatuses: Y(e.itemStatuses, t.itemStatuses),
689
- itemMeta: Y(e.itemMeta, t.itemMeta),
690
- filters: Y(e.filters, t.filters),
691
- moduleActions: Y(e.moduleActions, t.moduleActions),
692
- itemActions: Y(e.itemActions, t.itemActions),
693
- navigation: ge(e.navigation, t.navigation)
698
+ formatters: be(e.formatters, t.formatters),
699
+ itemTypes: W(e.itemTypes, t.itemTypes),
700
+ itemStatuses: W(e.itemStatuses, t.itemStatuses),
701
+ itemMeta: W(e.itemMeta, t.itemMeta),
702
+ filters: W(e.filters, t.filters),
703
+ moduleActions: W(e.moduleActions, t.moduleActions),
704
+ itemActions: W(e.itemActions, t.itemActions),
705
+ navigation: be(e.navigation, t.navigation)
694
706
  };
695
- return zn.parse(s), s;
707
+ return Yn.parse(s), s;
696
708
  }
697
- function Xo(e = {}) {
698
- return Un(he, e);
709
+ function Pi(e = {}) {
710
+ return Qn(Me, e);
699
711
  }
700
- const Pe = 100, bt = 100, Mt = 100, On = 4, pe = 5 * 60 * 1e3, St = 20, fe = { hasNextPage: !1, endCursor: null }, Q = ["platform-modules"], te = {
712
+ const Ae = 100, _t = 100, Tt = 100, Hn = 4, Se = 5 * 60 * 1e3, wt = 20, Ie = { hasNextPage: !1, endCursor: null }, Q = ["platform-modules"], ie = {
701
713
  all: Q,
702
714
  course: (e) => [...Q, e],
703
715
  list: (e, t = {}) => [...Q, e, "list", t],
704
716
  items: (e, t, n = {}) => [...Q, e, "module", t, "items", n]
705
717
  };
706
- function $n(e) {
718
+ function Kn(e) {
707
719
  return [...Q, e, "list"];
708
720
  }
709
- function yt(e, t) {
721
+ function Pt(e, t) {
710
722
  return [...Q, e, "module", t, "items"];
711
723
  }
712
- function _t(e) {
724
+ function Et(e) {
713
725
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
714
726
  }
715
- function Tt(e) {
727
+ function Ct(e) {
716
728
  const {
717
729
  courseId: t,
718
730
  adapter: n,
719
731
  pageSize: s,
720
732
  includeItems: r,
721
- inlineItemsFirst: i,
722
- inlineFirst: u,
723
- view: a,
733
+ inlineItemsFirst: o,
734
+ inlineFirst: l,
735
+ view: u,
724
736
  staleTime: c,
725
737
  enabled: g
726
738
  } = e;
727
739
  return {
728
- // `inlineItemsFirst` is deliberately NOT in the key. It is derived from the
729
- // probe of this very list, so it cannot vary for a fixed (view, pageSize,
730
- // includeItems) including it would only add a segment that never differs.
731
- queryKey: te.list(t, { view: a, pageSize: s, includeItems: r }),
740
+ // `inlineItemsFirst` is deliberately not in the key: it is derived from the probe of this
741
+ // very list, so it cannot vary for a fixed (view, pageSize, includeItems).
742
+ queryKey: ie.list(t, { view: u, pageSize: s, includeItems: r }),
732
743
  initialPageParam: null,
733
- queryFn: ({ pageParam: l, signal: m }) => n.listModules({
744
+ queryFn: ({ pageParam: a, signal: d }) => n.listModules({
734
745
  courseId: t,
735
- cursor: l,
746
+ cursor: a,
736
747
  pageSize: s,
737
748
  includeItems: r,
738
- inlineItemsFirst: i,
739
- inlineFirst: u,
740
- signal: m
749
+ inlineItemsFirst: o,
750
+ inlineFirst: l,
751
+ signal: d
741
752
  }),
742
- getNextPageParam: _t,
753
+ getNextPageParam: Et,
743
754
  enabled: g,
744
755
  staleTime: c,
745
- // A refetch of an infinite query re-walks every page it has loaded. Doing
746
- // that because someone alt-tabbed is the Canvas behaviour we are replacing.
756
+ // A refetch re-walks every page loaded. Doing that on alt-tab is the behavior we replace.
747
757
  refetchOnWindowFocus: !1
748
758
  };
749
759
  }
750
- function wt(e) {
751
- const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: c } = e;
760
+ function xt(e) {
761
+ const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: o, staleTime: l, enabled: u, limit: c } = e;
752
762
  return {
753
- queryKey: te.items(t, n, { view: i, pageSize: r }),
763
+ queryKey: ie.items(t, n, { view: o, pageSize: r }),
754
764
  initialPageParam: null,
755
- queryFn: ({ pageParam: g, signal: l }) => {
756
- const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: l });
765
+ queryFn: ({ pageParam: g, signal: a }) => {
766
+ const d = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: a });
757
767
  return c ? c(() => {
758
- if (l.aborted)
768
+ if (a.aborted)
759
769
  throw new DOMException("The operation was aborted.", "AbortError");
760
- return m();
761
- }) : m();
770
+ return d();
771
+ }) : d();
762
772
  },
763
- getNextPageParam: _t,
764
- enabled: a,
765
- staleTime: u,
773
+ getNextPageParam: Et,
774
+ enabled: u,
775
+ staleTime: l,
766
776
  refetchOnWindowFocus: !1
767
777
  };
768
778
  }
769
- function Bn(e) {
770
- var P;
779
+ function Zn(e) {
780
+ var w;
771
781
  const {
772
782
  courseId: t,
773
783
  adapter: n,
774
- pageSize: s = Pe,
784
+ pageSize: s = Ae,
775
785
  includeItems: r = !1,
776
- inlineItemsFirst: i,
777
- inlineFirst: u,
778
- view: a,
779
- staleTime: c = pe,
786
+ inlineItemsFirst: o,
787
+ inlineFirst: l,
788
+ view: u,
789
+ staleTime: c = Se,
780
790
  enabled: g = !0
781
- } = e, l = Te(
782
- Tt({
791
+ } = e, a = xe(
792
+ Ct({
783
793
  courseId: t,
784
794
  adapter: n,
785
795
  pageSize: s,
786
796
  includeItems: r,
787
- inlineItemsFirst: i,
788
- inlineFirst: u,
789
- view: a,
797
+ inlineItemsFirst: o,
798
+ inlineFirst: l,
799
+ view: u,
790
800
  staleTime: c,
791
801
  enabled: g
792
802
  })
793
- ), m = (P = l.data) == null ? void 0 : P.pages, M = N(() => (m ?? []).flatMap((C) => C.modules), [m]), p = m && m.length > 0 ? m[m.length - 1].pageInfo : fe, f = l.fetchNextPage, h = D(() => {
794
- f();
795
- }, [f]);
803
+ ), d = (w = a.data) == null ? void 0 : w.pages, h = v(() => (d ?? []).flatMap((L) => L.modules), [d]), I = d && d.length > 0 ? d[d.length - 1].pageInfo : Ie, p = a.fetchNextPage, f = k(() => {
804
+ p();
805
+ }, [p]);
796
806
  return {
797
- modules: M,
798
- pageInfo: p,
799
- hasNextPage: p.hasNextPage,
800
- fetchNextPage: h,
801
- isLoading: l.isLoading,
802
- isFetchingNextPage: l.isFetchingNextPage,
803
- isPending: l.isPending,
804
- error: l.error
807
+ modules: h,
808
+ pageInfo: I,
809
+ hasNextPage: I.hasNextPage,
810
+ fetchNextPage: f,
811
+ isLoading: a.isLoading,
812
+ isFetchingNextPage: a.isFetchingNextPage,
813
+ isPending: a.isPending,
814
+ error: a.error
805
815
  };
806
816
  }
807
- function Jo(e) {
808
- var h;
817
+ function Ei(e) {
818
+ var f;
809
819
  const {
810
820
  courseId: t,
811
821
  moduleId: n,
812
822
  adapter: s,
813
- pageSize: r = bt,
814
- view: i,
815
- enabled: u = !0,
816
- staleTime: a = pe,
823
+ pageSize: r = _t,
824
+ view: o,
825
+ enabled: l = !0,
826
+ staleTime: u = Se,
817
827
  limit: c
818
- } = e, g = Te(
819
- wt({
828
+ } = e, g = xe(
829
+ xt({
820
830
  courseId: t,
821
831
  moduleId: n,
822
832
  adapter: s,
823
833
  pageSize: r,
824
- view: i,
825
- staleTime: a,
826
- enabled: u,
834
+ view: o,
835
+ staleTime: u,
836
+ enabled: l,
827
837
  limit: c
828
838
  })
829
- ), l = (h = g.data) == null ? void 0 : h.pages, m = N(() => (l ?? []).flatMap((P) => P.items), [l]), M = l && l.length > 0 ? l[l.length - 1].pageInfo : fe, p = g.fetchNextPage, f = D(() => {
830
- p();
831
- }, [p]);
839
+ ), a = (f = g.data) == null ? void 0 : f.pages, d = v(() => (a ?? []).flatMap((w) => w.items), [a]), h = a && a.length > 0 ? a[a.length - 1].pageInfo : Ie, I = g.fetchNextPage, p = k(() => {
840
+ I();
841
+ }, [I]);
832
842
  return {
833
- items: m,
834
- pageInfo: M,
835
- hasNextPage: M.hasNextPage,
836
- fetchNextPage: f,
843
+ items: d,
844
+ pageInfo: h,
845
+ hasNextPage: h.hasNextPage,
846
+ fetchNextPage: p,
837
847
  isLoading: g.isLoading,
838
848
  isFetchingNextPage: g.isFetchingNextPage,
839
849
  error: g.error
840
850
  };
841
851
  }
842
- function Gn(e, t, n = we) {
852
+ function Vn(e, t, n = Le) {
843
853
  if (e.pageInfo.hasNextPage) return "onDemand";
844
854
  let s = 0, r = 0;
845
- for (const i of e.modules) {
846
- if (i.itemCount > t) return "onDemand";
847
- s += i.itemCount, i.itemCount > r && (r = i.itemCount);
855
+ for (const o of e.modules) {
856
+ if (o.itemCount > t) return "onDemand";
857
+ s += o.itemCount, o.itemCount > r && (r = o.itemCount);
848
858
  }
849
859
  return s > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
850
860
  }
851
- function jn(e) {
852
- var M;
861
+ function Xn(e) {
862
+ var h;
853
863
  const {
854
864
  courseId: t,
855
865
  adapter: n,
856
866
  mode: s = "auto",
857
- inlineThreshold: r = Mt,
858
- nodeBudget: i = n.inlineNodeBudget ?? we,
859
- pageSize: u = Pe,
860
- view: a,
861
- staleTime: c = pe
862
- } = e, g = s === "auto", l = Te(
863
- Tt({
867
+ inlineThreshold: r = Tt,
868
+ nodeBudget: o = n.inlineNodeBudget ?? Le,
869
+ pageSize: l = Ae,
870
+ view: u,
871
+ staleTime: c = Se
872
+ } = e, g = s === "auto", a = xe(
873
+ Ct({
864
874
  courseId: t,
865
875
  adapter: n,
866
- pageSize: u,
876
+ pageSize: l,
867
877
  includeItems: !1,
868
- view: a,
878
+ view: u,
869
879
  staleTime: c,
870
880
  enabled: g
871
881
  })
@@ -878,393 +888,437 @@ function jn(e) {
878
888
  error: null,
879
889
  inlineShape: null
880
890
  };
881
- if (l.error)
891
+ if (a.error)
882
892
  return {
883
893
  resolvedMode: "onDemand",
884
894
  isResolving: !1,
885
895
  probed: !0,
886
- error: l.error,
896
+ error: a.error,
887
897
  inlineShape: null
888
898
  };
889
- const m = (M = l.data) == null ? void 0 : M.pages[0];
890
- return m ? {
891
- resolvedMode: Gn(m, r, i),
899
+ const d = (h = a.data) == null ? void 0 : h.pages[0];
900
+ return d ? {
901
+ resolvedMode: Vn(d, r, o),
892
902
  isResolving: !1,
893
903
  probed: !0,
894
904
  error: null,
895
- inlineShape: Yn(m)
905
+ inlineShape: Jn(d)
896
906
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
897
907
  }
898
- function Yn(e) {
908
+ function Jn(e) {
899
909
  let t = 1;
900
910
  for (const n of e.modules)
901
911
  n.itemCount > t && (t = n.itemCount);
902
912
  return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
903
913
  }
904
- const ve = "\0", Wn = /* @__PURE__ */ new Map();
905
- function Qn(e, t, n = St) {
906
- const s = We(), r = $(/* @__PURE__ */ new Map()), [i, u] = Z(Wn), a = e.join(ve), c = N(() => a === "" ? [] : a.split(ve), [a]);
907
- de(() => {
908
- const l = r.current, m = () => {
909
- u((f) => {
910
- const h = /* @__PURE__ */ new Map();
911
- let P = f.size !== l.size;
912
- for (const [C, v] of l) {
913
- const A = v.getCurrentResult();
914
- h.set(C, A), !P && f.get(C) !== A && (P = !0);
914
+ const De = "\0", es = /* @__PURE__ */ new Map();
915
+ function ts(e, t, n = wt) {
916
+ const s = Ze(), r = O(/* @__PURE__ */ new Map()), [o, l] = te(es), u = e.join(De), c = v(() => u === "" ? [] : u.split(De), [u]);
917
+ he(() => {
918
+ const a = r.current, d = () => {
919
+ l((p) => {
920
+ const f = /* @__PURE__ */ new Map();
921
+ let w = p.size !== a.size;
922
+ for (const [L, A] of a) {
923
+ const P = A.getCurrentResult();
924
+ f.set(L, P), !w && p.get(L) !== P && (w = !0);
915
925
  }
916
- return P ? h : f;
926
+ return w ? f : p;
917
927
  });
918
- }, M = new Set(c);
919
- for (const f of c) {
920
- if (l.has(f)) continue;
921
- const h = new Rt(
928
+ }, h = new Set(c);
929
+ for (const p of c) {
930
+ if (a.has(p)) continue;
931
+ const f = new Bt(
922
932
  s,
923
- t(f, !0)
933
+ t(p, !0)
924
934
  );
925
- l.set(f, h), h.subscribe(m);
935
+ a.set(p, f), f.subscribe(d);
926
936
  }
927
- for (const [f, h] of l)
928
- h.setOptions(t(f, M.has(f)));
929
- for (const f of c) {
930
- const h = l.get(f);
931
- h && (l.delete(f), l.set(f, h));
937
+ for (const [p, f] of a)
938
+ f.setOptions(t(p, h.has(p)));
939
+ for (const p of c) {
940
+ const f = a.get(p);
941
+ f && (a.delete(p), a.set(p, f));
932
942
  }
933
- let p = l.size - M.size;
934
- if (p > n)
935
- for (const [f, h] of l) {
936
- if (p <= n) break;
937
- M.has(f) || (h.destroy(), l.delete(f), p -= 1);
943
+ let I = a.size - h.size;
944
+ if (I > n)
945
+ for (const [p, f] of a) {
946
+ if (I <= n) break;
947
+ h.has(p) || (f.destroy(), a.delete(p), I -= 1);
938
948
  }
939
- m();
940
- }, [s, t, c, n]), de(() => {
941
- const l = r.current;
949
+ d();
950
+ }, [s, t, c, n]), he(() => {
951
+ const a = r.current;
942
952
  return () => {
943
- for (const m of l.values()) m.destroy();
944
- l.clear();
953
+ for (const d of a.values()) d.destroy();
954
+ a.clear();
945
955
  };
946
956
  }, []);
947
- const g = D((l) => {
948
- var m;
949
- (m = r.current.get(l)) == null || m.fetchNextPage();
957
+ const g = k((a) => {
958
+ var d;
959
+ (d = r.current.get(a)) == null || d.fetchNextPage();
950
960
  }, []);
951
- return { results: i, fetchNextPage: g };
961
+ return { results: o, fetchNextPage: g };
952
962
  }
953
- const Hn = [], Kn = () => {
963
+ const ns = [], ss = () => {
954
964
  };
955
- function ei(e) {
956
- var G, le;
965
+ function Ci(e) {
966
+ var J, $;
957
967
  const {
958
968
  courseId: t,
959
969
  adapter: n,
960
970
  view: s,
961
971
  itemsMode: r = "auto",
962
- inlineThreshold: i = Mt,
963
- pageSize: u = Pe,
964
- itemPageSize: a = bt,
965
- itemConcurrency: c = On,
966
- retainCollapsedLimit: g = St,
967
- staleTime: l = pe,
968
- initialExpandedModuleIds: m
969
- } = e, M = We(), p = jn({
972
+ inlineThreshold: o = Tt,
973
+ pageSize: l = Ae,
974
+ itemPageSize: u = _t,
975
+ itemConcurrency: c = Hn,
976
+ retainCollapsedLimit: g = wt,
977
+ staleTime: a = Se,
978
+ initialExpandedModuleIds: d
979
+ } = e, h = Ze(), I = Xn({
970
980
  courseId: t,
971
981
  adapter: n,
972
982
  mode: r,
973
- inlineThreshold: i,
974
- pageSize: u,
983
+ inlineThreshold: o,
984
+ pageSize: l,
975
985
  view: s,
976
- staleTime: l
977
- }), f = p.resolvedMode, h = Bn({
986
+ staleTime: a
987
+ }), p = I.resolvedMode, f = Zn({
978
988
  courseId: t,
979
989
  adapter: n,
980
- pageSize: u,
990
+ pageSize: l,
981
991
  view: s,
982
- staleTime: l,
983
- includeItems: f === "inline",
984
- // Measured by the probe, not assumed. Canvas charges GraphQL complexity on
985
- // the requested shape, so asking for the ceiling rejects the query outright
986
- // even on a tiny course. @see UseItemsModeResult.inlineShape
987
- inlineItemsFirst: (G = p.inlineShape) == null ? void 0 : G.maxItemCount,
988
- // Both axes, not just one: the budget is charged on the product, so asking
989
- // for 100 modules when page 1 held 6 is what forces `inlineItemsFirst` down.
990
- inlineFirst: (le = p.inlineShape) == null ? void 0 : le.moduleCount,
991
- enabled: f !== null
992
- }), [P, C] = Z(
993
- () => m ?? []
994
- ), v = N(() => {
992
+ staleTime: a,
993
+ includeItems: p === "inline",
994
+ // Measured, not assumed: Canvas charges complexity on the requested shape, so asking
995
+ // for the ceiling is rejected even on a tiny course. @see UseItemsModeResult.inlineShape
996
+ inlineItemsFirst: (J = I.inlineShape) == null ? void 0 : J.maxItemCount,
997
+ inlineFirst: ($ = I.inlineShape) == null ? void 0 : $.moduleCount,
998
+ enabled: p !== null
999
+ }), [w, L] = te(
1000
+ () => d ?? []
1001
+ ), A = v(() => {
995
1002
  const S = /* @__PURE__ */ new Map();
996
- for (const I of h.modules) S.set(I.id, I);
1003
+ for (const b of f.modules) S.set(b.id, b);
997
1004
  return S;
998
- }, [h.modules]), A = N(
999
- () => P.filter((S) => {
1000
- const I = v.get(S);
1001
- return I !== void 0 && I.items === void 0;
1005
+ }, [f.modules]), P = v(
1006
+ () => w.filter((S) => {
1007
+ const b = A.get(S);
1008
+ return b !== void 0 && b.items === void 0;
1002
1009
  }),
1003
- [P, v]
1004
- ), se = N(() => new Set(A), [A]), re = N(() => Ft(c), [c]), E = D(
1005
- (S, I) => wt({
1010
+ [w, A]
1011
+ ), ae = v(() => new Set(P), [P]), ue = v(() => Gt(c), [c]), U = k(
1012
+ (S, b) => xt({
1006
1013
  courseId: t,
1007
1014
  moduleId: S,
1008
1015
  adapter: n,
1009
- pageSize: a,
1016
+ pageSize: u,
1010
1017
  view: s,
1011
- staleTime: l,
1012
- enabled: I,
1013
- limit: re
1018
+ staleTime: a,
1019
+ enabled: b,
1020
+ limit: ue
1014
1021
  }),
1015
- [t, n, a, s, l, re]
1016
- ), F = Qn(A, E, g), H = F.fetchNextPage, q = $(/* @__PURE__ */ new Map()), K = D(
1022
+ [t, n, u, s, a, ue]
1023
+ ), z = ts(P, U, g), R = z.fetchNextPage, ce = O(/* @__PURE__ */ new Map()), K = k(
1017
1024
  (S) => {
1018
- let I = q.current.get(S);
1019
- return I || (I = () => H(S), q.current.set(S, I)), I;
1025
+ let b = ce.current.get(S);
1026
+ return b || (b = () => R(S), ce.current.set(S, b)), b;
1020
1027
  },
1021
- [H]
1022
- ), z = D((S) => {
1023
- C(
1024
- (I) => I.includes(S) ? I : [...I, S]
1028
+ [R]
1029
+ ), Z = k((S) => {
1030
+ L(
1031
+ (b) => b.includes(S) ? b : [...b, S]
1025
1032
  );
1026
- }, []), B = D(
1033
+ }, []), V = k(
1027
1034
  (S) => {
1028
- C((I) => I.filter((x) => x !== S)), M.cancelQueries({ queryKey: yt(t, S) });
1035
+ L((b) => b.filter((C) => C !== S)), h.cancelQueries({ queryKey: Pt(t, S) });
1029
1036
  },
1030
- [M, t]
1031
- ), V = $(P);
1032
- V.current = P;
1033
- const oe = D(
1037
+ [h, t]
1038
+ ), de = O(w);
1039
+ de.current = w;
1040
+ const _e = k(
1034
1041
  (S) => {
1035
- V.current.includes(S) ? B(S) : z(S);
1042
+ de.current.includes(S) ? V(S) : Z(S);
1036
1043
  },
1037
- [B, z]
1038
- ), U = F.results, ie = $(/* @__PURE__ */ new Map()), O = D(
1044
+ [V, Z]
1045
+ ), E = z.results, X = O(/* @__PURE__ */ new Map()), me = k(
1039
1046
  (S) => {
1040
- var xe;
1041
- const I = v.get(S), x = U.get(S), w = se.has(S), L = ie.current.get(S);
1042
- if (L && L.items === (I == null ? void 0 : I.items) && L.result === x && L.active === w)
1043
- return L.value;
1044
- const j = (ae) => (ie.current.set(S, { items: I == null ? void 0 : I.items, result: x, active: w, value: ae }), ae);
1045
- if ((I == null ? void 0 : I.items) !== void 0)
1046
- return j({
1047
- items: I.items,
1048
- pageInfo: fe,
1047
+ var ge;
1048
+ const b = A.get(S), C = E.get(S), B = ae.has(S), D = X.current.get(S);
1049
+ if (D && D.items === (b == null ? void 0 : b.items) && D.result === C && D.active === B)
1050
+ return D.value;
1051
+ const F = (j) => (X.current.set(S, { items: b == null ? void 0 : b.items, result: C, active: B, value: j }), j);
1052
+ if ((b == null ? void 0 : b.items) !== void 0)
1053
+ return F({
1054
+ items: b.items,
1055
+ pageInfo: Ie,
1049
1056
  hasNextPage: !1,
1050
- fetchNextPage: Kn,
1057
+ fetchNextPage: ss,
1051
1058
  isLoading: !1,
1052
1059
  isFetchingNextPage: !1,
1053
1060
  error: null,
1054
1061
  source: "inline"
1055
1062
  });
1056
- const R = (xe = x == null ? void 0 : x.data) == null ? void 0 : xe.pages, qt = R ? R.flatMap((ae) => ae.items) : Hn, Ee = R && R.length > 0 ? R[R.length - 1].pageInfo : fe;
1057
- return j({
1058
- items: qt,
1059
- pageInfo: Ee,
1060
- hasNextPage: Ee.hasNextPage,
1063
+ const q = (ge = C == null ? void 0 : C.data) == null ? void 0 : ge.pages, ee = q ? q.flatMap((j) => j.items) : ns, G = q && q.length > 0 ? q[q.length - 1].pageInfo : Ie;
1064
+ return F({
1065
+ items: ee,
1066
+ pageInfo: G,
1067
+ hasNextPage: G.hasNextPage,
1061
1068
  fetchNextPage: K(S),
1062
- // Between the click and the observer being wired up there is one commit
1063
- // with no result yet; report that as loading rather than as "empty".
1064
- isLoading: x ? x.isLoading : w,
1065
- isFetchingNextPage: (x == null ? void 0 : x.isFetchingNextPage) ?? !1,
1066
- error: (x == null ? void 0 : x.error) ?? null,
1069
+ // One commit passes between the click and the observer existing; that is loading,
1070
+ // not empty.
1071
+ isLoading: C ? C.isLoading : B,
1072
+ isFetchingNextPage: (C == null ? void 0 : C.isFetchingNextPage) ?? !1,
1073
+ error: (C == null ? void 0 : C.error) ?? null,
1067
1074
  source: "onDemand"
1068
1075
  });
1069
1076
  },
1070
- [v, U, K, se]
1077
+ [A, E, K, ae]
1071
1078
  );
1072
1079
  return {
1073
- modules: h.modules,
1074
- pageInfo: h.pageInfo,
1075
- hasNextPage: h.hasNextPage,
1076
- fetchNextPage: h.fetchNextPage,
1077
- isLoading: p.isResolving || h.isPending,
1078
- isFetchingNextPage: h.isFetchingNextPage,
1079
- error: h.error ?? p.error,
1080
- itemsMode: f,
1081
- getItems: O,
1082
- expandModule: z,
1083
- collapseModule: B,
1084
- toggleModule: oe,
1085
- expandedModuleIds: P
1080
+ modules: f.modules,
1081
+ pageInfo: f.pageInfo,
1082
+ hasNextPage: f.hasNextPage,
1083
+ fetchNextPage: f.fetchNextPage,
1084
+ isLoading: I.isResolving || f.isPending,
1085
+ isFetchingNextPage: f.isFetchingNextPage,
1086
+ error: f.error ?? I.error,
1087
+ itemsMode: p,
1088
+ getItems: me,
1089
+ expandModule: Z,
1090
+ collapseModule: V,
1091
+ toggleModule: _e,
1092
+ expandedModuleIds: w
1086
1093
  };
1087
1094
  }
1088
- function ti(e, t, n, s) {
1089
- const r = s ? te.items(t, n, s) : yt(t, n);
1095
+ function xi(e, t, n, s) {
1096
+ const r = s ? ie.items(t, n, s) : Pt(t, n);
1090
1097
  return e.invalidateQueries({ queryKey: r });
1091
1098
  }
1092
- function ni(e, t, n) {
1093
- const s = n ? te.list(t, n) : $n(t);
1099
+ function Li(e, t, n) {
1100
+ const s = n ? ie.list(t, n) : Kn(t);
1094
1101
  return e.invalidateQueries({ queryKey: s });
1095
1102
  }
1096
- function si(e, t) {
1097
- return e.invalidateQueries({ queryKey: te.course(t) });
1098
- }
1099
- const Vn = "Course modules", Zn = { one: "%{count} module loaded", other: "%{count} modules loaded" }, Xn = "Search by name", Jn = "Search…", es = "Expand / collapse", ts = "Expand all", ns = "Collapse all", ss = "Search matches module names only — items of collapsed modules are not loaded.", rs = "Modules failed to load: %{message}", os = "Loading modules", is = "This course has no modules.", ls = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, as = "Clear filters", us = "Loading more modules…", cs = "Load more modules (%{count} loaded)", ds = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, ms = "Filter", gs = "%{label} (%{count})", fs = "All", hs = "In progress", ps = "Complete", Is = "Due this week", bs = "Missing", Ms = "Locked until prerequisites are met", Ss = "%{name} progress", ys = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, _s = "Items failed to load: %{message}", Ts = "Loading items", ws = "Loading…", Ps = "No items.", Es = "Loading more items…", xs = "Load more items (%{loaded} of %{count} loaded)", Cs = "(unpublished)", Ls = "Collapse %{name}", As = "Expand %{name}", vs = "Not started", Ns = "In progress", Ds = "All items complete", ks = "All items graded", qs = "Missing", Rs = "Locked", Fs = "Not started", zs = "In progress", Us = "Submitted", Os = "Graded", $s = "Missing", Bs = "Locked", Gs = "Assignment", js = "Quiz", Ys = "Discussion", Ws = "Page", Qs = "File", Hs = "External URL", Ks = "External tool", Vs = "Text header", Zs = "View the item", Xs = "Submit the assignment", Js = "Contribute to the page", er = "Mark as done", tr = "Score at least the minimum", nr = "Score at least %{count}", sr = "Score at least the minimum percentage", rr = "Score at least %{count}%", or = "Complete the requirement", ir = "today, %{time}", lr = "yesterday, %{time}", ar = "tomorrow, %{time}", ur = "%{date}, %{time}", cr = "Due %{when}", dr = "Will unlock on %{when}", mr = { one: "%{count} pt", other: "%{count} pts" }, gr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, fr = "%{count} min", hr = "Unpublished", pr = "Untitled item", Ir = "opens in a new window", br = {
1100
- pageTitle: Vn,
1101
- modulesLoadedAnnouncement: Zn,
1102
- moduleSearchLabel: Xn,
1103
- searchPlaceholder: Jn,
1104
- expandCollapseTrigger: es,
1105
- expandAll: ts,
1106
- collapseAll: ns,
1107
- searchScopeHint: ss,
1108
- modulesLoadErrorAlert: rs,
1109
- modulesLoadingSpinnerLabel: os,
1110
- noModulesEmptyState: is,
1111
- filteredEmptyState: ls,
1112
- clearFilters: as,
1113
- loadMoreModulesLoading: us,
1114
- loadMoreModules: cs,
1115
- allModulesLoaded: ds,
1116
- filterGroupLabel: ms,
1117
- filterChipWithCount: gs,
1118
- filterAll: fs,
1119
- filterInProgress: hs,
1120
- filterComplete: ps,
1121
- filterDueThisWeek: Is,
1122
- filterMissing: bs,
1123
- lockedByline: Ms,
1124
- moduleProgressScreenReaderLabel: Ss,
1125
- itemsLoadedAnnouncement: ys,
1126
- itemsLoadErrorAlert: _s,
1127
- itemsLoadingSpinnerLabel: Ts,
1128
- itemsLoadingText: ws,
1129
- noItemsEmptyState: Ps,
1130
- loadMoreItemsLoading: Es,
1131
- loadMoreItems: xs,
1132
- moduleUnpublishedBadge: Cs,
1133
- collapseModule: Ls,
1134
- expandModule: As,
1135
- moduleStatusNotStarted: vs,
1136
- moduleStatusInProgress: Ns,
1137
- moduleStatusAllSubmitted: Ds,
1138
- moduleStatusAllGraded: ks,
1139
- moduleStatusMissing: qs,
1140
- moduleStatusLocked: Rs,
1141
- itemStatusNotStarted: Fs,
1142
- itemStatusInProgress: zs,
1143
- itemStatusSubmitted: Us,
1144
- itemStatusGraded: Os,
1145
- itemStatusMissing: $s,
1146
- itemStatusLocked: Bs,
1147
- itemTypeAssignment: Gs,
1148
- itemTypeQuiz: js,
1149
- itemTypeDiscussion: Ys,
1150
- itemTypePage: Ws,
1151
- itemTypeFile: Qs,
1152
- itemTypeExternalUrl: Hs,
1153
- itemTypeExternalTool: Ks,
1154
- itemTypeSubHeader: Vs,
1155
- requirementMustView: Zs,
1156
- requirementMustSubmit: Xs,
1157
- requirementMustContribute: Js,
1158
- requirementMustMarkDone: er,
1159
- requirementMinScoreUnknown: tr,
1160
- requirementMinScore: nr,
1161
- requirementMinPercentageUnknown: sr,
1162
- requirementMinPercentage: rr,
1163
- requirementUnknown: or,
1164
- dateTimeToday: ir,
1165
- dateTimeYesterday: lr,
1166
- dateTimeTomorrow: ar,
1167
- dateTimeWithDate: ur,
1168
- dueByline: cr,
1169
- unlockByline: dr,
1170
- pointsAbbreviated: mr,
1171
- progressSummary: gr,
1172
- durationMinutes: fr,
1173
- itemUnpublishedLabel: hr,
1174
- itemUntitled: pr,
1175
- opensInNewWindow: Ir
1176
- }, Mr = /%\{(\w+)\}/g, Sr = br, ne = "en-US", yr = /* @__PURE__ */ new Map(), _r = /* @__PURE__ */ new Map();
1177
- function Pt(e, t, n) {
1103
+ function Ai(e, t) {
1104
+ return e.invalidateQueries({ queryKey: ie.course(t) });
1105
+ }
1106
+ const rs = "Course modules", os = { one: "%{count} module loaded", other: "%{count} modules loaded" }, is = "Search by name", ls = "Search…", as = "Expand / collapse", us = "Expand all", cs = "Collapse all", ds = "Search matches module names only — items of collapsed modules are not loaded.", ms = "Modules failed to load: %{message}", gs = "Loading modules", ps = "This course has no modules.", fs = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, hs = "Clear filters", bs = "Loading more modules…", Is = "Load more modules (%{count} loaded)", Ms = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Ss = "Filter", ys = "All", _s = "In progress", Ts = "Complete", ws = "Due this week", Ps = "Missing", Es = "Locked until prerequisites are met", Cs = "%{name} progress", xs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Ls = "Items failed to load: %{message}", As = "Loading items", vs = "Loading…", ks = "No items.", Ns = "Loading more items…", Ds = "Load more items (%{loaded} of %{count} loaded)", qs = "(unpublished)", Rs = "Collapse %{name}", Fs = "Expand %{name}", Os = "Not started", Us = "In progress", zs = "All items complete", $s = "All items graded", Bs = "Missing", Gs = "Locked", js = "Not started", Ws = "In progress", Ys = "Complete", Qs = "Submitted", Hs = "Graded", Ks = "Excused", Zs = "Missing", Vs = "Locked", Xs = "Assignment", Js = "Quiz", er = "Discussion", tr = "Page", nr = "File", sr = "External URL", rr = "External tool", or = "Text header", ir = "View the item", lr = "Submit the assignment", ar = "Contribute to the page", ur = "Mark as done", cr = "Score at least the minimum", dr = "Score at least %{count}", mr = "Score at least the minimum percentage", gr = "Score at least %{count}%", pr = "Complete the requirement", fr = "today, %{time}", hr = "yesterday, %{time}", br = "tomorrow, %{time}", Ir = "%{date}, %{time}", Mr = "%{time} (%{zone})", Sr = "Due %{when}", yr = "Will unlock on %{when}", _r = { one: "%{count} pt", other: "%{count} pts" }, Tr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, wr = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, Pr = "%{count} min", Er = "Unpublished", Cr = "Untitled item", xr = "opens in a new window", Lr = {
1107
+ pageTitle: rs,
1108
+ modulesLoadedAnnouncement: os,
1109
+ moduleSearchLabel: is,
1110
+ searchPlaceholder: ls,
1111
+ expandCollapseTrigger: as,
1112
+ expandAll: us,
1113
+ collapseAll: cs,
1114
+ searchScopeHint: ds,
1115
+ modulesLoadErrorAlert: ms,
1116
+ modulesLoadingSpinnerLabel: gs,
1117
+ noModulesEmptyState: ps,
1118
+ filteredEmptyState: fs,
1119
+ clearFilters: hs,
1120
+ loadMoreModulesLoading: bs,
1121
+ loadMoreModules: Is,
1122
+ allModulesLoaded: Ms,
1123
+ filterGroupLabel: Ss,
1124
+ filterAll: ys,
1125
+ filterInProgress: _s,
1126
+ filterComplete: Ts,
1127
+ filterDueThisWeek: ws,
1128
+ filterMissing: Ps,
1129
+ lockedByline: Es,
1130
+ moduleProgressScreenReaderLabel: Cs,
1131
+ itemsLoadedAnnouncement: xs,
1132
+ itemsLoadErrorAlert: Ls,
1133
+ itemsLoadingSpinnerLabel: As,
1134
+ itemsLoadingText: vs,
1135
+ noItemsEmptyState: ks,
1136
+ loadMoreItemsLoading: Ns,
1137
+ loadMoreItems: Ds,
1138
+ moduleUnpublishedBadge: qs,
1139
+ collapseModule: Rs,
1140
+ expandModule: Fs,
1141
+ moduleStatusNotStarted: Os,
1142
+ moduleStatusInProgress: Us,
1143
+ moduleStatusAllSubmitted: zs,
1144
+ moduleStatusAllGraded: $s,
1145
+ moduleStatusMissing: Bs,
1146
+ moduleStatusLocked: Gs,
1147
+ itemStatusNotStarted: js,
1148
+ itemStatusInProgress: Ws,
1149
+ itemStatusComplete: Ys,
1150
+ itemStatusSubmitted: Qs,
1151
+ itemStatusGraded: Hs,
1152
+ itemStatusExcused: Ks,
1153
+ itemStatusMissing: Zs,
1154
+ itemStatusLocked: Vs,
1155
+ itemTypeAssignment: Xs,
1156
+ itemTypeQuiz: Js,
1157
+ itemTypeDiscussion: er,
1158
+ itemTypePage: tr,
1159
+ itemTypeFile: nr,
1160
+ itemTypeExternalUrl: sr,
1161
+ itemTypeExternalTool: rr,
1162
+ itemTypeSubHeader: or,
1163
+ requirementMustView: ir,
1164
+ requirementMustSubmit: lr,
1165
+ requirementMustContribute: ar,
1166
+ requirementMustMarkDone: ur,
1167
+ requirementMinScoreUnknown: cr,
1168
+ requirementMinScore: dr,
1169
+ requirementMinPercentageUnknown: mr,
1170
+ requirementMinPercentage: gr,
1171
+ requirementUnknown: pr,
1172
+ dateTimeToday: fr,
1173
+ dateTimeYesterday: hr,
1174
+ dateTimeTomorrow: br,
1175
+ dateTimeWithDate: Ir,
1176
+ timeWithZone: Mr,
1177
+ dueByline: Sr,
1178
+ unlockByline: yr,
1179
+ pointsAbbreviated: _r,
1180
+ progressSummary: Tr,
1181
+ progressScreenReaderValue: wr,
1182
+ durationMinutes: Pr,
1183
+ itemUnpublishedLabel: Er,
1184
+ itemUntitled: Cr,
1185
+ opensInNewWindow: xr
1186
+ }, Ar = /%\{(\w+)\}/g, vr = Lr, H = "en-US", kr = /* @__PURE__ */ new Map(), Nr = /* @__PURE__ */ new Map();
1187
+ function Lt(e, t, n) {
1178
1188
  const s = e.get(t);
1179
1189
  if (s) return s;
1180
1190
  const r = n();
1181
1191
  return e.set(t, r), r;
1182
1192
  }
1183
- function Tr(e, t, n) {
1184
- return n ? e.replace(Mr, (s, r) => {
1193
+ function Dr(e, t, n) {
1194
+ return n ? e.replace(Ar, (s, r) => {
1185
1195
  if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
1186
- const i = n[r];
1187
- return typeof i == "number" && Number.isFinite(i) ? Pt(_r, t, () => new Intl.NumberFormat(t)).format(i) : String(i);
1196
+ const o = n[r];
1197
+ return typeof o == "number" && Number.isFinite(o) ? Lt(Nr, t, () => new Intl.NumberFormat(t)).format(o) : String(o);
1188
1198
  }) : e;
1189
1199
  }
1190
- function wr(e, t, n) {
1200
+ function qr(e, t, n) {
1191
1201
  const s = n == null ? void 0 : n.count;
1192
1202
  if (typeof s == "number" && Number.isFinite(s)) {
1193
- const r = Pt(yr, t, () => new Intl.PluralRules(t)).select(s), i = e[r];
1194
- if (typeof i == "string") return i;
1203
+ const r = Lt(kr, t, () => new Intl.PluralRules(t)).select(s), o = e[r];
1204
+ if (typeof o == "string") return o;
1195
1205
  }
1196
1206
  return typeof e.other == "string" ? e.other : void 0;
1197
1207
  }
1198
- function Ne(e, t, n) {
1208
+ function qe(e, t, n) {
1199
1209
  if (typeof e == "string") return e;
1200
1210
  if (e !== null && typeof e == "object")
1201
- return wr(e, t, n);
1211
+ return qr(e, t, n);
1202
1212
  }
1203
- function Pr(e, t, n, s) {
1204
- const r = Ne(e == null ? void 0 : e[t], n, s);
1213
+ function Rr(e, t, n, s) {
1214
+ const r = qe(e == null ? void 0 : e[t], n, s);
1205
1215
  if (typeof r == "string") return r;
1206
- const i = Ne(Sr[t], n, s);
1207
- return typeof i == "string" ? i : t;
1216
+ const o = qe(vr[t], n, s);
1217
+ return typeof o == "string" ? o : t;
1208
1218
  }
1209
- function Et(e, t = ne) {
1210
- return (n, s) => Tr(Pr(e, n, t, s), t, s);
1219
+ function At(e, t = H) {
1220
+ return (n, s) => Dr(Rr(e, n, t, s), t, s);
1211
1221
  }
1212
- const Er = Et(), xr = { t: Er, locale: ne }, xt = Be(null);
1213
- function ri({
1222
+ const Fr = At(), Or = { t: Fr, locale: H }, vt = Ye(null);
1223
+ function vi({
1214
1224
  translations: e,
1215
1225
  locale: t,
1216
- children: n
1226
+ timezone: n,
1227
+ children: s
1217
1228
  }) {
1218
- const s = N(() => {
1219
- const r = t ?? ne;
1220
- return { t: Et(e, r), locale: r };
1221
- }, [e, t]);
1222
- return /* @__PURE__ */ o(xt.Provider, { value: s, children: n });
1223
- }
1224
- function k() {
1225
- return Ge(xt) ?? xr;
1226
- }
1227
- const Cr = 864e5, De = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
1228
- function Lr(e) {
1229
- const t = ke.get(e);
1229
+ const r = v(() => {
1230
+ const o = t ?? H;
1231
+ return { t: At(e, o), locale: o, timezone: n };
1232
+ }, [e, t, n]);
1233
+ return /* @__PURE__ */ i(vt.Provider, { value: r, children: s });
1234
+ }
1235
+ function N() {
1236
+ return Qe(vt) ?? Or;
1237
+ }
1238
+ const Ur = 864e5, zr = "en-US", Re = /* @__PURE__ */ new Map(), Fe = /* @__PURE__ */ new Map();
1239
+ function $r(e) {
1240
+ const t = Fe.get(e);
1230
1241
  if (t) return t;
1231
1242
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
1232
- return ke.set(e, n), n;
1243
+ return Fe.set(e, n), n;
1233
1244
  }
1234
- function Ar(e) {
1235
- const t = De.get(e);
1236
- if (t) return t;
1237
- const n = {
1238
- time: new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }),
1239
- day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric" }),
1240
- dayYear: new Intl.DateTimeFormat(e, { month: "long", day: "numeric", year: "numeric" })
1245
+ function Oe(e, t) {
1246
+ return {
1247
+ time: new Intl.DateTimeFormat(e, {
1248
+ hour: "numeric",
1249
+ minute: "2-digit",
1250
+ timeZone: t
1251
+ }),
1252
+ day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric", timeZone: t }),
1253
+ dayYear: new Intl.DateTimeFormat(e, {
1254
+ month: "long",
1255
+ day: "numeric",
1256
+ year: "numeric",
1257
+ timeZone: t
1258
+ }),
1259
+ zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
1260
+ civilDay: new Intl.DateTimeFormat(zr, {
1261
+ year: "numeric",
1262
+ month: "numeric",
1263
+ day: "numeric",
1264
+ timeZone: t
1265
+ })
1266
+ };
1267
+ }
1268
+ function kt(e, t) {
1269
+ const n = t || void 0, s = `${e}|${n ?? ""}`, r = Re.get(s);
1270
+ if (r) return r;
1271
+ let o;
1272
+ try {
1273
+ o = Oe(e, n);
1274
+ } catch {
1275
+ console.warn(
1276
+ `[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
1277
+ ), o = Oe(e, void 0);
1278
+ }
1279
+ return Re.set(s, o), o;
1280
+ }
1281
+ function Ue(e, t) {
1282
+ return new Date(Ee(e, t)).getUTCFullYear();
1283
+ }
1284
+ function Br(e, t) {
1285
+ var s;
1286
+ const n = (s = e.zone) == null ? void 0 : s.formatToParts(t).find((r) => r.type === "timeZoneName");
1287
+ return (n == null ? void 0 : n.value) ?? null;
1288
+ }
1289
+ function Ee(e, t) {
1290
+ const n = e.civilDay.formatToParts(t), s = (r) => {
1291
+ var o;
1292
+ return Number((o = n.find((l) => l.type === r)) == null ? void 0 : o.value);
1241
1293
  };
1242
- return De.set(e, n), n;
1294
+ return Date.UTC(s("year"), s("month") - 1, s("day"));
1295
+ }
1296
+ function Gr(e, t, n) {
1297
+ return Nt(kt(H, n), e, t);
1243
1298
  }
1244
- function Ct(e, t) {
1245
- const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), s = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
1246
- return Math.round((n - s) / Cr);
1299
+ function Nt(e, t, n) {
1300
+ return Math.round((Ee(e, t) - Ee(e, n)) / Ur);
1247
1301
  }
1248
- function Lt(e, t, n, s = ne) {
1249
- const r = new Date(t);
1250
- if (Number.isNaN(r.getTime())) return t;
1251
- const i = Ar(s), u = i.time.format(r), a = Ct(r, n);
1252
- if (a === 0) return e("dateTimeToday", { time: u });
1253
- if (a === -1) return e("dateTimeYesterday", { time: u });
1254
- if (a === 1) return e("dateTimeTomorrow", { time: u });
1255
- const c = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1256
- return e("dateTimeWithDate", { date: c, time: u });
1302
+ function Dt(e, t, n, { locale: s = H, timezone: r } = {}) {
1303
+ const o = new Date(t);
1304
+ if (Number.isNaN(o.getTime())) return t;
1305
+ const l = kt(s, r), u = Br(l, o), c = l.time.format(o), g = u ? e("timeWithZone", { time: c, zone: u }) : c, a = Nt(l, o, n);
1306
+ if (a === 0) return e("dateTimeToday", { time: g });
1307
+ if (a === -1) return e("dateTimeYesterday", { time: g });
1308
+ if (a === 1) return e("dateTimeTomorrow", { time: g });
1309
+ const h = Ue(l, o) === Ue(l, n) ? l.day.format(o) : l.dayYear.format(o);
1310
+ return e("dateTimeWithDate", { date: h, time: g });
1257
1311
  }
1258
- function At(e, t, n, s) {
1259
- return e("dueByline", { when: Lt(e, t, n, s) });
1312
+ function qt(e, t, n, s = {}) {
1313
+ return e("dueByline", { when: Dt(e, t, n, s) });
1260
1314
  }
1261
- function qe(e, t, n, s) {
1262
- return e("unlockByline", { when: Lt(e, t, n, s) });
1315
+ function ze(e, t, n, s = {}) {
1316
+ return e("unlockByline", { when: Dt(e, t, n, s) });
1263
1317
  }
1264
- function vr(e, t = ne) {
1265
- return !Number.isInteger(e) || e < 1 ? null : Lr(t).format(e);
1318
+ function jr(e, t = H) {
1319
+ return !Number.isInteger(e) || e < 1 ? null : $r(t).format(e);
1266
1320
  }
1267
- function Nr(e, t) {
1321
+ function Wr(e, t) {
1268
1322
  switch (t) {
1269
1323
  case "assignment":
1270
1324
  return e("itemTypeAssignment");
@@ -1284,10 +1338,10 @@ function Nr(e, t) {
1284
1338
  return e("itemTypeSubHeader");
1285
1339
  }
1286
1340
  }
1287
- function Dr(e, t) {
1341
+ function Yr(e, t) {
1288
1342
  return t == null ? null : e("pointsAbbreviated", { count: t });
1289
1343
  }
1290
- function kr(e, t) {
1344
+ function Qr(e, t) {
1291
1345
  switch (t.type) {
1292
1346
  case "must_view":
1293
1347
  return e("requirementMustView");
@@ -1305,17 +1359,20 @@ function kr(e, t) {
1305
1359
  return e("requirementUnknown");
1306
1360
  }
1307
1361
  }
1308
- function qr(e, t, n, s) {
1362
+ function Hr(e, t, n, s) {
1309
1363
  return e("progressSummary", { percent: t, met: n, count: s });
1310
1364
  }
1311
- const Rr = [
1365
+ function Kr(e, t, n, s) {
1366
+ return e("progressScreenReaderValue", { percent: t, met: n, count: s });
1367
+ }
1368
+ const Zr = [
1312
1369
  "all",
1313
1370
  "in_progress",
1314
1371
  "complete",
1315
1372
  "due_this_week",
1316
1373
  "missing"
1317
1374
  ];
1318
- function Fr(e, t) {
1375
+ function Vr(e, t) {
1319
1376
  switch (t) {
1320
1377
  case "all":
1321
1378
  return e("filterAll");
@@ -1329,81 +1386,83 @@ function Fr(e, t) {
1329
1386
  return e("filterMissing");
1330
1387
  }
1331
1388
  }
1332
- const zr = 7;
1333
- function Re(e, t, n) {
1389
+ const Xr = 7;
1390
+ function Jr(e, t, n, s) {
1334
1391
  if (t === "all") return !0;
1335
- const s = e.progress;
1336
- if (!s) return !1;
1392
+ const r = e.progress;
1393
+ if (!r) return !1;
1337
1394
  switch (t) {
1338
1395
  case "in_progress":
1339
- return s.status === "in_progress";
1396
+ return r.status === "in_progress";
1340
1397
  case "complete":
1341
- return s.status === "all_submitted" || s.status === "all_graded";
1398
+ return r.status === "all_submitted" || r.status === "all_graded";
1342
1399
  case "missing":
1343
- return s.missingCount > 0;
1400
+ return r.missingCount > 0;
1344
1401
  case "due_this_week": {
1345
- if (!s.latestDueAt) return !1;
1346
- const r = new Date(s.latestDueAt);
1347
- if (Number.isNaN(r.getTime())) return !1;
1348
- const i = Ct(r, n);
1349
- return i >= 0 && i <= zr;
1402
+ if (!r.latestDueAt) return !1;
1403
+ const o = new Date(r.latestDueAt);
1404
+ if (Number.isNaN(o.getTime())) return !1;
1405
+ const l = Gr(o, n, s);
1406
+ return l >= 0 && l <= Xr;
1350
1407
  }
1351
1408
  default:
1352
1409
  return !0;
1353
1410
  }
1354
1411
  }
1355
- function Fe(e, t, n) {
1412
+ function eo(e, t, n) {
1356
1413
  const s = t.trim().toLocaleLowerCase(n);
1357
1414
  return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
1358
1415
  }
1359
- function Ur({ value: e, onChange: t, counts: n }) {
1360
- const { t: s } = k(), r = je();
1416
+ function to({ value: e, onChange: t }) {
1417
+ const { t: n } = N(), s = He();
1361
1418
  return /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
1362
- /* @__PURE__ */ o(y, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(b, { size: "small", weight: "bold", id: r, children: s("filterGroupLabel") }) }),
1363
- /* @__PURE__ */ o(
1419
+ /* @__PURE__ */ i(y, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ i(M, { size: "medium", weight: "bold", id: s, children: n("filterGroupLabel") }) }),
1420
+ /* @__PURE__ */ i(
1364
1421
  T,
1365
1422
  {
1366
- gap: "x-small",
1423
+ gap: "space4",
1367
1424
  wrap: "wrap",
1368
1425
  as: "div",
1369
1426
  role: "group",
1370
- "aria-labelledby": r,
1427
+ "aria-labelledby": s,
1371
1428
  "data-testid": "filter-chips",
1372
- children: Rr.map((i) => {
1373
- const u = i === e, a = n == null ? void 0 : n[i], c = Fr(s, i);
1374
- return /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1375
- X,
1429
+ children: Zr.map((r) => {
1430
+ const o = r === e;
1431
+ return /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
1432
+ ne,
1376
1433
  {
1377
- size: "small",
1378
- color: u ? "primary" : "secondary",
1379
- "aria-pressed": u,
1380
- onClick: () => t(i),
1381
- "data-testid": `filter-chip-${i}`,
1382
- themeOverride: { borderRadius: "1.5rem" },
1383
- children: a === void 0 ? c : s("filterChipWithCount", { label: c, count: a })
1434
+ size: "medium",
1435
+ color: o ? "primary" : "secondary",
1436
+ "aria-pressed": o,
1437
+ onClick: () => t(r),
1438
+ "data-testid": `filter-chip-${r}`,
1439
+ themeOverride: { borderRadius: "0.5rem" },
1440
+ children: Vr(n, r)
1384
1441
  }
1385
- ) }, i);
1442
+ ) }, r);
1386
1443
  })
1387
1444
  }
1388
1445
  )
1389
1446
  ] });
1390
1447
  }
1391
- const Or = {
1448
+ const no = {
1392
1449
  not_started: {},
1393
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Je, {}) },
1394
- all_submitted: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1395
- all_graded: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1396
- missing: { color: "danger", icon: /* @__PURE__ */ o(Xe, {}) },
1397
- locked: { icon: /* @__PURE__ */ o(Ze, {}) }
1398
- }, $r = {
1450
+ in_progress: { color: "info", icon: /* @__PURE__ */ i(st, {}) },
1451
+ all_submitted: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
1452
+ all_graded: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
1453
+ missing: { color: "danger", icon: /* @__PURE__ */ i(nt, {}) },
1454
+ locked: { icon: /* @__PURE__ */ i(tt, {}) }
1455
+ }, so = {
1399
1456
  not_started: {},
1400
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Je, {}) },
1401
- submitted: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1402
- graded: { color: "success", icon: /* @__PURE__ */ o(me, {}) },
1403
- missing: { color: "danger", icon: /* @__PURE__ */ o(Xe, {}) },
1404
- locked: { icon: /* @__PURE__ */ o(Ze, {}) }
1457
+ in_progress: { color: "info", icon: /* @__PURE__ */ i(st, {}) },
1458
+ complete: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
1459
+ submitted: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
1460
+ graded: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
1461
+ excused: {},
1462
+ missing: { color: "danger", icon: /* @__PURE__ */ i(nt, {}) },
1463
+ locked: { icon: /* @__PURE__ */ i(tt, {}) }
1405
1464
  };
1406
- function Br(e, t) {
1465
+ function ro(e, t) {
1407
1466
  switch (t) {
1408
1467
  case "not_started":
1409
1468
  return e("moduleStatusNotStarted");
@@ -1419,67 +1478,71 @@ function Br(e, t) {
1419
1478
  return e("moduleStatusLocked");
1420
1479
  }
1421
1480
  }
1422
- function Gr(e, t) {
1481
+ function oo(e, t) {
1423
1482
  switch (t) {
1424
1483
  case "not_started":
1425
1484
  return e("itemStatusNotStarted");
1426
1485
  case "in_progress":
1427
1486
  return e("itemStatusInProgress");
1487
+ case "complete":
1488
+ return e("itemStatusComplete");
1428
1489
  case "submitted":
1429
1490
  return e("itemStatusSubmitted");
1430
1491
  case "graded":
1431
1492
  return e("itemStatusGraded");
1493
+ case "excused":
1494
+ return e("itemStatusExcused");
1432
1495
  case "missing":
1433
1496
  return e("itemStatusMissing");
1434
1497
  case "locked":
1435
1498
  return e("itemStatusLocked");
1436
1499
  }
1437
1500
  }
1438
- function vt(e, t, n) {
1439
- return /* @__PURE__ */ o(Jt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1501
+ function Rt(e, t, n) {
1502
+ return /* @__PURE__ */ i(on, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
1440
1503
  }
1441
- function jr({ status: e }) {
1442
- const { t } = k();
1443
- return vt(
1444
- Or[e],
1445
- Br(t, e),
1504
+ function io({ status: e }) {
1505
+ const { t } = N();
1506
+ return Rt(
1507
+ no[e],
1508
+ ro(t, e),
1446
1509
  "module-status-pill"
1447
1510
  );
1448
1511
  }
1449
- function Yr({ status: e }) {
1450
- const { t } = k();
1451
- return vt(
1452
- $r[e],
1453
- Gr(t, e),
1512
+ function lo({ status: e }) {
1513
+ const { t } = N();
1514
+ return Rt(
1515
+ so[e],
1516
+ oo(t, e),
1454
1517
  "item-status-pill"
1455
1518
  );
1456
1519
  }
1457
- const Wr = {
1458
- assignment: /* @__PURE__ */ o(Qt, {}),
1459
- quiz: /* @__PURE__ */ o(Wt, {}),
1460
- discussion: /* @__PURE__ */ o(Yt, {}),
1461
- page: /* @__PURE__ */ o(jt, {}),
1462
- file: /* @__PURE__ */ o(Gt, {}),
1463
- external_url: /* @__PURE__ */ o(Bt, {}),
1464
- external_tool: /* @__PURE__ */ o($t, {}),
1465
- sub_header: /* @__PURE__ */ o(Ot, {})
1466
- }, Qr = 1.75, Hr = {
1520
+ const ao = {
1521
+ assignment: /* @__PURE__ */ i(Jt, {}),
1522
+ quiz: /* @__PURE__ */ i(Xt, {}),
1523
+ discussion: /* @__PURE__ */ i(Vt, {}),
1524
+ page: /* @__PURE__ */ i(Zt, {}),
1525
+ file: /* @__PURE__ */ i(Kt, {}),
1526
+ external_url: /* @__PURE__ */ i(Ht, {}),
1527
+ external_tool: /* @__PURE__ */ i(Qt, {}),
1528
+ sub_header: /* @__PURE__ */ i(Yt, {})
1529
+ }, uo = 1.75, co = {
1467
1530
  contentVisibility: "auto",
1468
1531
  containIntrinsicSize: "auto 3.5rem"
1469
1532
  };
1470
- function Kr({ item: e, today: t, navigation: n }) {
1533
+ function mo({ item: e, today: t, navigation: n }) {
1471
1534
  var p;
1472
- const { t: s, locale: r } = k(), i = e.title || s("itemUntitled");
1535
+ const { t: s, locale: r, timezone: o } = N(), l = e.title || s("itemUntitled");
1473
1536
  if (e.type === "sub_header")
1474
- return /* @__PURE__ */ o(
1537
+ return /* @__PURE__ */ i(
1475
1538
  y,
1476
1539
  {
1477
1540
  as: "div",
1478
1541
  padding: "x-small small",
1479
1542
  margin: "x-small 0 0 0",
1480
1543
  "data-testid": `module-item-${e.id}`,
1481
- children: /* @__PURE__ */ o(
1482
- b,
1544
+ children: /* @__PURE__ */ i(
1545
+ M,
1483
1546
  {
1484
1547
  size: "small",
1485
1548
  weight: "bold",
@@ -1487,17 +1550,17 @@ function Kr({ item: e, today: t, navigation: n }) {
1487
1550
  letterSpacing: "expanded",
1488
1551
  "data-testid": "module-item-title",
1489
1552
  "data-sub-header": "true",
1490
- children: i
1553
+ children: l
1491
1554
  }
1492
1555
  )
1493
1556
  }
1494
1557
  );
1495
- const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, a = e.status === "locked", c = n == null ? void 0 : n.onItemClick, g = c ? (f) => c(e, f) : void 0, l = [Nr(s, e.type)];
1496
- e.dueAt && l.push(At(s, e.dueAt, t, r));
1497
- const m = Dr(s, e.pointsPossible);
1498
- m && l.push(m), e.completionRequirement && l.push(kr(s, e.completionRequirement));
1499
- const M = cn(e);
1500
- return M !== null && l.push(s("durationMinutes", { count: M })), e.published || l.push(s("itemUnpublishedLabel")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * Qr}rem`, ...Hr }, children: /* @__PURE__ */ o(
1558
+ const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, c = e.status === "locked", g = n == null ? void 0 : n.onItemClick, a = g ? (f) => g(e, f) : void 0, d = [Wr(s, e.type)];
1559
+ e.dueAt && d.push(qt(s, e.dueAt, t, { locale: r, timezone: o }));
1560
+ const h = Yr(s, e.pointsPossible);
1561
+ h && d.push(h), e.completionRequirement && d.push(Qr(s, e.completionRequirement));
1562
+ const I = In(e);
1563
+ return I !== null && d.push(s("durationMinutes", { count: I })), e.published || d.push(s("itemUnpublishedLabel")), /* @__PURE__ */ i("div", { style: { marginLeft: `${e.indent * uo}rem`, ...co }, children: /* @__PURE__ */ i(
1501
1564
  y,
1502
1565
  {
1503
1566
  as: "div",
@@ -1507,8 +1570,8 @@ function Kr({ item: e, today: t, navigation: n }) {
1507
1570
  margin: "x-small 0 0 0",
1508
1571
  "data-testid": `module-item-${e.id}`,
1509
1572
  children: /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", children: [
1510
- e.indent > 0 ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { color: "secondary", children: /* @__PURE__ */ o(Ut, {}) }) }) : null,
1511
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1573
+ e.indent > 0 ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(M, { color: "secondary", children: /* @__PURE__ */ i(Wt, {}) }) }) : null,
1574
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
1512
1575
  y,
1513
1576
  {
1514
1577
  as: "div",
@@ -1519,51 +1582,51 @@ function Kr({ item: e, today: t, navigation: n }) {
1519
1582
  width: "2.25rem",
1520
1583
  height: "2.25rem",
1521
1584
  textAlign: "center",
1522
- children: /* @__PURE__ */ o(b, { color: "secondary", children: Wr[e.type] })
1585
+ children: /* @__PURE__ */ i(M, { color: "secondary", children: ao[e.type] })
1523
1586
  }
1524
1587
  ) }),
1525
1588
  /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1526
- /* @__PURE__ */ o(y, { as: "div", children: a || !u ? /* @__PURE__ */ o(
1527
- b,
1589
+ /* @__PURE__ */ i(y, { as: "div", children: c || !u ? /* @__PURE__ */ i(
1590
+ M,
1528
1591
  {
1529
1592
  weight: "bold",
1530
1593
  size: "small",
1531
- color: a ? "secondary" : "primary",
1594
+ color: c ? "secondary" : "primary",
1532
1595
  "data-testid": "module-item-title",
1533
- "data-locked": a ? "true" : void 0,
1534
- children: i
1596
+ "data-locked": c ? "true" : void 0,
1597
+ children: l
1535
1598
  }
1536
1599
  ) : /* @__PURE__ */ _(
1537
- Xt,
1600
+ rn,
1538
1601
  {
1539
1602
  href: u,
1540
- onClick: g,
1603
+ onClick: a,
1541
1604
  forceButtonRole: !1,
1542
1605
  isWithinText: !1,
1543
1606
  target: e.newTab ? "_blank" : void 0,
1544
1607
  rel: e.newTab ? "noopener noreferrer" : void 0,
1545
1608
  children: [
1546
- /* @__PURE__ */ o(b, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: i }),
1547
- e.newTab ? /* @__PURE__ */ o(Zt, { children: ` ${s("opensInNewWindow")}` }) : null
1609
+ /* @__PURE__ */ i(M, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: l }),
1610
+ e.newTab ? /* @__PURE__ */ i(sn, { children: ` ${s("opensInNewWindow")}` }) : null
1548
1611
  ]
1549
1612
  }
1550
1613
  ) }),
1551
- /* @__PURE__ */ o(y, { as: "div", children: /* @__PURE__ */ o(b, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: l.map((f, h) => /* @__PURE__ */ _("span", { children: [
1552
- h > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1553
- /* @__PURE__ */ o("span", { children: f })
1614
+ /* @__PURE__ */ i(y, { as: "div", children: /* @__PURE__ */ i(M, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: d.map((f, w) => /* @__PURE__ */ _("span", { children: [
1615
+ w > 0 ? /* @__PURE__ */ i("span", { "aria-hidden": "true", children: " | " }) : null,
1616
+ /* @__PURE__ */ i("span", { children: f })
1554
1617
  ] }, f)) }) })
1555
1618
  ] }),
1556
- e.status ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(Yr, { status: e.status }) }) : null
1619
+ e.status ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(lo, { status: e.status }) }) : null
1557
1620
  ] })
1558
1621
  }
1559
1622
  ) });
1560
1623
  }
1561
- const Vr = Ye(Kr), ze = "3rem";
1562
- function Zr({
1624
+ const go = Ke(mo), $e = "3rem";
1625
+ function po({
1563
1626
  label: e,
1564
1627
  dimmed: t = !1
1565
1628
  }) {
1566
- return e === null ? null : /* @__PURE__ */ o(
1629
+ return e === null ? null : /* @__PURE__ */ i(
1567
1630
  y,
1568
1631
  {
1569
1632
  as: "div",
@@ -1571,79 +1634,112 @@ function Zr({
1571
1634
  borderWidth: "small",
1572
1635
  borderRadius: "large",
1573
1636
  borderColor: t ? "primary" : "secondary",
1574
- minWidth: ze,
1575
- height: ze,
1637
+ minWidth: $e,
1638
+ height: $e,
1576
1639
  padding: "0 xx-small",
1577
1640
  "data-testid": "module-number",
1578
- children: /* @__PURE__ */ o(T, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ o(b, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
1641
+ children: /* @__PURE__ */ i(T, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ i(M, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
1579
1642
  }
1580
1643
  );
1581
1644
  }
1582
- function Xr({ module: e, today: t }) {
1583
- var a, c;
1584
- const { t: n, locale: s } = k(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1585
- if (r && i)
1586
- return /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) });
1587
- if (r)
1588
- return /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
1589
- const u = (c = e.progress) == null ? void 0 : c.latestDueAt;
1590
- return u ? /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: At(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(b, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) }) : null;
1591
- }
1592
- function Jr({ module: e }) {
1593
- const { t } = k(), n = e.progress;
1594
- return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1595
- /* @__PURE__ */ o(T.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1596
- Vt,
1597
- {
1598
- size: "x-small",
1599
- meterColor: n.percentComplete >= 100 ? "success" : "brand",
1600
- valueNow: n.requirementsMet,
1601
- valueMax: Math.max(n.requirementCount, 1),
1602
- shouldAnimate: !1,
1603
- screenReaderLabel: t("moduleProgressScreenReaderLabel", { name: e.name })
1604
- }
1605
- ) }),
1606
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: qr(
1607
- t,
1608
- n.percentComplete,
1609
- n.requirementsMet,
1610
- n.requirementCount
1611
- ) }) })
1612
- ] });
1645
+ function fo({ module: e, today: t }) {
1646
+ var c, g;
1647
+ const { t: n, locale: s, timezone: r } = N(), o = ((c = e.progress) == null ? void 0 : c.status) === "locked", l = e.unlockAt;
1648
+ if (o && l)
1649
+ return /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: ze(n, l, t, { locale: s, timezone: r }) });
1650
+ if (o)
1651
+ return /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
1652
+ const u = (g = e.progress) == null ? void 0 : g.latestDueAt;
1653
+ return u ? /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qt(n, u, t, { locale: s, timezone: r }) }) : !e.progress && l ? /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: ze(n, l, t, { locale: s, timezone: r }) }) : null;
1654
+ }
1655
+ const ho = "#273540", bo = "#D7DADE", Io = "0.5rem", Mo = (e, t) => {
1656
+ var n, s, r, o, l;
1657
+ return {
1658
+ meterColorBrand: ((s = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : s.grey125125) ?? ho,
1659
+ borderRadius: String(((r = t.borders) == null ? void 0 : r.radiusLarge) ?? Io),
1660
+ borderColor: ((l = (o = t.colors) == null ? void 0 : o.contrasts) == null ? void 0 : l.grey1424) ?? bo,
1661
+ trackBottomBorderColor: "transparent"
1662
+ };
1663
+ }, So = "66.667%", yo = "8rem";
1664
+ function _o({
1665
+ module: e,
1666
+ breakpoints: t
1667
+ }) {
1668
+ const { t: n } = N(), s = e.progress;
1669
+ if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
1670
+ const r = t.mobileOnly, o = Object.keys(t).length === 0 || t.desktop === !0;
1671
+ return /* @__PURE__ */ _(
1672
+ T,
1673
+ {
1674
+ width: o ? So : "100%",
1675
+ direction: r ? "column" : "row",
1676
+ alignItems: r ? "stretch" : "center",
1677
+ wrap: "wrap",
1678
+ gap: "x-small",
1679
+ margin: "small 0 0 0",
1680
+ "data-testid": "module-progress",
1681
+ children: [
1682
+ /* @__PURE__ */ i(T.Item, { size: r ? void 0 : yo, shouldGrow: !0, children: /* @__PURE__ */ i(
1683
+ nn,
1684
+ {
1685
+ size: "x-small",
1686
+ meterColor: "brand",
1687
+ valueNow: s.requirementsMet,
1688
+ valueMax: s.requirementCount,
1689
+ shouldAnimate: !1,
1690
+ screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
1691
+ formatScreenReaderValue: () => Kr(
1692
+ n,
1693
+ s.percentComplete,
1694
+ s.requirementsMet,
1695
+ s.requirementCount
1696
+ ),
1697
+ themeOverride: Mo
1698
+ }
1699
+ ) }),
1700
+ /* @__PURE__ */ i(T.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: Hr(
1701
+ n,
1702
+ s.percentComplete,
1703
+ s.requirementsMet,
1704
+ s.requirementCount
1705
+ ) }) })
1706
+ ]
1707
+ }
1708
+ );
1613
1709
  }
1614
- const Ue = (e) => `platform-modules-panel-${e}`;
1615
- function eo({
1710
+ const Be = (e) => `platform-modules-panel-${e}`;
1711
+ function To({
1616
1712
  module: e,
1617
1713
  state: t,
1618
1714
  today: n,
1619
1715
  navigation: s,
1620
1716
  showDiagnostics: r
1621
1717
  }) {
1622
- const { t: i } = k(), u = $(null), a = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1623
- return de(() => {
1624
- !c || a === 0 || u.current !== a && (u.current = a, Qe(
1625
- i("itemsLoadedAnnouncement", {
1626
- loaded: a,
1718
+ const { t: o } = N(), l = O(null), u = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1719
+ return he(() => {
1720
+ !c || u === 0 || l.current !== u && (l.current = u, Ve(
1721
+ o("itemsLoadedAnnouncement", {
1722
+ loaded: u,
1627
1723
  count: e.itemCount,
1628
1724
  name: e.name
1629
1725
  })
1630
1726
  ));
1631
- }, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(y, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1632
- Ke,
1727
+ }, [c, u, e.itemCount, e.name, o]), t.error ? /* @__PURE__ */ i(y, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ i(
1728
+ Je,
1633
1729
  {
1634
1730
  variant: "error",
1635
1731
  margin: "0",
1636
- liveRegion: He,
1732
+ liveRegion: Xe,
1637
1733
  liveRegionPoliteness: "assertive",
1638
1734
  "data-testid": "items-error",
1639
- children: i("itemsLoadErrorAlert", { message: t.error.message })
1735
+ children: o("itemsLoadErrorAlert", { message: t.error.message })
1640
1736
  }
1641
1737
  ) }) : t.isLoading ? /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1642
- /* @__PURE__ */ o(tt, { size: "x-small", renderTitle: i("itemsLoadingSpinnerLabel") }),
1738
+ /* @__PURE__ */ i(ot, { size: "x-small", renderTitle: o("itemsLoadingSpinnerLabel") }),
1643
1739
  " ",
1644
- /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: i("itemsLoadingText") })
1740
+ /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: o("itemsLoadingText") })
1645
1741
  ] }) : /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", children: [
1646
- r ? /* @__PURE__ */ _(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1742
+ r ? /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1647
1743
  "items source: ",
1648
1744
  t.source,
1649
1745
  " · loaded ",
@@ -1651,15 +1747,15 @@ function eo({
1651
1747
  " of ",
1652
1748
  e.itemCount
1653
1749
  ] }) : null,
1654
- t.items.length === 0 ? /* @__PURE__ */ o(y, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: i("noItemsEmptyState") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(Vr, { item: g, today: n, navigation: s }) }, g.id)) }),
1655
- t.hasNextPage ? /* @__PURE__ */ o(y, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1656
- X,
1750
+ t.items.length === 0 ? /* @__PURE__ */ i(y, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: o("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(go, { item: g, today: n, navigation: s }) }, g.id)) }),
1751
+ t.hasNextPage ? /* @__PURE__ */ i(y, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
1752
+ ne,
1657
1753
  {
1658
1754
  size: "small",
1659
1755
  onClick: t.fetchNextPage,
1660
1756
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
1661
1757
  "data-testid": "load-more-items",
1662
- children: t.isFetchingNextPage ? i("loadMoreItemsLoading") : i("loadMoreItems", {
1758
+ children: t.isFetchingNextPage ? o("loadMoreItemsLoading") : o("loadMoreItems", {
1663
1759
  loaded: t.items.length,
1664
1760
  count: e.itemCount
1665
1761
  })
@@ -1667,19 +1763,20 @@ function eo({
1667
1763
  ) }) : null
1668
1764
  ] });
1669
1765
  }
1670
- function to({
1766
+ function wo({
1671
1767
  module: e,
1672
1768
  expanded: t,
1673
1769
  onToggle: n,
1674
1770
  itemsState: s,
1675
1771
  today: r,
1676
- navigation: i,
1677
- showDiagnostics: u = !1,
1678
- headingLevel: a = "h3",
1679
- moduleLabel: c
1772
+ navigation: o,
1773
+ showDiagnostics: l = !1,
1774
+ headingLevel: u = "h3",
1775
+ moduleLabel: c,
1776
+ breakpoints: g = {}
1680
1777
  }) {
1681
1778
  var p;
1682
- const { t: g, locale: l } = k(), m = ((p = e.progress) == null ? void 0 : p.status) === "locked", M = c === void 0 ? vr(e.position, l) : c;
1779
+ const { t: a, locale: d } = N(), h = ((p = e.progress) == null ? void 0 : p.status) === "locked", I = c === void 0 ? jr(e.position, d) : c;
1683
1780
  return /* @__PURE__ */ _(
1684
1781
  y,
1685
1782
  {
@@ -1693,64 +1790,64 @@ function to({
1693
1790
  "data-testid": `module-card-${e.id}`,
1694
1791
  children: [
1695
1792
  /* @__PURE__ */ _(T, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
1696
- M !== null ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(Zr, { label: M, dimmed: m }) }) : null,
1793
+ I !== null ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(po, { label: I, dimmed: h }) }) : null,
1697
1794
  /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1698
1795
  /* @__PURE__ */ _(y, { as: "div", children: [
1699
- /* @__PURE__ */ o(
1700
- Ve,
1796
+ /* @__PURE__ */ i(
1797
+ et,
1701
1798
  {
1702
- level: a,
1799
+ level: u,
1703
1800
  themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
1704
1801
  "data-testid": "module-name",
1705
- children: /* @__PURE__ */ o(b, { size: "large", weight: "bold", color: m ? "secondary" : "primary", children: e.name })
1802
+ children: /* @__PURE__ */ i(M, { size: "large", weight: "bold", color: h ? "secondary" : "primary", children: e.name })
1706
1803
  }
1707
1804
  ),
1708
- e.published ? null : /* @__PURE__ */ _(b, { size: "x-small", color: "secondary", children: [
1805
+ e.published ? null : /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", children: [
1709
1806
  " ",
1710
- g("moduleUnpublishedBadge")
1807
+ a("moduleUnpublishedBadge")
1711
1808
  ] })
1712
1809
  ] }),
1713
- /* @__PURE__ */ o(y, { as: "div", children: /* @__PURE__ */ o(Xr, { module: e, today: r }) }),
1714
- /* @__PURE__ */ o(Jr, { module: e })
1810
+ /* @__PURE__ */ i(y, { as: "div", children: /* @__PURE__ */ i(fo, { module: e, today: r }) }),
1811
+ /* @__PURE__ */ i(_o, { module: e, breakpoints: g })
1715
1812
  ] }),
1716
- e.progress ? /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(jr, { status: e.progress.status }) }) : null,
1717
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(
1718
- zt,
1813
+ e.progress ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(io, { status: e.progress.status }) }) : null,
1814
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
1815
+ jt,
1719
1816
  {
1720
1817
  size: "small",
1721
1818
  withBorder: !0,
1722
1819
  withBackground: !1,
1723
- screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
1820
+ screenReaderLabel: t ? a("collapseModule", { name: e.name }) : a("expandModule", { name: e.name }),
1724
1821
  "aria-expanded": t,
1725
- "aria-controls": Ue(e.id),
1822
+ "aria-controls": Be(e.id),
1726
1823
  onClick: () => n(e.id),
1727
1824
  "data-testid": `toggle-module-${e.id}`,
1728
- children: t ? /* @__PURE__ */ o(Ht, {}) : /* @__PURE__ */ o(et, {})
1825
+ children: t ? /* @__PURE__ */ i(en, {}) : /* @__PURE__ */ i(rt, {})
1729
1826
  }
1730
1827
  ) })
1731
1828
  ] }),
1732
- /* @__PURE__ */ o("div", { id: Ue(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1733
- eo,
1829
+ /* @__PURE__ */ i("div", { id: Be(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
1830
+ To,
1734
1831
  {
1735
1832
  module: e,
1736
1833
  state: s,
1737
1834
  today: r,
1738
- navigation: i,
1739
- showDiagnostics: u
1835
+ navigation: o,
1836
+ showDiagnostics: l
1740
1837
  }
1741
1838
  ) : null })
1742
1839
  ]
1743
1840
  }
1744
1841
  );
1745
1842
  }
1746
- const no = Ye(to);
1747
- function so({
1843
+ const Po = Ke(wo);
1844
+ function Eo({
1748
1845
  counts: e,
1749
1846
  itemsMode: t,
1750
1847
  loadedModules: n
1751
1848
  }) {
1752
1849
  const s = e.listModules + e.listModuleItems;
1753
- return /* @__PURE__ */ o(
1850
+ return /* @__PURE__ */ i(
1754
1851
  y,
1755
1852
  {
1756
1853
  as: "div",
@@ -1761,24 +1858,24 @@ function so({
1761
1858
  margin: "0 0 small 0",
1762
1859
  "data-testid": "dev-diagnostics",
1763
1860
  children: /* @__PURE__ */ _(T, { gap: "medium", wrap: "wrap", children: [
1764
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ o(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1765
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1861
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(M, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1862
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1766
1863
  "listModules: ",
1767
1864
  e.listModules
1768
1865
  ] }) }),
1769
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1866
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
1770
1867
  "listModuleItems: ",
1771
1868
  e.listModuleItems
1772
1869
  ] }) }),
1773
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1870
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
1774
1871
  "total: ",
1775
1872
  s
1776
1873
  ] }) }),
1777
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1874
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "resolved-items-mode", children: [
1778
1875
  "itemsMode: ",
1779
1876
  t ?? "probing…"
1780
1877
  ] }) }),
1781
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1878
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "modules-loaded-count", children: [
1782
1879
  "modules loaded: ",
1783
1880
  n
1784
1881
  ] }) })
@@ -1786,120 +1883,115 @@ function so({
1786
1883
  }
1787
1884
  );
1788
1885
  }
1789
- function oi({
1886
+ function Co({
1790
1887
  data: e,
1791
1888
  courseName: t,
1792
1889
  courseContext: n,
1793
1890
  today: s,
1794
1891
  requestCounts: r,
1795
- showDiagnostics: i = r !== void 0,
1796
- initialFilter: u = "all",
1797
- navigation: a,
1892
+ showDiagnostics: o = r !== void 0,
1893
+ initialFilter: l = "all",
1894
+ navigation: u,
1798
1895
  as: c = "div",
1799
- headingLevel: g = "h2"
1896
+ headingLevel: g = "h2",
1897
+ breakpoints: a = {}
1800
1898
  }) {
1801
- const {
1802
- modules: l,
1803
- hasNextPage: m,
1804
- fetchNextPage: M,
1805
- isFetchingNextPage: p,
1806
- isLoading: f,
1807
- error: h,
1808
- itemsMode: P,
1809
- expandedModuleIds: C,
1810
- toggleModule: v,
1811
- expandModule: A,
1812
- collapseModule: se,
1813
- getItems: re
1814
- } = e, { t: E, locale: F } = k(), H = t ?? E("pageTitle"), [q, K] = Z(""), [z, B] = Z(u), V = $(null), oe = je(), U = $(!1), [ie] = Z(() => /* @__PURE__ */ new Date()), O = s ?? ie;
1815
- de(() => {
1816
- var w;
1817
- !U.current || p || (U.current = !1, Qe(E("modulesLoadedAnnouncement", { count: l.length })), (w = V.current) == null || w.focus());
1818
- }, [p, l.length, E]);
1819
- const G = N(
1820
- () => l.filter(
1821
- (w) => Fe(w, q, F) && Re(w, z, O)
1899
+ const { miniTablet: d, tablet: h, desktop: I, desktopNavOpen: p, desktopOnly: f, mobileOnly: w, ICEDesktop: L } = a, A = v(
1900
+ () => ({ miniTablet: d, tablet: h, desktop: I, desktopNavOpen: p, desktopOnly: f, mobileOnly: w, ICEDesktop: L }),
1901
+ [d, h, I, p, f, w, L]
1902
+ ), {
1903
+ modules: P,
1904
+ hasNextPage: ae,
1905
+ fetchNextPage: ue,
1906
+ isFetchingNextPage: U,
1907
+ isLoading: z,
1908
+ error: R,
1909
+ itemsMode: ce,
1910
+ expandedModuleIds: K,
1911
+ toggleModule: Z,
1912
+ expandModule: V,
1913
+ collapseModule: de,
1914
+ getItems: _e
1915
+ } = e, { t: E, locale: X, timezone: me } = N(), J = t ?? E("pageTitle"), [$, S] = te(""), [b, C] = te(l), B = O(null), D = He(), F = O(!1), [q] = te(() => /* @__PURE__ */ new Date()), ee = s ?? q;
1916
+ he(() => {
1917
+ var x;
1918
+ !F.current || U || (F.current = !1, Ve(E("modulesLoadedAnnouncement", { count: P.length })), (x = B.current) == null || x.focus());
1919
+ }, [U, P.length, E]);
1920
+ const G = v(
1921
+ () => P.filter(
1922
+ (x) => eo(x, $, X) && Jr(x, b, ee, me)
1822
1923
  ),
1823
- [l, q, z, O, F]
1824
- ), le = N(() => {
1825
- const w = l.filter((j) => Fe(j, q, F)), L = (j) => w.filter((R) => Re(R, j, O)).length;
1826
- return {
1827
- all: w.length,
1828
- in_progress: L("in_progress"),
1829
- complete: L("complete"),
1830
- due_this_week: L("due_this_week"),
1831
- missing: L("missing")
1832
- };
1833
- }, [l, q, O, F]), S = () => {
1834
- for (const w of G) A(w.id);
1835
- }, I = () => {
1836
- for (const w of C) se(w);
1837
- }, x = l.length > 0 && G.length === 0 && !f && !h;
1924
+ [P, $, b, ee, X, me]
1925
+ ), ge = () => {
1926
+ for (const x of G) V(x.id);
1927
+ }, j = () => {
1928
+ for (const x of K) de(x);
1929
+ }, zt = P.length > 0 && G.length === 0 && !z && !R;
1838
1930
  return /* @__PURE__ */ _(y, { as: c, display: "block", "data-testid": "modules-list", children: [
1839
1931
  n ? /* @__PURE__ */ _(y, { as: "div", children: [
1840
- /* @__PURE__ */ o(b, { size: "small", color: "brand", children: n }),
1841
- /* @__PURE__ */ _(b, { size: "small", color: "secondary", children: [
1932
+ /* @__PURE__ */ i(M, { size: "small", color: "brand", children: n }),
1933
+ /* @__PURE__ */ _(M, { size: "small", color: "secondary", children: [
1842
1934
  " ",
1843
1935
  "/",
1844
1936
  " "
1845
1937
  ] }),
1846
- /* @__PURE__ */ o(b, { size: "small", color: "secondary", children: H })
1938
+ /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: J })
1847
1939
  ] }) : null,
1848
- /* @__PURE__ */ o(Ve, { level: g, margin: "x-small 0 medium 0", children: H }),
1849
- r ? /* @__PURE__ */ o(
1850
- so,
1940
+ /* @__PURE__ */ i(et, { level: g, margin: "x-small 0 medium 0", children: J }),
1941
+ r ? /* @__PURE__ */ i(
1942
+ Eo,
1851
1943
  {
1852
1944
  counts: r,
1853
- itemsMode: P,
1854
- loadedModules: l.length
1945
+ itemsMode: ce,
1946
+ loadedModules: P.length
1855
1947
  }
1856
1948
  ) : null,
1857
1949
  /* @__PURE__ */ _(T, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1858
- /* @__PURE__ */ o(T.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1859
- en,
1950
+ /* @__PURE__ */ i(T.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ i(
1951
+ an,
1860
1952
  {
1861
1953
  renderLabel: E("moduleSearchLabel"),
1862
1954
  placeholder: E("searchPlaceholder"),
1863
- "aria-describedby": oe,
1864
- value: q,
1865
- onChange: (w, L) => K(L),
1866
- renderBeforeInput: /* @__PURE__ */ o(Kt, { inline: !1 }),
1955
+ "aria-describedby": D,
1956
+ value: $,
1957
+ onChange: (x, $t) => S($t),
1958
+ renderBeforeInput: /* @__PURE__ */ i(tn, { inline: !1 }),
1867
1959
  "data-testid": "modules-search"
1868
1960
  }
1869
1961
  ) }),
1870
- /* @__PURE__ */ o(T.Item, { shouldGrow: !0 }),
1871
- /* @__PURE__ */ o(T.Item, { children: /* @__PURE__ */ _(
1872
- Me,
1962
+ /* @__PURE__ */ i(T.Item, { shouldGrow: !0 }),
1963
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(
1964
+ Te,
1873
1965
  {
1874
1966
  placement: "bottom end",
1875
- trigger: /* @__PURE__ */ o(X, { renderIcon: /* @__PURE__ */ o(et, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
1967
+ trigger: /* @__PURE__ */ i(ne, { renderIcon: /* @__PURE__ */ i(rt, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
1876
1968
  children: [
1877
- /* @__PURE__ */ o(Me.Item, { onSelect: S, "data-testid": "expand-all", children: E("expandAll") }),
1878
- /* @__PURE__ */ o(Me.Item, { onSelect: I, "data-testid": "collapse-all", children: E("collapseAll") })
1969
+ /* @__PURE__ */ i(Te.Item, { onSelect: ge, "data-testid": "expand-all", children: E("expandAll") }),
1970
+ /* @__PURE__ */ i(Te.Item, { onSelect: j, "data-testid": "collapse-all", children: E("collapseAll") })
1879
1971
  ]
1880
1972
  }
1881
1973
  ) })
1882
1974
  ] }),
1883
- /* @__PURE__ */ o(y, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(b, { size: "x-small", color: "secondary", id: oe, children: E("searchScopeHint") }) }),
1884
- /* @__PURE__ */ o(Ur, { value: z, onChange: B, counts: le }),
1975
+ /* @__PURE__ */ i(y, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ i(M, { size: "x-small", color: "secondary", id: D, children: E("searchScopeHint") }) }),
1976
+ /* @__PURE__ */ i(to, { value: b, onChange: C }),
1885
1977
  /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
1886
- h ? (
1978
+ R ? (
1887
1979
  // `liveRegion` is what makes this announce; without it InstUI's Alert
1888
1980
  // sets no role and no aria-live. See the same fix in ModuleCard.
1889
- /* @__PURE__ */ o(
1890
- Ke,
1981
+ /* @__PURE__ */ i(
1982
+ Je,
1891
1983
  {
1892
1984
  variant: "error",
1893
1985
  margin: "0 0 small 0",
1894
- liveRegion: He,
1986
+ liveRegion: Xe,
1895
1987
  liveRegionPoliteness: "assertive",
1896
1988
  "data-testid": "modules-error",
1897
- children: E("modulesLoadErrorAlert", { message: h.message })
1989
+ children: E("modulesLoadErrorAlert", { message: R.message })
1898
1990
  }
1899
1991
  )
1900
1992
  ) : null,
1901
- f ? /* @__PURE__ */ o(y, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(tt, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1902
- !f && !h && l.length === 0 ? /* @__PURE__ */ o(
1993
+ z ? /* @__PURE__ */ i(y, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ i(ot, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1994
+ !z && !R && P.length === 0 ? /* @__PURE__ */ i(
1903
1995
  y,
1904
1996
  {
1905
1997
  as: "div",
@@ -1908,10 +2000,10 @@ function oi({
1908
2000
  padding: "large",
1909
2001
  textAlign: "center",
1910
2002
  "data-testid": "modules-empty",
1911
- children: /* @__PURE__ */ o(b, { color: "secondary", children: E("noModulesEmptyState") })
2003
+ children: /* @__PURE__ */ i(M, { color: "secondary", children: E("noModulesEmptyState") })
1912
2004
  }
1913
2005
  ) : null,
1914
- x ? /* @__PURE__ */ _(
2006
+ zt ? /* @__PURE__ */ _(
1915
2007
  y,
1916
2008
  {
1917
2009
  as: "div",
@@ -1921,13 +2013,13 @@ function oi({
1921
2013
  textAlign: "center",
1922
2014
  "data-testid": "modules-filtered-empty",
1923
2015
  children: [
1924
- /* @__PURE__ */ o(y, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(b, { color: "secondary", children: E("filteredEmptyState", { count: l.length }) }) }),
1925
- /* @__PURE__ */ o(
1926
- X,
2016
+ /* @__PURE__ */ i(y, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(M, { color: "secondary", children: E("filteredEmptyState", { count: P.length }) }) }),
2017
+ /* @__PURE__ */ i(
2018
+ ne,
1927
2019
  {
1928
2020
  size: "small",
1929
2021
  onClick: () => {
1930
- B("all"), K(""), U.current = !0;
2022
+ C("all"), S(""), F.current = !0;
1931
2023
  },
1932
2024
  children: E("clearFilters")
1933
2025
  }
@@ -1935,47 +2027,50 @@ function oi({
1935
2027
  ]
1936
2028
  }
1937
2029
  ) : null,
1938
- /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: G.map((w) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1939
- no,
2030
+ /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: G.map((x) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
2031
+ Po,
1940
2032
  {
1941
- module: w,
1942
- expanded: C.includes(w.id),
1943
- onToggle: v,
1944
- itemsState: re(w.id),
1945
- today: O,
1946
- showDiagnostics: i,
1947
- navigation: a,
1948
- headingLevel: g === "h1" ? "h2" : "h3"
2033
+ module: x,
2034
+ expanded: K.includes(x.id),
2035
+ onToggle: Z,
2036
+ itemsState: _e(x.id),
2037
+ today: ee,
2038
+ showDiagnostics: o,
2039
+ navigation: u,
2040
+ headingLevel: g === "h1" ? "h2" : "h3",
2041
+ breakpoints: A
1949
2042
  }
1950
- ) }, w.id)) })
2043
+ ) }, x.id)) })
1951
2044
  ] }),
1952
- m ? /* @__PURE__ */ o(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1953
- X,
2045
+ ae ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2046
+ ne,
1954
2047
  {
1955
2048
  color: "primary",
1956
2049
  onClick: () => {
1957
- U.current = !0, M();
2050
+ F.current = !0, ue();
1958
2051
  },
1959
- interaction: p ? "disabled" : "enabled",
2052
+ interaction: U ? "disabled" : "enabled",
1960
2053
  "data-testid": "load-more-modules",
1961
- children: p ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: l.length })
2054
+ children: U ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: P.length })
1962
2055
  }
1963
- ) }) : l.length > 0 ? /* @__PURE__ */ o(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1964
- b,
2056
+ ) }) : P.length > 0 ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2057
+ M,
1965
2058
  {
1966
2059
  size: "x-small",
1967
2060
  color: "secondary",
1968
2061
  "data-testid": "modules-all-loaded",
1969
- elementRef: (w) => {
1970
- V.current = w;
2062
+ elementRef: (x) => {
2063
+ B.current = x;
1971
2064
  },
1972
2065
  tabIndex: -1,
1973
- children: E("allModulesLoaded", { count: l.length })
2066
+ children: E("allModulesLoaded", { count: P.length })
1974
2067
  }
1975
2068
  ) }) : null
1976
2069
  ] });
1977
2070
  }
1978
- const J = [
2071
+ const ki = ln(
2072
+ Co
2073
+ ), re = [
1979
2074
  "assignment",
1980
2075
  "quiz",
1981
2076
  "discussion",
@@ -1984,25 +2079,25 @@ const J = [
1984
2079
  "external_url",
1985
2080
  "external_tool",
1986
2081
  "sub_header"
1987
- ], _e = [
2082
+ ], Ce = [
1988
2083
  "not_started",
1989
2084
  "in_progress",
1990
2085
  "all_submitted",
1991
2086
  "all_graded",
1992
2087
  "missing",
1993
2088
  "locked"
1994
- ], Oe = [
2089
+ ], Ge = [
1995
2090
  "must_view",
1996
2091
  "must_submit",
1997
2092
  "must_contribute",
1998
2093
  "must_mark_done",
1999
2094
  "min_score",
2000
2095
  "min_percentage"
2001
- ], ro = ["assignment", "quiz", "discussion"], oo = ["external_url", "external_tool"], io = ["assignment", "quiz", "discussion"], lo = Date.UTC(2025, 0, 6), ao = 864e5, Ie = "1", Nt = (e) => new Date(lo + e * ao).toISOString(), uo = (e, t) => {
2002
- const n = Oe[Math.floor(t / 3) % Oe.length];
2096
+ ], xo = (e) => e.pointsPossible != null && e.status !== "excused", Lo = ["assignment", "quiz", "discussion"], Ao = ["external_url", "external_tool"], vo = ["assignment", "quiz", "discussion"], ko = Date.UTC(2025, 0, 6), No = 864e5, le = "1", Ft = (e) => new Date(ko + e * No).toISOString(), Do = (e, t) => {
2097
+ const n = Ge[Math.floor(t / 3) % Ge.length];
2003
2098
  return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
2004
- }, Dt = (e, t) => t % 3 === 0 && e !== "sub_header", kt = (e) => _e[(e - 1) % _e.length], co = (e, t) => !io.includes(e) || e === "discussion" && Math.floor(t / J.length) % 2 === 1 ? null : 5 + t % 4 * 5, mo = (e, t, n, s) => {
2005
- const r = n ? "in_progress" : "not_started";
2099
+ }, Ot = (e, t) => t % 3 === 0 && e !== "sub_header", Ut = (e) => Ce[(e - 1) % Ce.length], qo = (e, t) => !vo.includes(e) || e === "discussion" && Math.floor(t / re.length) % 2 === 1 ? null : 5 + t % 4 * 5, Ro = (e, t, n, s) => {
2100
+ const r = n ? "complete" : "not_started";
2006
2101
  switch (e) {
2007
2102
  case "locked":
2008
2103
  return "locked";
@@ -2011,65 +2106,70 @@ const J = [
2011
2106
  case "all_submitted":
2012
2107
  return t ? "submitted" : r;
2013
2108
  case "all_graded":
2014
- return t ? "graded" : r;
2109
+ return t ? s === 0 ? "excused" : "graded" : r;
2015
2110
  case "missing":
2016
2111
  return n ? t ? "missing" : "not_started" : t ? s % 2 === 0 ? "missing" : "graded" : "not_started";
2017
2112
  case "in_progress":
2018
2113
  return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
2019
2114
  }
2020
- }, go = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, fo = (e, t, n, s, r, i) => {
2021
- const u = String(e), a = String(e * 1e3 + t + 1), c = J[n % J.length], g = c === "sub_header", l = ro.includes(c) && (n % 4 === 0 || s === "missing"), m = Dt(c, n) ? uo(a, n) : null;
2115
+ }, Fo = /* @__PURE__ */ new Set([
2116
+ "submitted",
2117
+ "graded",
2118
+ "excused",
2119
+ "complete"
2120
+ ]), Oo = (e) => e.status !== void 0 && Fo.has(e.status), Uo = (e, t, n, s, r, o) => {
2121
+ const l = String(e), u = String(e * 1e3 + t + 1), c = re[n % re.length], g = c === "sub_header", a = Lo.includes(c) && (n % 4 === 0 || s === "missing"), d = Ot(c, n) ? Do(u, n) : null;
2022
2122
  return {
2023
- id: a,
2024
- moduleId: u,
2123
+ id: u,
2124
+ moduleId: l,
2025
2125
  title: `${c} ${t + 1}`,
2026
2126
  type: c,
2027
2127
  position: t + 1,
2028
2128
  indent: t % 5 === 4 ? 1 : 0,
2029
- // 1 in 7 unpublished, so a teacher view always has something to grey out.
2129
+ // 1 in 7 unpublished, so a teacher view always has something to gray out.
2030
2130
  // Same rule as the module: a student's page contains no unpublished items,
2031
- // so only a teacher fixture greys any out.
2032
- published: i === "teacher" ? n % 7 !== 0 : !0,
2033
- url: g ? null : `/courses/${Ie}/modules/items/${a}`,
2034
- newTab: oo.includes(c) && n % 2 === 0,
2035
- completionRequirement: m,
2036
- dueAt: l ? Nt(n % 90) : null,
2131
+ // so only a teacher fixture grays any out.
2132
+ published: o === "teacher" ? n % 7 !== 0 : !0,
2133
+ url: g ? null : `/courses/${le}/modules/items/${u}`,
2134
+ newTab: Ao.includes(c) && n % 2 === 0,
2135
+ completionRequirement: d,
2136
+ dueAt: a ? Ft(n % 90) : null,
2037
2137
  status: s,
2038
2138
  pointsPossible: r,
2039
2139
  // Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
2040
2140
  // handful per fixture proves the escape hatch survives a round trip, and
2041
2141
  // every other item must carry no `extensions` key at all.
2042
- extensions: it(
2142
+ extensions: ct(
2043
2143
  void 0,
2044
2144
  n % 37 === 0 ? 5 + n % 4 * 10 : null
2045
2145
  )
2046
2146
  };
2047
- }, ho = (e, t, n, s) => {
2048
- const r = kt(e), i = [];
2049
- let u = 0;
2050
- for (let a = 0; a < t; a += 1) {
2051
- const c = n + a, g = J[c % J.length], l = co(g, c), m = l !== null, M = m ? u++ : a, p = mo(r, m, Dt(g, c), M);
2052
- i.push(fo(e, a, c, p, l, s));
2147
+ }, zo = (e, t, n, s) => {
2148
+ const r = Ut(e), o = [];
2149
+ let l = 0;
2150
+ for (let u = 0; u < t; u += 1) {
2151
+ const c = n + u, g = re[c % re.length], a = qo(g, c), d = a !== null, h = d ? l++ : u, I = Ro(r, d, Ot(g, c), h);
2152
+ o.push(Uo(e, u, c, I, a, s));
2053
2153
  }
2054
- return i;
2055
- }, po = (e, t, n) => {
2056
- const s = kt(e);
2057
- return s === "locked" || s === "not_started" ? s : t.length === 0 ? "not_started" : !t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 ? "in_progress" : s;
2058
- }, Io = (e) => {
2154
+ return o;
2155
+ }, $o = (e, t, n) => {
2156
+ const s = Ut(e);
2157
+ return s === "locked" || s === "not_started" ? s : t.length === 0 ? "not_started" : !t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 ? "in_progress" : s === "all_graded" && !t.some(xo) ? "all_submitted" : s;
2158
+ }, Bo = (e) => {
2059
2159
  const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
2060
2160
  return t.length > 0 ? t[t.length - 1] : null;
2061
- }, bo = (e, t, n) => {
2062
- const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(go).length, r), u = t.filter((c) => c.status === "missing").length;
2161
+ }, Go = (e, t, n) => {
2162
+ const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, o = Math.min(s.filter(Oo).length, r), l = t.filter((c) => c.status === "missing").length;
2063
2163
  return {
2064
- status: po(e, t, u),
2065
- requirementsMet: i,
2164
+ status: $o(e, t, l),
2165
+ requirementsMet: o,
2066
2166
  requirementCount: r,
2067
2167
  // Derived from the clamped pair, so the bar and the fraction always agree.
2068
- percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
2069
- latestDueAt: Io(t),
2070
- missingCount: u
2168
+ percentComplete: r > 0 ? Math.round(o / r * 100) : 0,
2169
+ latestDueAt: Bo(t),
2170
+ missingCount: l
2071
2171
  };
2072
- }, Mo = (e, t, n) => {
2172
+ }, jo = (e, t, n) => {
2073
2173
  const s = e % 2 === 0 ? null : 1;
2074
2174
  return {
2075
2175
  id: String(e),
@@ -2078,17 +2178,17 @@ const J = [
2078
2178
  // A student sees only published modules; publish state varies for a teacher.
2079
2179
  published: n === "teacher" ? e % 4 !== 0 : !0,
2080
2180
  itemCount: t.length,
2081
- unlockAt: e % 5 === 0 ? Nt(e) : null,
2082
- prerequisiteModuleIds: e > 1 && e % 3 === 0 ? [String(e - 1)] : [],
2181
+ unlockAt: e % 5 === 0 ? Ft(e) : null,
2182
+ prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
2083
2183
  requirementCount: s,
2084
2184
  requireSequentialProgress: e % 6 === 0,
2085
2185
  completionRequirements: t.flatMap(
2086
2186
  (r) => r.completionRequirement ? [r.completionRequirement] : []
2087
2187
  ),
2088
- progress: bo(e, t, s)
2188
+ progress: Go(e, t, s)
2089
2189
  };
2090
2190
  };
2091
- function So(e) {
2191
+ function Wo(e) {
2092
2192
  return {
2093
2193
  courseId: e.courseId,
2094
2194
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -2100,40 +2200,75 @@ function So(e) {
2100
2200
  )
2101
2201
  };
2102
2202
  }
2103
- function be(e, t = {}) {
2104
- const n = t.view ?? "student", s = t.courseId ?? Ie, r = [], i = {};
2105
- let u = 0;
2203
+ function ye(e, t = {}) {
2204
+ const n = t.view ?? "student", s = t.courseId ?? le, r = [], o = {};
2205
+ let l = 0;
2106
2206
  e.forEach((c, g) => {
2107
- const l = g + 1, m = ho(l, c, u, n);
2108
- u += c, r.push(Mo(l, m, n)), i[String(l)] = m;
2207
+ const a = g + 1, d = zo(a, c, l, n);
2208
+ l += c, r.push(jo(a, d, n)), o[String(a)] = d;
2109
2209
  });
2110
- const a = { courseId: s, modules: r, itemsByModuleId: i };
2111
- return n === "teacher" ? So(a) : a;
2210
+ const u = { courseId: s, modules: r, itemsByModuleId: o };
2211
+ return n === "teacher" ? Wo(u) : u;
2112
2212
  }
2113
- const ce = (e) => `/courses/${Ie}/modules/items/${e}`, yo = _e.length, _o = 8, To = 120, wo = 25, Po = 250, $e = 8;
2114
- function ii() {
2115
- return be(Array.from({ length: yo }, () => _o));
2213
+ const fe = (e) => `/courses/${le}/modules/items/${e}`, je = "2099-08-31T06:59:00Z", Yo = "2020-01-06T07:00:00Z", Qo = Ce.length, Ho = 8, Ko = 120, Zo = 25, Vo = 250, We = 8;
2214
+ function Ni() {
2215
+ return ye(Array.from({ length: Qo }, () => Ho));
2116
2216
  }
2117
- function li() {
2118
- return be(Array.from({ length: To }, () => wo));
2217
+ function Di() {
2218
+ return ye(Array.from({ length: Ko }, () => Zo));
2119
2219
  }
2120
- function ai() {
2121
- return be([
2122
- $e,
2123
- Po,
2124
- $e
2220
+ function qi() {
2221
+ return ye([
2222
+ We,
2223
+ Vo,
2224
+ We
2125
2225
  ]);
2126
2226
  }
2127
- function ui() {
2128
- return be([]);
2227
+ function Ri() {
2228
+ const e = (r, o, l) => ({
2229
+ id: String(r),
2230
+ name: o,
2231
+ position: r,
2232
+ published: !0,
2233
+ itemCount: 0,
2234
+ prerequisiteModules: [],
2235
+ requireSequentialProgress: !1,
2236
+ progress: {
2237
+ status: "locked",
2238
+ requirementsMet: 0,
2239
+ requirementCount: 0,
2240
+ percentComplete: 0,
2241
+ missingCount: 0
2242
+ },
2243
+ ...l
2244
+ }), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, s = [
2245
+ e(1, "Locked by a future date", { unlockAt: je }),
2246
+ e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
2247
+ e(3, "Locked by several prerequisites", {
2248
+ prerequisiteModules: [t, n]
2249
+ }),
2250
+ e(4, "Locked by a date and a prerequisite", {
2251
+ unlockAt: je,
2252
+ prerequisiteModules: [t]
2253
+ }),
2254
+ e(5, "Locked, and the unlock date has passed", { unlockAt: Yo })
2255
+ ];
2256
+ return {
2257
+ courseId: le,
2258
+ modules: s,
2259
+ itemsByModuleId: Object.fromEntries(s.map((r) => [r.id, []]))
2260
+ };
2261
+ }
2262
+ function Fi() {
2263
+ return ye([]);
2129
2264
  }
2130
- function ci() {
2265
+ function Oi() {
2131
2266
  const t = [
2132
- { title: "Reading: limits from the left and the right", type: "page", url: ce(1) },
2267
+ { title: "Reading: limits from the left and the right", type: "page", url: fe(1) },
2133
2268
  {
2134
2269
  title: "Desmos: interactive limit explorer",
2135
2270
  type: "external_url",
2136
- url: ce(2),
2271
+ url: fe(2),
2137
2272
  newTab: !0
2138
2273
  },
2139
2274
  { title: "Practice", type: "sub_header", url: null },
@@ -2141,9 +2276,9 @@ function ci() {
2141
2276
  {
2142
2277
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2143
2278
  type: "assignment",
2144
- url: ce(5)
2279
+ url: fe(5)
2145
2280
  },
2146
- { title: "Unit test", type: "quiz", url: ce(6), status: "locked" }
2281
+ { title: "Unit test", type: "quiz", url: fe(6), status: "locked" }
2147
2282
  ].map((n, s) => ({
2148
2283
  id: String(s + 1),
2149
2284
  moduleId: "1",
@@ -2155,7 +2290,7 @@ function ci() {
2155
2290
  ...n
2156
2291
  }));
2157
2292
  return {
2158
- courseId: Ie,
2293
+ courseId: le,
2159
2294
  modules: [
2160
2295
  {
2161
2296
  id: "1",
@@ -2163,7 +2298,7 @@ function ci() {
2163
2298
  position: 1,
2164
2299
  published: !0,
2165
2300
  itemCount: t.length,
2166
- prerequisiteModuleIds: [],
2301
+ prerequisiteModules: [],
2167
2302
  requireSequentialProgress: !1
2168
2303
  }
2169
2304
  ],
@@ -2171,74 +2306,76 @@ function ci() {
2171
2306
  };
2172
2307
  }
2173
2308
  export {
2174
- nt as CompletionRequirementSchema,
2175
- rn as CompletionRequirementTypeSchema,
2176
- Mt as DEFAULT_INLINE_THRESHOLD,
2177
- On as DEFAULT_ITEM_CONCURRENCY,
2178
- bt as DEFAULT_ITEM_PAGE_SIZE,
2179
- ne as DEFAULT_LOCALE,
2180
- Pe as DEFAULT_PAGE_SIZE,
2181
- St as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2182
- pe as DEFAULT_STALE_TIME_MS,
2183
- ot as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2184
- Ie as FIXTURE_COURSE_ID,
2185
- Ur as FilterChips,
2186
- kn as GET_MODULES,
2187
- qn as GET_MODULE_ITEMS,
2188
- Se as INLINE_ITEM_LIMIT,
2189
- we as INLINE_QUERY_NODE_BUDGET,
2190
- dn as InMemoryCourseMismatchError,
2191
- Rr as MODULES_FILTER_IDS,
2192
- no as ModuleCard,
2193
- Vr as ModuleItemRow,
2194
- st as ModuleItemSchema,
2195
- Yr as ModuleItemStatusPill,
2196
- nn as ModuleItemStatusSchema,
2197
- tn as ModuleItemTypeSchema,
2198
- un as ModuleItemsPageSchema,
2199
- Zr as ModuleNumberBadge,
2200
- on as ModuleProgressSchema,
2201
- ln as ModuleSchema,
2202
- jr as ModuleStatusPill,
2203
- sn as ModuleStatusSchema,
2204
- Ko as ModulesConfigProvider,
2205
- zn as ModulesConfigSchema,
2206
- ri as ModulesI18nProvider,
2207
- oi as ModulesList,
2208
- an as ModulesPageSchema,
2209
- rt as PageInfoSchema,
2210
- lt as PartialCanvasResponseError,
2211
- Rn as RegistryEntrySchema,
2212
- he as baseModulesConfig,
2213
- be as buildFixture,
2214
- ui as courseEmpty,
2215
- ai as courseFatModule,
2216
- ci as courseItemLinks,
2217
- li as courseLarge,
2218
- ii as courseSmall,
2219
- Ho as createCanvasGraphqlAdapter,
2220
- Qo as createInMemoryAdapter,
2221
- Et as createTranslate,
2222
- Er as defaultTranslate,
2223
- Fr as filterLabel,
2224
- cn as getEstimatedDurationMinutes,
2225
- si as invalidateCourse,
2226
- ti as invalidateModuleItems,
2227
- ni as invalidateModuleList,
2228
- Y as mergeRegistry,
2229
- Gr as moduleItemStatusLabel,
2230
- yt as moduleItemsPrefix,
2231
- Br as moduleStatusLabel,
2232
- te as modulesKeys,
2233
- $n as modulesListPrefix,
2234
- Xo as partialModulesConfig,
2235
- Fn as registrySchema,
2236
- Un as resolveModulesConfig,
2237
- Jo as useModuleItems,
2238
- Bn as useModules,
2239
- Vo as useModulesConfig,
2240
- k as useModulesI18n,
2241
- ei as useModulesPageData,
2242
- Zo as visibleEntries,
2243
- it as withEstimatedDurationMinutes
2309
+ it as CompletionRequirementSchema,
2310
+ mn as CompletionRequirementTypeSchema,
2311
+ Tt as DEFAULT_INLINE_THRESHOLD,
2312
+ Hn as DEFAULT_ITEM_CONCURRENCY,
2313
+ _t as DEFAULT_ITEM_PAGE_SIZE,
2314
+ H as DEFAULT_LOCALE,
2315
+ Ae as DEFAULT_PAGE_SIZE,
2316
+ wt as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2317
+ Se as DEFAULT_STALE_TIME_MS,
2318
+ ut as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2319
+ le as FIXTURE_COURSE_ID,
2320
+ to as FilterChips,
2321
+ Bn as GET_MODULES,
2322
+ Gn as GET_MODULE_ITEMS,
2323
+ we as INLINE_ITEM_LIMIT,
2324
+ Le as INLINE_QUERY_NODE_BUDGET,
2325
+ Mn as InMemoryCourseMismatchError,
2326
+ Zr as MODULES_FILTER_IDS,
2327
+ Po as ModuleCard,
2328
+ go as ModuleItemRow,
2329
+ lt as ModuleItemSchema,
2330
+ lo as ModuleItemStatusPill,
2331
+ cn as ModuleItemStatusSchema,
2332
+ un as ModuleItemTypeSchema,
2333
+ bn as ModuleItemsPageSchema,
2334
+ po as ModuleNumberBadge,
2335
+ gn as ModuleProgressSchema,
2336
+ fn as ModuleSchema,
2337
+ io as ModuleStatusPill,
2338
+ dn as ModuleStatusSchema,
2339
+ _i as ModulesConfigProvider,
2340
+ Yn as ModulesConfigSchema,
2341
+ vi as ModulesI18nProvider,
2342
+ ki as ModulesList,
2343
+ hn as ModulesPageSchema,
2344
+ at as PageInfoSchema,
2345
+ dt as PartialCanvasResponseError,
2346
+ pn as PrerequisiteModuleSchema,
2347
+ jn as RegistryEntrySchema,
2348
+ Me as baseModulesConfig,
2349
+ ye as buildFixture,
2350
+ Fi as courseEmpty,
2351
+ qi as courseFatModule,
2352
+ Oi as courseItemLinks,
2353
+ Di as courseLarge,
2354
+ Ri as courseLockReasons,
2355
+ Ni as courseSmall,
2356
+ yi as createCanvasGraphqlAdapter,
2357
+ Si as createInMemoryAdapter,
2358
+ At as createTranslate,
2359
+ Fr as defaultTranslate,
2360
+ Vr as filterLabel,
2361
+ In as getEstimatedDurationMinutes,
2362
+ Ai as invalidateCourse,
2363
+ xi as invalidateModuleItems,
2364
+ Li as invalidateModuleList,
2365
+ W as mergeRegistry,
2366
+ oo as moduleItemStatusLabel,
2367
+ Pt as moduleItemsPrefix,
2368
+ ro as moduleStatusLabel,
2369
+ ie as modulesKeys,
2370
+ Kn as modulesListPrefix,
2371
+ Pi as partialModulesConfig,
2372
+ Wn as registrySchema,
2373
+ Qn as resolveModulesConfig,
2374
+ Ei as useModuleItems,
2375
+ Zn as useModules,
2376
+ Ti as useModulesConfig,
2377
+ N as useModulesI18n,
2378
+ Ci as useModulesPageData,
2379
+ wi as visibleEntries,
2380
+ ct as withEstimatedDurationMinutes
2244
2381
  };