hyperbook 0.113.1 → 0.113.3

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 (55) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-BNwEKIvk.js} +258 -258
  3. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
  4. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
  5. package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +4 -4
  8. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
  9. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
  10. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
  11. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
  12. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
  13. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
  14. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
  15. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
  16. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
  17. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
  18. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
  19. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
  20. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
  21. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
  22. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
  23. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
  24. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
  25. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
  26. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
  27. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
  28. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
  29. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
  30. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
  31. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
  32. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
  33. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
  34. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
  35. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
  36. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
  37. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
  38. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
  39. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
  40. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
  41. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
  42. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
  43. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
  44. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
  45. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
  46. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
  47. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
  48. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  51. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  52. package/dist/assets/directive-bitflow/report.js +1 -1
  53. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-mdyEMdsJ.js} +6 -6
  54. package/dist/index.js +1 -1
  55. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- import { L as R, a4 as Z, a as x, j as r, ac as J, ad as _, a2 as L, am as ee, a5 as te, b as P, aa as ae, s as ie } from "./dom-uYx_3K1r.js";
2
- import { S as re, v as ne, A as z, e as q, E as le, L as se, P as oe, D as ce, y as de, R as he } from "./bitLoaders-DIGwTcpd.js";
3
- const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-matching-columns{position:relative;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--bitflow-space-large)}.bitflow-matching-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.bitflow-matching-line{stroke:var(--bitflow-color-primary);stroke-width:2;stroke-linecap:round}.bitflow-matching-line-correct{stroke:var(--bitflow-color-correct)}.bitflow-matching-line-wrong{stroke:var(--bitflow-color-wrong)}.bitflow-matching-column{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:var(--bitflow-space-xxsmall) 0 0;list-style:none}.bitflow-matching-card{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;width:100%;padding:var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:pointer;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-matching-card:disabled{cursor:default}.bitflow-matching-image{max-height:4rem}.bitflow-matching-index{flex:none;width:1.5rem;height:1.5rem;font-size:var(--bitflow-font-size-small);font-variant-numeric:tabular-nums;line-height:1.5rem;color:var(--bitflow-color-on-primary);text-align:center;background:var(--bitflow-color-primary);border-radius:50%}.bitflow-matching-card.bitflow-matching-card-held{background:var(--bitflow-color-neutral-100);border-color:var(--bitflow-color-primary);box-shadow:0 0 0 2px var(--bitflow-color-primary)}.bitflow-matching-card.bitflow-matching-card-matched{background:var(--bitflow-color-neutral-100);border-style:dashed}.bitflow-matching-card.bitflow-matching-card-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-style:solid;border-color:var(--bitflow-color-correct)}.bitflow-matching-card.bitflow-matching-card-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-style:solid;border-color:var(--bitflow-color-wrong)}.bitflow-matching-status{position:sticky;bottom:0;z-index:1;margin:0;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border-top:var(--bitflow-border-width) solid var(--bitflow-color-primary);box-shadow:var(--bitflow-shadow-medium)}", F = (t) => t.leftId === t.rightId, me = ({
1
+ import { P as C, a4 as F, a as x, j as r, ac as J, ad as Z, a2 as P, am as ee, a5 as te, b as L, aa as ae, s as ie } from "./dom-B6NPWBb1.js";
2
+ import { $ as re, e as ne, g as z, P as G, B as le, U as se, M as oe, h as ce, C as de, H as he } from "./bitLoaders-7qanePQL.js";
3
+ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-matching-columns{position:relative;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--bitflow-space-large)}.bitflow-matching-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.bitflow-matching-line{stroke:var(--bitflow-color-primary);stroke-width:2;stroke-linecap:round}.bitflow-matching-line-correct{stroke:var(--bitflow-color-correct)}.bitflow-matching-line-wrong{stroke:var(--bitflow-color-wrong)}.bitflow-matching-column{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:var(--bitflow-space-xxsmall) 0 0;list-style:none}.bitflow-matching-card{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;width:100%;padding:var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:pointer;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-matching-card:disabled{cursor:default}.bitflow-matching-image{max-height:4rem}.bitflow-matching-index{flex:none;width:1.5rem;height:1.5rem;font-size:var(--bitflow-font-size-small);font-variant-numeric:tabular-nums;line-height:1.5rem;color:var(--bitflow-color-on-primary);text-align:center;background:var(--bitflow-color-primary);border-radius:50%}.bitflow-matching-card.bitflow-matching-card-held{background:var(--bitflow-color-neutral-100);border-color:var(--bitflow-color-primary);box-shadow:0 0 0 2px var(--bitflow-color-primary)}.bitflow-matching-card.bitflow-matching-card-matched{background:var(--bitflow-color-neutral-100);border-style:dashed}.bitflow-matching-card.bitflow-matching-card-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-style:solid;border-color:var(--bitflow-color-correct)}.bitflow-matching-card.bitflow-matching-card-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-style:solid;border-color:var(--bitflow-color-wrong)}.bitflow-matching-status{position:sticky;bottom:0;z-index:1;margin:0;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border-top:var(--bitflow-border-width) solid var(--bitflow-color-primary);box-shadow:var(--bitflow-shadow-medium)}", U = (t) => t.leftId === t.rightId, me = ({
4
4
  data: t,
5
5
  answer: l
6
6
  }) => {
7
7
  if (t.evaluation.mode === "skip")
8
8
  return { state: "unknown", allowRetry: !1 };
9
- const h = l?.matches ?? [], s = h.filter(F), n = t.pairs.length;
9
+ const h = l?.matches ?? [], s = h.filter(U), n = t.pairs.length;
10
10
  return {
11
11
  state: n > 0 && s.length === n ? "correct" : "wrong",
12
12
  score: { earned: s.length, possible: n },
@@ -14,10 +14,10 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
14
14
  detail: {
15
15
  // Which pairings held, so each can be marked where it sits rather than
16
16
  // the learner being given a number to reverse-engineer.
17
- matches: h.map((o) => ({ ...o, correct: F(o) }))
17
+ matches: h.map((o) => ({ ...o, correct: U(o) }))
18
18
  }
19
19
  };
20
- }, S = {
20
+ }, R = {
21
21
  en: {
22
22
  name: "Match up",
23
23
  description: "Two columns the learner pairs off.",
@@ -58,24 +58,24 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
58
58
  matchRight: "richtig",
59
59
  matchWrong: "nicht richtig"
60
60
  }
61
- }, G = R({
61
+ }, Y = C({
62
62
  kind: te(["text", "image"]).default("text"),
63
63
  /**
64
64
  * The words on the card, or — for a picture — what the picture shows. One
65
65
  * field either way, so an image can never be shipped undescribed.
66
66
  */
67
- label: L().default(""),
67
+ label: P().default(""),
68
68
  image: ee.optional()
69
- }), fe = R({
69
+ }), fe = C({
70
70
  /** Stable across edits, so an answer keeps pointing at the same pair. */
71
- id: L().min(1),
72
- left: G,
73
- right: G
74
- }), ge = R({
75
- instruction: L().default(""),
71
+ id: P().min(1),
72
+ left: Y,
73
+ right: Y
74
+ }), ge = C({
75
+ instruction: P().default(""),
76
76
  /** Written as pairs; the learner is given the two columns shuffled. */
77
- pairs: Z(fe).default([]),
78
- evaluation: J.default(_)
77
+ pairs: F(fe).default([]),
78
+ evaluation: J.default(Z)
79
79
  }).check((t) => {
80
80
  const l = t.value.pairs.map((h) => h.id);
81
81
  new Set(l).size !== l.length && t.issues.push({
@@ -104,13 +104,13 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
104
104
  path: ["pairs"],
105
105
  message: "Add at least two pairs. With one there is nothing to match."
106
106
  });
107
- }), be = R({
107
+ }), be = C({
108
108
  /** The pair the left card came from. */
109
- leftId: L().min(1),
109
+ leftId: P().min(1),
110
110
  /** The pair the right card came from — the same one, when it is right. */
111
- rightId: L().min(1)
112
- }), ze = R({
113
- matches: Z(be).default([])
111
+ rightId: P().min(1)
112
+ }), ze = C({
113
+ matches: F(be).default([])
114
114
  }), we = ({
115
115
  pairs: t,
116
116
  leftOrder: l,
@@ -118,50 +118,50 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
118
118
  matches: s,
119
119
  results: n,
120
120
  locale: o,
121
- readonly: y,
121
+ readonly: k,
122
122
  onChange: g
123
123
  }) => {
124
- const u = (e, a) => P(S, e, o, a), [i, d] = x.useState(null), [w, c] = x.useState(""), b = x.useRef(null), T = x.useRef(/* @__PURE__ */ new Map()), [U, C] = x.useState([]), p = (e) => t.find((a) => a.id === e), v = (e) => e.label, H = n !== void 0, M = i ? v(p(i).left) : null, $ = (e) => s.find((a) => a.leftId === e), A = (e) => s.find((a) => a.rightId === e), D = (e) => e && n?.find(
124
+ const u = (e, a) => L(R, e, o, a), [i, d] = x.useState(null), [w, c] = x.useState(""), b = x.useRef(null), T = x.useRef(/* @__PURE__ */ new Map()), [Q, H] = x.useState([]), p = (e) => t.find((a) => a.id === e), v = (e) => e.label, E = n !== void 0, M = i ? v(p(i).left) : null, $ = (e) => s.find((a) => a.leftId === e), A = (e) => s.find((a) => a.rightId === e), K = (e) => e && n?.find(
125
125
  (a) => a.leftId === e.leftId && a.rightId === e.rightId
126
126
  )?.correct;
127
127
  x.useEffect(() => {
128
128
  if (i === null) return;
129
129
  const e = (a) => {
130
- a.key === "Escape" && (d(null), c(P(S, "putDown", o)));
130
+ a.key === "Escape" && (d(null), c(L(R, "putDown", o)));
131
131
  };
132
132
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
133
133
  }, [i, o]);
134
- const E = x.useCallback(() => {
134
+ const S = x.useCallback(() => {
135
135
  const e = b.current;
136
- if (!e) return C([]);
136
+ if (!e) return H([]);
137
137
  const a = e.getBoundingClientRect(), f = [];
138
138
  for (const m of s) {
139
139
  const I = T.current.get(`left:${m.leftId}`), N = T.current.get(`right:${m.rightId}`);
140
140
  if (!I || !N) continue;
141
- const j = I.getBoundingClientRect(), k = N.getBoundingClientRect();
142
- if (k.left < j.right) return C([]);
141
+ const j = I.getBoundingClientRect(), y = N.getBoundingClientRect();
142
+ if (y.left < j.right) return H([]);
143
143
  f.push({
144
144
  id: `${m.leftId}:${m.rightId}`,
145
145
  x1: j.right - a.left,
146
146
  y1: j.top + j.height / 2 - a.top,
147
- x2: k.left - a.left,
148
- y2: k.top + k.height / 2 - a.top,
149
- correct: D(m)
147
+ x2: y.left - a.left,
148
+ y2: y.top + y.height / 2 - a.top,
149
+ correct: K(m)
150
150
  });
151
151
  }
152
- C(f);
152
+ H(f);
153
153
  }, [s, n]);
154
154
  x.useLayoutEffect(() => {
155
- E();
156
- const e = () => E();
155
+ S();
156
+ const e = () => S();
157
157
  window.addEventListener("resize", e);
158
158
  const a = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(e);
159
159
  return a && b.current && a.observe(b.current), () => {
160
160
  window.removeEventListener("resize", e), a?.disconnect();
161
161
  };
162
- }, [E]);
163
- const K = (e) => {
164
- y || (g(
162
+ }, [S]);
163
+ const W = (e) => {
164
+ k || (g(
165
165
  s.filter(
166
166
  (a) => !(a.leftId === e.leftId && a.rightId === e.rightId)
167
167
  )
@@ -172,10 +172,10 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
172
172
  })
173
173
  ));
174
174
  }, V = (e) => {
175
- if (y) return;
175
+ if (k) return;
176
176
  const a = $(e);
177
177
  if (a) {
178
- K(a);
178
+ W(a);
179
179
  return;
180
180
  }
181
181
  const f = i === e ? null : e;
@@ -183,10 +183,10 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
183
183
  f ? u("holding", { card: v(p(e).left) }) : u("putDown")
184
184
  );
185
185
  }, X = (e) => {
186
- if (y) return;
186
+ if (k) return;
187
187
  const a = A(e);
188
188
  if (a && i === null) {
189
- K(a);
189
+ W(a);
190
190
  return;
191
191
  }
192
192
  if (i === null) return;
@@ -199,20 +199,20 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
199
199
  right: v(p(e).right)
200
200
  })
201
201
  );
202
- }, W = (e, a, f) => {
203
- const m = f === "left" ? $(a) : A(a), I = m ? s.indexOf(m) + 1 : void 0, N = m ? f === "left" ? p(m.rightId)?.right : p(m.leftId)?.left : void 0, j = D(m), k = ["bitflow-matching-card"];
204
- return m && k.push("bitflow-matching-card-matched"), i === a && f === "left" && k.push("bitflow-matching-card-held"), H && m && k.push(
202
+ }, D = (e, a, f) => {
203
+ const m = f === "left" ? $(a) : A(a), I = m ? s.indexOf(m) + 1 : void 0, N = m ? f === "left" ? p(m.rightId)?.right : p(m.leftId)?.left : void 0, j = K(m), y = ["bitflow-matching-card"];
204
+ return m && y.push("bitflow-matching-card-matched"), i === a && f === "left" && y.push("bitflow-matching-card-held"), E && m && y.push(
205
205
  j ? "bitflow-matching-card-correct" : "bitflow-matching-card-wrong"
206
206
  ), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
207
207
  "button",
208
208
  {
209
209
  type: "button",
210
- ref: (O) => {
211
- const B = `${f}:${a}`;
212
- O ? T.current.set(B, O) : T.current.delete(B);
210
+ ref: (B) => {
211
+ const O = `${f}:${a}`;
212
+ B ? T.current.set(O, B) : T.current.delete(O);
213
213
  },
214
- className: k.join(" "),
215
- disabled: y,
214
+ className: y.join(" "),
215
+ disabled: k,
216
216
  "aria-pressed": f === "left" ? i === a : void 0,
217
217
  "aria-label": N ? u("matchedWith", { card: v(e), other: v(N) }) : u("unmatched", { card: v(e) }),
218
218
  onClick: () => f === "left" ? V(a) : X(a),
@@ -227,7 +227,7 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
227
227
  draggable: !1
228
228
  }
229
229
  ) : /* @__PURE__ */ r.jsx("span", { children: v(e) }),
230
- H && m && /* @__PURE__ */ r.jsxs("span", { className: "bitflow-visually-hidden", children: [
230
+ E && m && /* @__PURE__ */ r.jsxs("span", { className: "bitflow-visually-hidden", children: [
231
231
  " ",
232
232
  u(j ? "matchRight" : "matchWrong")
233
233
  ] })
@@ -236,9 +236,9 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
236
236
  ) }, a);
237
237
  };
238
238
  return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-matching", children: [
239
- /* @__PURE__ */ r.jsx("p", { className: "bitflow-hint", children: u(y ? "howToReadonly" : "howTo") }),
239
+ /* @__PURE__ */ r.jsx("p", { className: "bitflow-hint", children: u(k ? "howToReadonly" : "howTo") }),
240
240
  /* @__PURE__ */ r.jsxs("div", { className: "bitflow-matching-columns", ref: b, children: [
241
- /* @__PURE__ */ r.jsx("svg", { className: "bitflow-matching-lines", "aria-hidden": "true", children: U.map((e) => /* @__PURE__ */ r.jsx(
241
+ /* @__PURE__ */ r.jsx("svg", { className: "bitflow-matching-lines", "aria-hidden": "true", children: Q.map((e) => /* @__PURE__ */ r.jsx(
242
242
  "line",
243
243
  {
244
244
  className: e.correct === void 0 ? "bitflow-matching-line" : `bitflow-matching-line bitflow-matching-line-${e.correct ? "correct" : "wrong"}`,
@@ -253,14 +253,14 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
253
253
  /* @__PURE__ */ r.jsx("h3", { className: "bitflow-label", children: u("leftHeading") }),
254
254
  /* @__PURE__ */ r.jsx("ul", { className: "bitflow-matching-column", children: l.map((e) => {
255
255
  const a = p(e);
256
- return a ? W(a.left, e, "left") : null;
256
+ return a ? D(a.left, e, "left") : null;
257
257
  }) })
258
258
  ] }),
259
259
  /* @__PURE__ */ r.jsxs("section", { children: [
260
260
  /* @__PURE__ */ r.jsx("h3", { className: "bitflow-label", children: u("rightHeading") }),
261
261
  /* @__PURE__ */ r.jsx("ul", { className: "bitflow-matching-column", children: h.map((e) => {
262
262
  const a = p(e);
263
- return a ? W(a.right, e, "right") : null;
263
+ return a ? D(a.right, e, "right") : null;
264
264
  }) })
265
265
  ] })
266
266
  ] }),
@@ -308,7 +308,7 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
308
308
  unnamedPair: "Leeres Paar",
309
309
  pairSummary: "{left} → {right}"
310
310
  }
311
- }, Y = (t, l) => {
311
+ }, q = (t, l) => {
312
312
  const h = xe(ve(l)), s = [...t];
313
313
  for (let n = s.length - 1; n > 0; n--) {
314
314
  const o = Math.floor(h() * (n + 1));
@@ -324,21 +324,21 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
324
324
  t |= 0, t = t + 1831565813 | 0;
325
325
  let l = Math.imul(t ^ t >>> 15, 1 | t);
326
326
  return l = l + Math.imul(l ^ l >>> 7, 61 | l) ^ l, ((l ^ l >>> 14) >>> 0) / 4294967296;
327
- }, ye = ({
327
+ }, ke = ({
328
328
  data: t,
329
329
  answer: l,
330
330
  result: h,
331
331
  readonly: s,
332
332
  locale: n,
333
333
  attempt: o,
334
- onAnswerChange: y
334
+ onAnswerChange: k
335
335
  }) => {
336
336
  const g = t.pairs.map((c) => c.id), u = o?.attemptId ?? "bitflow", i = x.useMemo(
337
- () => Y(g, `${u}:left`),
337
+ () => q(g, `${u}:left`),
338
338
  // eslint-disable-next-line react-hooks/exhaustive-deps
339
339
  [g.join(), u]
340
340
  ), d = x.useMemo(
341
- () => Y(g, `${u}:right`),
341
+ () => q(g, `${u}:right`),
342
342
  // eslint-disable-next-line react-hooks/exhaustive-deps
343
343
  [g.join(), u]
344
344
  ), w = (l?.matches ?? []).filter(
@@ -356,11 +356,11 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
356
356
  results: h?.detail?.matches,
357
357
  locale: n,
358
358
  readonly: s,
359
- onChange: (c) => y({ matches: c })
359
+ onChange: (c) => k({ matches: c })
360
360
  }
361
361
  )
362
362
  ] });
363
- }, ke = (t) => {
363
+ }, ye = (t) => {
364
364
  for (let l = t.length + 1; ; l++) {
365
365
  const h = `pair-${l}`;
366
366
  if (!t.includes(h)) return h;
@@ -371,7 +371,7 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
371
371
  onChange: h,
372
372
  errors: s
373
373
  }) => {
374
- const n = (i, d) => P(pe, i, l, d), o = (i) => h({ ...t, ...i }), y = re(t.pairs.map((i) => i.id)), g = (i, d, w) => o({
374
+ const n = (i, d) => L(pe, i, l, d), o = (i) => h({ ...t, ...i }), k = re(t.pairs.map((i) => i.id)), g = (i, d, w) => o({
375
375
  pairs: t.pairs.map(
376
376
  (c) => c.id === i ? { ...c, [d]: { ...c[d], ...w } } : c
377
377
  )
@@ -436,9 +436,9 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
436
436
  z(s, "pairs") && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: z(s, "pairs") }),
437
437
  t.pairs.length === 0 && /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: n("noPairs") }),
438
438
  t.pairs.map((i, d) => /* @__PURE__ */ r.jsx("div", { className: "bitflow-rule", children: /* @__PURE__ */ r.jsxs(
439
- q,
439
+ G,
440
440
  {
441
- ...y.props(i.id),
441
+ ...k.props(i.id),
442
442
  summary: i.left.label || i.right.label ? n("pairSummary", {
443
443
  left: i.left.label || "…",
444
444
  right: i.right.label || "…"
@@ -469,7 +469,7 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
469
469
  pairs: [
470
470
  ...t.pairs,
471
471
  {
472
- id: ke(t.pairs.map((i) => i.id)),
472
+ id: ye(t.pairs.map((i) => i.id)),
473
473
  left: { kind: "text", label: "" },
474
474
  right: { kind: "text", label: "" }
475
475
  }
@@ -479,7 +479,7 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
479
479
  }
480
480
  )
481
481
  ] }),
482
- /* @__PURE__ */ r.jsx(q, { summary: n("advanced"), children: /* @__PURE__ */ r.jsx(
482
+ /* @__PURE__ */ r.jsx(G, { summary: n("advanced"), children: /* @__PURE__ */ r.jsx(
483
483
  le,
484
484
  {
485
485
  evaluation: t.evaluation,
@@ -488,25 +488,25 @@ const ue = ".bitflow-matching{display:flex;flex-direction:column;gap:var(--bitfl
488
488
  }
489
489
  ) })
490
490
  ] });
491
- }, Q = "task-matching";
491
+ }, _ = "task-matching";
492
492
  ae({
493
- type: Q,
493
+ type: _,
494
494
  kind: "task",
495
495
  schema: ge,
496
496
  evaluate: me,
497
- Task: ye,
497
+ Task: ke,
498
498
  Form: je,
499
499
  info: (t) => ({
500
- name: P(S, "name", t),
501
- description: P(S, "description", t)
500
+ name: L(R, "name", t),
501
+ description: L(R, "description", t)
502
502
  }),
503
503
  defaultData: () => ({
504
504
  instruction: "",
505
505
  pairs: [],
506
- evaluation: _()
506
+ evaluation: Z()
507
507
  })
508
508
  });
509
- he(Q);
509
+ he(_);
510
510
  ie("bitflow-styles-task-matching", ue);
511
511
  export {
512
512
  ze as AnswerSchema,
@@ -515,12 +515,12 @@ export {
515
515
  je as Form,
516
516
  be as MatchSchema,
517
517
  fe as PairSchema,
518
- G as SideSchema,
519
- Q as TYPE,
520
- ye as Task,
518
+ Y as SideSchema,
519
+ _ as TYPE,
520
+ ke as Task,
521
521
  me as evaluate,
522
522
  pe as formMessages,
523
- F as isRight,
524
- S as messages,
525
- Y as seededShuffle
523
+ U as isRight,
524
+ R as messages,
525
+ q as seededShuffle
526
526
  };
@@ -1,6 +1,6 @@
1
- import { L as v, a9 as g, a2 as r, j as n, a as k, b as o, s as L, aa as y } from "./dom-uYx_3K1r.js";
2
- import { y as m, v as j, M as x, L as A, R as H } from "./bitLoaders-DIGwTcpd.js";
3
- const N = ".bitflow-download-state{margin:0;min-height:var(--bitflow-space-small);font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}", h = {
1
+ import { P as v, a9 as g, a2 as r, j as n, a as k, b as o, s as y, aa as L } from "./dom-B6NPWBb1.js";
2
+ import { C as m, e as j, F as x, U as A, H } from "./bitLoaders-7qanePQL.js";
3
+ const F = ".bitflow-download-state{margin:0;min-height:var(--bitflow-space-small);font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}", h = {
4
4
  en: {
5
5
  name: "Finish and save",
6
6
  description: "Closing screen that lets the learner save their attempt as a file.",
@@ -73,7 +73,7 @@ const N = ".bitflow-download-state{margin:0;min-height:var(--bitflow-space-small
73
73
  saved: "{filename} olarak kaydedildi.",
74
74
  failed: "Dosya kaydedilemedi."
75
75
  }
76
- }, F = v({
76
+ }, N = v({
77
77
  title: r().default(""),
78
78
  markdown: r().default(""),
79
79
  /** Leave empty for the wording this bit ships with. */
@@ -208,12 +208,12 @@ const N = ".bitflow-download-state{margin:0;min-height:var(--bitflow-space-small
208
208
  )
209
209
  ] });
210
210
  };
211
- L("bitflow-styles-end-download", N);
211
+ y("bitflow-styles-end-download", F);
212
212
  const w = "end-download";
213
- y({
213
+ L({
214
214
  type: w,
215
215
  kind: "end",
216
- schema: F,
216
+ schema: N,
217
217
  Task: z,
218
218
  Form: D,
219
219
  info: (e) => ({
@@ -230,7 +230,7 @@ y({
230
230
  });
231
231
  H(w);
232
232
  export {
233
- F as DataSchema,
233
+ N as DataSchema,
234
234
  D as Form,
235
235
  w as TYPE,
236
236
  z as Task,