hyperbook 0.113.1 → 0.113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-CE3Yr86b.js} +155 -155
  3. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-eYGRtw6N.js} +1 -1
  4. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-CxvZkGrY.js} +1138 -1073
  5. package/dist/assets/directive-bitflow/editor.js +3 -3
  6. package/dist/assets/directive-bitflow/flow.js +3 -3
  7. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-88c3K20U.js} +31 -31
  8. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-B61LKxr1.js} +45 -45
  9. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BG0PL-Z6.js} +30 -30
  10. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-BNdpL6Ss.js} +78 -78
  11. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-BO-d4HVC.js} +48 -48
  12. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-BZhNY0lo.js} +12 -12
  13. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-BadyFTU5.js} +8 -8
  14. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-BlT1EcFH.js} +34 -34
  15. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-BuQ-K_tR.js} +7 -7
  16. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-Bw0pL0hW.js} +28 -28
  17. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-BwBVUdJ9.js} +94 -94
  18. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-BydYlLy4.js} +73 -73
  19. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-C7RJxxAx.js} +63 -63
  20. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-CERSJ9uS.js} +70 -70
  21. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-CLHtOGrW.js} +11 -11
  22. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-CWe2GjBK.js} +14 -14
  23. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CfKpkSVC.js} +72 -72
  24. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-CjKhq7gY.js} +23 -23
  25. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-Cm4w1Zyc.js} +38 -38
  26. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-D0U3nepG.js} +52 -52
  27. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-D4PdXMcj.js} +33 -33
  28. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-D9LOuqr2.js} +99 -99
  29. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-DIb3CXwC.js} +42 -42
  30. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-DQP0cUsP.js} +70 -70
  31. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-DUOrQfVe.js} +27 -27
  32. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DW3cUBvZ.js} +1 -1
  33. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-DYWo0PUv.js} +24 -24
  34. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-D_QhyFcx.js} +101 -91
  35. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-Dn5hHVuT.js} +226 -193
  36. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-DruC5d43.js} +69 -69
  37. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-EKIgFddO.js} +105 -105
  38. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-HXNGIC7K.js} +70 -70
  39. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-ISbOe239.js} +42 -42
  40. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-IsMJtrUT.js} +31 -31
  41. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-TUXuIR22.js} +6 -6
  42. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-WbE9UOFa.js} +24 -24
  43. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-d5ebPDeY.js} +13 -13
  44. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-ledofrbo.js} +33 -33
  45. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-oNmOArKu.js} +1 -1
  46. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-rp4UTV85.js} +84 -84
  47. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-xTX3CXJW.js} +23 -23
  48. package/dist/assets/directive-bitflow/index.js +6 -6
  49. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  50. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  51. package/dist/assets/directive-bitflow/report.js +1 -1
  52. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-vjEU4OvA.js} +2 -2
  53. package/dist/index.js +1 -1
  54. package/package.json +4 -4
@@ -1,9 +1,9 @@
1
- import { L as z, ak as ge, a2 as j, P as Y, ac as ve, ad as me, a9 as J, a4 as ie, a as L, j as t, a5 as ye, b as A, aa as je, s as ke } from "./dom-uYx_3K1r.js";
2
- import { v as Ne, _ as B, A as le, t as X, e as Ce, M as oe, E as Le, L as Pe, R as Ae } from "./bitLoaders-DIGwTcpd.js";
1
+ import { L as z, ak as ge, a2 as j, P as I, ac as ve, ad as me, a9 as Q, a4 as ie, a as P, j as t, a5 as ye, b as A, aa as je, s as ke } from "./dom-uYx_3K1r.js";
2
+ import { e as Ne, i as R, g as le, r as X, P as Ce, F as oe, B as Pe, U as Le, H as Ae } from "./bitLoaders-CxvZkGrY.js";
3
3
  const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a-fA-F]{6}$/, ze = j().regex($e, "A colour is six hex digits after a #, like #017460."), ne = z({
4
4
  label: j().default(""),
5
- min: Y().default(0),
6
- max: Y().default(10)
5
+ min: I().default(0),
6
+ max: I().default(10)
7
7
  }).prefault({}), Se = z({
8
8
  x: ne,
9
9
  y: ne
@@ -13,11 +13,11 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
13
13
  label: j().default(""),
14
14
  color: ze.default("#017460"),
15
15
  shape: Oe.default("circle")
16
- }), Te = z({
16
+ }), He = z({
17
17
  id: j().min(1),
18
18
  /** In axis units, never pixels — the plot is drawn at whatever size it is given. */
19
- x: Y(),
20
- y: Y(),
19
+ x: I(),
20
+ y: I(),
21
21
  label: j().optional(),
22
22
  /** Set on a known point: shown filled, in this class's shape and colour. */
23
23
  class: j().optional(),
@@ -28,19 +28,19 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
28
28
  */
29
29
  expected: j().optional(),
30
30
  /** A cluster centre. Drawn larger and apart from ordinary points; never open. */
31
- centroid: J().default(!1)
32
- }), I = (e) => e.centroid ? "centroid" : e.expected !== void 0 ? "open" : "known", He = z({
31
+ centroid: Q().default(!1)
32
+ }), U = (e) => e.centroid ? "centroid" : e.expected !== void 0 ? "open" : "known", Te = z({
33
33
  instruction: j().default(""),
34
34
  axes: Se,
35
35
  classes: ie(Ke).default([]),
36
- points: ie(Te).default([]),
37
- showGrid: J().default(!0),
36
+ points: ie(He).default([]),
37
+ showGrid: Q().default(!0),
38
38
  /**
39
39
  * A point per open point instead of one for the whole plot. On by default:
40
40
  * a learner who places nine of ten points correctly got nine right, the
41
41
  * same reasoning as task-code-trace's cell-by-cell credit.
42
42
  */
43
- partialCredit: J().default(!0),
43
+ partialCredit: Q().default(!0),
44
44
  evaluation: ve.default(me)
45
45
  }).check((e) => {
46
46
  const { axes: s, classes: o, points: n } = e.value;
@@ -126,7 +126,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
126
126
  }), it = z({
127
127
  /** Open point id → the class the learner assigned it. */
128
128
  assignments: ge(j(), j()).default({})
129
- }), Q = (e, s) => s === void 0 ? void 0 : e.classes.find((o) => o.id === s), U = (e, s) => Q(e, s)?.label || s || "", he = (e) => e.points.filter((s) => s.expected !== void 0), re = (e) => e.points.filter((s) => s.centroid), ce = (e) => e.points.filter((s) => !s.centroid && s.class !== void 0), ae = (e, s) => {
129
+ }), _ = (e, s) => s === void 0 ? void 0 : e.classes.find((o) => o.id === s), Y = (e, s) => _(e, s)?.label || s || "", he = (e) => e.points.filter((s) => s.expected !== void 0), re = (e) => e.points.filter((s) => s.centroid), ce = (e) => e.points.filter((s) => !s.centroid && s.class !== void 0), ae = (e, s) => {
130
130
  const o = {};
131
131
  for (const n of he(e)) {
132
132
  const a = s?.assignments?.[n.id];
@@ -139,16 +139,16 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
139
139
  earned: o.filter((n) => n === "correct").length,
140
140
  possible: o.length
141
141
  };
142
- }, Ee = (e, s) => {
142
+ }, Fe = (e, s) => {
143
143
  const o = Object.values(ae(e, s));
144
144
  return o.length > 0 && o.every((n) => n === "correct");
145
- }, Re = ({
145
+ }, Ee = ({
146
146
  data: e,
147
147
  answer: s
148
148
  }) => {
149
149
  if (e.evaluation.mode === "skip")
150
150
  return { state: "unknown", allowRetry: !1 };
151
- const o = Ee(e, s), n = Me(e, s), a = e.partialCredit && n.possible > 0 ? n : { earned: o ? 1 : 0, possible: 1 };
151
+ const o = Fe(e, s), n = Me(e, s), a = e.partialCredit && n.possible > 0 ? n : { earned: o ? 1 : 0, possible: 1 };
152
152
  return {
153
153
  state: o ? "correct" : "wrong",
154
154
  score: a,
@@ -202,7 +202,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
202
202
  xAxisNote: "x: {label}",
203
203
  yAxisNote: "y: {label}"
204
204
  }
205
- }, Fe = ".bitflow-point-plot{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-point-plot-diagram{width:100%;height:auto;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-point-plot-grid line{stroke:var(--bitflow-color-neutral-200);stroke-width:calc(1.5 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-axis line{stroke:var(--bitflow-color-neutral-700);stroke-width:calc(3 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-ticks text{fill:var(--bitflow-color-text-muted);font-family:var(--bitflow-font-family);font-size:calc(22px * var(--bitflow-point-plot-scale, 1));font-variant-numeric:tabular-nums}.bitflow-point-plot-axis-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:calc(24px * var(--bitflow-point-plot-scale, 1));font-weight:var(--bitflow-font-weight-medium)}.bitflow-point-plot-point circle:not(.bitflow-point-plot-hit):not(.bitflow-point-plot-ring),.bitflow-point-plot-point polygon,.bitflow-point-plot-swatch-icon circle,.bitflow-point-plot-swatch-icon polygon{fill:var(--bitflow-point-plot-color, transparent);stroke:var(--bitflow-color-text);stroke-width:3}.bitflow-point-plot-mark{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:22px;font-weight:var(--bitflow-font-weight-bold);text-anchor:middle;dominant-baseline:central;pointer-events:none}.bitflow-point-plot-hit{fill:transparent;stroke:none;cursor:pointer}.bitflow-point-plot-ring{fill:none;stroke:var(--bitflow-color-text);stroke-width:2;stroke-dasharray:5 4;pointer-events:none}.bitflow-point-plot-point>:not(.bitflow-point-plot-hit){pointer-events:none}.bitflow-point-plot-centroid circle{fill:color-mix(in srgb,var(--bitflow-point-plot-color, transparent) 25%,transparent);stroke:var(--bitflow-point-plot-color, var(--bitflow-color-text));stroke-width:5}.bitflow-point-plot-centroid line{stroke:var(--bitflow-color-text);stroke-width:4}.bitflow-point-plot-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:20px;text-anchor:middle}.bitflow-point-plot-verdict{font-family:var(--bitflow-font-family);font-size:24px;font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-verdict-correct{fill:var(--bitflow-color-correct)}.bitflow-point-plot-verdict-wrong{fill:var(--bitflow-color-wrong)}.bitflow-point-plot-catcher{cursor:crosshair}.bitflow-point-plot-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-point-plot-swatch{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);min-height:44px;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer}.bitflow-point-plot-swatch:has(:checked){border-color:var(--bitflow-color-neutral-900);font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-swatch:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-point-plot-swatch-icon{width:1.5rem;height:1.5rem;flex:none}.bitflow-point-plot-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-row-label{flex:1 1 10rem;font-variant-numeric:tabular-nums}.bitflow-point-plot-row>.bitflow-select{flex:1 1 10rem;width:auto}.bitflow-point-plot-badge{font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-badge-correct{color:var(--bitflow-color-correct)}.bitflow-point-plot-badge-wrong{color:var(--bitflow-color-wrong)}.bitflow-point-plot-written summary{cursor:pointer;color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-point-plot-written ul{margin:var(--bitflow-space-xxsmall) 0 0;padding-inline-start:var(--bitflow-space-medium)}.bitflow-point-plot-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-editor-row>.bitflow-input,.bitflow-point-plot-editor-row>.bitflow-select{flex:1 1 var(--bitflow-point-plot-editor-min, 7rem);width:auto;min-width:0}.bitflow-point-plot-editor-row>.bitflow-point-plot-number,.bitflow-point-plot-number{flex:0 1 var(--bitflow-point-plot-number-width, 5.5rem);width:var(--bitflow-point-plot-number-width, 5.5rem)}.bitflow-point-plot-color-input{flex:none;width:2.5rem;height:44px;padding:2px;border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface)}", ee = (e, s) => Math.hypot(e.x - s.x, e.y - s.y), Be = (e, s) => {
205
+ }, Be = ".bitflow-point-plot{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-point-plot-diagram{width:100%;height:auto;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-point-plot-grid line{stroke:var(--bitflow-color-neutral-200);stroke-width:calc(1.5 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-axis line{stroke:var(--bitflow-color-neutral-700);stroke-width:calc(3 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-ticks text{fill:var(--bitflow-color-text-muted);font-family:var(--bitflow-font-family);font-size:calc(22px * var(--bitflow-point-plot-scale, 1));font-variant-numeric:tabular-nums}.bitflow-point-plot-axis-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:calc(24px * var(--bitflow-point-plot-scale, 1));font-weight:var(--bitflow-font-weight-medium)}.bitflow-point-plot-point circle:not(.bitflow-point-plot-hit):not(.bitflow-point-plot-ring),.bitflow-point-plot-point polygon,.bitflow-point-plot-swatch-icon circle,.bitflow-point-plot-swatch-icon polygon{fill:var(--bitflow-point-plot-color, transparent);stroke:var(--bitflow-color-text);stroke-width:3}.bitflow-point-plot-mark{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:22px;font-weight:var(--bitflow-font-weight-bold);text-anchor:middle;dominant-baseline:central;pointer-events:none}.bitflow-point-plot-hit{fill:transparent;stroke:none;cursor:pointer}.bitflow-point-plot-ring{fill:none;stroke:var(--bitflow-color-text);stroke-width:2;stroke-dasharray:5 4;pointer-events:none}.bitflow-point-plot-point>:not(.bitflow-point-plot-hit){pointer-events:none}.bitflow-point-plot-centroid circle{fill:color-mix(in srgb,var(--bitflow-point-plot-color, transparent) 25%,transparent);stroke:var(--bitflow-point-plot-color, var(--bitflow-color-text));stroke-width:5}.bitflow-point-plot-centroid line{stroke:var(--bitflow-color-text);stroke-width:4}.bitflow-point-plot-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:20px;text-anchor:middle}.bitflow-point-plot-verdict{font-family:var(--bitflow-font-family);font-size:24px;font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-verdict-correct{fill:var(--bitflow-color-correct)}.bitflow-point-plot-verdict-wrong{fill:var(--bitflow-color-wrong)}.bitflow-point-plot-catcher{cursor:crosshair}.bitflow-point-plot-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-point-plot-swatch{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);min-height:44px;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer}.bitflow-point-plot-swatch:has(:checked){border-color:var(--bitflow-color-neutral-900);font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-swatch:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-point-plot-swatch-icon{width:1.5rem;height:1.5rem;flex:none}.bitflow-point-plot-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-row-label{flex:1 1 10rem;font-variant-numeric:tabular-nums}.bitflow-point-plot-row>.bitflow-select{flex:1 1 10rem;width:auto}.bitflow-point-plot-badge{font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-badge-correct{color:var(--bitflow-color-correct)}.bitflow-point-plot-badge-wrong{color:var(--bitflow-color-wrong)}.bitflow-point-plot-written summary{cursor:pointer;color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-point-plot-written ul{margin:var(--bitflow-space-xxsmall) 0 0;padding-inline-start:var(--bitflow-space-medium)}.bitflow-point-plot-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-editor-row>.bitflow-input,.bitflow-point-plot-editor-row>.bitflow-select{flex:1 1 var(--bitflow-point-plot-editor-min, 7rem);width:auto;min-width:0}.bitflow-point-plot-editor-row>.bitflow-point-plot-number,.bitflow-point-plot-number{flex:0 1 var(--bitflow-point-plot-number-width, 5.5rem);width:var(--bitflow-point-plot-number-width, 5.5rem)}.bitflow-point-plot-color-input{flex:none;width:2.5rem;height:44px;padding:2px;border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface)}", ee = (e, s) => Math.hypot(e.x - s.x, e.y - s.y), Re = (e, s) => {
206
206
  let o;
207
207
  for (const n of e) {
208
208
  if (n.class === void 0) continue;
@@ -338,14 +338,14 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
338
338
  }, fe = (e) => {
339
339
  const s = Math.round(e * 100) / 100;
340
340
  return String(s);
341
- }, Z = 16, H = 26, We = 42, Ye = 560, Ie = 2.2, Ue = (e) => {
342
- const [s, o] = L.useState(1);
343
- return L.useLayoutEffect(() => {
341
+ }, Z = 16, T = 26, We = 42, Ie = 560, Ue = 2.2, Ye = (e) => {
342
+ const [s, o] = P.useState(1);
343
+ return P.useLayoutEffect(() => {
344
344
  const n = e.current;
345
345
  if (!n || typeof ResizeObserver > "u") return;
346
346
  const a = () => {
347
347
  const r = n.getBoundingClientRect().width;
348
- r && o(Math.min(Ie, Math.max(1, Ye / r)));
348
+ r && o(Math.min(Ue, Math.max(1, Ie / r)));
349
349
  };
350
350
  a();
351
351
  const p = new ResizeObserver(a);
@@ -354,7 +354,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
354
354
  }, Ve = (e) => {
355
355
  const s = e * 1.05;
356
356
  return `0,${-s} ${s * 0.92},${s * 0.62} ${-s * 0.92},${s * 0.62}`;
357
- }, Xe = (e) => `0,${-e} ${e},0 0,${e} ${-e},0`, _e = (e) => {
357
+ }, Xe = (e) => `0,${-e} ${e},0 0,${e} ${-e},0`, Je = (e) => {
358
358
  const s = e * 0.82;
359
359
  return `${-s},${-s} ${s},${-s} ${s},${s} ${-s},${s}`;
360
360
  }, se = ({
@@ -364,7 +364,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
364
364
  style: n
365
365
  }) => {
366
366
  if (e === "circle") return /* @__PURE__ */ t.jsx("circle", { r: s, className: o, style: n });
367
- const a = e === "square" ? _e(s) : e === "triangle" ? Ve(s) : Xe(s);
367
+ const a = e === "square" ? Je(s) : e === "triangle" ? Ve(s) : Xe(s);
368
368
  return /* @__PURE__ */ t.jsx("polygon", { points: a, className: o, style: n });
369
369
  }, xe = ({
370
370
  data: e,
@@ -375,21 +375,21 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
375
375
  onAssign: p,
376
376
  onPlacePoint: r
377
377
  }) => {
378
- const f = (l, d) => A($, l, n, d), u = L.useRef(null), w = Ue(u), [v, k] = L.useState(e.classes[0]?.id), [x, N] = L.useState(""), C = !!p && !a, g = s?.assignments ?? {}, S = de(e.axes.x), E = de(e.axes.y), K = (l, d) => {
378
+ const f = (l, d) => A($, l, n, d), u = P.useRef(null), w = Ye(u), [v, k] = P.useState(e.classes[0]?.id), [x, N] = P.useState(""), C = !!p && !a, g = s?.assignments ?? {}, S = de(e.axes.x), F = de(e.axes.y), K = (l, d) => {
379
379
  if (!p) return;
380
380
  p(l.id, d);
381
- const P = l.label || l.id;
381
+ const L = l.label || l.id;
382
382
  N(
383
- d === void 0 ? f("openUnassigned", { label: P }) : f("openAssigned", { label: P, class: U(e, d) })
383
+ d === void 0 ? f("openUnassigned", { label: L }) : f("openAssigned", { label: L, class: Y(e, d) })
384
384
  );
385
- }, R = (l, d) => K(l, g[l.id] === d ? void 0 : d), V = (l) => {
385
+ }, E = (l, d) => K(l, g[l.id] === d ? void 0 : d), V = (l) => {
386
386
  if (!r) return;
387
387
  const d = l.currentTarget.ownerSVGElement?.getBoundingClientRect();
388
388
  if (!d || d.width === 0 || d.height === 0) return;
389
- const P = (l.clientX - d.left) / d.width * te, T = (l.clientY - d.top) / d.height * W;
389
+ const L = (l.clientX - d.left) / d.width * te, H = (l.clientY - d.top) / d.height * W;
390
390
  r(
391
- pe(e.axes.x, Ze(e.axes.x, P)),
392
- pe(e.axes.y, qe(e.axes.y, T))
391
+ pe(e.axes.x, Ze(e.axes.x, L)),
392
+ pe(e.axes.y, qe(e.axes.y, H))
393
393
  );
394
394
  }, i = (l) => G(e.axes.x, l.x), c = (l) => D(e.axes.y, l.y), b = e.points.filter((l) => !l.centroid), h = e.points.filter((l) => l.centroid);
395
395
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-point-plot", children: [
@@ -414,7 +414,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
414
414
  },
415
415
  `x${l}`
416
416
  )),
417
- E.map((l) => /* @__PURE__ */ t.jsx(
417
+ F.map((l) => /* @__PURE__ */ t.jsx(
418
418
  "line",
419
419
  {
420
420
  y1: D(e.axes.y, l),
@@ -456,7 +456,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
456
456
  },
457
457
  `xt${l}`
458
458
  )),
459
- E.map((l) => /* @__PURE__ */ t.jsx(
459
+ F.map((l) => /* @__PURE__ */ t.jsx(
460
460
  "text",
461
461
  {
462
462
  x: m.left - 10,
@@ -500,7 +500,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
500
500
  }
501
501
  ),
502
502
  b.map((l) => {
503
- const d = I(l), P = g[l.id], T = o?.[l.id], F = Q(e, d === "known" ? l.class : P);
503
+ const d = U(l), L = g[l.id], H = o?.[l.id], B = _(e, d === "known" ? l.class : L);
504
504
  return /* @__PURE__ */ t.jsxs(
505
505
  "g",
506
506
  {
@@ -512,10 +512,10 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
512
512
  {
513
513
  r: We,
514
514
  className: "bitflow-point-plot-hit",
515
- onClick: () => v !== void 0 && R(l, v)
515
+ onClick: () => v !== void 0 && E(l, v)
516
516
  }
517
517
  ),
518
- d === "open" && !F ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
518
+ d === "open" && !B ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
519
519
  /* @__PURE__ */ t.jsx(
520
520
  se,
521
521
  {
@@ -525,13 +525,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
525
525
  }
526
526
  ),
527
527
  /* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-mark", children: "?" })
528
- ] }) : F && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
528
+ ] }) : B && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
529
529
  /* @__PURE__ */ t.jsx(
530
530
  se,
531
531
  {
532
- shape: F.shape,
532
+ shape: B.shape,
533
533
  size: Z,
534
- style: { "--bitflow-point-plot-color": F.color }
534
+ style: { "--bitflow-point-plot-color": B.color }
535
535
  }
536
536
  ),
537
537
  d === "open" && /* @__PURE__ */ t.jsx(
@@ -542,13 +542,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
542
542
  }
543
543
  )
544
544
  ] }),
545
- T && /* @__PURE__ */ t.jsx(
545
+ H && /* @__PURE__ */ t.jsx(
546
546
  "text",
547
547
  {
548
- className: T === "correct" ? "bitflow-point-plot-verdict bitflow-point-plot-verdict-correct" : "bitflow-point-plot-verdict bitflow-point-plot-verdict-wrong",
548
+ className: H === "correct" ? "bitflow-point-plot-verdict bitflow-point-plot-verdict-correct" : "bitflow-point-plot-verdict bitflow-point-plot-verdict-wrong",
549
549
  x: Z + 14,
550
550
  y: -24,
551
- children: T === "correct" ? "✓" : "✗"
551
+ children: H === "correct" ? "✓" : "✗"
552
552
  }
553
553
  ),
554
554
  l.label && /* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-label", y: -26, children: l.label })
@@ -558,7 +558,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
558
558
  );
559
559
  }),
560
560
  h.map((l) => {
561
- const d = Q(e, l.class);
561
+ const d = _(e, l.class);
562
562
  return d ? /* @__PURE__ */ t.jsxs(
563
563
  "g",
564
564
  {
@@ -566,10 +566,10 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
566
566
  transform: `translate(${i(l)} ${c(l)}) scale(${w})`,
567
567
  style: { "--bitflow-point-plot-color": d.color },
568
568
  children: [
569
- /* @__PURE__ */ t.jsx("title", { children: f("centroidTitle", { class: U(e, l.class) }) }),
570
- /* @__PURE__ */ t.jsx("circle", { r: H }),
571
- /* @__PURE__ */ t.jsx("line", { x1: -H * 0.6, y1: 0, x2: H * 0.6, y2: 0 }),
572
- /* @__PURE__ */ t.jsx("line", { x1: 0, y1: -H * 0.6, x2: 0, y2: H * 0.6 }),
569
+ /* @__PURE__ */ t.jsx("title", { children: f("centroidTitle", { class: Y(e, l.class) }) }),
570
+ /* @__PURE__ */ t.jsx("circle", { r: T }),
571
+ /* @__PURE__ */ t.jsx("line", { x1: -T * 0.6, y1: 0, x2: T * 0.6, y2: 0 }),
572
+ /* @__PURE__ */ t.jsx("line", { x1: 0, y1: -T * 0.6, x2: 0, y2: T * 0.6 }),
573
573
  l.label && /* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-label", y: -34, children: l.label })
574
574
  ]
575
575
  },
@@ -580,7 +580,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
580
580
  }
581
581
  ),
582
582
  p && /* @__PURE__ */ t.jsx(
583
- Je,
583
+ Qe,
584
584
  {
585
585
  data: e,
586
586
  answer: s,
@@ -594,7 +594,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
594
594
  ),
595
595
  /* @__PURE__ */ t.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: x })
596
596
  ] });
597
- }, Je = ({
597
+ }, Qe = ({
598
598
  data: e,
599
599
  answer: s,
600
600
  states: o,
@@ -604,7 +604,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
604
604
  setActive: r,
605
605
  onAssign: f
606
606
  }) => {
607
- const u = (x, N) => A($, x, n, N), w = s?.assignments ?? {}, v = he(e), k = L.useId();
607
+ const u = (x, N) => A($, x, n, N), w = s?.assignments ?? {}, v = he(e), k = P.useId();
608
608
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
609
609
  !a && /* @__PURE__ */ t.jsx(
610
610
  "div",
@@ -671,7 +671,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
671
671
  })
672
672
  ] })
673
673
  ] });
674
- }, Qe = ({
674
+ }, _e = ({
675
675
  data: e,
676
676
  answer: s,
677
677
  result: o,
@@ -681,7 +681,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
681
681
  }) => {
682
682
  const r = (u, w) => A($, u, a, w), f = o?.detail?.points;
683
683
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack", children: [
684
- /* @__PURE__ */ t.jsx(Pe, { markdown: e.instruction }),
684
+ /* @__PURE__ */ t.jsx(Le, { markdown: e.instruction }),
685
685
  /* @__PURE__ */ t.jsx("p", { className: "bitflow-hint", children: r(n ? "howToReadonly" : "howTo") }),
686
686
  /* @__PURE__ */ t.jsx(
687
687
  xe,
@@ -706,7 +706,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
706
706
  e.axes.x.label && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text", children: o("xAxisNote", { label: e.axes.x.label }) }),
707
707
  e.axes.y.label && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text", children: o("yAxisNote", { label: e.axes.y.label }) }),
708
708
  /* @__PURE__ */ t.jsx("ul", { children: e.points.map((a, p) => {
709
- const r = `(${a.x}, ${a.y})`, f = I(a), u = f === "centroid" ? o("centroidTitle", { class: U(e, a.class) }) : f === "known" ? o("knownTitle", { label: n(a, p), class: U(e, a.class) }) : o("openUnassigned", { label: n(a, p) });
709
+ const r = `(${a.x}, ${a.y})`, f = U(a), u = f === "centroid" ? o("centroidTitle", { class: Y(e, a.class) }) : f === "known" ? o("knownTitle", { label: n(a, p), class: Y(e, a.class) }) : o("openUnassigned", { label: n(a, p) });
710
710
  return /* @__PURE__ */ t.jsxs("li", { children: [
711
711
  u,
712
712
  " ",
@@ -714,13 +714,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
714
714
  ] }, a.id);
715
715
  }) })
716
716
  ] });
717
- }, _ = ({
717
+ }, J = ({
718
718
  value: e,
719
719
  onChange: s,
720
720
  ...o
721
721
  }) => {
722
- const [n, a] = L.useState(() => String(e));
723
- return L.useEffect(() => {
722
+ const [n, a] = P.useState(() => String(e));
723
+ return P.useEffect(() => {
724
724
  Number(n.replace(",", ".")) !== e && a(String(e));
725
725
  }, [e]), /* @__PURE__ */ t.jsx(
726
726
  "input",
@@ -748,7 +748,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
748
748
  onChange: o,
749
749
  errors: n
750
750
  }) => {
751
- const a = (i, c) => A(De, i, s, c), p = (i) => o({ ...e, ...i }), [r, f] = L.useState(3), u = (i, c) => p({ axes: { ...e.axes, [i]: { ...e.axes[i], ...c } } }), w = (i, c) => p({
751
+ const a = (i, c) => A(De, i, s, c), p = (i) => o({ ...e, ...i }), [r, f] = P.useState(3), u = (i, c) => p({ axes: { ...e.axes, [i]: { ...e.axes[i], ...c } } }), w = (i, c) => p({
752
752
  classes: e.classes.map((b) => b.id === i ? { ...b, ...c } : b)
753
753
  }), v = (i) => p({
754
754
  classes: e.classes.filter((c) => c.id !== i),
@@ -781,22 +781,22 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
781
781
  return [...i].sort((b, h) => c(b) - c(h));
782
782
  }, S = (i) => p({
783
783
  points: e.points.map(
784
- (c) => I(c) === "open" ? { ...c, expected: i(c) ?? c.expected } : c
784
+ (c) => U(c) === "open" ? { ...c, expected: i(c) ?? c.expected } : c
785
785
  )
786
- }), E = {
786
+ }), F = {
787
787
  circle: a("shapeCircle"),
788
788
  square: a("shapeSquare"),
789
789
  triangle: a("shapeTriangle"),
790
790
  diamond: a("shapeDiamond")
791
791
  }, K = (i, c, b, h) => /* @__PURE__ */ t.jsx(X, { label: i, error: h, children: (l) => /* @__PURE__ */ t.jsx(
792
- _,
792
+ J,
793
793
  {
794
794
  ...l,
795
795
  className: "bitflow-input bitflow-point-plot-number",
796
796
  value: c,
797
797
  onChange: b
798
798
  }
799
- ) }), R = (i) => /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
799
+ ) }), E = (i) => /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
800
800
  /* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a(i === "x" ? "xAxisLegend" : "yAxisLegend") }),
801
801
  /* @__PURE__ */ t.jsxs("div", { className: "bitflow-row", children: [
802
802
  /* @__PURE__ */ t.jsx(X, { label: a("axisLabelField"), children: (c) => /* @__PURE__ */ t.jsx(
@@ -833,12 +833,12 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
833
833
  onChange: (i) => p({ instruction: i })
834
834
  }
835
835
  ),
836
- R("x"),
837
- R("y"),
836
+ E("x"),
837
+ E("y"),
838
838
  /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
839
839
  /* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a("classesLabel") }),
840
840
  /* @__PURE__ */ t.jsx("span", { className: "bitflow-hint", children: a("classesHint") }),
841
- B(n, "classes") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: B(n, "classes") }),
841
+ R(n, "classes") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: R(n, "classes") }),
842
842
  e.classes.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text-muted", children: a("noClasses") }),
843
843
  e.classes.map((i, c) => {
844
844
  const b = i.label || a("unnamedClass", { number: c + 1 });
@@ -872,7 +872,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
872
872
  value: i.shape,
873
873
  "aria-label": a("classShapeOf", { class: b }),
874
874
  onChange: (h) => w(i.id, { shape: h.target.value }),
875
- children: q.map((h) => /* @__PURE__ */ t.jsx("option", { value: h, children: E[h] }, h))
875
+ children: q.map((h) => /* @__PURE__ */ t.jsx("option", { value: h, children: F[h] }, h))
876
876
  }
877
877
  ),
878
878
  /* @__PURE__ */ t.jsx(
@@ -918,14 +918,14 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
918
918
  /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
919
919
  /* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a("pointsLabel") }),
920
920
  /* @__PURE__ */ t.jsx("span", { className: "bitflow-hint", children: a("pointsHint") }),
921
- B(n, "points") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: B(n, "points") }),
921
+ R(n, "points") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: R(n, "points") }),
922
922
  V.map((i) => /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: i }, i)),
923
923
  e.points.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text-muted", children: a("noPoints") }),
924
924
  e.points.map((i, c) => {
925
- const b = I(i), h = c + 1, l = b === "open" ? "expected" : "class";
925
+ const b = U(i), h = c + 1, l = b === "open" ? "expected" : "class";
926
926
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-point-plot-editor-row", children: [
927
927
  /* @__PURE__ */ t.jsx(
928
- _,
928
+ J,
929
929
  {
930
930
  className: "bitflow-input bitflow-point-plot-number",
931
931
  value: i.x,
@@ -934,7 +934,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
934
934
  }
935
935
  ),
936
936
  /* @__PURE__ */ t.jsx(
937
- _,
937
+ J,
938
938
  {
939
939
  className: "bitflow-input bitflow-point-plot-number",
940
940
  value: i.y,
@@ -976,7 +976,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
976
976
  onChange: (d) => k(i.id, { [l]: d.target.value || void 0 }),
977
977
  children: [
978
978
  /* @__PURE__ */ t.jsx("option", { value: "", children: a("chooseNone") }),
979
- e.classes.map((d, P) => /* @__PURE__ */ t.jsx("option", { value: d.id, children: d.label || a("unnamedClass", { number: P + 1 }) }, d.id))
979
+ e.classes.map((d, L) => /* @__PURE__ */ t.jsx("option", { value: d.id, children: d.label || a("unnamedClass", { number: L + 1 }) }, d.id))
980
980
  ]
981
981
  }
982
982
  ),
@@ -1014,7 +1014,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
1014
1014
  type: "button",
1015
1015
  className: "bitflow-button bitflow-button-secondary",
1016
1016
  disabled: re(e).length === 0,
1017
- onClick: () => S((i) => Be(g(re(e)), i)),
1017
+ onClick: () => S((i) => Re(g(re(e)), i)),
1018
1018
  children: a("apply")
1019
1019
  }
1020
1020
  ) })
@@ -1070,7 +1070,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
1070
1070
  }
1071
1071
  ),
1072
1072
  /* @__PURE__ */ t.jsx(
1073
- Le,
1073
+ Pe,
1074
1074
  {
1075
1075
  evaluation: e.evaluation,
1076
1076
  locale: s,
@@ -1083,9 +1083,9 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
1083
1083
  je({
1084
1084
  type: we,
1085
1085
  kind: "task",
1086
- schema: He,
1087
- evaluate: Re,
1088
- Task: Qe,
1086
+ schema: Te,
1087
+ evaluate: Ee,
1088
+ Task: _e,
1089
1089
  Form: tt,
1090
1090
  info: (e) => ({
1091
1091
  name: A($, "name", e),
@@ -1105,33 +1105,33 @@ je({
1105
1105
  })
1106
1106
  });
1107
1107
  Ae(we);
1108
- ke("bitflow-styles-task-point-plot", Fe);
1108
+ ke("bitflow-styles-task-point-plot", Be);
1109
1109
  export {
1110
1110
  it as AnswerSchema,
1111
1111
  Se as AxesSchema,
1112
1112
  ne as AxisSchema,
1113
1113
  Ke as ClassSchema,
1114
- He as DataSchema,
1114
+ Te as DataSchema,
1115
1115
  tt as Form,
1116
1116
  xe as PlotView,
1117
- Te as PointSchema,
1117
+ He as PointSchema,
1118
1118
  q as SHAPES,
1119
1119
  Oe as ShapeSchema,
1120
1120
  we as TYPE,
1121
- Qe as Task,
1122
- Ee as allCorrect,
1121
+ _e as Task,
1122
+ Fe as allCorrect,
1123
1123
  re as centroids,
1124
- Q as classById,
1125
- U as classLabel,
1124
+ _ as classById,
1125
+ Y as classLabel,
1126
1126
  ee as distance,
1127
- Re as evaluate,
1127
+ Ee as evaluate,
1128
1128
  De as formMessages,
1129
1129
  Ge as knn,
1130
1130
  ce as knownPoints,
1131
1131
  $ as messages,
1132
- Be as nearestCentroid,
1132
+ Re as nearestCentroid,
1133
1133
  he as openPoints,
1134
1134
  ae as pointStates,
1135
- I as roleOf,
1135
+ U as roleOf,
1136
1136
  Me as scoreOf
1137
1137
  };
@@ -1,6 +1,6 @@
1
- import { L as g, a4 as v, a2 as c, j as a, a as y, b as f, E as k, a5 as F, a9 as N, s as L, aa as C } from "./dom-uYx_3K1r.js";
2
- import { S as H, y as b, v as w, e as K, P as O, M as T, L as E, R as S } from "./bitLoaders-DIGwTcpd.js";
3
- const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);margin:0}.bitflow-identify-required{margin:0;min-height:1.5em;color:var(--bitflow-color-warning);font-size:var(--bitflow-font-size-small)}", p = {
1
+ import { L as g, a4 as k, a2 as c, j as a, a as q, b as f, E as v, a5 as y, a9 as N, s as C, aa as H } from "./dom-uYx_3K1r.js";
2
+ import { $ as L, C as b, e as w, P as K, M as O, F as E, U as T, H as z } from "./bitLoaders-CxvZkGrY.js";
3
+ const A = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);margin:0}.bitflow-identify-required{margin:0;min-height:1.5em;color:var(--bitflow-color-warning);font-size:var(--bitflow-font-size-small)}", p = {
4
4
  en: {
5
5
  name: "Who you are",
6
6
  description: "Asks the learner for a name or a class before the assessment starts.",
@@ -73,20 +73,20 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
73
73
  incomplete: "Başlamadan önce “Gerekli” işaretli her yeri doldur.",
74
74
  nameFallback: "Ad"
75
75
  }
76
- }, A = g({
76
+ }, S = g({
77
77
  id: c().min(1),
78
78
  label: c().default(""),
79
79
  hint: c().default(""),
80
80
  required: N().default(!0),
81
- kind: F(["text", "select"]).default("text"),
81
+ kind: y(["text", "select"]).default("text"),
82
82
  /** Only for `select`. Ignored otherwise. */
83
- options: v(c()).default([])
83
+ options: k(c()).default([])
84
84
  }), R = g({
85
85
  title: c().default(""),
86
86
  markdown: c().default(""),
87
- fields: v(A).default([])
87
+ fields: k(S).default([])
88
88
  }), D = () => ({
89
- id: k("field"),
89
+ id: v("field"),
90
90
  label: "",
91
91
  hint: "",
92
92
  required: !0,
@@ -94,7 +94,7 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
94
94
  options: []
95
95
  }), x = (e, r) => e.fields.every(
96
96
  (s) => !s.required || s.label.trim() === "" || (r?.[s.id] ?? "").trim() !== ""
97
- ), M = (e, r) => {
97
+ ), I = (e, r) => {
98
98
  for (const s of e.fields) {
99
99
  const t = (r?.[s.id] ?? "").trim();
100
100
  if (t !== "") return t;
@@ -145,16 +145,16 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
145
145
  locale: t,
146
146
  onAnswerChange: h
147
147
  }) => {
148
- const d = (l) => f(p, l, t), i = y.useId(), n = e.fields.filter((l) => l.label.trim() !== ""), o = (l, u) => h({ ...r, [l]: u });
148
+ const d = (l) => f(p, l, t), i = q.useId(), n = e.fields.filter((l) => l.label.trim() !== ""), o = (l, u) => h({ ...r, [l]: u });
149
149
  return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-stack", children: [
150
150
  e.title && /* @__PURE__ */ a.jsx("h1", { className: "bitflow-heading", children: e.title }),
151
- /* @__PURE__ */ a.jsx(E, { markdown: e.markdown }),
151
+ /* @__PURE__ */ a.jsx(T, { markdown: e.markdown }),
152
152
  n.length > 0 && /* @__PURE__ */ a.jsxs("fieldset", { className: "bitflow-identify", children: [
153
153
  /* @__PURE__ */ a.jsx("legend", { className: "bitflow-label", children: d("legend") }),
154
154
  n.map((l) => {
155
- const u = `${i}-${l.id}`, q = l.required ? `${l.label} (${d("required")})` : l.label;
155
+ const u = `${i}-${l.id}`, F = l.required ? `${l.label} (${d("required")})` : l.label;
156
156
  return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-field", children: [
157
- /* @__PURE__ */ a.jsx("label", { className: "bitflow-label", htmlFor: u, children: q }),
157
+ /* @__PURE__ */ a.jsx("label", { className: "bitflow-label", htmlFor: u, children: F }),
158
158
  l.hint && /* @__PURE__ */ a.jsx("span", { className: "bitflow-hint", children: l.hint }),
159
159
  l.kind === "select" ? /* @__PURE__ */ a.jsxs(
160
160
  "select",
@@ -187,12 +187,12 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
187
187
  ] }),
188
188
  /* @__PURE__ */ a.jsx("p", { className: "bitflow-identify-required", children: !x(e, r) && !s && d("incomplete") })
189
189
  ] });
190
- }, V = ({
190
+ }, U = ({
191
191
  data: e,
192
192
  locale: r,
193
193
  onChange: s
194
194
  }) => {
195
- const t = (i) => f(W, i, r), h = H(e.fields.map((i) => i.id)), d = (i, n) => s({
195
+ const t = (i) => f(W, i, r), h = L(e.fields.map((i) => i.id)), d = (i, n) => s({
196
196
  ...e,
197
197
  fields: e.fields.map(
198
198
  (o) => o.id === i ? { ...o, ...n } : o
@@ -270,7 +270,7 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
270
270
  }
271
271
  ),
272
272
  /* @__PURE__ */ a.jsx(
273
- T,
273
+ E,
274
274
  {
275
275
  label: t("fieldRequired"),
276
276
  checked: i.required,
@@ -304,14 +304,14 @@ const z = ".bitflow-identify{display:flex;flex-direction:column;gap:var(--bitflo
304
304
  )
305
305
  ] });
306
306
  };
307
- L("bitflow-styles-start-identify", z);
307
+ C("bitflow-styles-start-identify", A);
308
308
  const j = "start-identify";
309
- C({
309
+ H({
310
310
  type: j,
311
311
  kind: "start",
312
312
  schema: R,
313
313
  Task: P,
314
- Form: V,
314
+ Form: U,
315
315
  info: (e) => ({
316
316
  name: f(p, "name", e),
317
317
  description: f(p, "description", e)
@@ -325,7 +325,7 @@ C({
325
325
  // empty list would hand the author a step that shows nothing.
326
326
  fields: [
327
327
  {
328
- id: k("field"),
328
+ id: v("field"),
329
329
  label: "Name",
330
330
  hint: "",
331
331
  required: !0,
@@ -335,13 +335,13 @@ C({
335
335
  ]
336
336
  })
337
337
  });
338
- S(j);
338
+ z(j);
339
339
  export {
340
340
  R as DataSchema,
341
- V as Form,
341
+ U as Form,
342
342
  j as TYPE,
343
343
  P as Task,
344
- M as identityOf,
344
+ I as identityOf,
345
345
  x as isFilledIn,
346
346
  p as messages
347
347
  };