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.
- package/dist/asset-manifest.json +9 -9
- package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-BNwEKIvk.js} +258 -258
- package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
- package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
- package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
- package/dist/assets/directive-bitflow/editor.js +3 -3
- package/dist/assets/directive-bitflow/flow.js +4 -4
- package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
- package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
- package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
- package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
- package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
- package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
- package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
- package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
- package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
- package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
- package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
- package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
- package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
- package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
- package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
- package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
- package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
- package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
- package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
- package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
- package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
- package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
- package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
- package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
- package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
- package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
- package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
- package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
- package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
- package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
- package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
- package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
- package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
- package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
- package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
- package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
- package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
- package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
- package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
- package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
- package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
- package/dist/assets/directive-bitflow/index.js +6 -6
- package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
- package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
- package/dist/assets/directive-bitflow/report.js +1 -1
- package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-mdyEMdsJ.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as S, a4 as q, ac as ce, ad as J, a9 as W, Y as L, am as he, a2 as C, a as p, j as n, a5 as Q, b as z, s as ue, aa as be } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { $ as me, e as Z, h as ge, g as M, M as O, i as G, P as U, C as fe, F as Y, r as D, B as we, U as pe, y as V, H as xe } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const I = (e) => ({
|
|
4
4
|
x: e.x,
|
|
5
5
|
y: e.y,
|
|
@@ -119,9 +119,9 @@ const I = (e) => ({
|
|
|
119
119
|
verdictStray: "Hier ist nichts",
|
|
120
120
|
missed: "Nicht markiert: {label}"
|
|
121
121
|
}
|
|
122
|
-
},
|
|
122
|
+
}, Ce = ".bitflow-annotate{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-annotate-picture{position:relative;width:100%;border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);overflow:hidden;background:var(--bitflow-color-surface);touch-action:manipulation}.bitflow-annotate-picture-drag{touch-action:none}.bitflow-annotate-image{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-select:none;user-select:none}.bitflow-annotate-noimage{background:repeating-linear-gradient(45deg,var(--bitflow-color-neutral-100),var(--bitflow-color-neutral-100) 10px,var(--bitflow-color-surface) 10px,var(--bitflow-color-surface) 20px)}.bitflow-annotate-surface{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:crosshair}.bitflow-annotate-surface:disabled{cursor:default}.bitflow-annotate-aim{position:absolute;width:var(--bitflow-annotate-aim-size, 1.5rem);height:var(--bitflow-annotate-aim-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);pointer-events:none;opacity:0;background:linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / var(--bitflow-border-width) 100% no-repeat,linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / 100% var(--bitflow-border-width) no-repeat}.bitflow-annotate-surface:focus-visible~.bitflow-annotate-aim{opacity:1}.bitflow-annotate-mark{position:absolute;pointer-events:none;border:var(--bitflow-border-width) solid var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 15%,transparent)}.bitflow-annotate-mark-point{width:var(--bitflow-annotate-mark-size, 1.5rem);height:var(--bitflow-annotate-mark-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);border-radius:var(--bitflow-radius-full)}.bitflow-annotate-number{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-bold);color:var(--bitflow-color-primary)}.bitflow-annotate-mark-right{border-color:var(--bitflow-color-correct);background:color-mix(in srgb,var(--bitflow-color-correct) 20%,transparent)}.bitflow-annotate-mark-named-wrong{border-color:var(--bitflow-color-warning);border-style:dashed}.bitflow-annotate-mark-stray{border-color:var(--bitflow-color-wrong);border-style:dashed}.bitflow-annotate-drawing{border-style:dashed}.bitflow-annotate-region{position:absolute;border:var(--bitflow-border-width) dashed var(--bitflow-color-correct);background:transparent;pointer-events:none}.bitflow-annotate-editor .bitflow-annotate-region{pointer-events:auto;cursor:move;padding:0;border-style:solid;border-color:var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 10%,transparent)}.bitflow-annotate-editor{cursor:crosshair}.bitflow-annotate-region-selected{border-color:var(--bitflow-color-primary-dark);background:color-mix(in srgb,var(--bitflow-color-primary) 25%,transparent)}.bitflow-annotate-region-name{position:absolute;left:0;bottom:100%;padding:0 var(--bitflow-space-xxsmall);font-size:var(--bitflow-font-size-small);white-space:nowrap;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-list,.bitflow-annotate-missed{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-annotate-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-row-where{font-variant-numeric:tabular-nums}.bitflow-annotate-row>.bitflow-input{flex:1 1 var(--bitflow-annotate-name-min, 8rem);min-width:0}.bitflow-annotate-verdict{color:var(--bitflow-color-text-muted)}", N = L().min(0).max(1), te = ["point", "rect"], ae = Q(te), Se = S({
|
|
123
123
|
/** Stable across edits, so an outcome keeps pointing at the same region. */
|
|
124
|
-
id:
|
|
124
|
+
id: C().min(1),
|
|
125
125
|
/**
|
|
126
126
|
* Where the answer is. A circle for "mark the point"; a rectangle for
|
|
127
127
|
* "outline the area". Both are what *counts*, not what is asked for — the
|
|
@@ -139,17 +139,17 @@ const I = (e) => ({
|
|
|
139
139
|
* Names what is here. Shown once the answer is in, and used by whoever
|
|
140
140
|
* cannot see the picture — so it is written for a reader, not as a key.
|
|
141
141
|
*/
|
|
142
|
-
label:
|
|
142
|
+
label: C().default(""),
|
|
143
143
|
/**
|
|
144
144
|
* Spellings the learner may write when a label is asked for. The region's
|
|
145
145
|
* own `label` always counts, so this is for synonyms.
|
|
146
146
|
*/
|
|
147
|
-
acceptedLabels: q(
|
|
148
|
-
}),
|
|
149
|
-
instruction:
|
|
147
|
+
acceptedLabels: q(C()).default([])
|
|
148
|
+
}), ze = S({
|
|
149
|
+
instruction: C().default(""),
|
|
150
150
|
background: he.default({ src: "", alt: "" }),
|
|
151
151
|
/** The shape of the picture, so the marks keep their proportions. */
|
|
152
|
-
size:
|
|
152
|
+
size: S({
|
|
153
153
|
width: L().positive().default(620),
|
|
154
154
|
height: L().positive().default(310)
|
|
155
155
|
}).default({ width: 620, height: 310 }),
|
|
@@ -163,7 +163,7 @@ const I = (e) => ({
|
|
|
163
163
|
maximumCount: L().int().min(1).default(1),
|
|
164
164
|
/** Whether each mark has to be named as well as placed. */
|
|
165
165
|
requireLabel: W().default(!1),
|
|
166
|
-
regions: q(
|
|
166
|
+
regions: q(Se).default([]),
|
|
167
167
|
/**
|
|
168
168
|
* How close a `rect` answer has to be to a `rect` region, as a fraction of
|
|
169
169
|
* the two boxes' union — the Jaccard overlap. 0.5 is "half right", which
|
|
@@ -223,18 +223,18 @@ const I = (e) => ({
|
|
|
223
223
|
path: ["maximumCount"],
|
|
224
224
|
message: `There are ${r.length} regions but only ${l} mark(s) allowed, so the task cannot be completed.`
|
|
225
225
|
}));
|
|
226
|
-
}),
|
|
226
|
+
}), Re = S({
|
|
227
227
|
/** Stable while the learner works, so a mark can be moved and removed. */
|
|
228
|
-
id:
|
|
228
|
+
id: C().min(1),
|
|
229
229
|
kind: ae.default("point"),
|
|
230
230
|
x: N,
|
|
231
231
|
y: N,
|
|
232
232
|
/** Only for a `rect` mark. */
|
|
233
233
|
width: N.default(0),
|
|
234
234
|
height: N.default(0),
|
|
235
|
-
label:
|
|
236
|
-
}),
|
|
237
|
-
annotations: q(
|
|
235
|
+
label: C().default("")
|
|
236
|
+
}), Fe = S({
|
|
237
|
+
annotations: q(Re).default([])
|
|
238
238
|
}), Ee = 0.01, He = 0.05, Pe = 0.02, $ = (e) => Math.min(1, Math.max(0, e));
|
|
239
239
|
let $e = 0;
|
|
240
240
|
const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be = ({
|
|
@@ -245,13 +245,13 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
245
245
|
readonly: a,
|
|
246
246
|
onAnswerChange: h
|
|
247
247
|
}) => {
|
|
248
|
-
const d = (i, o) =>
|
|
248
|
+
const d = (i, o) => z(X, i, l, o), f = p.useRef(null), [g, j] = p.useState({ x: 0.5, y: 0.5 }), [w, k] = p.useState(), [b, t] = p.useState(""), s = p.useRef(void 0), m = p.useRef(!1), [v, R] = p.useState(), y = r?.annotations ?? [], E = c !== void 0, K = y.length >= e.maximumCount, H = p.useCallback((i, o) => {
|
|
249
249
|
const u = f.current?.getBoundingClientRect();
|
|
250
250
|
return !u || u.width === 0 || u.height === 0 ? null : {
|
|
251
251
|
x: $((i - u.left) / u.width),
|
|
252
252
|
y: $((o - u.top) / u.height)
|
|
253
253
|
};
|
|
254
|
-
}, []),
|
|
254
|
+
}, []), F = (i) => {
|
|
255
255
|
if (a || K) return;
|
|
256
256
|
const o = { ...i, id: Ae() };
|
|
257
257
|
h({ annotations: [...y, o] }), t(
|
|
@@ -271,10 +271,10 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
271
271
|
)
|
|
272
272
|
}), P = (i, o) => {
|
|
273
273
|
if (e.annotationKind === "point" || !o) {
|
|
274
|
-
|
|
274
|
+
F({ kind: "point", x: i.x, y: i.y, width: 0, height: 0, label: "" });
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
F({
|
|
278
278
|
kind: "rect",
|
|
279
279
|
x: Math.min(i.x, o.x),
|
|
280
280
|
y: Math.min(i.y, o.y),
|
|
@@ -289,7 +289,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
289
289
|
const o = H(i.clientX, i.clientY);
|
|
290
290
|
if (!o) return;
|
|
291
291
|
const { fromX: u, fromY: x } = s.current;
|
|
292
|
-
Math.hypot(o.x - u, o.y - x) > Pe && (m.current = !0), m.current && e.annotationKind === "rect" &&
|
|
292
|
+
Math.hypot(o.x - u, o.y - x) > Pe && (m.current = !0), m.current && e.annotationKind === "rect" && R({
|
|
293
293
|
x: Math.min(u, o.x),
|
|
294
294
|
y: Math.min(x, o.y),
|
|
295
295
|
width: Math.abs(o.x - u),
|
|
@@ -298,7 +298,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
298
298
|
},
|
|
299
299
|
(i) => {
|
|
300
300
|
const o = s.current;
|
|
301
|
-
if (s.current = void 0,
|
|
301
|
+
if (s.current = void 0, R(void 0), !o || !m.current) return;
|
|
302
302
|
const u = H(i.clientX, i.clientY);
|
|
303
303
|
u && e.annotationKind === "rect" && P({ x: o.fromX, y: o.fromY }, u);
|
|
304
304
|
}
|
|
@@ -331,7 +331,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
333
|
P(w, g), k(void 0);
|
|
334
|
-
},
|
|
334
|
+
}, T = (i) => c?.find((o) => o.annotationId === i);
|
|
335
335
|
return /* @__PURE__ */ n.jsxs("div", { className: "bitflow-annotate", children: [
|
|
336
336
|
/* @__PURE__ */ n.jsxs(
|
|
337
337
|
"div",
|
|
@@ -368,7 +368,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
368
368
|
);
|
|
369
369
|
}),
|
|
370
370
|
y.map((i, o) => {
|
|
371
|
-
const u = I(i), x =
|
|
371
|
+
const u = I(i), x = T(i.id), de = E ? x && !x.labelWrong ? " bitflow-annotate-mark-right" : x ? " bitflow-annotate-mark-named-wrong" : " bitflow-annotate-mark-stray" : "";
|
|
372
372
|
return /* @__PURE__ */ n.jsx(
|
|
373
373
|
"span",
|
|
374
374
|
{
|
|
@@ -448,7 +448,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
448
448
|
/* @__PURE__ */ n.jsxs("ul", { className: "bitflow-annotate-list", children: [
|
|
449
449
|
y.length === 0 && /* @__PURE__ */ n.jsx("li", { className: "bitflow-text-muted", children: d("nothingPlaced") }),
|
|
450
450
|
y.map((i, o) => {
|
|
451
|
-
const u =
|
|
451
|
+
const u = T(i.id);
|
|
452
452
|
return /* @__PURE__ */ n.jsxs("li", { className: "bitflow-annotate-row", children: [
|
|
453
453
|
/* @__PURE__ */ n.jsx("span", { className: "bitflow-annotate-row-where", children: d(i.kind === "rect" ? "markBox" : "markPoint", {
|
|
454
454
|
number: o + 1,
|
|
@@ -567,7 +567,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
567
567
|
advanced: "Erweitert",
|
|
568
568
|
previewHint: "Das Bild, wie Lernende es sehen, mit eingezeichneten Bereichen. Ihnen werden die Bereiche erst nach der Abgabe gezeigt."
|
|
569
569
|
}
|
|
570
|
-
}, A = (e) => Math.min(1, Math.max(0, e)),
|
|
570
|
+
}, A = (e) => Math.min(1, Math.max(0, e)), _ = 0.02, Ke = ({
|
|
571
571
|
data: e,
|
|
572
572
|
locale: r,
|
|
573
573
|
selectedId: c,
|
|
@@ -575,7 +575,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
575
575
|
onDraw: a,
|
|
576
576
|
onMove: h
|
|
577
577
|
}) => {
|
|
578
|
-
const d = (b) =>
|
|
578
|
+
const d = (b) => z(ne, b, r), f = p.useRef(null), [g, j] = p.useState(), w = p.useRef(void 0), k = p.useCallback((b, t) => {
|
|
579
579
|
const s = f.current?.getBoundingClientRect();
|
|
580
580
|
return !s || s.width === 0 || s.height === 0 ? null : {
|
|
581
581
|
x: A((b - s.left) / s.width),
|
|
@@ -607,7 +607,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
607
607
|
const b = w.current;
|
|
608
608
|
w.current = void 0;
|
|
609
609
|
const t = g;
|
|
610
|
-
j(void 0), !(b?.kind !== "draw" || !t) && (t.width <
|
|
610
|
+
j(void 0), !(b?.kind !== "draw" || !t) && (t.width < _ || t.height < _ || a(t));
|
|
611
611
|
}
|
|
612
612
|
), /* @__PURE__ */ n.jsxs(
|
|
613
613
|
"div",
|
|
@@ -696,7 +696,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
696
696
|
height: r.height,
|
|
697
697
|
label: "",
|
|
698
698
|
acceptedLabels: []
|
|
699
|
-
},
|
|
699
|
+
}, Ye = ({
|
|
700
700
|
data: e,
|
|
701
701
|
answer: r,
|
|
702
702
|
result: c,
|
|
@@ -716,7 +716,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
716
716
|
onAnswerChange: h
|
|
717
717
|
}
|
|
718
718
|
)
|
|
719
|
-
] }),
|
|
719
|
+
] }), De = (e) => {
|
|
720
720
|
for (let r = e.length + 1; ; r++) {
|
|
721
721
|
const c = `region-${r}`;
|
|
722
722
|
if (!e.includes(c)) return c;
|
|
@@ -727,14 +727,14 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
727
727
|
onChange: c,
|
|
728
728
|
errors: l
|
|
729
729
|
}) => {
|
|
730
|
-
const a = (t, s) =>
|
|
730
|
+
const a = (t, s) => z(ne, t, r, s), h = (t) => c({ ...e, ...t }), [d, f] = p.useState(), g = me(e.regions.map((t) => t.id)), j = (t) => {
|
|
731
731
|
f(t), t && g.open(t);
|
|
732
732
|
}, w = (t, s) => h({
|
|
733
733
|
regions: e.regions.map(
|
|
734
734
|
(m) => m.id === t ? { ...m, ...s } : m
|
|
735
735
|
)
|
|
736
736
|
}), k = (t) => {
|
|
737
|
-
const s =
|
|
737
|
+
const s = De(e.regions.map((v) => v.id)), m = We(s, t, e.annotationKind === "rect" ? "rect" : "circle");
|
|
738
738
|
h({
|
|
739
739
|
regions: [...e.regions, m],
|
|
740
740
|
// A task nobody can finish is not what the author just asked for, so
|
|
@@ -742,7 +742,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
742
742
|
// problem the next click would have avoided.
|
|
743
743
|
maximumCount: Math.max(e.maximumCount, e.regions.length + 1)
|
|
744
744
|
}), j(s);
|
|
745
|
-
}, b = (t, s, m) => /* @__PURE__ */ n.jsx(
|
|
745
|
+
}, b = (t, s, m) => /* @__PURE__ */ n.jsx(D, { label: m, children: (v) => /* @__PURE__ */ n.jsx(
|
|
746
746
|
"input",
|
|
747
747
|
{
|
|
748
748
|
...v,
|
|
@@ -752,14 +752,14 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
752
752
|
max: 100,
|
|
753
753
|
step: 1,
|
|
754
754
|
value: Math.round(t[s] * 100),
|
|
755
|
-
onChange: (
|
|
756
|
-
[s]: Math.min(1, Math.max(0, Number(
|
|
755
|
+
onChange: (R) => w(t.id, {
|
|
756
|
+
[s]: Math.min(1, Math.max(0, Number(R.target.value) / 100))
|
|
757
757
|
})
|
|
758
758
|
}
|
|
759
759
|
) });
|
|
760
760
|
return /* @__PURE__ */ n.jsxs("div", { className: "bitflow-stack", children: [
|
|
761
761
|
/* @__PURE__ */ n.jsx(
|
|
762
|
-
|
|
762
|
+
Z,
|
|
763
763
|
{
|
|
764
764
|
label: a("instructionLabel"),
|
|
765
765
|
hint: a("instructionHint"),
|
|
@@ -810,14 +810,14 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
810
810
|
/* @__PURE__ */ n.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
811
811
|
/* @__PURE__ */ n.jsx("legend", { className: "bitflow-label", children: a("regionsLabel") }),
|
|
812
812
|
/* @__PURE__ */ n.jsx("span", { className: "bitflow-hint", children: a("regionsHint") }),
|
|
813
|
-
|
|
813
|
+
G(l, "regions") && /* @__PURE__ */ n.jsx("span", { className: "bitflow-field-error", role: "alert", children: G(l, "regions") }),
|
|
814
814
|
e.regions.length === 0 && /* @__PURE__ */ n.jsx("p", { className: "bitflow-text-muted", children: a("noRegions") }),
|
|
815
815
|
e.regions.map((t, s) => /* @__PURE__ */ n.jsx(
|
|
816
816
|
"div",
|
|
817
817
|
{
|
|
818
818
|
className: d === t.id ? "bitflow-rule bitflow-rule-selected" : "bitflow-rule",
|
|
819
819
|
children: /* @__PURE__ */ n.jsxs(
|
|
820
|
-
|
|
820
|
+
U,
|
|
821
821
|
{
|
|
822
822
|
...g.props(t.id),
|
|
823
823
|
summary: t.label || a("unnamedRegion"),
|
|
@@ -858,7 +858,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
858
858
|
] }),
|
|
859
859
|
M(l, `regions.${s}`) && /* @__PURE__ */ n.jsx("span", { className: "bitflow-field-error", role: "alert", children: M(l, `regions.${s}`) }),
|
|
860
860
|
e.requireLabel && /* @__PURE__ */ n.jsx(
|
|
861
|
-
|
|
861
|
+
Z,
|
|
862
862
|
{
|
|
863
863
|
label: a("acceptedLabels"),
|
|
864
864
|
hint: a("acceptedLabelsHint"),
|
|
@@ -901,7 +901,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
901
901
|
) })
|
|
902
902
|
] }),
|
|
903
903
|
/* @__PURE__ */ n.jsx(
|
|
904
|
-
|
|
904
|
+
Y,
|
|
905
905
|
{
|
|
906
906
|
label: a("requireLabelLabel"),
|
|
907
907
|
hint: a("requireLabelHint"),
|
|
@@ -909,9 +909,9 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
909
909
|
onChange: (t) => h({ requireLabel: t })
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
|
-
/* @__PURE__ */ n.jsxs(
|
|
912
|
+
/* @__PURE__ */ n.jsxs(U, { summary: a("advanced"), children: [
|
|
913
913
|
/* @__PURE__ */ n.jsx(
|
|
914
|
-
|
|
914
|
+
D,
|
|
915
915
|
{
|
|
916
916
|
label: a("countLabel"),
|
|
917
917
|
hint: a("countHint"),
|
|
@@ -932,7 +932,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
932
932
|
)
|
|
933
933
|
}
|
|
934
934
|
),
|
|
935
|
-
e.annotationKind === "rect" && /* @__PURE__ */ n.jsx(
|
|
935
|
+
e.annotationKind === "rect" && /* @__PURE__ */ n.jsx(D, { label: a("overlapLabel"), hint: a("overlapHint"), children: (t) => /* @__PURE__ */ n.jsx(
|
|
936
936
|
"input",
|
|
937
937
|
{
|
|
938
938
|
...t,
|
|
@@ -951,7 +951,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
951
951
|
}
|
|
952
952
|
) }),
|
|
953
953
|
/* @__PURE__ */ n.jsx(
|
|
954
|
-
|
|
954
|
+
Y,
|
|
955
955
|
{
|
|
956
956
|
label: a("penaliseLabel"),
|
|
957
957
|
hint: a("penaliseHint"),
|
|
@@ -960,7 +960,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
960
960
|
}
|
|
961
961
|
),
|
|
962
962
|
e.requireLabel && /* @__PURE__ */ n.jsx(
|
|
963
|
-
|
|
963
|
+
Y,
|
|
964
964
|
{
|
|
965
965
|
label: a("caseSensitiveLabel"),
|
|
966
966
|
checked: e.caseSensitive,
|
|
@@ -978,18 +978,18 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
|
|
|
978
978
|
] })
|
|
979
979
|
] });
|
|
980
980
|
};
|
|
981
|
-
ue("bitflow-styles-task-image-annotation",
|
|
981
|
+
ue("bitflow-styles-task-image-annotation", Ce);
|
|
982
982
|
const ie = "task-image-annotation";
|
|
983
983
|
be({
|
|
984
984
|
type: ie,
|
|
985
985
|
kind: "task",
|
|
986
|
-
schema:
|
|
986
|
+
schema: ze,
|
|
987
987
|
evaluate: Le,
|
|
988
|
-
Task:
|
|
988
|
+
Task: Ye,
|
|
989
989
|
Form: Ie,
|
|
990
990
|
info: (e) => ({
|
|
991
|
-
name:
|
|
992
|
-
description:
|
|
991
|
+
name: z(X, "name", e),
|
|
992
|
+
description: z(X, "description", e)
|
|
993
993
|
}),
|
|
994
994
|
defaultData: () => ({
|
|
995
995
|
instruction: "",
|
|
@@ -1007,11 +1007,11 @@ be({
|
|
|
1007
1007
|
});
|
|
1008
1008
|
xe(ie);
|
|
1009
1009
|
export {
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
Fe as AnswerSchema,
|
|
1011
|
+
ze as DataSchema,
|
|
1012
1012
|
Ie as Form,
|
|
1013
1013
|
ie as TYPE,
|
|
1014
|
-
|
|
1014
|
+
Ye as Task,
|
|
1015
1015
|
Le as evaluate,
|
|
1016
1016
|
ne as formMessages,
|
|
1017
1017
|
Me as lands,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as k, ak as z, a2 as j, a9 as E, ac as U, ad as M, a5 as _, a4 as P, a as $, j as r, b as y, an as G, ao as J, a6 as N, s as K, aa as Q } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as F, g as H, i as W, F as V, P as X, M as Y, B as ee, U as te, H as ae } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const S = {
|
|
4
4
|
iff: ["<->", "<=>", "↔", "≡", "iff", "xnor"],
|
|
5
5
|
implies: ["->", "=>", "→", "⊃", "implies"],
|
|
@@ -7,7 +7,7 @@ const S = {
|
|
|
7
7
|
xor: ["⊕", "^", "xor"],
|
|
8
8
|
and: ["&&", "∧", "&", "·", "*", "and"],
|
|
9
9
|
not: ["¬", "!", "~", "not"]
|
|
10
|
-
},
|
|
10
|
+
}, C = /* @__PURE__ */ new Map([
|
|
11
11
|
["1", !0],
|
|
12
12
|
["0", !1],
|
|
13
13
|
["true", !0],
|
|
@@ -44,17 +44,17 @@ const S = {
|
|
|
44
44
|
const c = /^[\p{L}_][\p{L}\p{N}_]*/u.exec(n);
|
|
45
45
|
if (c) {
|
|
46
46
|
const f = c[0], v = f.toLowerCase(), x = Object.keys(S).find((u) => S[u].includes(v));
|
|
47
|
-
x ? t.push({ kind: "op", op: x }) :
|
|
47
|
+
x ? t.push({ kind: "op", op: x }) : C.has(v) ? t.push({ kind: "constant", value: C.get(v) }) : t.push({ kind: "name", name: f }), l += f.length;
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
if (
|
|
51
|
-
t.push({ kind: "constant", value:
|
|
50
|
+
if (C.has(n[0])) {
|
|
51
|
+
t.push({ kind: "constant", value: C.get(n[0]) }), l += 1;
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
return `“${s}” does not mean anything here.`;
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
|
-
},
|
|
57
|
+
}, B = (e) => {
|
|
58
58
|
const t = le(e);
|
|
59
59
|
if (typeof t == "string") return { ok: !1, error: t };
|
|
60
60
|
if (t.length === 0) return { ok: !1, error: "Write an expression." };
|
|
@@ -94,7 +94,7 @@ const S = {
|
|
|
94
94
|
xor: "⊕",
|
|
95
95
|
implies: "→",
|
|
96
96
|
iff: "↔"
|
|
97
|
-
},
|
|
97
|
+
}, R = {
|
|
98
98
|
iff: 1,
|
|
99
99
|
implies: 2,
|
|
100
100
|
or: 3,
|
|
@@ -106,7 +106,7 @@ const S = {
|
|
|
106
106
|
}, g = (e) => {
|
|
107
107
|
const t = (l, o) => {
|
|
108
108
|
const n = g(l);
|
|
109
|
-
return
|
|
109
|
+
return R[l.kind] < o ? `(${n})` : n;
|
|
110
110
|
};
|
|
111
111
|
switch (e.kind) {
|
|
112
112
|
case "variable":
|
|
@@ -114,9 +114,9 @@ const S = {
|
|
|
114
114
|
case "constant":
|
|
115
115
|
return e.value ? "1" : "0";
|
|
116
116
|
case "not":
|
|
117
|
-
return `¬${t(e.value,
|
|
117
|
+
return `¬${t(e.value, R.not)}`;
|
|
118
118
|
default: {
|
|
119
|
-
const l =
|
|
119
|
+
const l = R[e.kind], o = ne[e.kind];
|
|
120
120
|
return `${t(e.left, l)} ${o} ${t(
|
|
121
121
|
e.right,
|
|
122
122
|
l + 1
|
|
@@ -158,16 +158,16 @@ const S = {
|
|
|
158
158
|
case "iff":
|
|
159
159
|
return w(e.left, t) === w(e.right, t);
|
|
160
160
|
}
|
|
161
|
-
},
|
|
162
|
-
() =>
|
|
161
|
+
}, A = G(
|
|
162
|
+
() => J([
|
|
163
163
|
k({ kind: N("variable"), name: j().min(1) }),
|
|
164
164
|
k({ kind: N("constant"), value: E() }),
|
|
165
|
-
k({ kind: N("not"), value:
|
|
165
|
+
k({ kind: N("not"), value: A }),
|
|
166
166
|
...["and", "or", "xor", "implies", "iff"].map(
|
|
167
167
|
(e) => k({
|
|
168
168
|
kind: N(e),
|
|
169
|
-
left:
|
|
170
|
-
right:
|
|
169
|
+
left: A,
|
|
170
|
+
right: A
|
|
171
171
|
})
|
|
172
172
|
)
|
|
173
173
|
])
|
|
@@ -179,7 +179,7 @@ const S = {
|
|
|
179
179
|
* author usually wants, and what keeps the two from disagreeing.
|
|
180
180
|
*/
|
|
181
181
|
label: j().default(""),
|
|
182
|
-
expression:
|
|
182
|
+
expression: A,
|
|
183
183
|
/**
|
|
184
184
|
* Filled in already, as a worked step rather than a question. A table that
|
|
185
185
|
* builds up to something is taught by giving away the early columns.
|
|
@@ -200,10 +200,10 @@ const S = {
|
|
|
200
200
|
* with the first variable changing slowest, which is the same thing said
|
|
201
201
|
* the other way and is what most textbooks print.
|
|
202
202
|
*/
|
|
203
|
-
rowOrder:
|
|
203
|
+
rowOrder: _(["standard", "reversed"]).default("standard"),
|
|
204
204
|
/** A point per cell instead of one for the whole table. */
|
|
205
205
|
partialCredit: E().default(!0),
|
|
206
|
-
evaluation:
|
|
206
|
+
evaluation: U.default(M)
|
|
207
207
|
}).check((e) => {
|
|
208
208
|
const { variables: t, columns: l, evaluation: o } = e.value;
|
|
209
209
|
new Set(t).size !== t.length && e.issues.push({
|
|
@@ -255,7 +255,7 @@ const S = {
|
|
|
255
255
|
* three-state control has to be able to go back to having no answer, and an
|
|
256
256
|
* absent key would be indistinguishable from a cell never rendered.
|
|
257
257
|
*/
|
|
258
|
-
cells:
|
|
258
|
+
cells: z(j(), z(j(), E().nullable())).default({})
|
|
259
259
|
}), L = (e) => {
|
|
260
260
|
switch (e.kind) {
|
|
261
261
|
case "variable":
|
|
@@ -281,7 +281,7 @@ const S = {
|
|
|
281
281
|
)
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, I = (e, t, l) => e?.cells?.[t]?.[l] ?? null, oe = (e, t, l, o) => ({
|
|
285
285
|
cells: {
|
|
286
286
|
...e?.cells,
|
|
287
287
|
[t]: { ...e?.cells?.[t], [l]: o }
|
|
@@ -296,12 +296,12 @@ const S = {
|
|
|
296
296
|
])
|
|
297
297
|
)
|
|
298
298
|
])
|
|
299
|
-
),
|
|
299
|
+
), Z = (e) => O(e).flatMap(
|
|
300
300
|
(t) => e.columns.filter((l) => !l.given).map((l) => ({ rowId: t.id, columnId: l.id }))
|
|
301
301
|
), ce = (e, t) => {
|
|
302
302
|
const l = ie(e), o = {};
|
|
303
|
-
for (const { rowId: n, columnId: s } of
|
|
304
|
-
const d =
|
|
303
|
+
for (const { rowId: n, columnId: s } of Z(e)) {
|
|
304
|
+
const d = I(t, n, s);
|
|
305
305
|
o[n] ??= {}, o[n][s] = d === null ? "blank" : d === l[n][s] ? "correct" : "wrong";
|
|
306
306
|
}
|
|
307
307
|
return o;
|
|
@@ -311,7 +311,7 @@ const S = {
|
|
|
311
311
|
}) => {
|
|
312
312
|
if (e.evaluation.mode === "skip")
|
|
313
313
|
return { state: "unknown", allowRetry: !1 };
|
|
314
|
-
const l = ce(e, t), o =
|
|
314
|
+
const l = ce(e, t), o = Z(e), n = o.filter(
|
|
315
315
|
({ rowId: d, columnId: c }) => l[d]?.[c] === "correct"
|
|
316
316
|
).length, s = n === o.length && o.length > 0;
|
|
317
317
|
return {
|
|
@@ -363,7 +363,7 @@ const S = {
|
|
|
363
363
|
andValue: " und ",
|
|
364
364
|
isValue: "{name} ist {value}"
|
|
365
365
|
}
|
|
366
|
-
}, de = ".bitflow-truth-scroll{overflow-x:auto}.bitflow-truth-table{border-collapse:collapse;width:auto;min-width:100%}.bitflow-truth-table caption{text-align:left;padding-bottom:var(--bitflow-space-xxsmall)}.bitflow-truth-table th,.bitflow-truth-table td{padding:var(--bitflow-space-xxsmall);border:1px solid var(--bitflow-color-border);text-align:left;vertical-align:middle}.bitflow-truth-table thead th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-medium);white-space:nowrap}.bitflow-truth-input,.bitflow-truth-table tbody th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-standard);font-variant-numeric:tabular-nums;white-space:nowrap}.bitflow-truth-note{display:block;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-standard);color:var(--bitflow-color-text-muted)}.bitflow-truth-cell{padding:var(--bitflow-space-xxsmall)}.bitflow-truth-select{min-height:2.25rem;min-width:var(--bitflow-truth-cell-width, 6rem)}.bitflow-truth-cell-correct .bitflow-select{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-truth-cell-wrong .bitflow-select{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-truth-cell-blank .bitflow-select{border-style:dashed}.bitflow-truth-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-truth-editor-row>.bitflow-input{flex:1 1 var(--bitflow-truth-editor-min, 7rem);min-width:0}.bitflow-truth-expression{font-family:var(--bitflow-font-family-mono)}.bitflow-truth-actions{flex:none;flex-wrap:nowrap}", he = {
|
|
366
|
+
}, de = ".bitflow-truth-scroll{overflow-x:auto}.bitflow-truth-table{border-collapse:collapse;width:auto;min-width:100%}.bitflow-truth-table caption{text-align:left;padding-bottom:var(--bitflow-space-xxsmall)}.bitflow-truth-table th,.bitflow-truth-table td{padding:var(--bitflow-space-xxsmall);border:1px solid var(--bitflow-color-border);text-align:left;vertical-align:middle}.bitflow-truth-table thead th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-medium);white-space:nowrap;vertical-align:top;padding:var(--bitflow-space-xsmall)}.bitflow-truth-input,.bitflow-truth-table tbody th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-standard);font-variant-numeric:tabular-nums;white-space:nowrap;padding-inline:var(--bitflow-space-xsmall)}.bitflow-truth-note{display:block;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-standard);color:var(--bitflow-color-text-muted)}.bitflow-truth-cell{padding:var(--bitflow-space-xxsmall)}.bitflow-truth-select{min-height:2.25rem;min-width:var(--bitflow-truth-cell-width, 6rem)}.bitflow-truth-cell-correct .bitflow-select{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-truth-cell-wrong .bitflow-select{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-truth-cell-blank .bitflow-select{border-style:dashed}.bitflow-truth-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-truth-editor-row>.bitflow-input{flex:1 1 var(--bitflow-truth-editor-min, 7rem);min-width:0}.bitflow-truth-expression{font-family:var(--bitflow-font-family-mono)}.bitflow-truth-actions{flex:none;flex-wrap:nowrap}", he = {
|
|
367
367
|
en: {
|
|
368
368
|
instructionLabel: "Instruction",
|
|
369
369
|
instructionHint: "Shown above the table. Markdown is allowed.",
|
|
@@ -463,7 +463,7 @@ B`,
|
|
|
463
463
|
);
|
|
464
464
|
}),
|
|
465
465
|
e.columns.map((h, a) => {
|
|
466
|
-
const i = l?.[u.id]?.[h.id], m = h.given ? w(h.expression, u.inputs) :
|
|
466
|
+
const i = l?.[u.id]?.[h.id], m = h.given ? w(h.expression, u.inputs) : I(t, u.id, h.id), b = c("cellLabel", {
|
|
467
467
|
column: v(h, a),
|
|
468
468
|
inputs: x(u)
|
|
469
469
|
});
|
|
@@ -554,7 +554,7 @@ B`,
|
|
|
554
554
|
const i = { ...a };
|
|
555
555
|
let m = !1;
|
|
556
556
|
for (const b of e.columns) {
|
|
557
|
-
const p =
|
|
557
|
+
const p = B(i[b.id] ?? "");
|
|
558
558
|
(p.ok ? g(p.value) : void 0) !== g(b.expression) && (i[b.id] = g(b.expression), m = !0);
|
|
559
559
|
}
|
|
560
560
|
return m ? i : a;
|
|
@@ -566,7 +566,7 @@ B`,
|
|
|
566
566
|
)
|
|
567
567
|
}), x = (a, i) => {
|
|
568
568
|
c((b) => ({ ...b, [a]: i }));
|
|
569
|
-
const m =
|
|
569
|
+
const m = B(i);
|
|
570
570
|
m.ok && v(a, { expression: m.value });
|
|
571
571
|
}, u = (a, i) => {
|
|
572
572
|
const m = a + i;
|
|
@@ -576,7 +576,7 @@ B`,
|
|
|
576
576
|
}, h = O(e);
|
|
577
577
|
return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-stack", children: [
|
|
578
578
|
/* @__PURE__ */ r.jsx(
|
|
579
|
-
|
|
579
|
+
F,
|
|
580
580
|
{
|
|
581
581
|
label: n("instructionLabel"),
|
|
582
582
|
hint: n("instructionHint"),
|
|
@@ -586,7 +586,7 @@ B`,
|
|
|
586
586
|
}
|
|
587
587
|
),
|
|
588
588
|
/* @__PURE__ */ r.jsx(
|
|
589
|
-
|
|
589
|
+
F,
|
|
590
590
|
{
|
|
591
591
|
label: n("variablesLabel"),
|
|
592
592
|
hint: n("variablesHint"),
|
|
@@ -605,10 +605,10 @@ B`,
|
|
|
605
605
|
/* @__PURE__ */ r.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
606
606
|
/* @__PURE__ */ r.jsx("legend", { className: "bitflow-label", children: n("columnsLabel") }),
|
|
607
607
|
/* @__PURE__ */ r.jsx("span", { className: "bitflow-hint", children: n("columnsHint") }),
|
|
608
|
-
|
|
608
|
+
W(o, "columns") && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: W(o, "columns") }),
|
|
609
609
|
e.columns.length === 0 && /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: n("noColumns") }),
|
|
610
610
|
e.columns.map((a, i) => {
|
|
611
|
-
const m = d[a.id] ?? g(a.expression), b =
|
|
611
|
+
const m = d[a.id] ?? g(a.expression), b = B(m);
|
|
612
612
|
return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
613
613
|
/* @__PURE__ */ r.jsxs("div", { className: "bitflow-truth-editor-row", children: [
|
|
614
614
|
/* @__PURE__ */ r.jsx(
|
|
@@ -682,7 +682,7 @@ B`,
|
|
|
682
682
|
] }) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: b.error }),
|
|
683
683
|
H(o, `columns.${i}.expression`) && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: H(o, `columns.${i}.expression`) }),
|
|
684
684
|
/* @__PURE__ */ r.jsx(
|
|
685
|
-
|
|
685
|
+
V,
|
|
686
686
|
{
|
|
687
687
|
label: n("givenOf", { column: f(a, i) }),
|
|
688
688
|
hint: n("givenHint"),
|
|
@@ -749,7 +749,7 @@ B`,
|
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
751
|
/* @__PURE__ */ r.jsx(
|
|
752
|
-
|
|
752
|
+
V,
|
|
753
753
|
{
|
|
754
754
|
label: n("partialCreditLabel"),
|
|
755
755
|
hint: n("partialCreditHint"),
|
|
@@ -768,10 +768,10 @@ B`,
|
|
|
768
768
|
] })
|
|
769
769
|
] });
|
|
770
770
|
};
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
type:
|
|
771
|
+
K("bitflow-styles-task-boolean-logic", de);
|
|
772
|
+
const q = "task-boolean-logic";
|
|
773
|
+
Q({
|
|
774
|
+
type: q,
|
|
775
775
|
kind: "task",
|
|
776
776
|
schema: se,
|
|
777
777
|
evaluate: ue,
|
|
@@ -790,18 +790,18 @@ U({
|
|
|
790
790
|
evaluation: M()
|
|
791
791
|
})
|
|
792
792
|
});
|
|
793
|
-
ae(
|
|
793
|
+
ae(q);
|
|
794
794
|
export {
|
|
795
795
|
xe as AnswerSchema,
|
|
796
796
|
se as DataSchema,
|
|
797
797
|
pe as Form,
|
|
798
|
-
|
|
798
|
+
q as TYPE,
|
|
799
799
|
be as Task,
|
|
800
800
|
ue as evaluate,
|
|
801
801
|
he as formMessages,
|
|
802
802
|
g as format,
|
|
803
803
|
T as messages,
|
|
804
|
-
|
|
804
|
+
B as parse,
|
|
805
805
|
O as rowsOf,
|
|
806
806
|
w as valueOf,
|
|
807
807
|
ge as variablesIn
|