@instructure/platform-rubrics 3.1.0 → 3.2.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.
@@ -1,44 +1,44 @@
1
- import { g as gr, R as Ce, u as I, f as ue, h as Ne, r as hr, i as Te, b as pr, j as fr } from "./chunks/errorPage-B145UIKY.js";
2
- import { D as wt, a as Et, d as Pt } from "./chunks/errorPage-B145UIKY.js";
1
+ import { g as Br, R as we, h as B, i as ue, j as We, k as je, r as Ir, l as xe, c as Lr } from "./chunks/errorPage-C2-lUC8H.js";
2
+ import { D as zt, a as $t, d as Ut } from "./chunks/errorPage-C2-lUC8H.js";
3
3
  import "@instructure/platform-provider";
4
- import { useState as k, useEffect as F, useRef as $, useMemo as De, useCallback as Fe } from "react";
5
- import { jsx as e, jsxs as b, Fragment as ve } from "react/jsx-runtime";
6
- import { Heading as q } from "@instructure/ui-heading";
7
- import { View as y } from "@instructure/ui-view";
8
- import { Button as H, CloseButton as Cr, IconButton as ae } from "@instructure/ui-buttons";
9
- import { Flex as w } from "@instructure/ui-flex";
10
- import { SimpleSelect as pe } from "@instructure/ui-simple-select";
11
- import { Spinner as vr } from "@instructure/ui-spinner";
4
+ import { useState as y, useEffect as N, useRef as F, useMemo as Ae, useCallback as Ke } from "react";
5
+ import { jsx as e, jsxs as b, Fragment as Se } from "react/jsx-runtime";
6
+ import { Heading as V } from "@instructure/ui-heading";
7
+ import { View as P } from "@instructure/ui-view";
8
+ import { Button as H, CloseButton as yr, IconButton as oe } from "@instructure/ui-buttons";
9
+ import { Flex as k } from "@instructure/ui-flex";
10
+ import { SimpleSelect as Ce } from "@instructure/ui-simple-select";
11
+ import { Spinner as kr } from "@instructure/ui-spinner";
12
12
  import { Text as G } from "@instructure/ui-text";
13
- import { useQuery as Rr } from "@tanstack/react-query";
14
- import { u as Re, g as Lr, p as Sr, a as He, b as we, C as $e, c as Ee, i as Br, d as ze, e as se, s as Ue, K as qe, P as We, r as Ir, D as je, S as Ke, v as Ve, f as kr, h as yr, j as Tr, k as Dr, l as wr, m as Er, n as Pr, w as Pe, o as xr, q as Ar, t as Or, x as Gr, y as xe, A as fe, G as Mr, z as _r, B as Ae, E as Nr, F as Oe, R as Fr, H as Hr, I as $r, J as zr, L as Ur, M as qr, N as Wr, O as jr, Q as Kr, T as Vr, U as Qr, V as Xr } from "./chunks/useAssignmentRubricState-Cha3tHoC.js";
15
- import Yr from "graphql-tag";
16
- import { LoadingIndicator as Qe } from "@instructure/platform-loading-indicator";
17
- import { Alert as Jr } from "@instructure/ui-alerts";
18
- import { IconDragHandleLine as Xe, IconTrashLine as Ye, IconAddLine as Je, IconArrowOpenDownLine as Zr, IconArrowOpenEndLine as ei, IconCommentLine as ri, IconDuplicateLine as ii, IconAiSolid as be, IconLikeSolid as Ge, IconLikeLine as Me, IconAiColoredSolid as Ze } from "@instructure/ui-icons";
19
- import { Checkbox as oe } from "@instructure/ui-checkbox/v11_7";
20
- import { Flex as P } from "@instructure/ui-flex/v11_7";
21
- import { Modal as te } from "@instructure/ui-modal";
22
- import { ScreenReaderContent as er } from "@instructure/ui-a11y-content";
23
- import { Checkbox as ti } from "@instructure/ui-checkbox";
24
- import { Pill as rr } from "@instructure/ui-pill";
25
- import { TextArea as ni } from "@instructure/ui-text-area";
26
- import { TextInput as V } from "@instructure/ui-text-input";
27
- import { NumberInput as ai } from "@instructure/ui-number-input";
28
- import { CloseButton as Le, Button as _, IconButton as _e } from "@instructure/ui-buttons/v11_7";
29
- import { Heading as Q } from "@instructure/ui-heading/v11_7";
30
- import { Modal as x } from "@instructure/ui-modal/v11_7";
31
- import { Text as de } from "@instructure/ui-text/v11_7";
32
- import { RadioInputGroup as oi, RadioInput as li } from "@instructure/ui-radio-input";
33
- import { ProgressBar as si } from "@instructure/ui-progress/v11_7";
34
- import { Spinner as di } from "@instructure/ui-spinner/v11_7";
35
- import { View as ci } from "@instructure/ui-view/v11_7";
36
- import { SimpleSelect as U } from "@instructure/ui-simple-select/v11_7";
13
+ import { useQuery as Tr } from "@tanstack/react-query";
14
+ import { u as be, g as Pr, p as Dr, a as Xe, b as Oe, C as Ye, c as Ge, i as Er, d as Qe, e as de, s as Je, K as Ze, P as er, r as Mr, D as rr, S as ir, v as tr, f as xr, h as Ar, j as Or, k as Gr, l as _r, m as Nr, n as Fr, w as _e, o as Hr, q as zr, t as $r, x as Ur, T as Vr, M as qr, y as Wr, z as Ne, A as ve, G as jr, B as Kr, E as Fe, F as Xr, H as He, R as Yr, I as Qr, J as Jr, L as Zr, N as ei, O as ri, Q as ii, U as ti, V as ni, W as ai, X as oi, Y as li } from "./chunks/useAssignmentRubricState-DpcMVo45.js";
15
+ import si from "graphql-tag";
16
+ import { LoadingIndicator as nr } from "@instructure/platform-loading-indicator";
17
+ import { Alert as di } from "@instructure/ui-alerts";
18
+ import { IconDragHandleLine as ar, IconTrashLine as or, IconAddLine as lr, IconArrowOpenDownLine as ci, IconArrowOpenEndLine as ui, IconCommentLine as bi, IconDuplicateLine as mi, IconAiSolid as me, IconLikeSolid as ze, IconLikeLine as $e, IconAiColoredSolid as sr } from "@instructure/ui-icons";
19
+ import { Checkbox as le } from "@instructure/ui-checkbox/v11_7";
20
+ import { Flex as T } from "@instructure/ui-flex/v11_7";
21
+ import { Modal as ne } from "@instructure/ui-modal";
22
+ import { ScreenReaderContent as dr } from "@instructure/ui-a11y-content";
23
+ import { Checkbox as gi } from "@instructure/ui-checkbox";
24
+ import { Pill as cr } from "@instructure/ui-pill";
25
+ import { TextArea as hi } from "@instructure/ui-text-area";
26
+ import { TextInput as X } from "@instructure/ui-text-input";
27
+ import { NumberInput as pi } from "@instructure/ui-number-input";
28
+ import { CloseButton as Be, Button as A, IconButton as Ue } from "@instructure/ui-buttons/v11_7";
29
+ import { Heading as q } from "@instructure/ui-heading/v11_7";
30
+ import { Modal as M } from "@instructure/ui-modal/v11_7";
31
+ import { Text as Y } from "@instructure/ui-text/v11_7";
32
+ import { SimpleSelect as $ } from "@instructure/ui-simple-select/v11_7";
33
+ import { View as Re } from "@instructure/ui-view/v11_7";
34
+ import { RadioInputGroup as fi, RadioInput as Ci } from "@instructure/ui-radio-input";
35
+ import { ProgressBar as vi } from "@instructure/ui-progress/v11_7";
36
+ import { Spinner as Ri } from "@instructure/ui-spinner/v11_7";
37
37
  import { TextArea as ce } from "@instructure/ui-text-area/v11_7";
38
- import { TextInput as ui } from "@instructure/ui-text-input/v11_7";
39
- import { Tooltip as bi } from "@instructure/ui-tooltip/v11_7";
40
- import { Alert as mi } from "@instructure/ui-alerts/v11_7";
41
- const It = () => /* @__PURE__ */ e(y, { as: "div", padding: "small", children: /* @__PURE__ */ e(q, { level: "h2", children: gr("foundation") }) }), gi = Yr`
38
+ import { TextInput as wi } from "@instructure/ui-text-input/v11_7";
39
+ import { Tooltip as Si } from "@instructure/ui-tooltip/v11_7";
40
+ import { Alert as Bi } from "@instructure/ui-alerts/v11_7";
41
+ const Gt = () => /* @__PURE__ */ e(P, { as: "div", padding: "small", children: /* @__PURE__ */ e(V, { level: "h2", children: Br("foundation") }) }), Ii = si`
42
42
  query CourseRubricsList($courseId: ID!, $first: Int) {
43
43
  course(id: $courseId) {
44
44
  rubricsConnection(first: $first) {
@@ -56,13 +56,13 @@ const It = () => /* @__PURE__ */ e(y, { as: "div", padding: "small", children: /
56
56
  }
57
57
  }
58
58
  `;
59
- function hi(r) {
60
- const { executeQuery: n } = Re();
61
- return Rr({
59
+ function Li(r) {
60
+ const { executeQuery: a } = be();
61
+ return Tr({
62
62
  queryKey: ["courseRubrics", r],
63
63
  queryFn: async () => {
64
- var a;
65
- const { course: s } = await n(gi, {
64
+ var n;
65
+ const { course: s } = await a(Ii, {
66
66
  courseId: r,
67
67
  first: 50
68
68
  }), i = s == null ? void 0 : s.rubricsConnection;
@@ -70,44 +70,44 @@ function hi(r) {
70
70
  rubrics: ((i == null ? void 0 : i.nodes) ?? []).filter(
71
71
  (l) => l != null
72
72
  ),
73
- hasMore: ((a = i == null ? void 0 : i.pageInfo) == null ? void 0 : a.hasNextPage) ?? !1
73
+ hasMore: ((n = i == null ? void 0 : i.pageInfo) == null ? void 0 : n.hasNextPage) ?? !1
74
74
  };
75
75
  },
76
76
  enabled: !!r
77
77
  });
78
78
  }
79
- const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children: /* @__PURE__ */ e(pi, { ...r }) }), pi = ({
79
+ const _t = (r) => /* @__PURE__ */ e(we, { translations: r.translations, children: /* @__PURE__ */ e(yi, { ...r }) }), yi = ({
80
80
  courseId: r,
81
- value: n,
81
+ value: a,
82
82
  onChange: s
83
83
  }) => {
84
- const { translations: i } = I(), { data: a, isLoading: l, isError: o, refetch: g } = hi(r), t = a == null ? void 0 : a.rubrics;
85
- return l ? /* @__PURE__ */ b(y, { as: "div", role: "status", "aria-live": "polite", margin: "0 0 medium", children: [
86
- /* @__PURE__ */ e(vr, { renderTitle: i.rubricSelectorLoading, size: "x-small" }),
87
- /* @__PURE__ */ e(y, { as: "span", padding: "0 0 0 x-small", children: /* @__PURE__ */ e(G, { size: "small", children: i.rubricSelectorLoading }) })
88
- ] }) : o ? /* @__PURE__ */ e(y, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ b(w, { gap: "small", alignItems: "center", wrap: "wrap", children: [
89
- /* @__PURE__ */ e(w.Item, { children: /* @__PURE__ */ b(G, { size: "small", color: "danger", children: [
84
+ const { translations: i } = B(), { data: n, isLoading: l, isError: o, refetch: m } = Li(r), t = n == null ? void 0 : n.rubrics;
85
+ return l ? /* @__PURE__ */ b(P, { as: "div", role: "status", "aria-live": "polite", margin: "0 0 medium", children: [
86
+ /* @__PURE__ */ e(kr, { renderTitle: i.rubricSelectorLoading, size: "x-small" }),
87
+ /* @__PURE__ */ e(P, { as: "span", padding: "0 0 0 x-small", children: /* @__PURE__ */ e(G, { size: "small", children: i.rubricSelectorLoading }) })
88
+ ] }) : o ? /* @__PURE__ */ e(P, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ b(k, { gap: "small", alignItems: "center", wrap: "wrap", children: [
89
+ /* @__PURE__ */ e(k.Item, { children: /* @__PURE__ */ b(G, { size: "small", color: "danger", children: [
90
90
  i.rubricSelectorErrorTitle,
91
91
  ". ",
92
92
  i.rubricSelectorErrorBody
93
93
  ] }) }),
94
- /* @__PURE__ */ e(w.Item, { children: /* @__PURE__ */ e(H, { size: "small", onClick: () => g(), children: i.rubricSelectorRetry }) })
95
- ] }) }) : !t || t.length === 0 ? /* @__PURE__ */ e(y, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ e(G, { size: "small", children: i.rubricSelectorEmpty }) }) : /* @__PURE__ */ b(y, { as: "div", margin: "0 0 medium", maxWidth: "360px", children: [
94
+ /* @__PURE__ */ e(k.Item, { children: /* @__PURE__ */ e(H, { size: "small", onClick: () => m(), children: i.rubricSelectorRetry }) })
95
+ ] }) }) : !t || t.length === 0 ? /* @__PURE__ */ e(P, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ e(G, { size: "small", children: i.rubricSelectorEmpty }) }) : /* @__PURE__ */ b(P, { as: "div", margin: "0 0 medium", maxWidth: "360px", children: [
96
96
  /* @__PURE__ */ b(
97
- pe,
97
+ Ce,
98
98
  {
99
99
  renderLabel: i.rubricSelectorLabel,
100
100
  assistiveText: i.rubricSelectorAssistiveText,
101
- value: n ?? "",
101
+ value: a ?? "",
102
102
  onChange: (c, { value: h }) => {
103
103
  if (typeof h != "string" || !h) return;
104
104
  const d = t.find((u) => u.id === h);
105
105
  s(h, (d == null ? void 0 : d.title) ?? "");
106
106
  },
107
107
  children: [
108
- n === void 0 && /* @__PURE__ */ e(pe.Option, { id: "rubrics-rubric-selector-placeholder", value: "", children: i.rubricSelectorPlaceholder }),
108
+ a === void 0 && /* @__PURE__ */ e(Ce.Option, { id: "rubrics-rubric-selector-placeholder", value: "", children: i.rubricSelectorPlaceholder }),
109
109
  t.map((c) => /* @__PURE__ */ e(
110
- pe.Option,
110
+ Ce.Option,
111
111
  {
112
112
  id: `rubrics-rubric-selector-option-${c.id}`,
113
113
  value: c.id,
@@ -118,30 +118,30 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
118
118
  ]
119
119
  }
120
120
  ),
121
- (a == null ? void 0 : a.hasMore) && /* @__PURE__ */ e(y, { as: "div", padding: "xx-small 0 0", children: /* @__PURE__ */ e(G, { size: "x-small", color: "secondary", children: i.rubricSelectorTruncated }) })
121
+ (n == null ? void 0 : n.hasMore) && /* @__PURE__ */ e(P, { as: "div", padding: "xx-small 0 0", children: /* @__PURE__ */ e(G, { size: "x-small", color: "secondary", children: i.rubricSelectorTruncated }) })
122
122
  ] });
123
- }, fi = ({
123
+ }, ki = ({
124
124
  rubricForm: r,
125
- canUseForGrading: n,
125
+ canUseForGrading: a,
126
126
  setRubricFormField: s
127
127
  }) => {
128
- const { translations: i } = I(), { hidePoints: a, useForGrading: l, hideScoreTotal: o, hideOutcomeResults: g } = r, t = (c) => {
129
- const h = Lr(c);
128
+ const { translations: i } = B(), { hidePoints: n, useForGrading: l, hideScoreTotal: o, hideOutcomeResults: m } = r, t = (c) => {
129
+ const h = Pr(c);
130
130
  s("useForGrading", h.useForGrading), s("hideScoreTotal", h.hideScoreTotal);
131
131
  };
132
- return /* @__PURE__ */ b(P, { direction: "column", gap: "small", "data-testid": "rubric-builder-assignment-settings", children: [
132
+ return /* @__PURE__ */ b(T, { direction: "column", gap: "small", "data-testid": "rubric-builder-assignment-settings", children: [
133
133
  /* @__PURE__ */ e(
134
- oe,
134
+ le,
135
135
  {
136
136
  variant: "toggle",
137
137
  label: i.hideOutcomeResultsLabel,
138
- checked: g,
138
+ checked: m,
139
139
  onChange: (c) => s("hideOutcomeResults", c.target.checked),
140
140
  "data-testid": "rubric-builder-hide-outcome-results"
141
141
  }
142
142
  ),
143
- !a && n && /* @__PURE__ */ e(
144
- oe,
143
+ !n && a && /* @__PURE__ */ e(
144
+ le,
145
145
  {
146
146
  variant: "toggle",
147
147
  label: i.useForGradingLabel,
@@ -150,8 +150,8 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
150
150
  "data-testid": "rubric-builder-use-for-grading"
151
151
  }
152
152
  ),
153
- !a && !l && /* @__PURE__ */ e(
154
- oe,
153
+ !n && !l && /* @__PURE__ */ e(
154
+ le,
155
155
  {
156
156
  variant: "toggle",
157
157
  label: i.hideScoreTotalLabel,
@@ -161,21 +161,21 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
161
161
  }
162
162
  )
163
163
  ] });
164
- }, le = ({
164
+ }, se = ({
165
165
  isOpen: r,
166
- heading: n,
166
+ heading: a,
167
167
  body: s,
168
168
  confirmLabel: i,
169
- cancelLabel: a,
169
+ cancelLabel: n,
170
170
  onConfirm: l,
171
171
  onDismiss: o,
172
- "data-testid": g
172
+ "data-testid": m
173
173
  }) => {
174
- const { translations: t } = I();
175
- return /* @__PURE__ */ b(te, { open: r, onDismiss: o, size: "small", label: n, "data-testid": g, children: [
176
- /* @__PURE__ */ b(te.Header, { children: [
174
+ const { translations: t } = B();
175
+ return /* @__PURE__ */ b(ne, { open: r, onDismiss: o, size: "small", label: a, "data-testid": m, children: [
176
+ /* @__PURE__ */ b(ne.Header, { children: [
177
177
  /* @__PURE__ */ e(
178
- Cr,
178
+ yr,
179
179
  {
180
180
  placement: "end",
181
181
  offset: "small",
@@ -183,187 +183,187 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
183
183
  screenReaderLabel: t.close
184
184
  }
185
185
  ),
186
- /* @__PURE__ */ e(q, { level: "h2", children: n })
186
+ /* @__PURE__ */ e(V, { level: "h2", children: a })
187
187
  ] }),
188
- /* @__PURE__ */ e(te.Body, { children: /* @__PURE__ */ e(G, { children: s }) }),
189
- /* @__PURE__ */ b(te.Footer, { children: [
190
- /* @__PURE__ */ e(H, { onClick: o, margin: "0 x-small 0 0", children: a }),
188
+ /* @__PURE__ */ e(ne.Body, { children: /* @__PURE__ */ e(G, { children: s }) }),
189
+ /* @__PURE__ */ b(ne.Footer, { children: [
190
+ /* @__PURE__ */ e(H, { onClick: o, margin: "0 x-small 0 0", children: n }),
191
191
  /* @__PURE__ */ e(H, { color: "primary", onClick: l, "data-testid": "confirm-modal-confirm", children: i })
192
192
  ] })
193
193
  ] });
194
- }, Ci = ({
194
+ }, Ti = ({
195
195
  criteriaCount: r,
196
- showMissingCriteriaError: n,
196
+ showMissingCriteriaError: a,
197
197
  actions: s,
198
198
  panel: i,
199
- children: a
199
+ children: n
200
200
  }) => {
201
- const { translations: l } = I();
202
- return /* @__PURE__ */ b(y, { as: "section", "aria-labelledby": "rubric-builder-criteria-heading", children: [
203
- /* @__PURE__ */ b(w, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
204
- /* @__PURE__ */ e(q, { level: "h3", id: "rubric-builder-criteria-heading", children: l.rubricBuilderCriteriaHeading }),
205
- s && /* @__PURE__ */ e(w, { gap: "small", wrap: "wrap", children: s })
201
+ const { translations: l } = B();
202
+ return /* @__PURE__ */ b(P, { as: "section", "aria-labelledby": "rubric-builder-criteria-heading", children: [
203
+ /* @__PURE__ */ b(k, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
204
+ /* @__PURE__ */ e(V, { level: "h3", id: "rubric-builder-criteria-heading", children: l.rubricBuilderCriteriaHeading }),
205
+ s && /* @__PURE__ */ e(k, { gap: "small", wrap: "wrap", children: s })
206
206
  ] }),
207
207
  i,
208
- /* @__PURE__ */ e(y, { as: "div", margin: "small 0 0", children: r === 0 ? /* @__PURE__ */ e(G, { color: "secondary", children: l.rubricBuilderCriteriaEmpty }) : a }),
209
- /* @__PURE__ */ e("div", { "aria-live": "polite", children: n && r === 0 && /* @__PURE__ */ e(G, { color: "danger", "data-testid": "rubric-builder-criteria-error", children: l.rubricBuilderAddCriterionError }) })
208
+ /* @__PURE__ */ e(P, { as: "div", margin: "small 0 0", children: r === 0 ? /* @__PURE__ */ e(G, { color: "secondary", children: l.rubricBuilderCriteriaEmpty }) : n }),
209
+ /* @__PURE__ */ e("div", { "aria-live": "polite", children: a && r === 0 && /* @__PURE__ */ e(G, { color: "danger", "data-testid": "rubric-builder-criteria-error", children: l.rubricBuilderAddCriterionError }) })
210
210
  ] });
211
- }, vi = ({ points: r, onCommit: n }) => {
212
- const { translations: s } = I(), [i, a] = k(String(r));
213
- return F(() => {
214
- a(String(r));
211
+ }, Pi = ({ points: r, onCommit: a }) => {
212
+ const { translations: s } = B(), [i, n] = y(String(r));
213
+ return N(() => {
214
+ n(String(r));
215
215
  }, [r]), /* @__PURE__ */ e(
216
- V,
216
+ X,
217
217
  {
218
218
  renderLabel: s.rubricBuilderPointsPossibleLabel,
219
219
  width: "8rem",
220
220
  value: i,
221
- onChange: (l) => a(l.target.value),
221
+ onChange: (l) => n(l.target.value),
222
222
  onBlur: (l) => {
223
- const o = Sr(l.target.value);
224
- a(String(o)), o !== r && n(o);
223
+ const o = Dr(l.target.value);
224
+ n(String(o)), o !== r && a(o);
225
225
  },
226
226
  "data-testid": "rubric-builder-points-possible"
227
227
  }
228
228
  );
229
- }, Ri = ({
229
+ }, Di = ({
230
230
  rating: r,
231
- sortableId: n,
231
+ sortableId: a,
232
232
  position: s,
233
233
  rangeStart: i,
234
- useRange: a,
234
+ useRange: n,
235
235
  hidePoints: l,
236
236
  showNameError: o,
237
- canRemove: g,
237
+ canRemove: m,
238
238
  onChange: t,
239
239
  onPointsBlur: c,
240
240
  onRemove: h
241
241
  }) => {
242
- const { translations: d, translate: u } = I(), { attributes: p, listeners: v, setNodeRef: f, transform: m, transition: C } = He({
243
- id: n
244
- }), [E, R] = k(String(r.points));
245
- F(() => {
246
- we(E) !== r.points && R(String(r.points));
242
+ const { translations: d, translate: u } = B(), { attributes: p, listeners: f, setNodeRef: C, transform: g, transition: v } = Xe({
243
+ id: a
244
+ }), [E, R] = y(String(r.points));
245
+ N(() => {
246
+ Oe(E) !== r.points && R(String(r.points));
247
247
  }, [r.points]);
248
- const S = (B, T) => {
249
- R(T), t({ ...r, points: B });
248
+ const I = (L, D) => {
249
+ R(D), t({ ...r, points: L });
250
250
  };
251
251
  return /* @__PURE__ */ e(
252
252
  "div",
253
253
  {
254
- ref: f,
255
- style: { transform: $e.Transform.toString(m), transition: C },
254
+ ref: C,
255
+ style: { transform: Ye.Transform.toString(g), transition: v },
256
256
  "data-testid": "rubric-builder-rating-row",
257
- children: /* @__PURE__ */ b(w, { gap: "small", alignItems: "start", wrap: "wrap", margin: "0 0 small", children: [
257
+ children: /* @__PURE__ */ b(k, { gap: "small", alignItems: "start", wrap: "wrap", margin: "0 0 small", children: [
258
258
  /* @__PURE__ */ e(
259
- y,
259
+ P,
260
260
  {
261
261
  as: "div",
262
262
  cursor: "grab",
263
263
  margin: "medium 0 0",
264
264
  "aria-label": u("rubricBuilderReorderRating", { position: s }),
265
265
  ...p,
266
- ...v,
267
- children: /* @__PURE__ */ e(Xe, { "aria-hidden": "true" })
266
+ ...f,
267
+ children: /* @__PURE__ */ e(ar, { "aria-hidden": "true" })
268
268
  }
269
269
  ),
270
- /* @__PURE__ */ e(y, { as: "div", minWidth: "1.5rem", margin: "medium 0 0", children: /* @__PURE__ */ e(G, { weight: "bold", "aria-hidden": "true", children: s }) }),
271
- !l && /* @__PURE__ */ b(w, { gap: "x-small", alignItems: "end", children: [
272
- a && i !== void 0 && /* @__PURE__ */ e(y, { as: "div", margin: "0 0 x-small", children: /* @__PURE__ */ e(G, { children: u("rangeStartPrefix", { rangeStart: i }) }) }),
270
+ /* @__PURE__ */ e(P, { as: "div", minWidth: "1.5rem", margin: "medium 0 0", children: /* @__PURE__ */ e(G, { weight: "bold", "aria-hidden": "true", children: s }) }),
271
+ !l && /* @__PURE__ */ b(k, { gap: "x-small", alignItems: "end", children: [
272
+ n && i !== void 0 && /* @__PURE__ */ e(P, { as: "div", margin: "0 0 x-small", children: /* @__PURE__ */ e(G, { children: u("rangeStartPrefix", { rangeStart: i }) }) }),
273
273
  /* @__PURE__ */ e(
274
- ai,
274
+ pi,
275
275
  {
276
- renderLabel: a ? d.rubricBuilderPointRangeLabel : d.rubricBuilderPointsLabel,
276
+ renderLabel: n ? d.rubricBuilderPointRangeLabel : d.rubricBuilderPointsLabel,
277
277
  allowStringValue: !0,
278
278
  showArrows: !1,
279
279
  width: "6rem",
280
280
  value: E,
281
- onChange: (B, T) => {
282
- Br(T) && S(we(T), T);
281
+ onChange: (L, D) => {
282
+ Er(D) && I(Oe(D), D);
283
283
  },
284
284
  onIncrement: () => {
285
- const B = Ee(Math.floor(r.points) + 1);
286
- S(B, String(B));
285
+ const L = Ge(Math.floor(r.points) + 1);
286
+ I(L, String(L));
287
287
  },
288
288
  onDecrement: () => {
289
- const B = Ee(Math.floor(r.points) - 1);
290
- S(B, String(B));
289
+ const L = Ge(Math.floor(r.points) - 1);
290
+ I(L, String(L));
291
291
  },
292
292
  onBlur: c,
293
293
  "data-testid": "rubric-builder-rating-points"
294
294
  }
295
295
  )
296
296
  ] }),
297
- /* @__PURE__ */ e(w.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
298
- V,
297
+ /* @__PURE__ */ e(k.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
298
+ X,
299
299
  {
300
300
  renderLabel: d.rubricBuilderRatingNameLabel,
301
301
  isRequired: !0,
302
302
  value: r.description,
303
- onChange: (B) => t({ ...r, description: B.target.value }),
303
+ onChange: (L) => t({ ...r, description: L.target.value }),
304
304
  messages: o ? [{ text: d.rubricBuilderRatingNameRequired, type: "error" }] : [],
305
305
  "data-testid": "rubric-builder-rating-name"
306
306
  }
307
307
  ) }),
308
- /* @__PURE__ */ e(w.Item, { shouldGrow: !0, shouldShrink: !0, size: "14rem", children: /* @__PURE__ */ e(
309
- V,
308
+ /* @__PURE__ */ e(k.Item, { shouldGrow: !0, shouldShrink: !0, size: "14rem", children: /* @__PURE__ */ e(
309
+ X,
310
310
  {
311
311
  renderLabel: d.rubricBuilderRatingDescriptionLabel,
312
312
  value: r.longDescription,
313
- onChange: (B) => t({ ...r, longDescription: B.target.value }),
313
+ onChange: (L) => t({ ...r, longDescription: L.target.value }),
314
314
  "data-testid": "rubric-builder-rating-description"
315
315
  }
316
316
  ) }),
317
- g && /* @__PURE__ */ e(y, { as: "div", margin: "medium 0 0", children: /* @__PURE__ */ e(
318
- ae,
317
+ m && /* @__PURE__ */ e(P, { as: "div", margin: "medium 0 0", children: /* @__PURE__ */ e(
318
+ oe,
319
319
  {
320
320
  screenReaderLabel: u("rubricBuilderRemoveRating", { position: s }),
321
321
  withBackground: !1,
322
322
  withBorder: !1,
323
323
  onClick: h,
324
324
  "data-testid": "rubric-builder-remove-rating",
325
- children: /* @__PURE__ */ e(Ye, {})
325
+ children: /* @__PURE__ */ e(or, {})
326
326
  }
327
327
  ) })
328
328
  ] })
329
329
  }
330
330
  );
331
- }, Li = ({
331
+ }, Ei = ({
332
332
  ratings: r,
333
- useRange: n,
333
+ useRange: a,
334
334
  hidePoints: s,
335
335
  ratingOrder: i,
336
- ratingNamesRequired: a,
336
+ ratingNamesRequired: n,
337
337
  onChange: l
338
338
  }) => {
339
- const { translations: o } = I(), g = ze(
340
- se(We, { activationConstraint: { distance: 8 } }),
341
- se(qe, { coordinateGetter: Ue })
342
- ), t = r.map(Ir), c = i === "ascending", h = r.map((u, p) => c ? r.length - 1 - p : p);
343
- return /* @__PURE__ */ b(y, { as: "div", children: [
344
- /* @__PURE__ */ e(je, { sensors: g, onDragEnd: ({ active: u, over: p }) => {
339
+ const { translations: o } = B(), m = Qe(
340
+ de(er, { activationConstraint: { distance: 8 } }),
341
+ de(Ze, { coordinateGetter: Je })
342
+ ), t = r.map(Mr), c = i === "ascending", h = r.map((u, p) => c ? r.length - 1 - p : p);
343
+ return /* @__PURE__ */ b(P, { as: "div", children: [
344
+ /* @__PURE__ */ e(rr, { sensors: m, onDragEnd: ({ active: u, over: p }) => {
345
345
  if (!p || u.id === p.id) return;
346
- const v = t.indexOf(String(u.id)), f = t.indexOf(String(p.id));
347
- v === -1 || f === -1 || l(Er({ list: r, startIndex: v, endIndex: f }));
346
+ const f = t.indexOf(String(u.id)), C = t.indexOf(String(p.id));
347
+ f === -1 || C === -1 || l(Nr({ list: r, startIndex: f, endIndex: C }));
348
348
  }, children: /* @__PURE__ */ e(
349
- Ke,
349
+ ir,
350
350
  {
351
351
  items: h.map((u) => t[u]),
352
- strategy: Ve,
352
+ strategy: tr,
353
353
  children: h.map((u, p) => /* @__PURE__ */ e(
354
- Ri,
354
+ Di,
355
355
  {
356
356
  rating: r[u],
357
357
  sortableId: t[u],
358
358
  position: p + 1,
359
- rangeStart: kr(r, u),
360
- useRange: n,
359
+ rangeStart: xr(r, u),
360
+ useRange: a,
361
361
  hidePoints: s,
362
- showNameError: a.includes(u),
362
+ showNameError: n.includes(u),
363
363
  canRemove: r.length > 1,
364
- onChange: (v) => l(Dr(r, u, v)),
365
- onPointsBlur: () => l(Tr(r)),
366
- onRemove: () => l(yr(r, u))
364
+ onChange: (f) => l(Gr(r, u, f)),
365
+ onPointsBlur: () => l(Or(r)),
366
+ onRemove: () => l(Ar(r, u))
367
367
  },
368
368
  t[u]
369
369
  ))
@@ -372,179 +372,179 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
372
372
  /* @__PURE__ */ e(
373
373
  H,
374
374
  {
375
- renderIcon: /* @__PURE__ */ e(Je, {}),
375
+ renderIcon: /* @__PURE__ */ e(lr, {}),
376
376
  withBackground: !1,
377
- onClick: () => l(wr(r, c ? 0 : r.length)),
377
+ onClick: () => l(_r(r, c ? 0 : r.length)),
378
378
  "data-testid": "rubric-builder-add-rating",
379
379
  children: o.rubricBuilderAddRatingLevel
380
380
  }
381
381
  )
382
382
  ] });
383
- }, Si = ({
383
+ }, Mi = ({
384
384
  criterion: r,
385
- sortableId: n,
385
+ sortableId: a,
386
386
  position: s,
387
387
  hidePoints: i,
388
- freeFormCriterionComments: a,
388
+ freeFormCriterionComments: n,
389
389
  ratingOrder: l,
390
390
  errors: o,
391
- showErrors: g,
391
+ showErrors: m,
392
392
  shouldFocusName: t,
393
393
  shouldFocusHandle: c,
394
394
  onNameFocused: h,
395
395
  onHandleFocused: d,
396
396
  onChange: u,
397
397
  onDuplicate: p,
398
- onDelete: v
398
+ onDelete: f
399
399
  }) => {
400
- const { translations: f, translate: m } = I(), { rubricCriterionRange: C } = ue(), { attributes: E, listeners: R, setNodeRef: S, transform: B, transition: T, isDragging: A } = He({
401
- id: n
402
- }), [M, O] = k(!r.description.trim()), [X, W] = k(!1), Y = $(null), J = $(null), z = g && Pr(o), Z = m("rubricBuilderCriterionHeading", { position: s }), j = r.description.trim(), N = j || Z, K = `rubric-builder-criterion-body-${n}`;
403
- return F(() => {
404
- z && O(!0);
405
- }, [z]), F(() => {
406
- var L;
407
- t && M && ((L = Y.current) == null || L.focus(), h());
408
- }, [t, M, h]), F(() => {
409
- var L;
410
- c && ((L = J.current) == null || L.focus(), d());
400
+ const { translations: C, translate: g } = B(), { rubricCriterionRange: v } = ue(), { attributes: E, listeners: R, setNodeRef: I, transform: L, transition: D, isDragging: x } = Xe({
401
+ id: a
402
+ }), [_, O] = y(!r.description.trim()), [Q, W] = y(!1), J = F(null), Z = F(null), U = m && Fr(o), ee = g("rubricBuilderCriterionHeading", { position: s }), j = r.description.trim(), z = j || ee, K = `rubric-builder-criterion-body-${a}`;
403
+ return N(() => {
404
+ U && O(!0);
405
+ }, [U]), N(() => {
406
+ var S;
407
+ t && _ && ((S = J.current) == null || S.focus(), h());
408
+ }, [t, _, h]), N(() => {
409
+ var S;
410
+ c && ((S = Z.current) == null || S.focus(), d());
411
411
  }, [c, d]), /* @__PURE__ */ b(
412
412
  "div",
413
413
  {
414
- ref: S,
415
- style: { transform: $e.Transform.toString(B), transition: T },
414
+ ref: I,
415
+ style: { transform: Ye.Transform.toString(L), transition: D },
416
416
  "data-testid": "rubric-builder-criterion-card",
417
417
  children: [
418
418
  /* @__PURE__ */ b(
419
- y,
419
+ P,
420
420
  {
421
421
  as: "section",
422
- "aria-label": N,
422
+ "aria-label": z,
423
423
  borderWidth: "small",
424
424
  borderRadius: "medium",
425
425
  padding: "small medium",
426
426
  margin: "0 0 small",
427
427
  background: "primary",
428
- shadow: A ? "above" : "none",
428
+ shadow: x ? "above" : "none",
429
429
  children: [
430
- /* @__PURE__ */ b(w, { gap: "small", alignItems: "center", wrap: "wrap", children: [
430
+ /* @__PURE__ */ b(k, { gap: "small", alignItems: "center", wrap: "wrap", children: [
431
431
  /* @__PURE__ */ e(
432
432
  "div",
433
433
  {
434
- ref: J,
435
- "aria-label": m("rubricBuilderReorderCriterion", { name: N }),
434
+ ref: Z,
435
+ "aria-label": g("rubricBuilderReorderCriterion", { name: z }),
436
436
  "data-testid": "rubric-builder-criterion-drag-handle",
437
437
  ...E,
438
438
  ...R,
439
- children: /* @__PURE__ */ e(Xe, { "aria-hidden": "true" })
439
+ children: /* @__PURE__ */ e(ar, { "aria-hidden": "true" })
440
440
  }
441
441
  ),
442
442
  /* @__PURE__ */ e(
443
- ae,
443
+ oe,
444
444
  {
445
- screenReaderLabel: m(
446
- M ? "rubricBuilderCollapseCriterion" : "rubricBuilderExpandCriterion",
447
- { name: N }
445
+ screenReaderLabel: g(
446
+ _ ? "rubricBuilderCollapseCriterion" : "rubricBuilderExpandCriterion",
447
+ { name: z }
448
448
  ),
449
- "aria-expanded": M,
449
+ "aria-expanded": _,
450
450
  "aria-controls": K,
451
451
  withBackground: !1,
452
452
  withBorder: !1,
453
453
  size: "small",
454
- onClick: () => O((L) => !L),
454
+ onClick: () => O((S) => !S),
455
455
  "data-testid": "rubric-builder-criterion-toggle",
456
- children: M ? /* @__PURE__ */ e(Zr, {}) : /* @__PURE__ */ e(ei, {})
456
+ children: _ ? /* @__PURE__ */ e(ci, {}) : /* @__PURE__ */ e(ui, {})
457
457
  }
458
458
  ),
459
- a && /* @__PURE__ */ e(
460
- ri,
459
+ n && /* @__PURE__ */ e(
460
+ bi,
461
461
  {
462
- title: f.rubricBuilderWrittenFeedback,
462
+ title: C.rubricBuilderWrittenFeedback,
463
463
  "data-testid": "rubric-builder-criterion-written-icon"
464
464
  }
465
465
  ),
466
- /* @__PURE__ */ e(w.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ b(q, { level: "h4", children: [
467
- Z,
466
+ /* @__PURE__ */ e(k.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ b(V, { level: "h4", children: [
467
+ ee,
468
468
  j && /* @__PURE__ */ e(G, { weight: "normal", "data-testid": "rubric-builder-criterion-name", children: `: ${j}` })
469
469
  ] }) }),
470
- !i && /* @__PURE__ */ e(rr, { "data-testid": "rubric-builder-criterion-max", children: m("rubricBuilderCriterionMaxPoints", { count: r.points }) }),
470
+ !i && /* @__PURE__ */ e(cr, { "data-testid": "rubric-builder-criterion-max", children: g("rubricBuilderCriterionMaxPoints", { count: r.points }) }),
471
471
  /* @__PURE__ */ e(
472
- ae,
472
+ oe,
473
473
  {
474
- screenReaderLabel: m("rubricBuilderDuplicateCriterion", { name: N }),
474
+ screenReaderLabel: g("rubricBuilderDuplicateCriterion", { name: z }),
475
475
  withBackground: !1,
476
476
  withBorder: !1,
477
477
  onClick: p,
478
478
  "data-testid": "rubric-builder-duplicate-criterion",
479
- children: /* @__PURE__ */ e(ii, {})
479
+ children: /* @__PURE__ */ e(mi, {})
480
480
  }
481
481
  ),
482
482
  /* @__PURE__ */ e(
483
- ae,
483
+ oe,
484
484
  {
485
- screenReaderLabel: m("rubricBuilderDeleteCriterion", { name: N }),
485
+ screenReaderLabel: g("rubricBuilderDeleteCriterion", { name: z }),
486
486
  withBackground: !1,
487
487
  withBorder: !1,
488
488
  onClick: () => W(!0),
489
489
  "data-testid": "rubric-builder-delete-criterion",
490
- children: /* @__PURE__ */ e(Ye, {})
490
+ children: /* @__PURE__ */ e(or, {})
491
491
  }
492
492
  )
493
493
  ] }),
494
- M && /* @__PURE__ */ e(y, { as: "div", id: K, margin: "medium 0 0", children: /* @__PURE__ */ b(w, { direction: "column", gap: "medium", children: [
494
+ _ && /* @__PURE__ */ e(P, { as: "div", id: K, margin: "medium 0 0", children: /* @__PURE__ */ b(k, { direction: "column", gap: "medium", children: [
495
495
  /* @__PURE__ */ e(
496
- V,
496
+ X,
497
497
  {
498
- renderLabel: f.rubricBuilderCriterionNameLabel,
498
+ renderLabel: C.rubricBuilderCriterionNameLabel,
499
499
  isRequired: !0,
500
500
  value: r.description,
501
- inputRef: (L) => {
502
- Y.current = L;
501
+ inputRef: (S) => {
502
+ J.current = S;
503
503
  },
504
- onChange: (L) => u({ ...r, description: L.target.value }),
505
- messages: g && o.nameRequired ? [{ text: f.rubricBuilderCriterionNameRequired, type: "error" }] : [],
504
+ onChange: (S) => u({ ...r, description: S.target.value }),
505
+ messages: m && o.nameRequired ? [{ text: C.rubricBuilderCriterionNameRequired, type: "error" }] : [],
506
506
  "data-testid": "rubric-builder-criterion-name-input"
507
507
  }
508
508
  ),
509
509
  /* @__PURE__ */ e(
510
- ni,
510
+ hi,
511
511
  {
512
- label: f.rubricBuilderCriterionDescriptionLabel,
512
+ label: C.rubricBuilderCriterionDescriptionLabel,
513
513
  value: r.longDescription ?? "",
514
- onChange: (L) => u({ ...r, longDescription: L.target.value }),
514
+ onChange: (S) => u({ ...r, longDescription: S.target.value }),
515
515
  "data-testid": "rubric-builder-criterion-description"
516
516
  }
517
517
  ),
518
- C && !i && !a && /* @__PURE__ */ e(
519
- ti,
518
+ v && !i && !n && /* @__PURE__ */ e(
519
+ gi,
520
520
  {
521
521
  variant: "toggle",
522
- label: f.rubricBuilderEnableRange,
522
+ label: C.rubricBuilderEnableRange,
523
523
  checked: r.criterionUseRange,
524
- onChange: (L) => u({ ...r, criterionUseRange: L.target.checked }),
524
+ onChange: (S) => u({ ...r, criterionUseRange: S.target.checked }),
525
525
  "data-testid": "rubric-builder-enable-range"
526
526
  }
527
527
  ),
528
- a ? !i && /* @__PURE__ */ e(
529
- vi,
528
+ n ? !i && /* @__PURE__ */ e(
529
+ Pi,
530
530
  {
531
531
  points: r.points,
532
- onCommit: (L) => u(
533
- Pe(
532
+ onCommit: (S) => u(
533
+ _e(
534
534
  r,
535
- xr(r.ratings, L)
535
+ Hr(r.ratings, S)
536
536
  )
537
537
  )
538
538
  }
539
539
  ) : /* @__PURE__ */ e(
540
- Li,
540
+ Ei,
541
541
  {
542
542
  ratings: r.ratings,
543
543
  useRange: r.criterionUseRange && !i,
544
544
  hidePoints: i,
545
545
  ratingOrder: l,
546
- ratingNamesRequired: g ? o.ratingNamesRequired : [],
547
- onChange: (L) => u(Pe(r, L))
546
+ ratingNamesRequired: m ? o.ratingNamesRequired : [],
547
+ onChange: (S) => u(_e(r, S))
548
548
  }
549
549
  )
550
550
  ] }) })
@@ -552,15 +552,15 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
552
552
  }
553
553
  ),
554
554
  /* @__PURE__ */ e(
555
- le,
555
+ se,
556
556
  {
557
- isOpen: X,
558
- heading: f.rubricBuilderCriterionDeleteHeading,
559
- body: f.rubricBuilderCriterionDeleteBody,
560
- confirmLabel: f.delete,
561
- cancelLabel: f.cancel,
557
+ isOpen: Q,
558
+ heading: C.rubricBuilderCriterionDeleteHeading,
559
+ body: C.rubricBuilderCriterionDeleteBody,
560
+ confirmLabel: C.delete,
561
+ cancelLabel: C.cancel,
562
562
  onConfirm: () => {
563
- W(!1), v();
563
+ W(!1), f();
564
564
  },
565
565
  onDismiss: () => W(!1),
566
566
  "data-testid": "rubric-builder-delete-criterion-modal"
@@ -569,15 +569,15 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
569
569
  ]
570
570
  }
571
571
  );
572
- }, Bi = ({
572
+ }, xi = ({
573
573
  criteria: r,
574
- hidePoints: n,
574
+ hidePoints: a,
575
575
  freeFormCriterionComments: s,
576
576
  ratingOrder: i,
577
- criteriaValidationErrors: a,
577
+ criteriaValidationErrors: n,
578
578
  showErrors: l,
579
579
  focusNameCriterionId: o,
580
- onFocusedName: g,
580
+ onFocusedName: m,
581
581
  onChangeCriterion: t,
582
582
  onDuplicateCriterion: c,
583
583
  onDeleteCriterion: h,
@@ -586,50 +586,50 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
586
586
  const {
587
587
  sortableIds: u,
588
588
  movedCriterionId: p,
589
- clearMovedCriterion: v,
590
- srAnnouncement: f,
591
- moveCriterionBySortableId: m
592
- } = Ar({ criteria: r, onReorderCriteria: d }), C = ze(
593
- se(We, { activationConstraint: { distance: 8 } }),
594
- se(qe, { coordinateGetter: Ue })
589
+ clearMovedCriterion: f,
590
+ srAnnouncement: C,
591
+ moveCriterionBySortableId: g
592
+ } = zr({ criteria: r, onReorderCriteria: d }), v = Qe(
593
+ de(er, { activationConstraint: { distance: 8 } }),
594
+ de(Ze, { coordinateGetter: Je })
595
595
  );
596
- return /* @__PURE__ */ b(ve, { children: [
597
- /* @__PURE__ */ e(er, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", children: f }) }),
598
- /* @__PURE__ */ e(je, { sensors: C, onDragEnd: ({ active: R, over: S }) => {
599
- S && m(R.id, S.id);
600
- }, children: /* @__PURE__ */ e(Ke, { items: u, strategy: Ve, children: r.map((R, S) => /* @__PURE__ */ e(
601
- Si,
596
+ return /* @__PURE__ */ b(Se, { children: [
597
+ /* @__PURE__ */ e(dr, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", children: C }) }),
598
+ /* @__PURE__ */ e(rr, { sensors: v, onDragEnd: ({ active: R, over: I }) => {
599
+ I && g(R.id, I.id);
600
+ }, children: /* @__PURE__ */ e(ir, { items: u, strategy: tr, children: r.map((R, I) => /* @__PURE__ */ e(
601
+ Mi,
602
602
  {
603
603
  criterion: R,
604
- sortableId: u[S],
605
- position: S + 1,
606
- hidePoints: n,
604
+ sortableId: u[I],
605
+ position: I + 1,
606
+ hidePoints: a,
607
607
  freeFormCriterionComments: s,
608
608
  ratingOrder: i,
609
- errors: a[S],
609
+ errors: n[I],
610
610
  showErrors: l,
611
611
  shouldFocusName: R.id === o,
612
612
  shouldFocusHandle: R.id === p,
613
- onNameFocused: g,
614
- onHandleFocused: v,
613
+ onNameFocused: m,
614
+ onHandleFocused: f,
615
615
  onChange: t,
616
616
  onDuplicate: () => c(R),
617
617
  onDelete: () => h(R)
618
618
  },
619
- u[S]
619
+ u[I]
620
620
  )) }) })
621
621
  ] });
622
- }, Ii = ({
622
+ }, Ai = ({
623
623
  isOpen: r,
624
- assignmentPoints: n,
624
+ assignmentPoints: a,
625
625
  rubricPoints: s,
626
626
  onChange: i,
627
- onLeaveDifferent: a,
627
+ onLeaveDifferent: n,
628
628
  onDismiss: l
629
629
  }) => {
630
- const { translations: o, translate: g } = I(), { locale: t } = Re(), c = Or(s, n, t), h = c === null ? g("pointsDifferenceModalBodyZeroAssignmentPoints", { rubricPoints: s }) : g("pointsDifferenceModalBody", { assignmentPoints: n, rubricPoints: s, pointRatio: c });
630
+ const { translations: o, translate: m } = B(), { locale: t } = be(), c = $r(s, a, t), h = c === null ? m("pointsDifferenceModalBodyZeroAssignmentPoints", { rubricPoints: s }) : m("pointsDifferenceModalBody", { assignmentPoints: a, rubricPoints: s, pointRatio: c });
631
631
  return /* @__PURE__ */ b(
632
- x,
632
+ M,
633
633
  {
634
634
  open: r,
635
635
  onDismiss: l,
@@ -637,9 +637,9 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
637
637
  label: o.pointsDifferenceModalLabel,
638
638
  "data-testid": "rubric-builder-points-difference-modal",
639
639
  children: [
640
- /* @__PURE__ */ b(x.Header, { children: [
640
+ /* @__PURE__ */ b(M.Header, { children: [
641
641
  /* @__PURE__ */ e(
642
- Le,
642
+ Be,
643
643
  {
644
644
  placement: "end",
645
645
  offset: "small",
@@ -647,32 +647,137 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
647
647
  screenReaderLabel: o.close
648
648
  }
649
649
  ),
650
- /* @__PURE__ */ e(Q, { level: "h2", children: o.confirmToContinueHeader })
650
+ /* @__PURE__ */ e(q, { level: "h2", children: o.confirmToContinueHeader })
651
651
  ] }),
652
- /* @__PURE__ */ e(x.Body, { children: /* @__PURE__ */ e(de, { children: h }) }),
653
- /* @__PURE__ */ b(x.Footer, { children: [
652
+ /* @__PURE__ */ e(M.Body, { children: /* @__PURE__ */ e(Y, { children: h }) }),
653
+ /* @__PURE__ */ b(M.Footer, { children: [
654
654
  /* @__PURE__ */ e(
655
- _,
655
+ A,
656
656
  {
657
- onClick: a,
657
+ onClick: n,
658
658
  margin: "0 x-small 0 0",
659
659
  "data-testid": "rubric-builder-leave-points-different",
660
660
  children: o.pointsDifferenceModalLeaveDifferent
661
661
  }
662
662
  ),
663
- /* @__PURE__ */ e(_, { color: "primary", onClick: i, "data-testid": "rubric-builder-change-points", children: o.pointsDifferenceModalChange })
663
+ /* @__PURE__ */ e(A, { color: "primary", onClick: i, "data-testid": "rubric-builder-change-points", children: o.pointsDifferenceModalChange })
664
664
  ] })
665
665
  ]
666
666
  }
667
667
  );
668
- }, ki = ({
668
+ }, ur = "rubric-builder-preview", Ve = "rubric-builder-preview-heading", Oi = ["traditional", "horizontal", "vertical"], qe = () => {
669
+ }, Gi = ({
670
+ rubric: r,
671
+ savePending: a,
672
+ onClose: s,
673
+ onSave: i
674
+ }) => {
675
+ const { translations: n } = B(), l = We(), o = F(null), { currentUserId: m, locale: t } = be(), { viewMode: c, isTraditionalView: h, setViewMode: d } = Ur({
676
+ currentUserId: m ?? ""
677
+ });
678
+ N(() => {
679
+ var f;
680
+ (f = o.current) == null || f.focus();
681
+ }, []);
682
+ const u = {
683
+ traditional: n.assessmentViewModeTraditional,
684
+ horizontal: n.assessmentViewModeHorizontal,
685
+ vertical: n.assessmentViewModeVertical
686
+ }, p = () => r.criteria.length === 0 ? /* @__PURE__ */ e(Y, { children: n.rubricBuilderCriteriaEmpty }) : h ? /* @__PURE__ */ e(
687
+ Vr,
688
+ {
689
+ translations: l,
690
+ criteria: r.criteria,
691
+ hidePoints: r.hidePoints,
692
+ locale: t ?? "en",
693
+ isFreeFormCriterionComments: r.freeFormCriterionComments,
694
+ isPreviewMode: !0,
695
+ ratingOrder: r.ratingOrder,
696
+ rubricAssessmentData: [],
697
+ rubricTitle: r.title,
698
+ onUpdateAssessmentData: qe
699
+ }
700
+ ) : /* @__PURE__ */ e(
701
+ qr,
702
+ {
703
+ buttonDisplay: r.buttonDisplay,
704
+ criteria: r.criteria,
705
+ hidePoints: r.hidePoints,
706
+ locale: t ?? "en",
707
+ isPreviewMode: !0,
708
+ isPeerReview: !1,
709
+ isSelfAssessment: !1,
710
+ isFreeFormCriterionComments: r.freeFormCriterionComments,
711
+ ratingOrder: r.ratingOrder,
712
+ rubricAssessmentData: [],
713
+ selectedViewMode: c,
714
+ onUpdateAssessmentData: qe
715
+ }
716
+ );
717
+ return /* @__PURE__ */ e(
718
+ Re,
719
+ {
720
+ as: "section",
721
+ id: ur,
722
+ "aria-labelledby": Ve,
723
+ borderWidth: "small",
724
+ borderRadius: "medium",
725
+ background: "primary",
726
+ "data-testid": "rubric-builder-preview-panel",
727
+ children: /* @__PURE__ */ b(T, { direction: "column", height: "100%", children: [
728
+ /* @__PURE__ */ e(T.Item, { padding: "medium", children: /* @__PURE__ */ b(T, { justifyItems: "space-between", alignItems: "end", gap: "small", wrap: "wrap", children: [
729
+ /* @__PURE__ */ e(
730
+ q,
731
+ {
732
+ level: "h3",
733
+ id: Ve,
734
+ tabIndex: -1,
735
+ elementRef: (f) => {
736
+ o.current = f;
737
+ },
738
+ children: n.rubricBuilderPreviewHeading
739
+ }
740
+ ),
741
+ /* @__PURE__ */ e(
742
+ $,
743
+ {
744
+ renderLabel: n.assessmentViewMode,
745
+ width: "10rem",
746
+ value: c,
747
+ onChange: (f, { value: C }) => d(C),
748
+ "data-testid": "rubric-builder-preview-view-mode",
749
+ children: Oi.map((f) => /* @__PURE__ */ e($.Option, { id: `rubric-builder-preview-${f}`, value: f, children: u[f] }, f))
750
+ }
751
+ )
752
+ ] }) }),
753
+ /* @__PURE__ */ e(T.Item, { shouldGrow: !0, shouldShrink: !0, padding: "0 medium", overflowX: "auto", overflowY: "auto", children: /* @__PURE__ */ e(Re, { as: "div", "data-testid": "rubric-builder-preview-body", children: p() }) }),
754
+ /* @__PURE__ */ e(T.Item, { as: "footer", padding: "small medium", children: /* @__PURE__ */ b(T, { justifyItems: "end", gap: "small", wrap: "wrap", children: [
755
+ /* @__PURE__ */ e(A, { onClick: s, "data-testid": "rubric-builder-preview-close", children: n.rubricBuilderPreviewClose }),
756
+ /* @__PURE__ */ e(
757
+ A,
758
+ {
759
+ color: "primary",
760
+ onClick: i,
761
+ interaction: a ? "disabled" : "enabled",
762
+ "data-testid": "rubric-builder-preview-save",
763
+ children: n.rubricBuilderPreviewSave
764
+ }
765
+ )
766
+ ] }) })
767
+ ] })
768
+ }
769
+ );
770
+ }, _i = ({
669
771
  savePending: r,
772
+ isPreviewOpen: a,
773
+ previewToggleRef: s,
774
+ onTogglePreview: i,
670
775
  onDiscard: n,
671
- onSave: s
776
+ onSave: l
672
777
  }) => {
673
- const { translations: i } = I();
778
+ const { translations: o } = B();
674
779
  return /* @__PURE__ */ e(
675
- y,
780
+ P,
676
781
  {
677
782
  as: "footer",
678
783
  position: "sticky",
@@ -681,59 +786,70 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
681
786
  borderWidth: "small none none none",
682
787
  padding: "small 0",
683
788
  stacking: "above",
684
- children: /* @__PURE__ */ b(w, { justifyItems: "end", gap: "small", wrap: "wrap", children: [
685
- /* @__PURE__ */ e(H, { onClick: n, "data-testid": "rubric-builder-discard", children: i.rubricBuilderDiscard }),
789
+ children: /* @__PURE__ */ b(k, { justifyItems: "end", gap: "small", wrap: "wrap", children: [
790
+ /* @__PURE__ */ e(
791
+ H,
792
+ {
793
+ "aria-expanded": a,
794
+ "aria-controls": ur,
795
+ onClick: i,
796
+ elementRef: (m) => s(m),
797
+ "data-testid": "rubric-builder-preview-toggle",
798
+ children: a ? o.rubricBuilderPreviewClose : o.rubricBuilderPreviewToggle
799
+ }
800
+ ),
801
+ /* @__PURE__ */ e(H, { onClick: n, "data-testid": "rubric-builder-discard", children: o.rubricBuilderDiscard }),
686
802
  /* @__PURE__ */ e(
687
803
  H,
688
804
  {
689
805
  color: "primary",
690
- onClick: s,
806
+ onClick: l,
691
807
  interaction: r ? "disabled" : "enabled",
692
808
  "data-testid": "rubric-builder-save",
693
- children: i.rubricBuilderSave
809
+ children: o.rubricBuilderSave
694
810
  }
695
811
  )
696
812
  ] })
697
813
  }
698
814
  );
699
- }, yi = ({
815
+ }, Ni = ({
700
816
  isNewRubric: r,
701
- pointsPossible: n,
817
+ pointsPossible: a,
702
818
  hidePoints: s
703
819
  }) => {
704
- const { translations: i, translate: a } = I();
705
- return /* @__PURE__ */ b(w, { as: "header", justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
706
- /* @__PURE__ */ e(q, { level: "h2", children: r ? i.rubricBuilderCreateTitle : i.rubricBuilderEditTitle }),
707
- !s && /* @__PURE__ */ e(rr, { "data-testid": "rubric-builder-current-total", children: a("rubricBuilderCurrentTotal", { count: n }) })
820
+ const { translations: i, translate: n } = B();
821
+ return /* @__PURE__ */ b(k, { as: "header", justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
822
+ /* @__PURE__ */ e(V, { level: "h2", children: r ? i.rubricBuilderCreateTitle : i.rubricBuilderEditTitle }),
823
+ !s && /* @__PURE__ */ e(cr, { "data-testid": "rubric-builder-current-total", children: n("rubricBuilderCurrentTotal", { count: a }) })
708
824
  ] });
709
- }, ne = ({ name: r, label: n, value: s, options: i, onChange: a }) => /* @__PURE__ */ e(
710
- oi,
825
+ }, ae = ({ name: r, label: a, value: s, options: i, onChange: n }) => /* @__PURE__ */ e(
826
+ fi,
711
827
  {
712
828
  name: r,
713
- description: n,
829
+ description: a,
714
830
  variant: "toggle",
715
831
  layout: "columns",
716
832
  value: s,
717
- onChange: (l, o) => a(o),
718
- children: i.map((l) => /* @__PURE__ */ e(li, { value: l.value, label: l.label }, l.value))
833
+ onChange: (l, o) => n(o),
834
+ children: i.map((l) => /* @__PURE__ */ e(Ci, { value: l.value, label: l.label }, l.value))
719
835
  }
720
- ), Ti = ({
836
+ ), Fi = ({
721
837
  rubricForm: r,
722
- setRubricFormField: n,
838
+ setRubricFormField: a,
723
839
  validateTitle: s,
724
840
  titleError: i,
725
- titleInputRef: a,
841
+ titleInputRef: n,
726
842
  assignmentSettings: l
727
843
  }) => {
728
- const { translations: o } = I(), g = (t) => {
844
+ const { translations: o } = B(), m = (t) => {
729
845
  if (t === "unscored" === r.hidePoints) return;
730
- const { hidePoints: c, hideScoreTotal: h, useForGrading: d, buttonDisplay: u } = Gr(
846
+ const { hidePoints: c, hideScoreTotal: h, useForGrading: d, buttonDisplay: u } = Wr(
731
847
  r.hidePoints
732
848
  );
733
- n("hidePoints", c), n("hideScoreTotal", h), n("useForGrading", d), u && n("buttonDisplay", u);
849
+ a("hidePoints", c), a("hideScoreTotal", h), a("useForGrading", d), u && a("buttonDisplay", u);
734
850
  };
735
851
  return /* @__PURE__ */ b(
736
- y,
852
+ P,
737
853
  {
738
854
  as: "section",
739
855
  "aria-labelledby": "rubric-builder-details-heading",
@@ -741,24 +857,24 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
741
857
  borderRadius: "medium",
742
858
  padding: "medium",
743
859
  children: [
744
- /* @__PURE__ */ e(q, { level: "h3", id: "rubric-builder-details-heading", margin: "0 0 medium", children: o.rubricBuilderDetailsHeading }),
745
- /* @__PURE__ */ b(w, { direction: "column", gap: "medium", children: [
860
+ /* @__PURE__ */ e(V, { level: "h3", id: "rubric-builder-details-heading", margin: "0 0 medium", children: o.rubricBuilderDetailsHeading }),
861
+ /* @__PURE__ */ b(k, { direction: "column", gap: "medium", children: [
746
862
  /* @__PURE__ */ e(
747
- V,
863
+ X,
748
864
  {
749
865
  "data-testid": "rubric-builder-name",
750
866
  renderLabel: o.rubricBuilderNameLabel,
751
867
  isRequired: !0,
752
868
  value: r.title,
753
- inputRef: a,
754
- onChange: (t) => n("title", t.target.value),
869
+ inputRef: n,
870
+ onChange: (t) => a("title", t.target.value),
755
871
  onBlur: (t) => s(t.target.value),
756
872
  messages: i ? [{ text: i, type: "error" }] : []
757
873
  }
758
874
  ),
759
- /* @__PURE__ */ b(w, { gap: "medium", wrap: "wrap", children: [
875
+ /* @__PURE__ */ b(k, { gap: "medium", wrap: "wrap", children: [
760
876
  /* @__PURE__ */ e(
761
- ne,
877
+ ae,
762
878
  {
763
879
  name: "rubric-builder-scoring",
764
880
  label: o.scoringTypeSelectLabel,
@@ -767,11 +883,11 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
767
883
  { value: "scored", label: o.scoringTypeScored },
768
884
  { value: "unscored", label: o.scoringTypeUnscored }
769
885
  ],
770
- onChange: g
886
+ onChange: m
771
887
  }
772
888
  ),
773
889
  !r.hidePoints && !r.freeFormCriterionComments && /* @__PURE__ */ e(
774
- ne,
890
+ ae,
775
891
  {
776
892
  name: "rubric-builder-display",
777
893
  label: o.rubricBuilderDisplayLabel,
@@ -780,11 +896,11 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
780
896
  { value: "points", label: o.ratingDisplayPoints },
781
897
  { value: "numeric", label: o.ratingDisplayLevel }
782
898
  ],
783
- onChange: (t) => n("buttonDisplay", t)
899
+ onChange: (t) => a("buttonDisplay", t)
784
900
  }
785
901
  ),
786
902
  /* @__PURE__ */ e(
787
- ne,
903
+ ae,
788
904
  {
789
905
  name: "rubric-builder-feedback",
790
906
  label: o.rubricBuilderFeedbackLabel,
@@ -793,11 +909,11 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
793
909
  { value: "scale", label: o.gradingTypeScale },
794
910
  { value: "freeForm", label: o.rubricBuilderFeedbackWrittenOnly }
795
911
  ],
796
- onChange: (t) => n("freeFormCriterionComments", t === "freeForm")
912
+ onChange: (t) => a("freeFormCriterionComments", t === "freeForm")
797
913
  }
798
914
  ),
799
915
  !r.freeFormCriterionComments && /* @__PURE__ */ e(
800
- ne,
916
+ ae,
801
917
  {
802
918
  name: "rubric-builder-rating-order",
803
919
  label: o.rubricBuilderRatingOrderLabel,
@@ -806,7 +922,7 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
806
922
  { value: "ascending", label: o.rubricBuilderRatingOrderLowToHigh },
807
923
  { value: "descending", label: o.rubricBuilderRatingOrderHighToLow }
808
924
  ],
809
- onChange: (t) => n("ratingOrder", t)
925
+ onChange: (t) => a("ratingOrder", t)
810
926
  }
811
927
  )
812
928
  ] }),
@@ -815,81 +931,81 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
815
931
  ]
816
932
  }
817
933
  );
818
- }, Di = ({
934
+ }, Hi = ({
819
935
  options: r,
820
- maxCriterionCount: n,
936
+ maxCriterionCount: a,
821
937
  maxRatingCount: s,
822
938
  rangeEnabled: i,
823
- isPending: a,
939
+ isPending: n,
824
940
  onChange: l,
825
941
  onGenerate: o,
826
- onCancel: g
942
+ onCancel: m
827
943
  }) => {
828
- const { translations: t } = I(), [c, h] = k(!1), d = (m, C) => l({ ...r, [m]: C }), u = xe(r.totalPoints), p = r.standard.length > fe, v = r.additionalPromptInfo.length > fe, f = () => {
944
+ const { translations: t } = B(), [c, h] = y(!1), d = (g, v) => l({ ...r, [g]: v }), u = Ne(r.totalPoints), p = r.standard.length > ve, f = r.additionalPromptInfo.length > ve, C = () => {
829
945
  if (!u) {
830
946
  h(!0);
831
947
  return;
832
948
  }
833
949
  o();
834
950
  };
835
- return /* @__PURE__ */ b(P, { direction: "column", gap: "medium", "data-testid": "rubric-builder-generator-form", children: [
836
- /* @__PURE__ */ b(P, { gap: "small", wrap: "wrap", alignItems: "start", children: [
837
- /* @__PURE__ */ e(P.Item, { shouldGrow: !0, shouldShrink: !0, size: "12rem", children: /* @__PURE__ */ e(
838
- U,
951
+ return /* @__PURE__ */ b(T, { direction: "column", gap: "medium", "data-testid": "rubric-builder-generator-form", children: [
952
+ /* @__PURE__ */ b(T, { gap: "small", wrap: "wrap", alignItems: "start", children: [
953
+ /* @__PURE__ */ e(T.Item, { shouldGrow: !0, shouldShrink: !0, size: "12rem", children: /* @__PURE__ */ e(
954
+ $,
839
955
  {
840
956
  renderLabel: t.rubricBuilderGeneratorDifficultyLabel,
841
957
  value: r.gradeLevel,
842
- onChange: (m, { value: C }) => C && d("gradeLevel", String(C)),
958
+ onChange: (g, { value: v }) => v && d("gradeLevel", String(v)),
843
959
  "data-testid": "rubric-builder-generator-difficulty",
844
- children: Mr.map((m) => /* @__PURE__ */ e(U.Option, { id: `rubric-builder-grade-level-${m}`, value: m, children: t[_r[m]] }, m))
960
+ children: jr.map((g) => /* @__PURE__ */ e($.Option, { id: `rubric-builder-grade-level-${g}`, value: g, children: t[Kr[g]] }, g))
845
961
  }
846
962
  ) }),
847
- /* @__PURE__ */ e(P.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
848
- U,
963
+ /* @__PURE__ */ e(T.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
964
+ $,
849
965
  {
850
966
  renderLabel: t.rubricBuilderGeneratorCriteriaCountLabel,
851
967
  isRequired: !0,
852
968
  value: String(r.criteriaCount),
853
- onChange: (m, { value: C }) => C && d("criteriaCount", Number(C)),
969
+ onChange: (g, { value: v }) => v && d("criteriaCount", Number(v)),
854
970
  "data-testid": "rubric-builder-generator-criteria-count",
855
- children: Ae(n).map((m) => /* @__PURE__ */ e(
856
- U.Option,
971
+ children: Fe(a).map((g) => /* @__PURE__ */ e(
972
+ $.Option,
857
973
  {
858
- id: `rubric-builder-criteria-count-${m}`,
859
- value: String(m),
860
- children: String(m)
974
+ id: `rubric-builder-criteria-count-${g}`,
975
+ value: String(g),
976
+ children: String(g)
861
977
  },
862
- m
978
+ g
863
979
  ))
864
980
  }
865
981
  ) }),
866
- /* @__PURE__ */ e(P.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
867
- U,
982
+ /* @__PURE__ */ e(T.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
983
+ $,
868
984
  {
869
985
  renderLabel: t.rubricBuilderGeneratorRatingCountLabel,
870
986
  isRequired: !0,
871
987
  value: String(r.ratingCount),
872
- onChange: (m, { value: C }) => C && d("ratingCount", Number(C)),
988
+ onChange: (g, { value: v }) => v && d("ratingCount", Number(v)),
873
989
  "data-testid": "rubric-builder-generator-rating-count",
874
- children: Ae(s).map((m) => /* @__PURE__ */ e(
875
- U.Option,
990
+ children: Fe(s).map((g) => /* @__PURE__ */ e(
991
+ $.Option,
876
992
  {
877
- id: `rubric-builder-rating-count-${m}`,
878
- value: String(m),
879
- children: String(m)
993
+ id: `rubric-builder-rating-count-${g}`,
994
+ value: String(g),
995
+ children: String(g)
880
996
  },
881
- m
997
+ g
882
998
  ))
883
999
  }
884
1000
  ) }),
885
- /* @__PURE__ */ e(P.Item, { shouldGrow: !0, shouldShrink: !0, size: "8rem", children: /* @__PURE__ */ e(
886
- ui,
1001
+ /* @__PURE__ */ e(T.Item, { shouldGrow: !0, shouldShrink: !0, size: "8rem", children: /* @__PURE__ */ e(
1002
+ wi,
887
1003
  {
888
1004
  renderLabel: t.generateCriteriaTotalPointsLabel,
889
1005
  isRequired: !0,
890
1006
  value: r.totalPoints,
891
- onChange: (m, C) => {
892
- d("totalPoints", C), xe(C) && h(!1);
1007
+ onChange: (g, v) => {
1008
+ d("totalPoints", v), Ne(v) && h(!1);
893
1009
  },
894
1010
  messages: c && !u ? [{ text: t.generateCriteriaTotalPointsError, type: "error" }] : [],
895
1011
  "data-testid": "rubric-builder-generator-total-points"
@@ -897,12 +1013,12 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
897
1013
  ) })
898
1014
  ] }),
899
1015
  i && /* @__PURE__ */ e(
900
- oe,
1016
+ le,
901
1017
  {
902
1018
  variant: "toggle",
903
1019
  label: t.rubricBuilderEnableRange,
904
1020
  checked: r.useRange,
905
- onChange: (m) => d("useRange", m.target.checked),
1021
+ onChange: (g) => d("useRange", g.target.checked),
906
1022
  "data-testid": "rubric-builder-generator-use-range"
907
1023
  }
908
1024
  ),
@@ -912,7 +1028,7 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
912
1028
  label: t.rubricBuilderGeneratorStandardLabel,
913
1029
  placeholder: t.standardObjectivePlaceholder,
914
1030
  value: r.standard,
915
- onChange: (m) => d("standard", m.target.value),
1031
+ onChange: (g) => d("standard", g.target.value),
916
1032
  messages: p ? [{ text: t.standardObjectiveTooLong, type: "error" }] : [],
917
1033
  "data-testid": "rubric-builder-generator-standard"
918
1034
  }
@@ -923,98 +1039,98 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
923
1039
  label: t.rubricBuilderGeneratorAdditionalLabel,
924
1040
  placeholder: t.generateCriteriaAdditionalPromptPlaceholder,
925
1041
  value: r.additionalPromptInfo,
926
- onChange: (m) => d("additionalPromptInfo", m.target.value),
927
- messages: v ? [{ text: t.generateCriteriaAdditionalPromptTooLong, type: "error" }] : [],
1042
+ onChange: (g) => d("additionalPromptInfo", g.target.value),
1043
+ messages: f ? [{ text: t.generateCriteriaAdditionalPromptTooLong, type: "error" }] : [],
928
1044
  "data-testid": "rubric-builder-generator-additional"
929
1045
  }
930
1046
  ),
931
- /* @__PURE__ */ b(P, { justifyItems: "end", gap: "small", children: [
1047
+ /* @__PURE__ */ b(T, { justifyItems: "end", gap: "small", children: [
932
1048
  /* @__PURE__ */ e(
933
- _,
1049
+ A,
934
1050
  {
935
- onClick: g,
936
- disabled: a,
1051
+ onClick: m,
1052
+ disabled: n,
937
1053
  "data-testid": "rubric-builder-generator-cancel",
938
1054
  children: t.cancel
939
1055
  }
940
1056
  ),
941
1057
  /* @__PURE__ */ e(
942
- _,
1058
+ A,
943
1059
  {
944
1060
  color: "ai-primary",
945
- renderIcon: /* @__PURE__ */ e(be, {}),
946
- onClick: f,
947
- disabled: a || p || v,
1061
+ renderIcon: /* @__PURE__ */ e(me, {}),
1062
+ onClick: C,
1063
+ disabled: n || p || f,
948
1064
  "data-testid": "rubric-builder-generator-generate",
949
1065
  children: t.rubricBuilderGeneratorGenerate
950
1066
  }
951
1067
  )
952
1068
  ] })
953
1069
  ] });
954
- }, wi = ({
1070
+ }, zi = ({
955
1071
  courseId: r,
956
- responseId: n,
1072
+ responseId: a,
957
1073
  responseType: s
958
1074
  }) => {
959
- const { translations: i, translate: a } = I(), { locale: l } = Re(), [o, g] = k(null), [t, c] = k(null), [h, d] = k("");
960
- F(() => {
961
- g(null), c(null);
962
- }, [n]);
1075
+ const { translations: i, translate: n } = B(), { locale: l } = be(), [o, m] = y(null), [t, c] = y(null), [h, d] = y("");
1076
+ N(() => {
1077
+ m(null), c(null);
1078
+ }, [a]);
963
1079
  const u = () => {
964
1080
  d(""), c(null);
965
- }, { submitFeedback: p, isPending: v } = Nr({
1081
+ }, { submitFeedback: p, isPending: f } = Xr({
966
1082
  courseId: r,
967
- responseId: n,
1083
+ responseId: a,
968
1084
  responseType: s,
969
1085
  onSubmitted: () => {
970
- g(t), u();
1086
+ m(t), u();
971
1087
  }
972
- }), f = t ?? o, m = h.length > Oe, C = t === "positive" ? i.positiveFeedbackLabel : i.negativeFeedbackLabel, E = (R) => {
1088
+ }), C = t ?? o, g = h.length > He, v = t === "positive" ? i.positiveFeedbackLabel : i.negativeFeedbackLabel, E = (R) => {
973
1089
  o !== R && c(R);
974
1090
  };
975
- return /* @__PURE__ */ b(ve, { children: [
976
- /* @__PURE__ */ b(P, { alignItems: "center", gap: "xx-small", "data-testid": "rubric-builder-generator-feedback", children: [
977
- /* @__PURE__ */ e(de, { children: i.generatedCriteriaFeedbackLabel }),
1091
+ return /* @__PURE__ */ b(Se, { children: [
1092
+ /* @__PURE__ */ b(T, { alignItems: "center", gap: "xx-small", "data-testid": "rubric-builder-generator-feedback", children: [
1093
+ /* @__PURE__ */ e(Y, { children: i.generatedCriteriaFeedbackLabel }),
978
1094
  /* @__PURE__ */ e(
979
- _e,
1095
+ Ue,
980
1096
  {
981
1097
  withBackground: !1,
982
1098
  withBorder: !1,
983
1099
  size: "small",
984
1100
  screenReaderLabel: i.positiveFeedbackLabel,
985
- "aria-pressed": f === "positive",
1101
+ "aria-pressed": C === "positive",
986
1102
  onClick: () => E("positive"),
987
1103
  "data-testid": "rubric-builder-generator-feedback-positive",
988
- children: f === "positive" ? /* @__PURE__ */ e(Ge, {}) : /* @__PURE__ */ e(Me, {})
1104
+ children: C === "positive" ? /* @__PURE__ */ e(ze, {}) : /* @__PURE__ */ e($e, {})
989
1105
  }
990
1106
  ),
991
1107
  /* @__PURE__ */ e(
992
- _e,
1108
+ Ue,
993
1109
  {
994
1110
  withBackground: !1,
995
1111
  withBorder: !1,
996
1112
  size: "small",
997
1113
  screenReaderLabel: i.negativeFeedbackLabel,
998
- "aria-pressed": f === "negative",
1114
+ "aria-pressed": C === "negative",
999
1115
  onClick: () => E("negative"),
1000
1116
  "data-testid": "rubric-builder-generator-feedback-negative",
1001
- children: f === "negative" ? /* @__PURE__ */ e(Ge, { rotate: "180" }) : /* @__PURE__ */ e(Me, { rotate: "180" })
1117
+ children: C === "negative" ? /* @__PURE__ */ e(ze, { rotate: "180" }) : /* @__PURE__ */ e($e, { rotate: "180" })
1002
1118
  }
1003
1119
  )
1004
1120
  ] }),
1005
1121
  /* @__PURE__ */ b(
1006
- x,
1122
+ M,
1007
1123
  {
1008
1124
  open: t != null,
1009
- onDismiss: v ? void 0 : u,
1125
+ onDismiss: f ? void 0 : u,
1010
1126
  size: "medium",
1011
- label: C,
1127
+ label: v,
1012
1128
  shouldCloseOnDocumentClick: !1,
1013
1129
  "data-testid": "rubric-builder-generator-feedback-modal",
1014
1130
  children: [
1015
- /* @__PURE__ */ b(x.Header, { children: [
1131
+ /* @__PURE__ */ b(M.Header, { children: [
1016
1132
  /* @__PURE__ */ e(
1017
- Le,
1133
+ Be,
1018
1134
  {
1019
1135
  placement: "end",
1020
1136
  offset: "small",
@@ -1022,22 +1138,22 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1022
1138
  screenReaderLabel: i.feedbackModalCancelLabel
1023
1139
  }
1024
1140
  ),
1025
- /* @__PURE__ */ e(Q, { level: "h2", children: C })
1141
+ /* @__PURE__ */ e(q, { level: "h2", children: v })
1026
1142
  ] }),
1027
- /* @__PURE__ */ b(x.Body, { children: [
1028
- /* @__PURE__ */ e(de, { as: "p", children: i.feedbackModalDescription }),
1143
+ /* @__PURE__ */ b(M.Body, { children: [
1144
+ /* @__PURE__ */ e(Y, { as: "p", children: i.feedbackModalDescription }),
1029
1145
  /* @__PURE__ */ e(
1030
1146
  ce,
1031
1147
  {
1032
1148
  label: i.feedbackModalCommentLabel,
1033
1149
  placeholder: i.feedbackModalCommentPlaceholder,
1034
1150
  value: h,
1035
- disabled: v,
1151
+ disabled: f,
1036
1152
  onChange: (R) => d(R.target.value),
1037
- messages: m ? [
1153
+ messages: g ? [
1038
1154
  {
1039
- text: a("feedbackModalCommentTooLong", {
1040
- limit: new Intl.NumberFormat(l).format(Oe)
1155
+ text: n("feedbackModalCommentTooLong", {
1156
+ limit: new Intl.NumberFormat(l).format(He)
1041
1157
  }),
1042
1158
  type: "error"
1043
1159
  }
@@ -1046,16 +1162,16 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1046
1162
  }
1047
1163
  )
1048
1164
  ] }),
1049
- /* @__PURE__ */ b(x.Footer, { children: [
1050
- /* @__PURE__ */ e(_, { onClick: u, disabled: v, margin: "0 x-small 0 0", children: i.cancel }),
1165
+ /* @__PURE__ */ b(M.Footer, { children: [
1166
+ /* @__PURE__ */ e(A, { onClick: u, disabled: f, margin: "0 x-small 0 0", children: i.cancel }),
1051
1167
  /* @__PURE__ */ e(
1052
- _,
1168
+ A,
1053
1169
  {
1054
1170
  color: "primary",
1055
- disabled: m || v,
1171
+ disabled: g || f,
1056
1172
  onClick: () => t && p({ feedbackType: t, comment: h }),
1057
1173
  "data-testid": "rubric-builder-generator-feedback-submit",
1058
- children: v ? i.feedbackModalSubmitting : i.feedbackModalSubmit
1174
+ children: f ? i.feedbackModalSubmitting : i.feedbackModalSubmit
1059
1175
  }
1060
1176
  )
1061
1177
  ] })
@@ -1063,31 +1179,31 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1063
1179
  }
1064
1180
  )
1065
1181
  ] });
1066
- }, Ei = ({
1182
+ }, $i = ({
1067
1183
  isOpen: r,
1068
- onRegenerate: n,
1184
+ onRegenerate: a,
1069
1185
  onDismiss: s
1070
1186
  }) => {
1071
- const { translations: i } = I(), a = $(null), [l, o] = k(""), g = l.length > fe, t = () => {
1187
+ const { translations: i } = B(), n = F(null), [l, o] = y(""), m = l.length > ve, t = () => {
1072
1188
  o(""), s();
1073
1189
  };
1074
1190
  return /* @__PURE__ */ b(
1075
- x,
1191
+ M,
1076
1192
  {
1077
1193
  open: r,
1078
1194
  onDismiss: t,
1079
1195
  size: "medium",
1080
1196
  label: i.regenerateModalCriteriaLabel,
1081
1197
  shouldCloseOnDocumentClick: !1,
1082
- defaultFocusElement: () => a.current,
1198
+ defaultFocusElement: () => n.current,
1083
1199
  "data-testid": "rubric-builder-regenerate-modal",
1084
1200
  children: [
1085
- /* @__PURE__ */ b(x.Header, { children: [
1086
- /* @__PURE__ */ e(Le, { placement: "end", offset: "small", onClick: t, screenReaderLabel: i.close }),
1087
- /* @__PURE__ */ e(Q, { level: "h2", children: i.regenerateModalCriteriaLabel })
1201
+ /* @__PURE__ */ b(M.Header, { children: [
1202
+ /* @__PURE__ */ e(Be, { placement: "end", offset: "small", onClick: t, screenReaderLabel: i.close }),
1203
+ /* @__PURE__ */ e(q, { level: "h2", children: i.regenerateModalCriteriaLabel })
1088
1204
  ] }),
1089
- /* @__PURE__ */ b(x.Body, { children: [
1090
- /* @__PURE__ */ e(de, { as: "p", children: i.regenerateModalDescriptionCriteria }),
1205
+ /* @__PURE__ */ b(M.Body, { children: [
1206
+ /* @__PURE__ */ e(Y, { as: "p", children: i.regenerateModalDescriptionCriteria }),
1091
1207
  /* @__PURE__ */ e(
1092
1208
  ce,
1093
1209
  {
@@ -1095,24 +1211,24 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1095
1211
  placeholder: i.regenerateModalPromptPlaceholder,
1096
1212
  value: l,
1097
1213
  textareaRef: (c) => {
1098
- a.current = c;
1214
+ n.current = c;
1099
1215
  },
1100
1216
  onChange: (c) => o(c.target.value),
1101
- messages: g ? [{ text: i.regenerateModalPromptTooLong, type: "error" }] : [],
1217
+ messages: m ? [{ text: i.regenerateModalPromptTooLong, type: "error" }] : [],
1102
1218
  "data-testid": "rubric-builder-regenerate-prompt"
1103
1219
  }
1104
1220
  )
1105
1221
  ] }),
1106
- /* @__PURE__ */ b(x.Footer, { children: [
1107
- /* @__PURE__ */ e(_, { onClick: t, margin: "0 x-small 0 0", children: i.cancel }),
1222
+ /* @__PURE__ */ b(M.Footer, { children: [
1223
+ /* @__PURE__ */ e(A, { onClick: t, margin: "0 x-small 0 0", children: i.cancel }),
1108
1224
  /* @__PURE__ */ e(
1109
- _,
1225
+ A,
1110
1226
  {
1111
1227
  color: "ai-primary",
1112
- renderIcon: /* @__PURE__ */ e(be, {}),
1113
- disabled: g,
1228
+ renderIcon: /* @__PURE__ */ e(me, {}),
1229
+ disabled: m,
1114
1230
  onClick: () => {
1115
- n(l), t();
1231
+ a(l), t();
1116
1232
  },
1117
1233
  "data-testid": "rubric-builder-regenerate-submit",
1118
1234
  children: i.regenerateButtonLabel
@@ -1122,55 +1238,55 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1122
1238
  ]
1123
1239
  }
1124
1240
  );
1125
- }, Pi = ({
1241
+ }, Ui = ({
1126
1242
  courseId: r,
1127
- responseId: n,
1243
+ responseId: a,
1128
1244
  responseType: s,
1129
1245
  canRegenerate: i,
1130
- isPending: a,
1246
+ isPending: n,
1131
1247
  onRegenerate: l
1132
1248
  }) => {
1133
- const { translations: o } = I(), g = $(null), [t, c] = k(!1);
1134
- F(() => {
1249
+ const { translations: o } = B(), m = F(null), [t, c] = y(!1);
1250
+ N(() => {
1135
1251
  var d;
1136
- (d = g.current) == null || d.focus();
1252
+ (d = m.current) == null || d.focus();
1137
1253
  }, []);
1138
1254
  const h = /* @__PURE__ */ e(
1139
- _,
1255
+ A,
1140
1256
  {
1141
1257
  color: "ai-secondary",
1142
- renderIcon: /* @__PURE__ */ e(be, {}),
1143
- disabled: a || !i,
1258
+ renderIcon: /* @__PURE__ */ e(me, {}),
1259
+ disabled: n || !i,
1144
1260
  onClick: () => c(!0),
1145
1261
  "data-testid": "rubric-builder-generator-regenerate",
1146
1262
  children: o.regenerateButtonLabel
1147
1263
  }
1148
1264
  );
1149
- return /* @__PURE__ */ b(P, { direction: "column", gap: "small", "data-testid": "rubric-builder-generator-summary", children: [
1265
+ return /* @__PURE__ */ b(T, { direction: "column", gap: "small", "data-testid": "rubric-builder-generator-summary", children: [
1150
1266
  /* @__PURE__ */ e(
1151
- Q,
1267
+ q,
1152
1268
  {
1153
1269
  level: "h4",
1154
1270
  elementRef: (d) => {
1155
- g.current = d;
1271
+ m.current = d;
1156
1272
  },
1157
1273
  tabIndex: -1,
1158
1274
  children: o.rubricBuilderGeneratorDoneHeading
1159
1275
  }
1160
1276
  ),
1161
- /* @__PURE__ */ b(P, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
1162
- n ? /* @__PURE__ */ e(
1163
- wi,
1277
+ /* @__PURE__ */ b(T, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
1278
+ a ? /* @__PURE__ */ e(
1279
+ zi,
1164
1280
  {
1165
1281
  courseId: r,
1166
- responseId: n,
1282
+ responseId: a,
1167
1283
  responseType: s
1168
1284
  }
1169
1285
  ) : /* @__PURE__ */ e("span", {}),
1170
- i ? h : /* @__PURE__ */ e(bi, { renderTip: o.noCriteriaForRegenerationTooltip, children: h })
1286
+ i ? h : /* @__PURE__ */ e(Si, { renderTip: o.noCriteriaForRegenerationTooltip, children: h })
1171
1287
  ] }),
1172
1288
  /* @__PURE__ */ e(
1173
- Ei,
1289
+ $i,
1174
1290
  {
1175
1291
  isOpen: t,
1176
1292
  onRegenerate: l,
@@ -1178,17 +1294,17 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1178
1294
  }
1179
1295
  )
1180
1296
  ] });
1181
- }, ir = "rubric-builder-generator", xi = ({
1297
+ }, br = "rubric-builder-generator", Vi = ({
1182
1298
  courseId: r,
1183
- generator: n,
1299
+ generator: a,
1184
1300
  onCancel: s
1185
1301
  }) => {
1186
- const { translations: i } = I(), { aiRubricsMaxCriterionCount: a, aiRubricsMaxRatingCount: l, rubricCriterionRange: o } = ue(), { isPending: g, progress: t } = n, c = t == null ? void 0 : t.completion;
1302
+ const { translations: i } = B(), { aiRubricsMaxCriterionCount: n, aiRubricsMaxRatingCount: l, rubricCriterionRange: o } = ue(), { isPending: m, progress: t } = a, c = t == null ? void 0 : t.completion;
1187
1303
  return /* @__PURE__ */ e(
1188
- ci,
1304
+ Re,
1189
1305
  {
1190
1306
  as: "section",
1191
- id: ir,
1307
+ id: br,
1192
1308
  "aria-labelledby": "rubric-builder-generator-heading",
1193
1309
  borderWidth: "small",
1194
1310
  borderRadius: "medium",
@@ -1196,14 +1312,14 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1196
1312
  margin: "small 0 0",
1197
1313
  background: "secondary",
1198
1314
  "data-testid": "rubric-builder-generator-panel",
1199
- children: /* @__PURE__ */ b(P, { direction: "column", gap: "medium", children: [
1200
- /* @__PURE__ */ b(P, { alignItems: "center", gap: "small", children: [
1201
- /* @__PURE__ */ e(Ze, {}),
1202
- /* @__PURE__ */ e(Q, { level: "h4", id: "rubric-builder-generator-heading", children: i.rubricBuilderGeneratorToggle }),
1203
- /* @__PURE__ */ e(Fr, { enabled: !0 })
1315
+ children: /* @__PURE__ */ b(T, { direction: "column", gap: "medium", children: [
1316
+ /* @__PURE__ */ b(T, { alignItems: "center", gap: "small", children: [
1317
+ /* @__PURE__ */ e(sr, {}),
1318
+ /* @__PURE__ */ e(q, { level: "h4", id: "rubric-builder-generator-heading", children: i.rubricBuilderGeneratorToggle }),
1319
+ /* @__PURE__ */ e(Yr, { enabled: !0 })
1204
1320
  ] }),
1205
- g && (typeof c == "number" ? /* @__PURE__ */ e(
1206
- si,
1321
+ m && (typeof c == "number" ? /* @__PURE__ */ e(
1322
+ vi,
1207
1323
  {
1208
1324
  screenReaderLabel: i.rubricBuilderGeneratorGenerating,
1209
1325
  valueNow: c,
@@ -1211,428 +1327,447 @@ const kt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children
1211
1327
  "data-testid": "rubric-builder-generator-progress"
1212
1328
  }
1213
1329
  ) : /* @__PURE__ */ e(
1214
- di,
1330
+ Ri,
1215
1331
  {
1216
1332
  size: "small",
1217
1333
  renderTitle: i.rubricBuilderGeneratorGenerating,
1218
1334
  "data-testid": "rubric-builder-generator-progress"
1219
1335
  }
1220
1336
  )),
1221
- n.isGenerated ? /* @__PURE__ */ e(
1222
- Pi,
1337
+ a.isGenerated ? /* @__PURE__ */ e(
1338
+ Ui,
1223
1339
  {
1224
1340
  courseId: r,
1225
- responseId: n.feedbackResponseId,
1226
- responseType: n.feedbackResponseType,
1227
- canRegenerate: n.canRegenerate,
1228
- isPending: g,
1229
- onRegenerate: n.regenerateAll
1341
+ responseId: a.feedbackResponseId,
1342
+ responseType: a.feedbackResponseType,
1343
+ canRegenerate: a.canRegenerate,
1344
+ isPending: m,
1345
+ onRegenerate: a.regenerateAll
1230
1346
  }
1231
1347
  ) : /* @__PURE__ */ e(
1232
- Di,
1348
+ Hi,
1233
1349
  {
1234
- options: n.options,
1235
- maxCriterionCount: a,
1350
+ options: a.options,
1351
+ maxCriterionCount: n,
1236
1352
  maxRatingCount: l,
1237
1353
  rangeEnabled: o,
1238
- isPending: g,
1239
- onChange: n.setOptions,
1240
- onGenerate: n.generate,
1354
+ isPending: m,
1355
+ onChange: a.setOptions,
1356
+ onGenerate: a.generate,
1241
1357
  onCancel: s
1242
1358
  }
1243
1359
  )
1244
1360
  ] })
1245
1361
  }
1246
1362
  );
1247
- }, Ai = ({ generator: r }) => {
1248
- const { translations: n, translate: s } = I(), { isPending: i, lastResult: a } = r, l = i ? n.rubricBuilderGeneratorGenerating : (a == null ? void 0 : a.kind) === "generated" ? s("rubricBuilderGeneratorAdded", { count: a.count }) : (a == null ? void 0 : a.kind) === "regenerated" ? n.rubricBuilderGeneratorRegenerated : "";
1249
- return /* @__PURE__ */ e(er, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", "data-testid": "rubric-builder-generator-status", children: l }) });
1250
- }, Oi = (r) => {
1363
+ }, qi = ({ generator: r }) => {
1364
+ const { translations: a, translate: s } = B(), { isPending: i, lastResult: n } = r, l = i ? a.rubricBuilderGeneratorGenerating : (n == null ? void 0 : n.kind) === "generated" ? s("rubricBuilderGeneratorAdded", { count: n.count }) : (n == null ? void 0 : n.kind) === "regenerated" ? a.rubricBuilderGeneratorRegenerated : "";
1365
+ return /* @__PURE__ */ e(dr, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", "data-testid": "rubric-builder-generator-status", children: l }) });
1366
+ }, Wi = (r) => {
1251
1367
  try {
1252
- return qr(r).criteria.length;
1368
+ return ri(r).criteria.length;
1253
1369
  } catch {
1254
1370
  return 0;
1255
1371
  }
1256
- }, Gi = ({
1372
+ }, ji = ({
1257
1373
  courseId: r,
1258
- assignmentId: n,
1374
+ assignmentId: a,
1259
1375
  assignmentPointsPossible: s,
1260
1376
  criteria: i,
1261
- criteriaRef: a,
1377
+ criteriaRef: n,
1262
1378
  setRubricFormField: l
1263
1379
  }) => {
1264
- const { aiRubricsMaxCriterionCount: o, aiRubricsMaxRatingCount: g } = ue(), t = De(
1265
- () => Hr({
1380
+ const { aiRubricsMaxCriterionCount: o, aiRubricsMaxRatingCount: m } = ue(), t = Ae(
1381
+ () => Qr({
1266
1382
  maxCriterionCount: o,
1267
- maxRatingCount: g,
1383
+ maxRatingCount: m,
1268
1384
  assignmentPointsPossible: s
1269
1385
  }),
1270
- [o, g, s]
1271
- ), [c, h] = k(t), d = Fe(() => h(t), [t]), {
1386
+ [o, m, s]
1387
+ ), [c, h] = y(t), d = Ke(() => h(t), [t]), {
1272
1388
  generateCriteriaProgress: u,
1273
1389
  generateCriteriaIsPending: p,
1274
- generateCriteriaIsSuccess: v,
1275
- generateCriteriaMutation: f,
1276
- generateResponseId: m
1277
- } = $r({
1390
+ generateCriteriaIsSuccess: f,
1391
+ generateCriteriaMutation: C,
1392
+ generateResponseId: g
1393
+ } = Jr({
1278
1394
  courseId: r,
1279
- assignmentId: n,
1395
+ assignmentId: a,
1280
1396
  generateOptions: c,
1281
- criteriaRef: a,
1397
+ criteriaRef: n,
1282
1398
  setRubricFormField: l
1283
1399
  }), {
1284
- regeneratedCriteriaProgress: C,
1400
+ regeneratedCriteriaProgress: v,
1285
1401
  regenerateCriteriaIsPending: E,
1286
1402
  regenerateCriteriaIsSuccess: R,
1287
- regenerateAllCriteria: S,
1288
- regenerateResponseId: B,
1289
- regenerateResponseType: T
1290
- } = zr({
1403
+ regenerateAllCriteria: I,
1404
+ regenerateResponseId: L,
1405
+ regenerateResponseType: D
1406
+ } = Zr({
1291
1407
  courseId: r,
1292
- assignmentId: n,
1293
- criteriaRef: a,
1408
+ assignmentId: a,
1409
+ criteriaRef: n,
1294
1410
  generateOptions: c,
1295
1411
  setRubricFormField: l
1296
- }), A = De(
1297
- () => v ? Oi(u == null ? void 0 : u.results) : 0,
1298
- [v, u]
1412
+ }), x = Ae(
1413
+ () => f ? Wi(u == null ? void 0 : u.results) : 0,
1414
+ [f, u]
1299
1415
  );
1300
1416
  return {
1301
1417
  options: c,
1302
1418
  setOptions: h,
1303
1419
  resetOptions: d,
1304
- generate: () => f(),
1305
- regenerateAll: S,
1420
+ generate: () => C(),
1421
+ regenerateAll: I,
1306
1422
  isPending: p || E,
1307
- progress: E ? C : u,
1308
- isGenerated: v,
1309
- lastResult: R ? { kind: "regenerated" } : v ? { kind: "generated", count: A } : null,
1423
+ progress: E ? v : u,
1424
+ isGenerated: f,
1425
+ lastResult: R ? { kind: "regenerated" } : f ? { kind: "generated", count: x } : null,
1310
1426
  // Outcome-linked criteria can't be regenerated, so there must be another one.
1311
1427
  canRegenerate: i.some((O) => !O.learningOutcomeId),
1312
- feedbackResponseId: B ?? m ?? "",
1313
- feedbackResponseType: T ?? Ur.GENERATE_CRITERIA
1428
+ feedbackResponseId: L ?? g ?? "",
1429
+ feedbackResponseType: D ?? ei.GENERATE_CRITERIA
1314
1430
  };
1315
- }, Mi = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children: /* @__PURE__ */ e(
1316
- Ne,
1431
+ }, Ki = (r) => /* @__PURE__ */ e(we, { translations: r.translations, children: /* @__PURE__ */ e(
1432
+ je,
1317
1433
  {
1318
1434
  courseId: r.courseId,
1319
1435
  accountId: r.accountId,
1320
1436
  featureFlags: r.featureFlags,
1321
1437
  aiLimits: r.aiLimits,
1322
- children: /* @__PURE__ */ e(_i, { ...r })
1438
+ children: /* @__PURE__ */ e(Xi, { ...r })
1323
1439
  }
1324
- ) }), _i = ({
1440
+ ) }), Xi = ({
1325
1441
  rubricId: r,
1326
- rubric: n,
1442
+ rubric: a,
1327
1443
  rubricAssociation: s,
1328
1444
  assignmentId: i,
1329
- assignmentPointsPossible: a,
1445
+ assignmentPointsPossible: n,
1330
1446
  canUseForGrading: l = !0,
1331
1447
  accountId: o,
1332
- courseId: g,
1448
+ courseId: m,
1333
1449
  canManageRubrics: t,
1334
1450
  onSaveRubric: c,
1335
1451
  onDiscard: h
1336
1452
  }) => {
1337
- var ye;
1338
- const { translations: d } = I(), { aiRubricsEnabled: u } = ue(), {
1453
+ var Me;
1454
+ const { translations: d } = B(), { aiRubricsEnabled: u } = ue(), {
1339
1455
  rubricForm: p,
1340
- criteriaRef: v,
1341
- setRubricFormField: f,
1342
- validateField: m,
1343
- validationErrors: C,
1456
+ criteriaRef: f,
1457
+ setRubricFormField: C,
1458
+ validateField: g,
1459
+ validationErrors: v,
1344
1460
  isNewRubric: E,
1345
- load: { data: R, isLoading: S, isError: B, isSuccess: T },
1346
- savePending: A,
1347
- saveError: M,
1461
+ load: { data: R, isLoading: I, isError: L, isSuccess: D },
1462
+ savePending: x,
1463
+ saveError: _,
1348
1464
  save: O,
1349
- saveAction: X,
1465
+ saveAction: Q,
1350
1466
  isDirty: W,
1351
- criteriaValid: Y,
1352
- criteriaValidationErrors: J,
1353
- saveCriterion: z,
1354
- deleteCriterion: Z,
1467
+ criteriaValid: J,
1468
+ criteriaValidationErrors: Z,
1469
+ saveCriterion: U,
1470
+ deleteCriterion: ee,
1355
1471
  reorderCriteria: j
1356
- } = Wr({
1472
+ } = ii({
1357
1473
  rubricId: r,
1358
- rubric: n,
1474
+ rubric: a,
1359
1475
  rubricAssociation: s,
1360
1476
  assignmentId: i,
1361
- assignmentPointsPossible: a,
1477
+ assignmentPointsPossible: n,
1362
1478
  accountId: o,
1363
- courseId: g,
1479
+ courseId: m,
1364
1480
  canManageRubrics: t,
1365
1481
  onSaveRubric: c
1366
- }), N = $(null), [K, L] = k(!1), [tr, Se] = k(!1), [nr, me] = k(!1), [ar, ge] = k(!1), [or, ee] = k(!1), [lr, Be] = k(), sr = jr(), dr = Fe(() => Be(void 0), []), re = Gi({
1367
- courseId: g,
1482
+ }), z = F(null), [K, S] = y(!1), [mr, Ie] = y(!1), [gr, ge] = y(!1), [hr, he] = y(!1), [pr, re] = y(!1), [fr, Le] = y(), Cr = ti(), vr = Ke(() => Le(void 0), []), ie = ji({
1483
+ courseId: m,
1368
1484
  assignmentId: i,
1369
- assignmentPointsPossible: a,
1485
+ assignmentPointsPossible: n,
1370
1486
  criteria: p.criteria,
1371
- criteriaRef: v,
1372
- setRubricFormField: f
1373
- }), [ie, Ie] = k(!1), ke = $(null), he = u && E && !!g;
1374
- if (r && S)
1375
- return /* @__PURE__ */ e(Qe, {});
1376
- if (r && B)
1377
- return hr({
1378
- errorImageUrl: Kr,
1487
+ criteriaRef: f,
1488
+ setRubricFormField: C
1489
+ }), [te, ye] = y(!1), ke = F(null), pe = u && E && !!m, [fe, Te] = y(!1), Pe = F(null);
1490
+ if (r && I)
1491
+ return /* @__PURE__ */ e(nr, {});
1492
+ if (r && L)
1493
+ return Ir({
1494
+ errorImageUrl: ni,
1379
1495
  errorCategory: d.rubricErrorPageCategory,
1380
- translations: Te(d)
1496
+ translations: xe(d)
1381
1497
  });
1382
- if (r && T && !R)
1383
- return pr({ translations: Te(d) });
1384
- const cr = () => {
1385
- var D;
1386
- if (L(!0), !m("title", p.title)) {
1387
- (D = N.current) == null || D.focus();
1498
+ if (r && D && !R)
1499
+ return Lr({ translations: xe(d) });
1500
+ const De = () => {
1501
+ var w;
1502
+ if (S(!0), !g("title", p.title)) {
1503
+ (w = z.current) == null || w.focus();
1388
1504
  return;
1389
1505
  }
1390
- if (!(p.criteria.length === 0 || !Y))
1391
- switch (X) {
1506
+ if (!(p.criteria.length === 0 || !J))
1507
+ switch (Q) {
1392
1508
  case "confirmPointsDifference":
1393
- ee(!0);
1509
+ re(!0);
1394
1510
  break;
1395
1511
  case "confirmAssessedEdit":
1396
- ge(!0);
1512
+ he(!0);
1397
1513
  break;
1398
1514
  case "confirmSave":
1399
- me(!0);
1515
+ ge(!0);
1400
1516
  break;
1401
1517
  case "save":
1402
1518
  O();
1403
1519
  break;
1404
1520
  default: {
1405
- const mr = X;
1406
- throw new Error(`Unhandled save action: ${mr}`);
1521
+ const Sr = Q;
1522
+ throw new Error(`Unhandled save action: ${Sr}`);
1407
1523
  }
1408
1524
  }
1409
- }, ur = () => {
1410
- const D = Qr(sr());
1411
- z(D), Be(D.id);
1412
- }, br = () => {
1413
- W ? Se(!0) : h();
1525
+ }, Rr = () => {
1526
+ const w = oi(Cr());
1527
+ U(w), Le(w.id);
1528
+ }, Ee = () => {
1529
+ var w;
1530
+ Te(!1), (w = Pe.current) == null || w.focus();
1531
+ }, wr = () => {
1532
+ W ? Ie(!0) : h();
1414
1533
  };
1415
- return /* @__PURE__ */ b(y, { as: "div", "data-testid": "rubric-builder", children: [
1416
- /* @__PURE__ */ b(w, { direction: "column", gap: "medium", padding: "medium 0", children: [
1417
- /* @__PURE__ */ e(
1418
- yi,
1419
- {
1420
- isNewRubric: E,
1421
- pointsPossible: p.pointsPossible,
1422
- hidePoints: p.hidePoints
1423
- }
1424
- ),
1425
- M && /* @__PURE__ */ e(Jr, { variant: "error", margin: "0", children: d.rubricFormSaveError }),
1426
- /* @__PURE__ */ e(
1427
- Ti,
1428
- {
1429
- rubricForm: p,
1430
- setRubricFormField: f,
1431
- validateTitle: (D) => m("title", D),
1432
- titleError: (ye = C.title) == null ? void 0 : ye.message,
1433
- titleInputRef: (D) => {
1434
- N.current = D;
1435
- },
1436
- assignmentSettings: /* @__PURE__ */ e(
1437
- fi,
1438
- {
1439
- rubricForm: p,
1440
- canUseForGrading: l,
1441
- setRubricFormField: f
1442
- }
1443
- )
1444
- }
1445
- ),
1446
- /* @__PURE__ */ e(
1447
- Ci,
1448
- {
1449
- criteriaCount: p.criteria.length,
1450
- showMissingCriteriaError: K,
1451
- actions: /* @__PURE__ */ b(ve, { children: [
1452
- he && /* @__PURE__ */ e(
1453
- H,
1534
+ return /* @__PURE__ */ b(P, { as: "div", "data-testid": "rubric-builder", children: [
1535
+ /* @__PURE__ */ b(k, { gap: "medium", wrap: "wrap", alignItems: "start", padding: "medium 0", children: [
1536
+ /* @__PURE__ */ e(k.Item, { shouldGrow: !0, shouldShrink: !0, size: "20rem", children: /* @__PURE__ */ b(k, { direction: "column", gap: "medium", children: [
1537
+ /* @__PURE__ */ e(
1538
+ Ni,
1539
+ {
1540
+ isNewRubric: E,
1541
+ pointsPossible: p.pointsPossible,
1542
+ hidePoints: p.hidePoints
1543
+ }
1544
+ ),
1545
+ _ && /* @__PURE__ */ e(di, { variant: "error", margin: "0", children: d.rubricFormSaveError }),
1546
+ /* @__PURE__ */ e(
1547
+ Fi,
1548
+ {
1549
+ rubricForm: p,
1550
+ setRubricFormField: C,
1551
+ validateTitle: (w) => g("title", w),
1552
+ titleError: (Me = v.title) == null ? void 0 : Me.message,
1553
+ titleInputRef: (w) => {
1554
+ z.current = w;
1555
+ },
1556
+ assignmentSettings: /* @__PURE__ */ e(
1557
+ ki,
1454
1558
  {
1455
- color: ie ? "ai-primary" : "ai-secondary",
1456
- renderIcon: ie ? /* @__PURE__ */ e(be, {}) : /* @__PURE__ */ e(Ze, {}),
1457
- "aria-expanded": ie,
1458
- "aria-controls": ir,
1459
- onClick: () => Ie((D) => !D),
1460
- elementRef: (D) => {
1461
- ke.current = D;
1462
- },
1463
- "data-testid": "rubric-builder-generator-toggle",
1464
- children: d.rubricBuilderGeneratorToggle
1559
+ rubricForm: p,
1560
+ canUseForGrading: l,
1561
+ setRubricFormField: C
1465
1562
  }
1466
- ),
1467
- /* @__PURE__ */ e(
1468
- H,
1563
+ )
1564
+ }
1565
+ ),
1566
+ /* @__PURE__ */ e(
1567
+ Ti,
1568
+ {
1569
+ criteriaCount: p.criteria.length,
1570
+ showMissingCriteriaError: K,
1571
+ actions: /* @__PURE__ */ b(Se, { children: [
1572
+ pe && /* @__PURE__ */ e(
1573
+ H,
1574
+ {
1575
+ color: te ? "ai-primary" : "ai-secondary",
1576
+ renderIcon: te ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ e(sr, {}),
1577
+ "aria-expanded": te,
1578
+ "aria-controls": br,
1579
+ onClick: () => ye((w) => !w),
1580
+ elementRef: (w) => {
1581
+ ke.current = w;
1582
+ },
1583
+ "data-testid": "rubric-builder-generator-toggle",
1584
+ children: d.rubricBuilderGeneratorToggle
1585
+ }
1586
+ ),
1587
+ /* @__PURE__ */ e(
1588
+ H,
1589
+ {
1590
+ renderIcon: /* @__PURE__ */ e(lr, {}),
1591
+ onClick: Rr,
1592
+ disabled: ie.isPending,
1593
+ "data-testid": "rubric-builder-add-criterion",
1594
+ children: d.rubricBuilderAddCriterion
1595
+ }
1596
+ )
1597
+ ] }),
1598
+ panel: pe && m && // Hidden rather than unmounted, so a run and its result survive a collapse.
1599
+ /* @__PURE__ */ e("div", { hidden: !te, children: /* @__PURE__ */ e(
1600
+ Vi,
1469
1601
  {
1470
- renderIcon: /* @__PURE__ */ e(Je, {}),
1471
- onClick: ur,
1472
- disabled: re.isPending,
1473
- "data-testid": "rubric-builder-add-criterion",
1474
- children: d.rubricBuilderAddCriterion
1602
+ courseId: m,
1603
+ generator: ie,
1604
+ onCancel: () => {
1605
+ var w;
1606
+ ie.resetOptions(), ye(!1), (w = ke.current) == null || w.focus();
1607
+ }
1475
1608
  }
1476
- )
1477
- ] }),
1478
- panel: he && g && // Hidden rather than unmounted, so a run and its result survive a collapse.
1479
- /* @__PURE__ */ e("div", { hidden: !ie, children: /* @__PURE__ */ e(
1480
- xi,
1481
- {
1482
- courseId: g,
1483
- generator: re,
1484
- onCancel: () => {
1485
- var D;
1486
- re.resetOptions(), Ie(!1), (D = ke.current) == null || D.focus();
1609
+ ) }),
1610
+ children: /* @__PURE__ */ e(
1611
+ xi,
1612
+ {
1613
+ criteria: p.criteria,
1614
+ hidePoints: p.hidePoints,
1615
+ freeFormCriterionComments: p.freeFormCriterionComments,
1616
+ ratingOrder: p.ratingOrder,
1617
+ criteriaValidationErrors: Z,
1618
+ showErrors: K,
1619
+ focusNameCriterionId: fr,
1620
+ onFocusedName: vr,
1621
+ onChangeCriterion: U,
1622
+ onDuplicateCriterion: (w) => U(ai(w)),
1623
+ onDeleteCriterion: ee,
1624
+ onReorderCriteria: j
1487
1625
  }
1488
- }
1489
- ) }),
1490
- children: /* @__PURE__ */ e(
1491
- Bi,
1492
- {
1493
- criteria: p.criteria,
1494
- hidePoints: p.hidePoints,
1495
- freeFormCriterionComments: p.freeFormCriterionComments,
1496
- ratingOrder: p.ratingOrder,
1497
- criteriaValidationErrors: J,
1498
- showErrors: K,
1499
- focusNameCriterionId: lr,
1500
- onFocusedName: dr,
1501
- onChangeCriterion: z,
1502
- onDuplicateCriterion: (D) => z(Vr(D)),
1503
- onDeleteCriterion: Z,
1504
- onReorderCriteria: j
1505
- }
1506
- )
1626
+ )
1627
+ }
1628
+ ),
1629
+ pe && /* @__PURE__ */ e(qi, { generator: ie })
1630
+ ] }) }),
1631
+ fe && /* @__PURE__ */ e(k.Item, { shouldGrow: !0, shouldShrink: !0, size: "24rem", children: /* @__PURE__ */ e(
1632
+ Gi,
1633
+ {
1634
+ rubric: p,
1635
+ savePending: x,
1636
+ onClose: Ee,
1637
+ onSave: De
1507
1638
  }
1508
- ),
1509
- he && /* @__PURE__ */ e(Ai, { generator: re })
1639
+ ) })
1510
1640
  ] }),
1511
1641
  /* @__PURE__ */ e(
1512
- ki,
1642
+ _i,
1513
1643
  {
1514
- savePending: A,
1515
- onDiscard: br,
1516
- onSave: cr
1644
+ savePending: x,
1645
+ isPreviewOpen: fe,
1646
+ previewToggleRef: (w) => {
1647
+ Pe.current = w;
1648
+ },
1649
+ onTogglePreview: () => fe ? Ee() : Te(!0),
1650
+ onDiscard: wr,
1651
+ onSave: De
1517
1652
  }
1518
1653
  ),
1519
1654
  /* @__PURE__ */ e(
1520
- le,
1655
+ se,
1521
1656
  {
1522
- isOpen: tr,
1657
+ isOpen: mr,
1523
1658
  heading: d.rubricBuilderDiscardHeading,
1524
1659
  body: d.rubricBuilderDiscardBody,
1525
1660
  confirmLabel: d.rubricBuilderDiscard,
1526
1661
  cancelLabel: d.rubricBuilderKeepEditing,
1527
1662
  onConfirm: h,
1528
- onDismiss: () => Se(!1),
1663
+ onDismiss: () => Ie(!1),
1529
1664
  "data-testid": "rubric-builder-discard-modal"
1530
1665
  }
1531
1666
  ),
1532
1667
  /* @__PURE__ */ e(
1533
- le,
1668
+ se,
1534
1669
  {
1535
- isOpen: nr,
1670
+ isOpen: gr,
1536
1671
  heading: d.confirmToContinueHeader,
1537
1672
  body: d.gradingHistoryWarning,
1538
1673
  confirmLabel: d.saveConfirmModalSave,
1539
1674
  cancelLabel: d.cancel,
1540
1675
  onConfirm: () => {
1541
- me(!1), O();
1676
+ ge(!1), O();
1542
1677
  },
1543
- onDismiss: () => me(!1),
1678
+ onDismiss: () => ge(!1),
1544
1679
  "data-testid": "rubric-builder-save-confirm-modal"
1545
1680
  }
1546
1681
  ),
1547
1682
  /* @__PURE__ */ e(
1548
- le,
1683
+ se,
1549
1684
  {
1550
- isOpen: ar,
1685
+ isOpen: hr,
1551
1686
  heading: d.confirmToContinueHeader,
1552
1687
  body: d.gradingHistoryWarning,
1553
1688
  confirmLabel: d.editConfirmModalConfirm,
1554
1689
  cancelLabel: d.cancel,
1555
1690
  onConfirm: () => {
1556
- ge(!1), O();
1691
+ he(!1), O();
1557
1692
  },
1558
- onDismiss: () => ge(!1),
1693
+ onDismiss: () => he(!1),
1559
1694
  "data-testid": "rubric-builder-assessed-edit-modal"
1560
1695
  }
1561
1696
  ),
1562
1697
  /* @__PURE__ */ e(
1563
- Ii,
1698
+ Ai,
1564
1699
  {
1565
- isOpen: or,
1566
- assignmentPoints: a ?? 0,
1700
+ isOpen: pr,
1701
+ assignmentPoints: n ?? 0,
1567
1702
  rubricPoints: p.pointsPossible,
1568
1703
  onChange: () => {
1569
- ee(!1), O(!1);
1704
+ re(!1), O(!1);
1570
1705
  },
1571
1706
  onLeaveDifferent: () => {
1572
- ee(!1), O(!0);
1707
+ re(!1), O(!0);
1573
1708
  },
1574
- onDismiss: () => ee(!1)
1709
+ onDismiss: () => re(!1)
1575
1710
  }
1576
1711
  )
1577
1712
  ] });
1578
- }, yt = (r) => /* @__PURE__ */ e(Ce, { translations: r.translations, children: /* @__PURE__ */ e(
1579
- Ne,
1713
+ }, Nt = (r) => /* @__PURE__ */ e(we, { translations: r.translations, children: /* @__PURE__ */ e(
1714
+ je,
1580
1715
  {
1581
1716
  courseId: r.courseId,
1582
1717
  featureFlags: r.featureFlags,
1583
1718
  aiLimits: r.aiLimits,
1584
- children: /* @__PURE__ */ e(Ni, { ...r })
1719
+ children: /* @__PURE__ */ e(Yi, { ...r })
1585
1720
  }
1586
- ) }), Ni = ({
1721
+ ) }), Yi = ({
1587
1722
  courseId: r,
1588
- assignmentId: n,
1723
+ assignmentId: a,
1589
1724
  assignmentPointsPossible: s,
1590
1725
  canManageRubrics: i,
1591
- canUseForGrading: a = !0,
1726
+ canUseForGrading: n = !0,
1592
1727
  featureFlags: l,
1593
1728
  aiLimits: o,
1594
- onAssignmentPointsPossibleChange: g,
1729
+ onAssignmentPointsPossibleChange: m,
1595
1730
  onRubricChange: t
1596
1731
  }) => {
1597
- const { translations: c } = I(), h = fr(), { rubric: d, rubricAssociation: u, isLoading: p, error: v, applySavedRubric: f, reload: m } = Xr({
1732
+ const { translations: c } = B(), h = We(), { rubric: d, rubricAssociation: u, isLoading: p, error: f, applySavedRubric: C, reload: g } = li({
1598
1733
  courseId: r,
1599
- assignmentId: n,
1600
- canUseForGrading: a,
1601
- onAssignmentPointsPossibleChange: g,
1734
+ assignmentId: a,
1735
+ canUseForGrading: n,
1736
+ onAssignmentPointsPossibleChange: m,
1602
1737
  onRubricChange: t
1603
- }), [C, E] = k(0), R = $(null), S = () => E((T) => T + 1);
1604
- F(() => {
1605
- var T, A;
1606
- C > 0 && ((A = (T = R.current) == null ? void 0 : T.querySelector('input[data-testid="rubric-builder-name"]')) == null || A.focus());
1607
- }, [C]);
1608
- const B = (T, A) => f(T, A, () => {
1609
- m().finally(S);
1738
+ }), [v, E] = y(0), R = F(null), I = () => E((D) => D + 1);
1739
+ N(() => {
1740
+ var D, x;
1741
+ v > 0 && ((x = (D = R.current) == null ? void 0 : D.querySelector('input[data-testid="rubric-builder-name"]')) == null || x.focus());
1742
+ }, [v]);
1743
+ const L = (D, x) => C(D, x, () => {
1744
+ g().finally(I);
1610
1745
  });
1611
- return p ? /* @__PURE__ */ e(Qe, {}) : v ? /* @__PURE__ */ e(mi, { variant: "error", children: c.rubricAssignmentContainerLoadError }) : /* @__PURE__ */ e("div", { ref: R, children: /* @__PURE__ */ e(
1612
- Mi,
1746
+ return p ? /* @__PURE__ */ e(nr, {}) : f ? /* @__PURE__ */ e(Bi, { variant: "error", children: c.rubricAssignmentContainerLoadError }) : /* @__PURE__ */ e("div", { ref: R, children: /* @__PURE__ */ e(
1747
+ Ki,
1613
1748
  {
1614
1749
  translations: h,
1615
1750
  courseId: r,
1616
1751
  featureFlags: l,
1617
1752
  aiLimits: o,
1618
- assignmentId: n,
1753
+ assignmentId: a,
1619
1754
  assignmentPointsPossible: s,
1620
1755
  rubric: d,
1621
1756
  rubricAssociation: u,
1622
- canUseForGrading: a,
1757
+ canUseForGrading: n,
1623
1758
  canManageRubrics: i,
1624
- onSaveRubric: B,
1625
- onDiscard: S
1759
+ onSaveRubric: L,
1760
+ onDiscard: I
1626
1761
  },
1627
- C
1762
+ v
1628
1763
  ) });
1629
1764
  };
1630
1765
  export {
1631
- wt as DEFAULT_AI_MAX_CRITERION_COUNT,
1632
- Et as DEFAULT_AI_MAX_RATING_COUNT,
1633
- It as HelloWorld,
1634
- yt as RubricAssignmentBuilder,
1635
- Mi as RubricBuilder,
1636
- kt as RubricSelector,
1637
- Pt as defaultRubricsTranslations
1766
+ zt as DEFAULT_AI_MAX_CRITERION_COUNT,
1767
+ $t as DEFAULT_AI_MAX_RATING_COUNT,
1768
+ Gt as HelloWorld,
1769
+ Nt as RubricAssignmentBuilder,
1770
+ Ki as RubricBuilder,
1771
+ _t as RubricSelector,
1772
+ Ut as defaultRubricsTranslations
1638
1773
  };