@instructure/platform-modules 0.3.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 (73) hide show
  1. package/dist/adapters/canvasGraphql/index.d.ts +7 -33
  2. package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
  3. package/dist/adapters/canvasGraphql/normalize.d.ts +44 -186
  4. package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
  5. package/dist/adapters/canvasGraphql/queries.d.ts +8 -36
  6. package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
  7. package/dist/adapters/inMemory.d.ts +1 -25
  8. package/dist/adapters/inMemory.d.ts.map +1 -1
  9. package/dist/adapters/limits.d.ts +17 -74
  10. package/dist/adapters/limits.d.ts.map +1 -1
  11. package/dist/adapters/types.d.ts +10 -40
  12. package/dist/adapters/types.d.ts.map +1 -1
  13. package/dist/cache/invalidate.d.ts +0 -23
  14. package/dist/cache/invalidate.d.ts.map +1 -1
  15. package/dist/cache/keys.d.ts +2 -43
  16. package/dist/cache/keys.d.ts.map +1 -1
  17. package/dist/components/FilterChips.d.ts +4 -10
  18. package/dist/components/FilterChips.d.ts.map +1 -1
  19. package/dist/components/ModuleCard.d.ts +10 -25
  20. package/dist/components/ModuleCard.d.ts.map +1 -1
  21. package/dist/components/ModuleCard.stories.d.ts +15 -0
  22. package/dist/components/ModuleCard.stories.d.ts.map +1 -1
  23. package/dist/components/ModuleItemRow.d.ts.map +1 -1
  24. package/dist/components/ModuleNumberBadge.d.ts.map +1 -1
  25. package/dist/components/ModulesList.d.ts +2 -23
  26. package/dist/components/ModulesList.d.ts.map +1 -1
  27. package/dist/components/ModulesList.stories.d.ts +22 -81
  28. package/dist/components/ModulesList.stories.d.ts.map +1 -1
  29. package/dist/components/StatusPill.d.ts +0 -3
  30. package/dist/components/StatusPill.d.ts.map +1 -1
  31. package/dist/components/index.d.ts +1 -1
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/labels.d.ts +26 -43
  34. package/dist/components/labels.d.ts.map +1 -1
  35. package/dist/config/context.d.ts +0 -1
  36. package/dist/config/context.d.ts.map +1 -1
  37. package/dist/config/registry.d.ts +5 -13
  38. package/dist/config/registry.d.ts.map +1 -1
  39. package/dist/config/types.d.ts +0 -3
  40. package/dist/config/types.d.ts.map +1 -1
  41. package/dist/fixtures/generate.d.ts +6 -17
  42. package/dist/fixtures/generate.d.ts.map +1 -1
  43. package/dist/fixtures/index.d.ts +1 -1
  44. package/dist/fixtures/index.d.ts.map +1 -1
  45. package/dist/fixtures/scenarios.d.ts +7 -32
  46. package/dist/fixtures/scenarios.d.ts.map +1 -1
  47. package/dist/hooks/constants.d.ts +4 -21
  48. package/dist/hooks/constants.d.ts.map +1 -1
  49. package/dist/hooks/queryOptions.d.ts +3 -24
  50. package/dist/hooks/queryOptions.d.ts.map +1 -1
  51. package/dist/hooks/useItemsMode.d.ts +3 -52
  52. package/dist/hooks/useItemsMode.d.ts.map +1 -1
  53. package/dist/hooks/useModuleItemQueries.d.ts +0 -38
  54. package/dist/hooks/useModuleItemQueries.d.ts.map +1 -1
  55. package/dist/hooks/useModulesPageData.d.ts +3 -29
  56. package/dist/hooks/useModulesPageData.d.ts.map +1 -1
  57. package/dist/i18n.d.ts +13 -20
  58. package/dist/i18n.d.ts.map +1 -1
  59. package/dist/index.d.ts +3 -10
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +1223 -1076
  62. package/dist/types/domain.d.ts +25 -80
  63. package/dist/types/domain.d.ts.map +1 -1
  64. package/dist/types/enums.d.ts +10 -41
  65. package/dist/types/enums.d.ts.map +1 -1
  66. package/dist/types/extensions.d.ts +0 -21
  67. package/dist/types/extensions.d.ts.map +1 -1
  68. package/dist/types/index.d.ts +2 -2
  69. package/dist/types/index.d.ts.map +1 -1
  70. package/dist/types/schemas.d.ts +5 -26
  71. package/dist/types/schemas.d.ts.map +1 -1
  72. package/locales/en.json +7 -7
  73. 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 J } from "graphql-tag";
3
- import { jsx as o, jsxs as T } from "react/jsx-runtime";
4
- import { createContext as Oe, useContext as $e, useMemo as v, useCallback as A, useRef as q, useState as V, useEffect as ce, useId as Be, memo as Ge } from "react";
5
- import { useInfiniteQuery as _e, useQueryClient as je, InfiniteQueryObserver as kt } from "@tanstack/react-query";
6
- import qt from "p-limit";
7
- import { Button as Z, IconButton as Rt } from "@instructure/ui-buttons";
8
- import { Flex as P } from "@instructure/ui-flex";
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
+ import { Flex as T } from "@instructure/ui-flex";
9
9
  import { Text as M } from "@instructure/ui-text";
10
- import { View as _ } from "@instructure/ui-view";
11
- import { politeAnnounce as Ye, getLiveRegion as Qe } from "@instructure/platform-instui-bindings";
12
- import { Alert as We } from "@instructure/ui-alerts";
13
- import { Heading as He } from "@instructure/ui-heading";
14
- import { IconLockLine as Ke, IconWarningLine as Ve, IconCheckLine as de, IconClockLine as Ze, IconArrowNestLine as Ft, IconEmptyLine as zt, IconLtiLine as Ut, IconLinkLine as Ot, IconAttachMediaLine as $t, IconDocumentLine as Bt, IconDiscussionLine as Gt, IconQuizLine as jt, IconAssignmentLine as Yt, IconArrowOpenUpLine as Qt, IconArrowOpenDownLine as Xe, IconSearchLine as Wt } from "@instructure/ui-icons";
15
- import { ProgressBar as Ht } from "@instructure/ui-progress";
16
- import { Spinner as Je } from "@instructure/ui-spinner";
17
- import { ScreenReaderContent as Kt } from "@instructure/ui-a11y-content";
18
- import { Link as Vt } from "@instructure/ui-link";
19
- import { Pill as Zt } from "@instructure/ui-pill";
20
- import { Menu as be } from "@instructure/ui-menu";
21
- import { TextInput as Xt } from "@instructure/ui-text-input";
22
- const Jt = d.enum([
10
+ import { View as y } from "@instructure/ui-view";
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 Jt = d.enum([
28
29
  "external_url",
29
30
  "external_tool",
30
31
  "sub_header"
31
- ]), en = d.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), tn = d.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), nn = 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 Jt = d.enum([
36
46
  "min_score",
37
47
  "min_percentage",
38
48
  "unknown"
39
- ]), sn = d.object({
40
- status: tn,
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
- }), et = d.object({
47
- itemId: d.string(),
48
- type: nn,
49
- minScore: d.number().nullish(),
50
- minPercentage: d.number().nullish()
51
- }), tt = d.object({
52
- id: d.string(),
53
- moduleId: d.string(),
54
- title: d.string(),
55
- type: Jt,
56
- position: d.number(),
57
- indent: d.number(),
58
- published: d.boolean(),
59
- url: d.string().nullish(),
60
- newTab: d.boolean().nullish(),
61
- completionRequirement: et.nullish(),
62
- dueAt: d.string().nullish(),
63
- status: en.optional(),
64
- pointsPossible: d.number().nullish(),
65
- extensions: d.record(d.unknown()).optional()
66
- }), rn = 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(tt).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(et).optional(),
78
- progress: sn.optional(),
79
- extensions: d.record(d.unknown()).optional()
80
- }), nt = 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
- }), on = d.object({
87
- modules: d.array(rn),
88
- pageInfo: nt
89
- }), ln = d.object({
90
- items: d.array(tt),
91
- pageInfo: nt
92
- }), st = "career.estimatedDurationMinutes";
93
- function an(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[st];
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 rt(e, t) {
99
- return t == null ? e : { ...e, [st]: t };
111
+ function ct(e, t) {
112
+ return t == null ? e : { ...e, [ut]: t };
100
113
  }
101
- const Me = 100, Te = 2e3;
102
- class un 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 cn = (e) => `offset:${e}`, dn = (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 = dn(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 ? cn(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 un(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), S = Math.min(c ?? Me, Me);
141
- return { modules: l.map((h) => {
142
- const w = n(h.id), x = a && w.length <= S;
143
- return { ...h, itemCount: w.length, items: x ? w : 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 ot 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 ot extends Error {
165
178
  ), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
166
179
  }
167
180
  }
168
- function it(e, t, n) {
181
+ function mt(e, t, n) {
169
182
  if (e != null) return e;
170
- throw new ot(t, n, "published");
183
+ throw new dt(t, n, "published");
171
184
  }
172
- function mn(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 mn(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 gn = {
194
+ const Tn = {
182
195
  Assignment: "assignment",
183
196
  Quiz: "quiz",
184
197
  Discussion: "discussion",
@@ -190,27 +203,24 @@ const gn = {
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 fn(e) {
209
+ function wn(e) {
200
210
  const t = e == null ? void 0 : e.__typename;
201
211
  if (!t) return null;
202
- const n = gn[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 hn = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
206
- function pn(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 = hn.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 In = /* @__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 In = /* @__PURE__ */ new Set([
218
228
  "min_score",
219
229
  "min_percentage"
220
230
  ]);
221
- function bn(e) {
222
- return In.has(e) ? e : "unknown";
231
+ function xn(e) {
232
+ return Cn.has(e) ? e : "unknown";
223
233
  }
224
- function Mn(e) {
234
+ function Ln(e) {
225
235
  return {
226
236
  itemId: String(e.id),
227
- type: bn(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 lt(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 Sn = /* @__PURE__ */ new Set(["graded"]), yn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), _n = /* @__PURE__ */ new Set(["graded", "excused"]);
239
- function at(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 ut(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 ut(e, t) {
258
268
  requirementsMetItemIds: s
259
269
  };
260
270
  }
261
- function Tn(e, t, n) {
271
+ function Nn(e, t, n, s = !0) {
262
272
  if (n.locked) return "locked";
263
- const s = at(e);
264
- if (s) {
265
- if (s.missing === !0) return "missing";
266
- if (Sn.has(s.state ?? "") || _n.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 || yn.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 Pn = (e) => e.pointsPossible != null;
275
- function wn(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(Pn);
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 En(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: wn(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 xn(e, t, n, s = {}, r) {
298
- var c, g, l;
299
- const i = String(e._id), u = fn(e.content);
300
- if (!u)
301
- return mn(s, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
302
- const a = at(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: it(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 ? Tn(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: rt(
330
+ extensions: ct(
320
331
  void 0,
321
- pn(e.estimatedDuration)
332
+ En(e.estimatedDuration)
322
333
  )
323
334
  };
324
335
  }
325
- function ct(e, t, n, s, r) {
326
- const i = [];
327
- for (const u of e ?? []) {
328
- if (!u) continue;
329
- const a = xn(
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 dt(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 = Mn(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 Cn(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 ot("module", n, "moduleItemsTotalCount");
354
- const { list: s, byItemId: r } = dt(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((g = i.pageInfo) != null && g.hasNextPage), a = ut(e.progression, s), c = u ? ct(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: it(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: En(e, s, a, c)
381
+ progress: Rn(e, s, u, c)
369
382
  };
370
383
  }
371
- function Ln(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(Cn(i, t));
376
- return { modules: s, pageInfo: lt(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 An(e, t, n = {}) {
379
- const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = dt(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = ut(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: ct(u == null ? void 0 : u.nodes, t, i, n, a),
382
- pageInfo: lt(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 vn = J`
398
+ const $n = oe`
386
399
  fragment PlatformModulesSubmissionFields on Submission {
387
400
  _id
388
401
  state
@@ -392,7 +405,7 @@ const vn = J`
392
405
  missing
393
406
  cachedDueDate
394
407
  }
395
- `, mt = J`
408
+ `, It = oe`
396
409
  fragment PlatformModulesItemFields on ModuleItem {
397
410
  _id
398
411
  title
@@ -439,8 +452,8 @@ const vn = J`
439
452
  }
440
453
  }
441
454
  }
442
- ${vn}
443
- `, gt = J`
455
+ ${$n}
456
+ `, Mt = oe`
444
457
  fragment PlatformModulesProgressionFields on ModuleProgression {
445
458
  workflowState
446
459
  completed
@@ -453,7 +466,7 @@ const vn = J`
453
466
  minPercentage
454
467
  }
455
468
  }
456
- `, Nn = J`
469
+ `, Bn = oe`
457
470
  query PlatformModulesGetModules(
458
471
  $courseId: ID!
459
472
  $first: Int!
@@ -477,6 +490,7 @@ const vn = J`
477
490
  requireSequentialProgress
478
491
  prerequisites {
479
492
  id
493
+ name
480
494
  }
481
495
  completionRequirements {
482
496
  id
@@ -509,9 +523,9 @@ const vn = J`
509
523
  }
510
524
  }
511
525
  }
512
- ${mt}
513
- ${gt}
514
- `, Dn = J`
526
+ ${It}
527
+ ${Mt}
528
+ `, Gn = oe`
515
529
  query PlatformModulesGetModuleItems(
516
530
  $moduleId: ID!
517
531
  $first: Int!
@@ -542,85 +556,83 @@ const vn = J`
542
556
  }
543
557
  }
544
558
  }
545
- ${mt}
546
- ${gt}
559
+ ${It}
560
+ ${Mt}
547
561
  `;
548
- function ft() {
562
+ function St() {
549
563
  return new DOMException("The operation was aborted.", "AbortError");
550
564
  }
551
- function ae(e) {
552
- if (e != null && e.aborted) throw ft();
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(ft());
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 Wo({
574
+ function yi({
561
575
  executeQuery: e,
562
- inlineItemLimit: t = Me,
563
- nodeBudget: n = Te,
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: S,
579
- inlineFirst: p,
580
- signal: f
588
+ pageSize: a,
589
+ includeItems: d,
590
+ inlineItemsFirst: h,
591
+ inlineFirst: I,
592
+ signal: p
581
593
  }) {
582
- ae(f);
583
- const h = m ? Math.min(p ?? l, l) : l, w = Math.min(S ?? t, t), x = Math.max(1, Math.min(w, Math.floor(n / h))), L = await Ae(
584
- e(Nn, {
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: x,
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
- ae(f);
597
- const C = Ln(L, u);
598
- return i ? on.parse(C) : C;
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
- ae(m);
607
- const S = await Ae(
608
- e(Dn, {
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
- ae(m);
618
- const p = An(S, c, u);
619
- return i ? ln.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 fe = {
635
+ const Me = {
624
636
  formatters: {},
625
637
  itemTypes: {},
626
638
  itemStatuses: {},
@@ -630,242 +642,240 @@ const fe = {
630
642
  itemActions: {},
631
643
  navigation: {}
632
644
  };
633
- Object.freeze(fe);
634
- for (const e of Object.values(fe))
645
+ Object.freeze(Me);
646
+ for (const e of Object.values(Me))
635
647
  Object.freeze(e);
636
- const ht = Oe(null);
637
- function Ho({ value: e, children: t }) {
638
- return /* @__PURE__ */ o(ht.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 Ko() {
641
- return $e(ht) ?? fe;
652
+ function Ti() {
653
+ return Qe(yt) ?? Me;
642
654
  }
643
- const Se = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
644
- function me(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 O(e, t = {}) {
660
+ function W(e, t = {}) {
649
661
  const n = Object.keys(e).map((r) => [
650
662
  r,
651
- me(e[r], Se(t, r) ? t[r] : void 0)
652
- ]), s = Object.keys(t).filter((r) => !Se(e, r)).sort().map((r) => [r, me({}, 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 Vo(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 kn = 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 qn(e) {
667
- return d.record(d.string(), e);
668
- }
669
- const $ = qn(kn.strict()), Rn = d.object({
670
- formatters: d.object({}).strict(),
671
- itemTypes: $,
672
- itemStatuses: $,
673
- itemMeta: $,
674
- filters: $,
675
- moduleActions: $,
676
- itemActions: $,
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 Fn(e, t = {}) {
680
- const n = Object.keys(t).filter((r) => !Se(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: me(e.formatters, t.formatters),
687
- itemTypes: O(e.itemTypes, t.itemTypes),
688
- itemStatuses: O(e.itemStatuses, t.itemStatuses),
689
- itemMeta: O(e.itemMeta, t.itemMeta),
690
- filters: O(e.filters, t.filters),
691
- moduleActions: O(e.moduleActions, t.moduleActions),
692
- itemActions: O(e.itemActions, t.itemActions),
693
- navigation: me(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 Rn.parse(s), s;
707
+ return Yn.parse(s), s;
696
708
  }
697
- function Zo(e = {}) {
698
- return Fn(fe, e);
709
+ function Pi(e = {}) {
710
+ return Qn(Me, e);
699
711
  }
700
- const Pe = 100, pt = 100, It = 100, zn = 4, he = 5 * 60 * 1e3, bt = 20, ge = { hasNextPage: !1, endCursor: null }, B = ["platform-modules"], ee = {
701
- all: B,
702
- course: (e) => [...B, e],
703
- list: (e, t = {}) => [...B, e, "list", t],
704
- items: (e, t, n = {}) => [...B, e, "module", t, "items", n]
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 = {
713
+ all: Q,
714
+ course: (e) => [...Q, e],
715
+ list: (e, t = {}) => [...Q, e, "list", t],
716
+ items: (e, t, n = {}) => [...Q, e, "module", t, "items", n]
705
717
  };
706
- function Un(e) {
707
- return [...B, e, "list"];
718
+ function Kn(e) {
719
+ return [...Q, e, "list"];
708
720
  }
709
- function Mt(e, t) {
710
- return [...B, e, "module", t, "items"];
721
+ function Pt(e, t) {
722
+ return [...Q, e, "module", t, "items"];
711
723
  }
712
- function St(e) {
724
+ function Et(e) {
713
725
  return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
714
726
  }
715
- function yt(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: ee.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: St,
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 behavior 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 _t(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: ee.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: St,
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 On(e) {
779
+ function Zn(e) {
770
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 = he,
786
+ inlineItemsFirst: o,
787
+ inlineFirst: l,
788
+ view: u,
789
+ staleTime: c = Se,
780
790
  enabled: g = !0
781
- } = e, l = _e(
782
- yt({
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 = (w = l.data) == null ? void 0 : w.pages, S = v(() => (m ?? []).flatMap((x) => x.modules), [m]), p = m && m.length > 0 ? m[m.length - 1].pageInfo : ge, f = l.fetchNextPage, h = A(() => {
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: S,
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 Xo(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 = pt,
814
- view: i,
815
- enabled: u = !0,
816
- staleTime: a = he,
823
+ pageSize: r = _t,
824
+ view: o,
825
+ enabled: l = !0,
826
+ staleTime: u = Se,
817
827
  limit: c
818
- } = e, g = _e(
819
- _t({
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 = v(() => (l ?? []).flatMap((w) => w.items), [l]), S = l && l.length > 0 ? l[l.length - 1].pageInfo : ge, p = g.fetchNextPage, f = A(() => {
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: S,
835
- hasNextPage: S.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 $n(e, t, n = Te) {
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 Bn(e) {
852
- var S;
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 = It,
858
- nodeBudget: i = n.inlineNodeBudget ?? Te,
859
- pageSize: u = Pe,
860
- view: a,
861
- staleTime: c = he
862
- } = e, g = s === "auto", l = _e(
863
- yt({
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,392 +888,437 @@ function Bn(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 = (S = l.data) == null ? void 0 : S.pages[0];
890
- return m ? {
891
- resolvedMode: $n(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: Gn(m)
905
+ inlineShape: Jn(d)
896
906
  } : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
897
907
  }
898
- function Gn(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", jn = /* @__PURE__ */ new Map();
905
- function Yn(e, t, n = bt) {
906
- const s = je(), r = q(/* @__PURE__ */ new Map()), [i, u] = V(jn), a = e.join(ve), c = v(() => a === "" ? [] : a.split(ve), [a]);
907
- ce(() => {
908
- const l = r.current, m = () => {
909
- u((f) => {
910
- const h = /* @__PURE__ */ new Map();
911
- let w = f.size !== l.size;
912
- for (const [x, L] of l) {
913
- const C = L.getCurrentResult();
914
- h.set(x, C), !w && f.get(x) !== C && (w = !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 w ? h : f;
926
+ return w ? f : p;
917
927
  });
918
- }, S = new Set(c);
919
- for (const f of c) {
920
- if (l.has(f)) continue;
921
- const h = new kt(
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, S.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 - S.size;
934
- if (p > n)
935
- for (const [f, h] of l) {
936
- if (p <= n) break;
937
- S.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]), ce(() => {
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 = A((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 Qn = [], Wn = () => {
963
+ const ns = [], ss = () => {
954
964
  };
955
- function Jo(e) {
956
- var z, ie;
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 = It,
963
- pageSize: u = Pe,
964
- itemPageSize: a = pt,
965
- itemConcurrency: c = zn,
966
- retainCollapsedLimit: g = bt,
967
- staleTime: l = he,
968
- initialExpandedModuleIds: m
969
- } = e, S = je(), p = Bn({
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 = On({
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: (z = p.inlineShape) == null ? void 0 : z.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: (ie = p.inlineShape) == null ? void 0 : ie.moduleCount,
991
- enabled: f !== null
992
- }), [w, x] = V(
993
- () => m ?? []
994
- ), L = v(() => {
995
- const y = /* @__PURE__ */ new Map();
996
- for (const b of h.modules) y.set(b.id, b);
997
- return y;
998
- }, [h.modules]), C = v(
999
- () => w.filter((y) => {
1000
- const b = L.get(y);
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(() => {
1002
+ const S = /* @__PURE__ */ new Map();
1003
+ for (const b of f.modules) S.set(b.id, b);
1004
+ return S;
1005
+ }, [f.modules]), P = v(
1006
+ () => w.filter((S) => {
1007
+ const b = A.get(S);
1001
1008
  return b !== void 0 && b.items === void 0;
1002
1009
  }),
1003
- [w, L]
1004
- ), ne = v(() => new Set(C), [C]), se = v(() => qt(c), [c]), E = A(
1005
- (y, b) => _t({
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
- moduleId: y,
1014
+ moduleId: S,
1008
1015
  adapter: n,
1009
- pageSize: a,
1016
+ pageSize: u,
1010
1017
  view: s,
1011
- staleTime: l,
1018
+ staleTime: a,
1012
1019
  enabled: b,
1013
- limit: se
1020
+ limit: ue
1014
1021
  }),
1015
- [t, n, a, s, l, se]
1016
- ), G = Yn(C, E, g), j = G.fetchNextPage, R = q(/* @__PURE__ */ new Map()), Y = A(
1017
- (y) => {
1018
- let b = R.current.get(y);
1019
- return b || (b = () => j(y), R.current.set(y, b)), b;
1022
+ [t, n, u, s, a, ue]
1023
+ ), z = ts(P, U, g), R = z.fetchNextPage, ce = O(/* @__PURE__ */ new Map()), K = k(
1024
+ (S) => {
1025
+ let b = ce.current.get(S);
1026
+ return b || (b = () => R(S), ce.current.set(S, b)), b;
1020
1027
  },
1021
- [j]
1022
- ), D = A((y) => {
1023
- x(
1024
- (b) => b.includes(y) ? b : [...b, y]
1028
+ [R]
1029
+ ), Z = k((S) => {
1030
+ L(
1031
+ (b) => b.includes(S) ? b : [...b, S]
1025
1032
  );
1026
- }, []), F = A(
1027
- (y) => {
1028
- x((b) => b.filter((I) => I !== y)), S.cancelQueries({ queryKey: Mt(t, y) });
1033
+ }, []), V = k(
1034
+ (S) => {
1035
+ L((b) => b.filter((C) => C !== S)), h.cancelQueries({ queryKey: Pt(t, S) });
1029
1036
  },
1030
- [S, t]
1031
- ), Q = q(w);
1032
- Q.current = w;
1033
- const re = A(
1034
- (y) => {
1035
- Q.current.includes(y) ? F(y) : D(y);
1037
+ [h, t]
1038
+ ), de = O(w);
1039
+ de.current = w;
1040
+ const _e = k(
1041
+ (S) => {
1042
+ de.current.includes(S) ? V(S) : Z(S);
1036
1043
  },
1037
- [F, D]
1038
- ), k = G.results, oe = q(/* @__PURE__ */ new Map()), W = A(
1039
- (y) => {
1040
- var xe;
1041
- const b = L.get(y), I = k.get(y), H = ne.has(y), K = oe.current.get(y);
1042
- if (K && K.items === (b == null ? void 0 : b.items) && K.result === I && K.active === H)
1043
- return K.value;
1044
- const we = (le) => (oe.current.set(y, { items: b == null ? void 0 : b.items, result: I, active: H, value: le }), le);
1044
+ [V, Z]
1045
+ ), E = z.results, X = O(/* @__PURE__ */ new Map()), me = k(
1046
+ (S) => {
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);
1045
1052
  if ((b == null ? void 0 : b.items) !== void 0)
1046
- return we({
1053
+ return F({
1047
1054
  items: b.items,
1048
- pageInfo: ge,
1055
+ pageInfo: Ie,
1049
1056
  hasNextPage: !1,
1050
- fetchNextPage: Wn,
1057
+ fetchNextPage: ss,
1051
1058
  isLoading: !1,
1052
1059
  isFetchingNextPage: !1,
1053
1060
  error: null,
1054
1061
  source: "inline"
1055
1062
  });
1056
- const U = (xe = I == null ? void 0 : I.data) == null ? void 0 : xe.pages, Dt = U ? U.flatMap((le) => le.items) : Qn, Ee = U && U.length > 0 ? U[U.length - 1].pageInfo : ge;
1057
- return we({
1058
- items: Dt,
1059
- pageInfo: Ee,
1060
- hasNextPage: Ee.hasNextPage,
1061
- fetchNextPage: Y(y),
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: I ? I.isLoading : H,
1065
- isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
1066
- error: (I == null ? void 0 : I.error) ?? null,
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,
1068
+ fetchNextPage: K(S),
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
- [L, k, Y, ne]
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: W,
1082
- expandModule: D,
1083
- collapseModule: F,
1084
- toggleModule: re,
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,
1085
1092
  expandedModuleIds: w
1086
1093
  };
1087
1094
  }
1088
- function ei(e, t, n, s) {
1089
- const r = s ? ee.items(t, n, s) : Mt(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 ti(e, t, n) {
1093
- const s = n ? ee.list(t, n) : Un(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 ni(e, t) {
1097
- return e.invalidateQueries({ queryKey: ee.course(t) });
1098
- }
1099
- const Hn = "Course modules", Kn = { one: "%{count} module loaded", other: "%{count} modules loaded" }, Vn = "Search by name", Zn = "Search…", Xn = "Expand / collapse", Jn = "Expand all", es = "Collapse all", ts = "Search matches module names only — items of collapsed modules are not loaded.", ns = "Modules failed to load: %{message}", ss = "Loading modules", rs = "This course has no modules.", os = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, is = "Clear filters", ls = "Loading more modules…", as = "Load more modules (%{count} loaded)", us = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, cs = "Filter", ds = "All", ms = "In progress", gs = "Complete", fs = "Due this week", hs = "Missing", ps = "Locked until prerequisites are met", Is = "%{name} progress", bs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Ms = "Items failed to load: %{message}", Ss = "Loading items", ys = "Loading…", _s = "No items.", Ts = "Loading more items…", Ps = "Load more items (%{loaded} of %{count} loaded)", ws = "(unpublished)", Es = "Collapse %{name}", xs = "Expand %{name}", Cs = "Not started", Ls = "In progress", As = "All items complete", vs = "All items graded", Ns = "Missing", Ds = "Locked", ks = "Not started", qs = "In progress", Rs = "Submitted", Fs = "Graded", zs = "Missing", Us = "Locked", Os = "Assignment", $s = "Quiz", Bs = "Discussion", Gs = "Page", js = "File", Ys = "External URL", Qs = "External tool", Ws = "Text header", Hs = "View the item", Ks = "Submit the assignment", Vs = "Contribute to the page", Zs = "Mark as done", Xs = "Score at least the minimum", Js = "Score at least %{count}", er = "Score at least the minimum percentage", tr = "Score at least %{count}%", nr = "Complete the requirement", sr = "today, %{time}", rr = "yesterday, %{time}", or = "tomorrow, %{time}", ir = "%{date}, %{time}", lr = "Due %{when}", ar = "Will unlock on %{when}", ur = { one: "%{count} pt", other: "%{count} pts" }, cr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, dr = "%{count} min", mr = "Unpublished", gr = "Untitled item", fr = "opens in a new window", hr = {
1100
- pageTitle: Hn,
1101
- modulesLoadedAnnouncement: Kn,
1102
- moduleSearchLabel: Vn,
1103
- searchPlaceholder: Zn,
1104
- expandCollapseTrigger: Xn,
1105
- expandAll: Jn,
1106
- collapseAll: es,
1107
- searchScopeHint: ts,
1108
- modulesLoadErrorAlert: ns,
1109
- modulesLoadingSpinnerLabel: ss,
1110
- noModulesEmptyState: rs,
1111
- filteredEmptyState: os,
1112
- clearFilters: is,
1113
- loadMoreModulesLoading: ls,
1114
- loadMoreModules: as,
1115
- allModulesLoaded: us,
1116
- filterGroupLabel: cs,
1117
- filterAll: ds,
1118
- filterInProgress: ms,
1119
- filterComplete: gs,
1120
- filterDueThisWeek: fs,
1121
- filterMissing: hs,
1122
- lockedByline: ps,
1123
- moduleProgressScreenReaderLabel: Is,
1124
- itemsLoadedAnnouncement: bs,
1125
- itemsLoadErrorAlert: Ms,
1126
- itemsLoadingSpinnerLabel: Ss,
1127
- itemsLoadingText: ys,
1128
- noItemsEmptyState: _s,
1129
- loadMoreItemsLoading: Ts,
1130
- loadMoreItems: Ps,
1131
- moduleUnpublishedBadge: ws,
1132
- collapseModule: Es,
1133
- expandModule: xs,
1134
- moduleStatusNotStarted: Cs,
1135
- moduleStatusInProgress: Ls,
1136
- moduleStatusAllSubmitted: As,
1137
- moduleStatusAllGraded: vs,
1138
- moduleStatusMissing: Ns,
1139
- moduleStatusLocked: Ds,
1140
- itemStatusNotStarted: ks,
1141
- itemStatusInProgress: qs,
1142
- itemStatusSubmitted: Rs,
1143
- itemStatusGraded: Fs,
1144
- itemStatusMissing: zs,
1145
- itemStatusLocked: Us,
1146
- itemTypeAssignment: Os,
1147
- itemTypeQuiz: $s,
1148
- itemTypeDiscussion: Bs,
1149
- itemTypePage: Gs,
1150
- itemTypeFile: js,
1151
- itemTypeExternalUrl: Ys,
1152
- itemTypeExternalTool: Qs,
1153
- itemTypeSubHeader: Ws,
1154
- requirementMustView: Hs,
1155
- requirementMustSubmit: Ks,
1156
- requirementMustContribute: Vs,
1157
- requirementMustMarkDone: Zs,
1158
- requirementMinScoreUnknown: Xs,
1159
- requirementMinScore: Js,
1160
- requirementMinPercentageUnknown: er,
1161
- requirementMinPercentage: tr,
1162
- requirementUnknown: nr,
1163
- dateTimeToday: sr,
1164
- dateTimeYesterday: rr,
1165
- dateTimeTomorrow: or,
1166
- dateTimeWithDate: ir,
1167
- dueByline: lr,
1168
- unlockByline: ar,
1169
- pointsAbbreviated: ur,
1170
- progressSummary: cr,
1171
- durationMinutes: dr,
1172
- itemUnpublishedLabel: mr,
1173
- itemUntitled: gr,
1174
- opensInNewWindow: fr
1175
- }, pr = /%\{(\w+)\}/g, Ir = hr, te = "en-US", br = /* @__PURE__ */ new Map(), Mr = /* @__PURE__ */ new Map();
1176
- function Tt(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) {
1177
1188
  const s = e.get(t);
1178
1189
  if (s) return s;
1179
1190
  const r = n();
1180
1191
  return e.set(t, r), r;
1181
1192
  }
1182
- function Sr(e, t, n) {
1183
- return n ? e.replace(pr, (s, r) => {
1193
+ function Dr(e, t, n) {
1194
+ return n ? e.replace(Ar, (s, r) => {
1184
1195
  if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
1185
- const i = n[r];
1186
- return typeof i == "number" && Number.isFinite(i) ? Tt(Mr, 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);
1187
1198
  }) : e;
1188
1199
  }
1189
- function yr(e, t, n) {
1200
+ function qr(e, t, n) {
1190
1201
  const s = n == null ? void 0 : n.count;
1191
1202
  if (typeof s == "number" && Number.isFinite(s)) {
1192
- const r = Tt(br, t, () => new Intl.PluralRules(t)).select(s), i = e[r];
1193
- 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;
1194
1205
  }
1195
1206
  return typeof e.other == "string" ? e.other : void 0;
1196
1207
  }
1197
- function Ne(e, t, n) {
1208
+ function qe(e, t, n) {
1198
1209
  if (typeof e == "string") return e;
1199
1210
  if (e !== null && typeof e == "object")
1200
- return yr(e, t, n);
1211
+ return qr(e, t, n);
1201
1212
  }
1202
- function _r(e, t, n, s) {
1203
- 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);
1204
1215
  if (typeof r == "string") return r;
1205
- const i = Ne(Ir[t], n, s);
1206
- return typeof i == "string" ? i : t;
1216
+ const o = qe(vr[t], n, s);
1217
+ return typeof o == "string" ? o : t;
1207
1218
  }
1208
- function Pt(e, t = te) {
1209
- return (n, s) => Sr(_r(e, n, t, s), t, s);
1219
+ function At(e, t = H) {
1220
+ return (n, s) => Dr(Rr(e, n, t, s), t, s);
1210
1221
  }
1211
- const Tr = Pt(), Pr = { t: Tr, locale: te }, wt = Oe(null);
1212
- function si({
1222
+ const Fr = At(), Or = { t: Fr, locale: H }, vt = Ye(null);
1223
+ function vi({
1213
1224
  translations: e,
1214
1225
  locale: t,
1215
- children: n
1226
+ timezone: n,
1227
+ children: s
1216
1228
  }) {
1217
- const s = v(() => {
1218
- const r = t ?? te;
1219
- return { t: Pt(e, r), locale: r };
1220
- }, [e, t]);
1221
- return /* @__PURE__ */ o(wt.Provider, { value: s, children: n });
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 });
1222
1234
  }
1223
1235
  function N() {
1224
- return $e(wt) ?? Pr;
1236
+ return Qe(vt) ?? Or;
1225
1237
  }
1226
- const wr = 864e5, De = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
1227
- function Er(e) {
1228
- const t = ke.get(e);
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);
1229
1241
  if (t) return t;
1230
1242
  const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
1231
- return ke.set(e, n), n;
1243
+ return Fe.set(e, n), n;
1232
1244
  }
1233
- function xr(e) {
1234
- const t = De.get(e);
1235
- if (t) return t;
1236
- const n = {
1237
- time: new Intl.DateTimeFormat(e, { hour: "numeric", minute: "2-digit" }),
1238
- day: new Intl.DateTimeFormat(e, { month: "long", day: "numeric" }),
1239
- 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
+ })
1240
1266
  };
1241
- return De.set(e, n), n;
1242
1267
  }
1243
- function Et(e, t) {
1244
- const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), s = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
1245
- return Math.round((n - s) / wr);
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);
1293
+ };
1294
+ return Date.UTC(s("year"), s("month") - 1, s("day"));
1246
1295
  }
1247
- function xt(e, t, n, s = te) {
1248
- const r = new Date(t);
1249
- if (Number.isNaN(r.getTime())) return t;
1250
- const i = xr(s), u = i.time.format(r), a = Et(r, n);
1251
- if (a === 0) return e("dateTimeToday", { time: u });
1252
- if (a === -1) return e("dateTimeYesterday", { time: u });
1253
- if (a === 1) return e("dateTimeTomorrow", { time: u });
1254
- const c = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
1255
- return e("dateTimeWithDate", { date: c, time: u });
1296
+ function Gr(e, t, n) {
1297
+ return Nt(kt(H, n), e, t);
1256
1298
  }
1257
- function Ct(e, t, n, s) {
1258
- return e("dueByline", { when: xt(e, t, n, s) });
1299
+ function Nt(e, t, n) {
1300
+ return Math.round((Ee(e, t) - Ee(e, n)) / Ur);
1259
1301
  }
1260
- function qe(e, t, n, s) {
1261
- return e("unlockByline", { when: xt(e, t, n, s) });
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 });
1262
1311
  }
1263
- function Cr(e, t = te) {
1264
- return !Number.isInteger(e) || e < 1 ? null : Er(t).format(e);
1312
+ function qt(e, t, n, s = {}) {
1313
+ return e("dueByline", { when: Dt(e, t, n, s) });
1265
1314
  }
1266
- function Lr(e, t) {
1315
+ function ze(e, t, n, s = {}) {
1316
+ return e("unlockByline", { when: Dt(e, t, n, s) });
1317
+ }
1318
+ function jr(e, t = H) {
1319
+ return !Number.isInteger(e) || e < 1 ? null : $r(t).format(e);
1320
+ }
1321
+ function Wr(e, t) {
1267
1322
  switch (t) {
1268
1323
  case "assignment":
1269
1324
  return e("itemTypeAssignment");
@@ -1283,10 +1338,10 @@ function Lr(e, t) {
1283
1338
  return e("itemTypeSubHeader");
1284
1339
  }
1285
1340
  }
1286
- function Ar(e, t) {
1341
+ function Yr(e, t) {
1287
1342
  return t == null ? null : e("pointsAbbreviated", { count: t });
1288
1343
  }
1289
- function vr(e, t) {
1344
+ function Qr(e, t) {
1290
1345
  switch (t.type) {
1291
1346
  case "must_view":
1292
1347
  return e("requirementMustView");
@@ -1304,17 +1359,20 @@ function vr(e, t) {
1304
1359
  return e("requirementUnknown");
1305
1360
  }
1306
1361
  }
1307
- function Nr(e, t, n, s) {
1362
+ function Hr(e, t, n, s) {
1308
1363
  return e("progressSummary", { percent: t, met: n, count: s });
1309
1364
  }
1310
- const Dr = [
1365
+ function Kr(e, t, n, s) {
1366
+ return e("progressScreenReaderValue", { percent: t, met: n, count: s });
1367
+ }
1368
+ const Zr = [
1311
1369
  "all",
1312
1370
  "in_progress",
1313
1371
  "complete",
1314
1372
  "due_this_week",
1315
1373
  "missing"
1316
1374
  ];
1317
- function kr(e, t) {
1375
+ function Vr(e, t) {
1318
1376
  switch (t) {
1319
1377
  case "all":
1320
1378
  return e("filterAll");
@@ -1328,39 +1386,39 @@ function kr(e, t) {
1328
1386
  return e("filterMissing");
1329
1387
  }
1330
1388
  }
1331
- const qr = 7;
1332
- function Rr(e, t, n) {
1389
+ const Xr = 7;
1390
+ function Jr(e, t, n, s) {
1333
1391
  if (t === "all") return !0;
1334
- const s = e.progress;
1335
- if (!s) return !1;
1392
+ const r = e.progress;
1393
+ if (!r) return !1;
1336
1394
  switch (t) {
1337
1395
  case "in_progress":
1338
- return s.status === "in_progress";
1396
+ return r.status === "in_progress";
1339
1397
  case "complete":
1340
- return s.status === "all_submitted" || s.status === "all_graded";
1398
+ return r.status === "all_submitted" || r.status === "all_graded";
1341
1399
  case "missing":
1342
- return s.missingCount > 0;
1400
+ return r.missingCount > 0;
1343
1401
  case "due_this_week": {
1344
- if (!s.latestDueAt) return !1;
1345
- const r = new Date(s.latestDueAt);
1346
- if (Number.isNaN(r.getTime())) return !1;
1347
- const i = Et(r, n);
1348
- return i >= 0 && i <= qr;
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;
1349
1407
  }
1350
1408
  default:
1351
1409
  return !0;
1352
1410
  }
1353
1411
  }
1354
- function Fr(e, t, n) {
1412
+ function eo(e, t, n) {
1355
1413
  const s = t.trim().toLocaleLowerCase(n);
1356
1414
  return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
1357
1415
  }
1358
- function zr({ value: e, onChange: t }) {
1359
- const { t: n } = N(), s = Be();
1360
- return /* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
1361
- /* @__PURE__ */ o(_, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(M, { size: "medium", weight: "bold", id: s, children: n("filterGroupLabel") }) }),
1362
- /* @__PURE__ */ o(
1363
- P,
1416
+ function to({ value: e, onChange: t }) {
1417
+ const { t: n } = N(), s = He();
1418
+ return /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
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(
1421
+ T,
1364
1422
  {
1365
1423
  gap: "space4",
1366
1424
  wrap: "wrap",
@@ -1368,18 +1426,18 @@ function zr({ value: e, onChange: t }) {
1368
1426
  role: "group",
1369
1427
  "aria-labelledby": s,
1370
1428
  "data-testid": "filter-chips",
1371
- children: Dr.map((r) => {
1372
- const i = r === e;
1373
- return /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1374
- Z,
1429
+ children: Zr.map((r) => {
1430
+ const o = r === e;
1431
+ return /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
1432
+ ne,
1375
1433
  {
1376
1434
  size: "medium",
1377
- color: i ? "primary" : "secondary",
1378
- "aria-pressed": i,
1435
+ color: o ? "primary" : "secondary",
1436
+ "aria-pressed": o,
1379
1437
  onClick: () => t(r),
1380
1438
  "data-testid": `filter-chip-${r}`,
1381
1439
  themeOverride: { borderRadius: "0.5rem" },
1382
- children: kr(n, r)
1440
+ children: Vr(n, r)
1383
1441
  }
1384
1442
  ) }, r);
1385
1443
  })
@@ -1387,22 +1445,24 @@ function zr({ value: e, onChange: t }) {
1387
1445
  )
1388
1446
  ] });
1389
1447
  }
1390
- const Ur = {
1448
+ const no = {
1391
1449
  not_started: {},
1392
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
1393
- all_submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1394
- all_graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1395
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
1396
- locked: { icon: /* @__PURE__ */ o(Ke, {}) }
1397
- }, Or = {
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 = {
1398
1456
  not_started: {},
1399
- in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
1400
- submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1401
- graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
1402
- missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
1403
- locked: { icon: /* @__PURE__ */ o(Ke, {}) }
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, {}) }
1404
1464
  };
1405
- function $r(e, t) {
1465
+ function ro(e, t) {
1406
1466
  switch (t) {
1407
1467
  case "not_started":
1408
1468
  return e("moduleStatusNotStarted");
@@ -1418,66 +1478,70 @@ function $r(e, t) {
1418
1478
  return e("moduleStatusLocked");
1419
1479
  }
1420
1480
  }
1421
- function Br(e, t) {
1481
+ function oo(e, t) {
1422
1482
  switch (t) {
1423
1483
  case "not_started":
1424
1484
  return e("itemStatusNotStarted");
1425
1485
  case "in_progress":
1426
1486
  return e("itemStatusInProgress");
1487
+ case "complete":
1488
+ return e("itemStatusComplete");
1427
1489
  case "submitted":
1428
1490
  return e("itemStatusSubmitted");
1429
1491
  case "graded":
1430
1492
  return e("itemStatusGraded");
1493
+ case "excused":
1494
+ return e("itemStatusExcused");
1431
1495
  case "missing":
1432
1496
  return e("itemStatusMissing");
1433
1497
  case "locked":
1434
1498
  return e("itemStatusLocked");
1435
1499
  }
1436
1500
  }
1437
- function Lt(e, t, n) {
1438
- return /* @__PURE__ */ o(Zt, { 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 });
1439
1503
  }
1440
- function Gr({ status: e }) {
1504
+ function io({ status: e }) {
1441
1505
  const { t } = N();
1442
- return Lt(
1443
- Ur[e],
1444
- $r(t, e),
1506
+ return Rt(
1507
+ no[e],
1508
+ ro(t, e),
1445
1509
  "module-status-pill"
1446
1510
  );
1447
1511
  }
1448
- function jr({ status: e }) {
1512
+ function lo({ status: e }) {
1449
1513
  const { t } = N();
1450
- return Lt(
1451
- Or[e],
1452
- Br(t, e),
1514
+ return Rt(
1515
+ so[e],
1516
+ oo(t, e),
1453
1517
  "item-status-pill"
1454
1518
  );
1455
1519
  }
1456
- const Yr = {
1457
- assignment: /* @__PURE__ */ o(Yt, {}),
1458
- quiz: /* @__PURE__ */ o(jt, {}),
1459
- discussion: /* @__PURE__ */ o(Gt, {}),
1460
- page: /* @__PURE__ */ o(Bt, {}),
1461
- file: /* @__PURE__ */ o($t, {}),
1462
- external_url: /* @__PURE__ */ o(Ot, {}),
1463
- external_tool: /* @__PURE__ */ o(Ut, {}),
1464
- sub_header: /* @__PURE__ */ o(zt, {})
1465
- }, Qr = 1.75, Wr = {
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 = {
1466
1530
  contentVisibility: "auto",
1467
1531
  containIntrinsicSize: "auto 3.5rem"
1468
1532
  };
1469
- function Hr({ item: e, today: t, navigation: n }) {
1533
+ function mo({ item: e, today: t, navigation: n }) {
1470
1534
  var p;
1471
- const { t: s, locale: r } = N(), i = e.title || s("itemUntitled");
1535
+ const { t: s, locale: r, timezone: o } = N(), l = e.title || s("itemUntitled");
1472
1536
  if (e.type === "sub_header")
1473
- return /* @__PURE__ */ o(
1474
- _,
1537
+ return /* @__PURE__ */ i(
1538
+ y,
1475
1539
  {
1476
1540
  as: "div",
1477
1541
  padding: "x-small small",
1478
1542
  margin: "x-small 0 0 0",
1479
1543
  "data-testid": `module-item-${e.id}`,
1480
- children: /* @__PURE__ */ o(
1544
+ children: /* @__PURE__ */ i(
1481
1545
  M,
1482
1546
  {
1483
1547
  size: "small",
@@ -1486,18 +1550,18 @@ function Hr({ item: e, today: t, navigation: n }) {
1486
1550
  letterSpacing: "expanded",
1487
1551
  "data-testid": "module-item-title",
1488
1552
  "data-sub-header": "true",
1489
- children: i
1553
+ children: l
1490
1554
  }
1491
1555
  )
1492
1556
  }
1493
1557
  );
1494
- 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 = [Lr(s, e.type)];
1495
- e.dueAt && l.push(Ct(s, e.dueAt, t, r));
1496
- const m = Ar(s, e.pointsPossible);
1497
- m && l.push(m), e.completionRequirement && l.push(vr(s, e.completionRequirement));
1498
- const S = an(e);
1499
- return S !== null && l.push(s("durationMinutes", { count: S })), e.published || l.push(s("itemUnpublishedLabel")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * Qr}rem`, ...Wr }, children: /* @__PURE__ */ o(
1500
- _,
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(
1564
+ y,
1501
1565
  {
1502
1566
  as: "div",
1503
1567
  background: "secondary",
@@ -1505,10 +1569,10 @@ function Hr({ item: e, today: t, navigation: n }) {
1505
1569
  padding: "x-small small",
1506
1570
  margin: "x-small 0 0 0",
1507
1571
  "data-testid": `module-item-${e.id}`,
1508
- children: /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", children: [
1509
- e.indent > 0 ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { color: "secondary", children: /* @__PURE__ */ o(Ft, {}) }) }) : null,
1510
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1511
- _,
1572
+ children: /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", children: [
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(
1575
+ y,
1512
1576
  {
1513
1577
  as: "div",
1514
1578
  background: "primary",
@@ -1518,131 +1582,164 @@ function Hr({ item: e, today: t, navigation: n }) {
1518
1582
  width: "2.25rem",
1519
1583
  height: "2.25rem",
1520
1584
  textAlign: "center",
1521
- children: /* @__PURE__ */ o(M, { color: "secondary", children: Yr[e.type] })
1585
+ children: /* @__PURE__ */ i(M, { color: "secondary", children: ao[e.type] })
1522
1586
  }
1523
1587
  ) }),
1524
- /* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1525
- /* @__PURE__ */ o(_, { as: "div", children: a || !u ? /* @__PURE__ */ o(
1588
+ /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1589
+ /* @__PURE__ */ i(y, { as: "div", children: c || !u ? /* @__PURE__ */ i(
1526
1590
  M,
1527
1591
  {
1528
1592
  weight: "bold",
1529
1593
  size: "small",
1530
- color: a ? "secondary" : "primary",
1594
+ color: c ? "secondary" : "primary",
1531
1595
  "data-testid": "module-item-title",
1532
- "data-locked": a ? "true" : void 0,
1533
- children: i
1596
+ "data-locked": c ? "true" : void 0,
1597
+ children: l
1534
1598
  }
1535
- ) : /* @__PURE__ */ T(
1536
- Vt,
1599
+ ) : /* @__PURE__ */ _(
1600
+ rn,
1537
1601
  {
1538
1602
  href: u,
1539
- onClick: g,
1603
+ onClick: a,
1540
1604
  forceButtonRole: !1,
1541
1605
  isWithinText: !1,
1542
1606
  target: e.newTab ? "_blank" : void 0,
1543
1607
  rel: e.newTab ? "noopener noreferrer" : void 0,
1544
1608
  children: [
1545
- /* @__PURE__ */ o(M, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: i }),
1546
- e.newTab ? /* @__PURE__ */ o(Kt, { 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
1547
1611
  ]
1548
1612
  }
1549
1613
  ) }),
1550
- /* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: l.map((f, h) => /* @__PURE__ */ T("span", { children: [
1551
- h > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
1552
- /* @__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 })
1553
1617
  ] }, f)) }) })
1554
1618
  ] }),
1555
- e.status ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(jr, { status: e.status }) }) : null
1619
+ e.status ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(lo, { status: e.status }) }) : null
1556
1620
  ] })
1557
1621
  }
1558
1622
  ) });
1559
1623
  }
1560
- const Kr = Ge(Hr), Re = "3rem";
1561
- function Vr({
1624
+ const go = Ke(mo), $e = "3rem";
1625
+ function po({
1562
1626
  label: e,
1563
1627
  dimmed: t = !1
1564
1628
  }) {
1565
- return e === null ? null : /* @__PURE__ */ o(
1566
- _,
1629
+ return e === null ? null : /* @__PURE__ */ i(
1630
+ y,
1567
1631
  {
1568
1632
  as: "div",
1569
1633
  display: "inline-block",
1570
1634
  borderWidth: "small",
1571
1635
  borderRadius: "large",
1572
1636
  borderColor: t ? "primary" : "secondary",
1573
- minWidth: Re,
1574
- height: Re,
1637
+ minWidth: $e,
1638
+ height: $e,
1575
1639
  padding: "0 xx-small",
1576
1640
  "data-testid": "module-number",
1577
- children: /* @__PURE__ */ o(P, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ o(M, { 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 }) })
1578
1642
  }
1579
1643
  );
1580
1644
  }
1581
- function Zr({ module: e, today: t }) {
1582
- var a, c;
1583
- const { t: n, locale: s } = N(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
1584
- if (r && i)
1585
- return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) });
1586
- if (r)
1587
- return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
1588
- const u = (c = e.progress) == null ? void 0 : c.latestDueAt;
1589
- return u ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ct(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) }) : null;
1590
- }
1591
- function Xr({ module: e }) {
1592
- const { t } = N(), n = e.progress;
1593
- return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
1594
- /* @__PURE__ */ o(P.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1595
- Ht,
1596
- {
1597
- size: "x-small",
1598
- meterColor: n.percentComplete >= 100 ? "success" : "brand",
1599
- valueNow: n.requirementsMet,
1600
- valueMax: Math.max(n.requirementCount, 1),
1601
- shouldAnimate: !1,
1602
- screenReaderLabel: t("moduleProgressScreenReaderLabel", { name: e.name })
1603
- }
1604
- ) }),
1605
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: Nr(
1606
- t,
1607
- n.percentComplete,
1608
- n.requirementsMet,
1609
- n.requirementCount
1610
- ) }) })
1611
- ] });
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
+ );
1612
1709
  }
1613
- const Fe = (e) => `platform-modules-panel-${e}`;
1614
- function Jr({
1710
+ const Be = (e) => `platform-modules-panel-${e}`;
1711
+ function To({
1615
1712
  module: e,
1616
1713
  state: t,
1617
1714
  today: n,
1618
1715
  navigation: s,
1619
1716
  showDiagnostics: r
1620
1717
  }) {
1621
- const { t: i } = N(), u = q(null), a = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
1622
- return ce(() => {
1623
- !c || a === 0 || u.current !== a && (u.current = a, Ye(
1624
- i("itemsLoadedAnnouncement", {
1625
- 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,
1626
1723
  count: e.itemCount,
1627
1724
  name: e.name
1628
1725
  })
1629
1726
  ));
1630
- }, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1631
- We,
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,
1632
1729
  {
1633
1730
  variant: "error",
1634
1731
  margin: "0",
1635
- liveRegion: Qe,
1732
+ liveRegion: Xe,
1636
1733
  liveRegionPoliteness: "assertive",
1637
1734
  "data-testid": "items-error",
1638
- children: i("itemsLoadErrorAlert", { message: t.error.message })
1735
+ children: o("itemsLoadErrorAlert", { message: t.error.message })
1639
1736
  }
1640
- ) }) : t.isLoading ? /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1641
- /* @__PURE__ */ o(Je, { size: "x-small", renderTitle: i("itemsLoadingSpinnerLabel") }),
1737
+ ) }) : t.isLoading ? /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
1738
+ /* @__PURE__ */ i(ot, { size: "x-small", renderTitle: o("itemsLoadingSpinnerLabel") }),
1642
1739
  " ",
1643
- /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: i("itemsLoadingText") })
1644
- ] }) : /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", children: [
1645
- r ? /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1740
+ /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: o("itemsLoadingText") })
1741
+ ] }) : /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", children: [
1742
+ r ? /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
1646
1743
  "items source: ",
1647
1744
  t.source,
1648
1745
  " · loaded ",
@@ -1650,15 +1747,15 @@ function Jr({
1650
1747
  " of ",
1651
1748
  e.itemCount
1652
1749
  ] }) : null,
1653
- t.items.length === 0 ? /* @__PURE__ */ o(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(M, { 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(Kr, { item: g, today: n, navigation: s }) }, g.id)) }),
1654
- t.hasNextPage ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
1655
- Z,
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,
1656
1753
  {
1657
1754
  size: "small",
1658
1755
  onClick: t.fetchNextPage,
1659
1756
  interaction: t.isFetchingNextPage ? "disabled" : "enabled",
1660
1757
  "data-testid": "load-more-items",
1661
- children: t.isFetchingNextPage ? i("loadMoreItemsLoading") : i("loadMoreItems", {
1758
+ children: t.isFetchingNextPage ? o("loadMoreItemsLoading") : o("loadMoreItems", {
1662
1759
  loaded: t.items.length,
1663
1760
  count: e.itemCount
1664
1761
  })
@@ -1666,21 +1763,22 @@ function Jr({
1666
1763
  ) }) : null
1667
1764
  ] });
1668
1765
  }
1669
- function eo({
1766
+ function wo({
1670
1767
  module: e,
1671
1768
  expanded: t,
1672
1769
  onToggle: n,
1673
1770
  itemsState: s,
1674
1771
  today: r,
1675
- navigation: i,
1676
- showDiagnostics: u = !1,
1677
- headingLevel: a = "h3",
1678
- moduleLabel: c
1772
+ navigation: o,
1773
+ showDiagnostics: l = !1,
1774
+ headingLevel: u = "h3",
1775
+ moduleLabel: c,
1776
+ breakpoints: g = {}
1679
1777
  }) {
1680
1778
  var p;
1681
- const { t: g, locale: l } = N(), m = ((p = e.progress) == null ? void 0 : p.status) === "locked", S = c === void 0 ? Cr(e.position, l) : c;
1682
- return /* @__PURE__ */ T(
1683
- _,
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;
1780
+ return /* @__PURE__ */ _(
1781
+ y,
1684
1782
  {
1685
1783
  as: "div",
1686
1784
  background: "primary",
@@ -1691,66 +1789,66 @@ function eo({
1691
1789
  margin: "0 0 small 0",
1692
1790
  "data-testid": `module-card-${e.id}`,
1693
1791
  children: [
1694
- /* @__PURE__ */ T(P, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
1695
- S !== null ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Vr, { label: S, dimmed: m }) }) : null,
1696
- /* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1697
- /* @__PURE__ */ T(_, { as: "div", children: [
1698
- /* @__PURE__ */ o(
1699
- He,
1792
+ /* @__PURE__ */ _(T, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
1793
+ I !== null ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(po, { label: I, dimmed: h }) }) : null,
1794
+ /* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
1795
+ /* @__PURE__ */ _(y, { as: "div", children: [
1796
+ /* @__PURE__ */ i(
1797
+ et,
1700
1798
  {
1701
- level: a,
1799
+ level: u,
1702
1800
  themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
1703
1801
  "data-testid": "module-name",
1704
- children: /* @__PURE__ */ o(M, { 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 })
1705
1803
  }
1706
1804
  ),
1707
- e.published ? null : /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", children: [
1805
+ e.published ? null : /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", children: [
1708
1806
  " ",
1709
- g("moduleUnpublishedBadge")
1807
+ a("moduleUnpublishedBadge")
1710
1808
  ] })
1711
1809
  ] }),
1712
- /* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(Zr, { module: e, today: r }) }),
1713
- /* @__PURE__ */ o(Xr, { module: e })
1810
+ /* @__PURE__ */ i(y, { as: "div", children: /* @__PURE__ */ i(fo, { module: e, today: r }) }),
1811
+ /* @__PURE__ */ i(_o, { module: e, breakpoints: g })
1714
1812
  ] }),
1715
- e.progress ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Gr, { status: e.progress.status }) }) : null,
1716
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
1717
- Rt,
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,
1718
1816
  {
1719
1817
  size: "small",
1720
1818
  withBorder: !0,
1721
1819
  withBackground: !1,
1722
- 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 }),
1723
1821
  "aria-expanded": t,
1724
- "aria-controls": Fe(e.id),
1822
+ "aria-controls": Be(e.id),
1725
1823
  onClick: () => n(e.id),
1726
1824
  "data-testid": `toggle-module-${e.id}`,
1727
- children: t ? /* @__PURE__ */ o(Qt, {}) : /* @__PURE__ */ o(Xe, {})
1825
+ children: t ? /* @__PURE__ */ i(en, {}) : /* @__PURE__ */ i(rt, {})
1728
1826
  }
1729
1827
  ) })
1730
1828
  ] }),
1731
- /* @__PURE__ */ o("div", { id: Fe(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
1732
- Jr,
1829
+ /* @__PURE__ */ i("div", { id: Be(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
1830
+ To,
1733
1831
  {
1734
1832
  module: e,
1735
1833
  state: s,
1736
1834
  today: r,
1737
- navigation: i,
1738
- showDiagnostics: u
1835
+ navigation: o,
1836
+ showDiagnostics: l
1739
1837
  }
1740
1838
  ) : null })
1741
1839
  ]
1742
1840
  }
1743
1841
  );
1744
1842
  }
1745
- const to = Ge(eo);
1746
- function no({
1843
+ const Po = Ke(wo);
1844
+ function Eo({
1747
1845
  counts: e,
1748
1846
  itemsMode: t,
1749
1847
  loadedModules: n
1750
1848
  }) {
1751
1849
  const s = e.listModules + e.listModuleItems;
1752
- return /* @__PURE__ */ o(
1753
- _,
1850
+ return /* @__PURE__ */ i(
1851
+ y,
1754
1852
  {
1755
1853
  as: "div",
1756
1854
  background: "secondary",
@@ -1759,25 +1857,25 @@ function no({
1759
1857
  padding: "x-small small",
1760
1858
  margin: "0 0 small 0",
1761
1859
  "data-testid": "dev-diagnostics",
1762
- children: /* @__PURE__ */ T(P, { gap: "medium", wrap: "wrap", children: [
1763
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
1764
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "request-count-list-modules", children: [
1860
+ children: /* @__PURE__ */ _(T, { gap: "medium", wrap: "wrap", 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: [
1765
1863
  "listModules: ",
1766
1864
  e.listModules
1767
1865
  ] }) }),
1768
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { 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: [
1769
1867
  "listModuleItems: ",
1770
1868
  e.listModuleItems
1771
1869
  ] }) }),
1772
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { 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: [
1773
1871
  "total: ",
1774
1872
  s
1775
1873
  ] }) }),
1776
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { 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: [
1777
1875
  "itemsMode: ",
1778
1876
  t ?? "probing…"
1779
1877
  ] }) }),
1780
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { 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: [
1781
1879
  "modules loaded: ",
1782
1880
  n
1783
1881
  ] }) })
@@ -1785,112 +1883,116 @@ function no({
1785
1883
  }
1786
1884
  );
1787
1885
  }
1788
- function ri({
1886
+ function Co({
1789
1887
  data: e,
1790
1888
  courseName: t,
1791
1889
  courseContext: n,
1792
1890
  today: s,
1793
1891
  requestCounts: r,
1794
- showDiagnostics: i = r !== void 0,
1795
- initialFilter: u = "all",
1796
- navigation: a,
1892
+ showDiagnostics: o = r !== void 0,
1893
+ initialFilter: l = "all",
1894
+ navigation: u,
1797
1895
  as: c = "div",
1798
- headingLevel: g = "h2"
1896
+ headingLevel: g = "h2",
1897
+ breakpoints: a = {}
1799
1898
  }) {
1800
- const {
1801
- modules: l,
1802
- hasNextPage: m,
1803
- fetchNextPage: S,
1804
- isFetchingNextPage: p,
1805
- isLoading: f,
1806
- error: h,
1807
- itemsMode: w,
1808
- expandedModuleIds: x,
1809
- toggleModule: L,
1810
- expandModule: C,
1811
- collapseModule: ne,
1812
- getItems: se
1813
- } = e, { t: E, locale: G } = N(), j = t ?? E("pageTitle"), [R, Y] = V(""), [D, F] = V(u), Q = q(null), re = Be(), k = q(!1), [oe] = V(() => /* @__PURE__ */ new Date()), W = s ?? oe;
1814
- ce(() => {
1815
- var I;
1816
- !k.current || p || (k.current = !1, Ye(E("modulesLoadedAnnouncement", { count: l.length })), (I = Q.current) == null || I.focus());
1817
- }, [p, l.length, E]);
1818
- const z = v(
1819
- () => l.filter(
1820
- (I) => Fr(I, R, G) && Rr(I, D, W)
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)
1821
1923
  ),
1822
- [l, R, D, W, G]
1823
- ), ie = () => {
1824
- for (const I of z) C(I.id);
1825
- }, y = () => {
1826
- for (const I of x) ne(I);
1827
- }, b = l.length > 0 && z.length === 0 && !f && !h;
1828
- return /* @__PURE__ */ T(_, { as: c, display: "block", "data-testid": "modules-list", children: [
1829
- n ? /* @__PURE__ */ T(_, { as: "div", children: [
1830
- /* @__PURE__ */ o(M, { size: "small", color: "brand", children: n }),
1831
- /* @__PURE__ */ T(M, { size: "small", color: "secondary", children: [
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;
1930
+ return /* @__PURE__ */ _(y, { as: c, display: "block", "data-testid": "modules-list", children: [
1931
+ n ? /* @__PURE__ */ _(y, { as: "div", children: [
1932
+ /* @__PURE__ */ i(M, { size: "small", color: "brand", children: n }),
1933
+ /* @__PURE__ */ _(M, { size: "small", color: "secondary", children: [
1832
1934
  " ",
1833
1935
  "/",
1834
1936
  " "
1835
1937
  ] }),
1836
- /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: j })
1938
+ /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: J })
1837
1939
  ] }) : null,
1838
- /* @__PURE__ */ o(He, { level: g, margin: "x-small 0 medium 0", children: j }),
1839
- r ? /* @__PURE__ */ o(
1840
- no,
1940
+ /* @__PURE__ */ i(et, { level: g, margin: "x-small 0 medium 0", children: J }),
1941
+ r ? /* @__PURE__ */ i(
1942
+ Eo,
1841
1943
  {
1842
1944
  counts: r,
1843
- itemsMode: w,
1844
- loadedModules: l.length
1945
+ itemsMode: ce,
1946
+ loadedModules: P.length
1845
1947
  }
1846
1948
  ) : null,
1847
- /* @__PURE__ */ T(P, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1848
- /* @__PURE__ */ o(P.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
1849
- Xt,
1949
+ /* @__PURE__ */ _(T, { gap: "small", wrap: "wrap", alignItems: "end", children: [
1950
+ /* @__PURE__ */ i(T.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ i(
1951
+ an,
1850
1952
  {
1851
1953
  renderLabel: E("moduleSearchLabel"),
1852
1954
  placeholder: E("searchPlaceholder"),
1853
- "aria-describedby": re,
1854
- value: R,
1855
- onChange: (I, H) => Y(H),
1856
- renderBeforeInput: /* @__PURE__ */ o(Wt, { inline: !1 }),
1955
+ "aria-describedby": D,
1956
+ value: $,
1957
+ onChange: (x, $t) => S($t),
1958
+ renderBeforeInput: /* @__PURE__ */ i(tn, { inline: !1 }),
1857
1959
  "data-testid": "modules-search"
1858
1960
  }
1859
1961
  ) }),
1860
- /* @__PURE__ */ o(P.Item, { shouldGrow: !0 }),
1861
- /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(
1862
- be,
1962
+ /* @__PURE__ */ i(T.Item, { shouldGrow: !0 }),
1963
+ /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(
1964
+ Te,
1863
1965
  {
1864
1966
  placement: "bottom end",
1865
- trigger: /* @__PURE__ */ o(Z, { renderIcon: /* @__PURE__ */ o(Xe, {}), "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") }),
1866
1968
  children: [
1867
- /* @__PURE__ */ o(be.Item, { onSelect: ie, "data-testid": "expand-all", children: E("expandAll") }),
1868
- /* @__PURE__ */ o(be.Item, { onSelect: y, "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") })
1869
1971
  ]
1870
1972
  }
1871
1973
  ) })
1872
1974
  ] }),
1873
- /* @__PURE__ */ o(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", id: re, children: E("searchScopeHint") }) }),
1874
- /* @__PURE__ */ o(zr, { value: D, onChange: F }),
1875
- /* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
1876
- h ? (
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 }),
1977
+ /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
1978
+ R ? (
1877
1979
  // `liveRegion` is what makes this announce; without it InstUI's Alert
1878
1980
  // sets no role and no aria-live. See the same fix in ModuleCard.
1879
- /* @__PURE__ */ o(
1880
- We,
1981
+ /* @__PURE__ */ i(
1982
+ Je,
1881
1983
  {
1882
1984
  variant: "error",
1883
1985
  margin: "0 0 small 0",
1884
- liveRegion: Qe,
1986
+ liveRegion: Xe,
1885
1987
  liveRegionPoliteness: "assertive",
1886
1988
  "data-testid": "modules-error",
1887
- children: E("modulesLoadErrorAlert", { message: h.message })
1989
+ children: E("modulesLoadErrorAlert", { message: R.message })
1888
1990
  }
1889
1991
  )
1890
1992
  ) : null,
1891
- f ? /* @__PURE__ */ o(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(Je, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
1892
- !f && !h && l.length === 0 ? /* @__PURE__ */ o(
1893
- _,
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(
1995
+ y,
1894
1996
  {
1895
1997
  as: "div",
1896
1998
  background: "secondary",
@@ -1898,11 +2000,11 @@ function ri({
1898
2000
  padding: "large",
1899
2001
  textAlign: "center",
1900
2002
  "data-testid": "modules-empty",
1901
- children: /* @__PURE__ */ o(M, { color: "secondary", children: E("noModulesEmptyState") })
2003
+ children: /* @__PURE__ */ i(M, { color: "secondary", children: E("noModulesEmptyState") })
1902
2004
  }
1903
2005
  ) : null,
1904
- b ? /* @__PURE__ */ T(
1905
- _,
2006
+ zt ? /* @__PURE__ */ _(
2007
+ y,
1906
2008
  {
1907
2009
  as: "div",
1908
2010
  background: "secondary",
@@ -1911,13 +2013,13 @@ function ri({
1911
2013
  textAlign: "center",
1912
2014
  "data-testid": "modules-filtered-empty",
1913
2015
  children: [
1914
- /* @__PURE__ */ o(_, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(M, { color: "secondary", children: E("filteredEmptyState", { count: l.length }) }) }),
1915
- /* @__PURE__ */ o(
1916
- Z,
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,
1917
2019
  {
1918
2020
  size: "small",
1919
2021
  onClick: () => {
1920
- F("all"), Y(""), k.current = !0;
2022
+ C("all"), S(""), F.current = !0;
1921
2023
  },
1922
2024
  children: E("clearFilters")
1923
2025
  }
@@ -1925,47 +2027,50 @@ function ri({
1925
2027
  ]
1926
2028
  }
1927
2029
  ) : null,
1928
- /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: z.map((I) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
1929
- to,
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,
1930
2032
  {
1931
- module: I,
1932
- expanded: x.includes(I.id),
1933
- onToggle: L,
1934
- itemsState: se(I.id),
1935
- today: W,
1936
- showDiagnostics: i,
1937
- navigation: a,
1938
- 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
1939
2042
  }
1940
- ) }, I.id)) })
2043
+ ) }, x.id)) })
1941
2044
  ] }),
1942
- m ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
1943
- Z,
2045
+ ae ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
2046
+ ne,
1944
2047
  {
1945
2048
  color: "primary",
1946
2049
  onClick: () => {
1947
- k.current = !0, S();
2050
+ F.current = !0, ue();
1948
2051
  },
1949
- interaction: p ? "disabled" : "enabled",
2052
+ interaction: U ? "disabled" : "enabled",
1950
2053
  "data-testid": "load-more-modules",
1951
- children: p ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: l.length })
2054
+ children: U ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: P.length })
1952
2055
  }
1953
- ) }) : l.length > 0 ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
2056
+ ) }) : P.length > 0 ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
1954
2057
  M,
1955
2058
  {
1956
2059
  size: "x-small",
1957
2060
  color: "secondary",
1958
2061
  "data-testid": "modules-all-loaded",
1959
- elementRef: (I) => {
1960
- Q.current = I;
2062
+ elementRef: (x) => {
2063
+ B.current = x;
1961
2064
  },
1962
2065
  tabIndex: -1,
1963
- children: E("allModulesLoaded", { count: l.length })
2066
+ children: E("allModulesLoaded", { count: P.length })
1964
2067
  }
1965
2068
  ) }) : null
1966
2069
  ] });
1967
2070
  }
1968
- const X = [
2071
+ const ki = ln(
2072
+ Co
2073
+ ), re = [
1969
2074
  "assignment",
1970
2075
  "quiz",
1971
2076
  "discussion",
@@ -1974,25 +2079,25 @@ const X = [
1974
2079
  "external_url",
1975
2080
  "external_tool",
1976
2081
  "sub_header"
1977
- ], ye = [
2082
+ ], Ce = [
1978
2083
  "not_started",
1979
2084
  "in_progress",
1980
2085
  "all_submitted",
1981
2086
  "all_graded",
1982
2087
  "missing",
1983
2088
  "locked"
1984
- ], ze = [
2089
+ ], Ge = [
1985
2090
  "must_view",
1986
2091
  "must_submit",
1987
2092
  "must_contribute",
1988
2093
  "must_mark_done",
1989
2094
  "min_score",
1990
2095
  "min_percentage"
1991
- ], so = ["assignment", "quiz", "discussion"], ro = ["external_url", "external_tool"], oo = ["assignment", "quiz", "discussion"], io = Date.UTC(2025, 0, 6), lo = 864e5, pe = "1", At = (e) => new Date(io + e * lo).toISOString(), ao = (e, t) => {
1992
- const n = ze[Math.floor(t / 3) % ze.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];
1993
2098
  return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
1994
- }, vt = (e, t) => t % 3 === 0 && e !== "sub_header", Nt = (e) => ye[(e - 1) % ye.length], uo = (e, t) => !oo.includes(e) || e === "discussion" && Math.floor(t / X.length) % 2 === 1 ? null : 5 + t % 4 * 5, co = (e, t, n, s) => {
1995
- 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";
1996
2101
  switch (e) {
1997
2102
  case "locked":
1998
2103
  return "locked";
@@ -2001,17 +2106,22 @@ const X = [
2001
2106
  case "all_submitted":
2002
2107
  return t ? "submitted" : r;
2003
2108
  case "all_graded":
2004
- return t ? "graded" : r;
2109
+ return t ? s === 0 ? "excused" : "graded" : r;
2005
2110
  case "missing":
2006
2111
  return n ? t ? "missing" : "not_started" : t ? s % 2 === 0 ? "missing" : "graded" : "not_started";
2007
2112
  case "in_progress":
2008
2113
  return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
2009
2114
  }
2010
- }, mo = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, go = (e, t, n, s, r, i) => {
2011
- const u = String(e), a = String(e * 1e3 + t + 1), c = X[n % X.length], g = c === "sub_header", l = so.includes(c) && (n % 4 === 0 || s === "missing"), m = vt(c, n) ? ao(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;
2012
2122
  return {
2013
- id: a,
2014
- moduleId: u,
2123
+ id: u,
2124
+ moduleId: l,
2015
2125
  title: `${c} ${t + 1}`,
2016
2126
  type: c,
2017
2127
  position: t + 1,
@@ -2019,47 +2129,47 @@ const X = [
2019
2129
  // 1 in 7 unpublished, so a teacher view always has something to gray out.
2020
2130
  // Same rule as the module: a student's page contains no unpublished items,
2021
2131
  // so only a teacher fixture grays any out.
2022
- published: i === "teacher" ? n % 7 !== 0 : !0,
2023
- url: g ? null : `/courses/${pe}/modules/items/${a}`,
2024
- newTab: ro.includes(c) && n % 2 === 0,
2025
- completionRequirement: m,
2026
- dueAt: l ? At(n % 90) : null,
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,
2027
2137
  status: s,
2028
2138
  pointsPossible: r,
2029
2139
  // Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
2030
2140
  // handful per fixture proves the escape hatch survives a round trip, and
2031
2141
  // every other item must carry no `extensions` key at all.
2032
- extensions: rt(
2142
+ extensions: ct(
2033
2143
  void 0,
2034
2144
  n % 37 === 0 ? 5 + n % 4 * 10 : null
2035
2145
  )
2036
2146
  };
2037
- }, fo = (e, t, n, s) => {
2038
- const r = Nt(e), i = [];
2039
- let u = 0;
2040
- for (let a = 0; a < t; a += 1) {
2041
- const c = n + a, g = X[c % X.length], l = uo(g, c), m = l !== null, S = m ? u++ : a, p = co(r, m, vt(g, c), S);
2042
- i.push(go(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));
2043
2153
  }
2044
- return i;
2045
- }, ho = (e, t, n) => {
2046
- const s = Nt(e);
2047
- 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;
2048
- }, po = (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) => {
2049
2159
  const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
2050
2160
  return t.length > 0 ? t[t.length - 1] : null;
2051
- }, Io = (e, t, n) => {
2052
- const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(mo).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;
2053
2163
  return {
2054
- status: ho(e, t, u),
2055
- requirementsMet: i,
2164
+ status: $o(e, t, l),
2165
+ requirementsMet: o,
2056
2166
  requirementCount: r,
2057
2167
  // Derived from the clamped pair, so the bar and the fraction always agree.
2058
- percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
2059
- latestDueAt: po(t),
2060
- missingCount: u
2168
+ percentComplete: r > 0 ? Math.round(o / r * 100) : 0,
2169
+ latestDueAt: Bo(t),
2170
+ missingCount: l
2061
2171
  };
2062
- }, bo = (e, t, n) => {
2172
+ }, jo = (e, t, n) => {
2063
2173
  const s = e % 2 === 0 ? null : 1;
2064
2174
  return {
2065
2175
  id: String(e),
@@ -2068,17 +2178,17 @@ const X = [
2068
2178
  // A student sees only published modules; publish state varies for a teacher.
2069
2179
  published: n === "teacher" ? e % 4 !== 0 : !0,
2070
2180
  itemCount: t.length,
2071
- unlockAt: e % 5 === 0 ? At(e) : null,
2072
- 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}` }] : [],
2073
2183
  requirementCount: s,
2074
2184
  requireSequentialProgress: e % 6 === 0,
2075
2185
  completionRequirements: t.flatMap(
2076
2186
  (r) => r.completionRequirement ? [r.completionRequirement] : []
2077
2187
  ),
2078
- progress: Io(e, t, s)
2188
+ progress: Go(e, t, s)
2079
2189
  };
2080
2190
  };
2081
- function Mo(e) {
2191
+ function Wo(e) {
2082
2192
  return {
2083
2193
  courseId: e.courseId,
2084
2194
  modules: e.modules.map(({ progress: t, ...n }) => n),
@@ -2090,40 +2200,75 @@ function Mo(e) {
2090
2200
  )
2091
2201
  };
2092
2202
  }
2093
- function Ie(e, t = {}) {
2094
- const n = t.view ?? "student", s = t.courseId ?? pe, r = [], i = {};
2095
- let u = 0;
2203
+ function ye(e, t = {}) {
2204
+ const n = t.view ?? "student", s = t.courseId ?? le, r = [], o = {};
2205
+ let l = 0;
2096
2206
  e.forEach((c, g) => {
2097
- const l = g + 1, m = fo(l, c, u, n);
2098
- u += c, r.push(bo(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;
2099
2209
  });
2100
- const a = { courseId: s, modules: r, itemsByModuleId: i };
2101
- return n === "teacher" ? Mo(a) : a;
2210
+ const u = { courseId: s, modules: r, itemsByModuleId: o };
2211
+ return n === "teacher" ? Wo(u) : u;
2102
2212
  }
2103
- const ue = (e) => `/courses/${pe}/modules/items/${e}`, So = ye.length, yo = 8, _o = 120, To = 25, Po = 250, Ue = 8;
2104
- function oi() {
2105
- return Ie(Array.from({ length: So }, () => yo));
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));
2106
2216
  }
2107
- function ii() {
2108
- return Ie(Array.from({ length: _o }, () => To));
2217
+ function Di() {
2218
+ return ye(Array.from({ length: Ko }, () => Zo));
2109
2219
  }
2110
- function li() {
2111
- return Ie([
2112
- Ue,
2113
- Po,
2114
- Ue
2220
+ function qi() {
2221
+ return ye([
2222
+ We,
2223
+ Vo,
2224
+ We
2115
2225
  ]);
2116
2226
  }
2117
- function ai() {
2118
- return Ie([]);
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([]);
2119
2264
  }
2120
- function ui() {
2265
+ function Oi() {
2121
2266
  const t = [
2122
- { title: "Reading: limits from the left and the right", type: "page", url: ue(1) },
2267
+ { title: "Reading: limits from the left and the right", type: "page", url: fe(1) },
2123
2268
  {
2124
2269
  title: "Desmos: interactive limit explorer",
2125
2270
  type: "external_url",
2126
- url: ue(2),
2271
+ url: fe(2),
2127
2272
  newTab: !0
2128
2273
  },
2129
2274
  { title: "Practice", type: "sub_header", url: null },
@@ -2131,9 +2276,9 @@ function ui() {
2131
2276
  {
2132
2277
  title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
2133
2278
  type: "assignment",
2134
- url: ue(5)
2279
+ url: fe(5)
2135
2280
  },
2136
- { title: "Unit test", type: "quiz", url: ue(6), status: "locked" }
2281
+ { title: "Unit test", type: "quiz", url: fe(6), status: "locked" }
2137
2282
  ].map((n, s) => ({
2138
2283
  id: String(s + 1),
2139
2284
  moduleId: "1",
@@ -2145,7 +2290,7 @@ function ui() {
2145
2290
  ...n
2146
2291
  }));
2147
2292
  return {
2148
- courseId: pe,
2293
+ courseId: le,
2149
2294
  modules: [
2150
2295
  {
2151
2296
  id: "1",
@@ -2153,7 +2298,7 @@ function ui() {
2153
2298
  position: 1,
2154
2299
  published: !0,
2155
2300
  itemCount: t.length,
2156
- prerequisiteModuleIds: [],
2301
+ prerequisiteModules: [],
2157
2302
  requireSequentialProgress: !1
2158
2303
  }
2159
2304
  ],
@@ -2161,74 +2306,76 @@ function ui() {
2161
2306
  };
2162
2307
  }
2163
2308
  export {
2164
- et as CompletionRequirementSchema,
2165
- nn as CompletionRequirementTypeSchema,
2166
- It as DEFAULT_INLINE_THRESHOLD,
2167
- zn as DEFAULT_ITEM_CONCURRENCY,
2168
- pt as DEFAULT_ITEM_PAGE_SIZE,
2169
- te as DEFAULT_LOCALE,
2170
- Pe as DEFAULT_PAGE_SIZE,
2171
- bt as DEFAULT_RETAIN_COLLAPSED_LIMIT,
2172
- he as DEFAULT_STALE_TIME_MS,
2173
- st as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
2174
- pe as FIXTURE_COURSE_ID,
2175
- zr as FilterChips,
2176
- Nn as GET_MODULES,
2177
- Dn as GET_MODULE_ITEMS,
2178
- Me as INLINE_ITEM_LIMIT,
2179
- Te as INLINE_QUERY_NODE_BUDGET,
2180
- un as InMemoryCourseMismatchError,
2181
- Dr as MODULES_FILTER_IDS,
2182
- to as ModuleCard,
2183
- Kr as ModuleItemRow,
2184
- tt as ModuleItemSchema,
2185
- jr as ModuleItemStatusPill,
2186
- en as ModuleItemStatusSchema,
2187
- Jt as ModuleItemTypeSchema,
2188
- ln as ModuleItemsPageSchema,
2189
- Vr as ModuleNumberBadge,
2190
- sn as ModuleProgressSchema,
2191
- rn as ModuleSchema,
2192
- Gr as ModuleStatusPill,
2193
- tn as ModuleStatusSchema,
2194
- Ho as ModulesConfigProvider,
2195
- Rn as ModulesConfigSchema,
2196
- si as ModulesI18nProvider,
2197
- ri as ModulesList,
2198
- on as ModulesPageSchema,
2199
- nt as PageInfoSchema,
2200
- ot as PartialCanvasResponseError,
2201
- kn as RegistryEntrySchema,
2202
- fe as baseModulesConfig,
2203
- Ie as buildFixture,
2204
- ai as courseEmpty,
2205
- li as courseFatModule,
2206
- ui as courseItemLinks,
2207
- ii as courseLarge,
2208
- oi as courseSmall,
2209
- Wo as createCanvasGraphqlAdapter,
2210
- Qo as createInMemoryAdapter,
2211
- Pt as createTranslate,
2212
- Tr as defaultTranslate,
2213
- kr as filterLabel,
2214
- an as getEstimatedDurationMinutes,
2215
- ni as invalidateCourse,
2216
- ei as invalidateModuleItems,
2217
- ti as invalidateModuleList,
2218
- O as mergeRegistry,
2219
- Br as moduleItemStatusLabel,
2220
- Mt as moduleItemsPrefix,
2221
- $r as moduleStatusLabel,
2222
- ee as modulesKeys,
2223
- Un as modulesListPrefix,
2224
- Zo as partialModulesConfig,
2225
- qn as registrySchema,
2226
- Fn as resolveModulesConfig,
2227
- Xo as useModuleItems,
2228
- On as useModules,
2229
- Ko as useModulesConfig,
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,
2230
2377
  N as useModulesI18n,
2231
- Jo as useModulesPageData,
2232
- Vo as visibleEntries,
2233
- rt as withEstimatedDurationMinutes
2378
+ Ci as useModulesPageData,
2379
+ wi as visibleEntries,
2380
+ ct as withEstimatedDurationMinutes
2234
2381
  };