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,6 +1,6 @@
|
|
|
1
|
-
import { d as o } from "./EditorElement-
|
|
2
|
-
import { B as l } from "./EditorElement-
|
|
3
|
-
import { l as m } from "./bitLoaders-
|
|
1
|
+
import { d as o } from "./EditorElement-BNwEKIvk.js";
|
|
2
|
+
import { B as l } from "./EditorElement-BNwEKIvk.js";
|
|
3
|
+
import { l as m } from "./bitLoaders-7qanePQL.js";
|
|
4
4
|
o();
|
|
5
5
|
export {
|
|
6
6
|
l as BitflowEditorElement,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as e } from "./shareableReport-
|
|
2
|
-
import { B as s, c as t } from "./shareableReport-
|
|
3
|
-
import { K as p, b as f, a as m, c as i } from "./bitLoaders-
|
|
4
|
-
import { O as b, t as d } from "./dom-
|
|
1
|
+
import { d as e } from "./shareableReport-mdyEMdsJ.js";
|
|
2
|
+
import { B as s, c as t } from "./shareableReport-mdyEMdsJ.js";
|
|
3
|
+
import { K as p, b as f, a as m, c as i } from "./bitLoaders-7qanePQL.js";
|
|
4
|
+
import { O as b, t as d } from "./dom-B6NPWBb1.js";
|
|
5
5
|
e();
|
|
6
6
|
export {
|
|
7
7
|
s as BitflowFlowElement,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as c, a2 as l, j as t, b as i, s as m, aa as p } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { C as k, e as x, U as h, H as b } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const w = "", s = {
|
|
4
4
|
en: {
|
|
5
5
|
name: "Explanation",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--bitflow-color-primary-dark: light-dark(#004c45, #7cbfb2);--bitflow-color-primary-light: light-dark(#b5e3d8, #214640);--bitflow-color-on-primary: light-dark(#ffffff, #1e1e1e);--bitflow-color-neutral-900: light-dark(#242428, #f5f5f5);--bitflow-color-neutral-700: light-dark(#3c3c3c, #d6d6d6);--bitflow-color-neutral-400: light-dark(#a4a4a4, #7a7a7a);--bitflow-color-neutral-200: light-dark(#d6d6d6, #464646);--bitflow-color-neutral-100: light-dark(#f5f5f5, #353535);--bitflow-color-black: #000000;--bitflow-color-white: #ffffff;--bitflow-color-correct: light-dark(#017460, #57a396);--bitflow-color-correct-surface: light-dark(#e6f2ef, #18312d);--bitflow-color-wrong: light-dark(#a3282d, #c67a7d);--bitflow-color-wrong-surface: light-dark(#f8eaea, #3b2021);--bitflow-color-warning: light-dark(#8a6100, #af9452);--bitflow-color-warning-surface: light-dark(#fbf2df, #362d17);--bitflow-color-info: light-dark(#1f5673, #7496a8);--bitflow-color-info-surface: light-dark(#e8f0f4, #1e2a31);--bitflow-color-unknown: var(--bitflow-color-neutral-400);--bitflow-color-manual: light-dark(#5a4b8a, #958cb4);--bitflow-color-manual-surface: light-dark(#eeebf6, #2b2836);--bitflow-color-background: light-dark(#f5f5f5, #1e1e1e);--bitflow-color-surface: light-dark(#ffffff, #2c2c2c);--bitflow-color-border: var(--bitflow-color-neutral-200);--bitflow-color-text: var(--bitflow-color-neutral-900);--bitflow-color-text-muted: var(--bitflow-color-neutral-700);--bitflow-font-family: inherit;--bitflow-font-family-mono: "Ubuntu Mono", Menlo, Consolas, monospace;--bitflow-font-size-small: 14px;--bitflow-font-size-standard: 16px;--bitflow-font-size-large: 20px;--bitflow-font-size-xlarge: 24px;--bitflow-font-weight-standard: 400;--bitflow-font-weight-medium: 500;--bitflow-font-weight-bold: 700;--bitflow-line-height-standard: 1.5;--bitflow-line-height-tight: 1.25;--bitflow-space-xxsmall: 4px;--bitflow-space-xsmall: 8px;--bitflow-space-small: 16px;--bitflow-space-medium: 24px;--bitflow-space-large: 32px;--bitflow-space-xlarge: 48px;--bitflow-radius-small: 4px;--bitflow-radius-standard: 8px;--bitflow-radius-large: 12px;--bitflow-radius-full: 9999px;--bitflow-border-width: 2px;--bitflow-shadow-standard: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--bitflow-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--bitflow-shadow-outline: 0 0 0 3px color-mix(in srgb, var(--bitflow-color-primary) 40%, transparent);--bitflow-motion-scale: 1;--bitflow-duration-fast: calc(.12s * var(--bitflow-motion-scale));--bitflow-duration-standard: calc(.2s * var(--bitflow-motion-scale))}@media(prefers-reduced-motion:reduce){:root,:host{--bitflow-motion-scale: 0}}.bitflow-root{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text)}.bitflow-root,.bitflow-root *,.bitflow-root *:before,.bitflow-root *:after{box-sizing:border-box}.bitflow-stack{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-stack-small{gap:var(--bitflow-space-xsmall)}.bitflow-stack-large{gap:var(--bitflow-space-medium)}.bitflow-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-row-end{justify-content:flex-end}.bitflow-row-between{justify-content:space-between}.bitflow-grid{display:grid;gap:var(--bitflow-space-small);grid-template-columns:repeat(auto-fit,minmax(var(--bitflow-grid-min, 220px),1fr))}.bitflow-content{max-width:var(--bitflow-max-width-content, none);margin-inline:auto;width:100%}.bitflow-heading{font-family:var(--bitflow-font-family);font-weight:var(--bitflow-font-weight-bold);line-height:var(--bitflow-line-height-tight);margin:0}h1.bitflow-heading{font-size:var(--bitflow-font-size-xlarge)}h2.bitflow-heading{font-size:var(--bitflow-font-size-large)}h3.bitflow-heading,h4.bitflow-heading,h5.bitflow-heading,h6.bitflow-heading{font-size:var(--bitflow-font-size-standard)}.bitflow-text{margin:0}.bitflow-text-muted{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.bitflow-card{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);box-shadow:var(--bitflow-shadow-standard);padding:var(--bitflow-space-medium)}.bitflow-alert{display:flex;gap:var(--bitflow-space-xsmall);align-items:flex-start;padding:var(--bitflow-space-small);border-radius:var(--bitflow-radius-standard);border-left:4px solid var(--bitflow-alert-accent, var(--bitflow-color-info));background:var(--bitflow-alert-surface, var(--bitflow-color-info-surface));color:var(--bitflow-color-text)}.bitflow-alert[hidden]{display:none}.bitflow-alert-success{--bitflow-alert-accent: var(--bitflow-color-correct);--bitflow-alert-surface: var(--bitflow-color-correct-surface)}.bitflow-alert-error{--bitflow-alert-accent: var(--bitflow-color-wrong);--bitflow-alert-surface: var(--bitflow-color-wrong-surface)}.bitflow-alert-warning{--bitflow-alert-accent: var(--bitflow-color-warning);--bitflow-alert-surface: var(--bitflow-color-warning-surface)}.bitflow-alert-info{--bitflow-alert-accent: var(--bitflow-color-info);--bitflow-alert-surface: var(--bitflow-color-info-surface)}.bitflow-button{font:inherit;font-weight:var(--bitflow-font-weight-medium);display:inline-flex;align-items:center;justify-content:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-primary);color:var(--bitflow-color-on-primary);cursor:pointer;transition:background-color var(--bitflow-duration-fast) ease-out}.bitflow-button:hover:not(:disabled){background:var(--bitflow-color-primary-dark)}.bitflow-button:disabled{opacity:.5;cursor:not-allowed}.bitflow-button-secondary{background:transparent;color:var(--bitflow-color-primary-dark);border-color:var(--bitflow-color-border)}.bitflow-button-secondary:hover:not(:disabled){background:var(--bitflow-color-neutral-100)}.bitflow-button-quiet{background:transparent;color:var(--bitflow-color-text-muted);border-color:transparent}.bitflow-button-quiet:hover:not(:disabled){background:var(--bitflow-color-neutral-100);color:var(--bitflow-color-text)}.bitflow-input,.bitflow-select,.bitflow-textarea{font:inherit;width:100%;padding:var(--bitflow-space-xsmall);min-height:44px;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-textarea{min-height:6em;resize:vertical}.bitflow-input:hover,.bitflow-select:hover,.bitflow-textarea:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-input[aria-invalid=true],.bitflow-select[aria-invalid=true],.bitflow-textarea[aria-invalid=true]{border-color:var(--bitflow-color-wrong)}.bitflow-root :focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline);border-radius:var(--bitflow-radius-small)}.bitflow-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer;transition:border-color var(--bitflow-duration-fast) ease-out}.bitflow-option:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-option:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-correct-surface)}.bitflow-option:has(:disabled){cursor:default;opacity:.75}.bitflow-option input{margin:0;width:1.15em;height:1.15em;flex-shrink:0;accent-color:var(--bitflow-color-primary)}.bitflow-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-label{font-weight:var(--bitflow-font-weight-medium)}.bitflow-hint{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-field-error{color:var(--bitflow-color-wrong);font-size:var(--bitflow-font-size-small)}.bitflow-state{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);background:var(--bitflow-state-surface, var(--bitflow-color-neutral-100));color:var(--bitflow-state-color, var(--bitflow-color-text-muted))}.bitflow-state-correct{--bitflow-state-color: var(--bitflow-color-correct);--bitflow-state-surface: var(--bitflow-color-correct-surface)}.bitflow-state-wrong{--bitflow-state-color: var(--bitflow-color-wrong);--bitflow-state-surface: var(--bitflow-color-wrong-surface)}.bitflow-state-manual{--bitflow-state-color: var(--bitflow-color-manual);--bitflow-state-surface: var(--bitflow-color-manual-surface)}.bitflow-state-unknown{--bitflow-state-color: var(--bitflow-color-text-muted);--bitflow-state-surface: var(--bitflow-color-neutral-100)}.bitflow-report{padding:var(--bitflow-space-medium) var(--bitflow-space-small)}.bitflow-report-score{font-size:var(--bitflow-font-size-xlarge);font-weight:var(--bitflow-font-weight-bold);margin:0}.bitflow-table-scroll{overflow-x:auto;max-width:100%}.bitflow-table{border-collapse:collapse;width:100%;font-size:var(--bitflow-font-size-small)}.bitflow-table th,.bitflow-table td{text-align:left;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-bottom:1px solid var(--bitflow-color-border);white-space:nowrap}.bitflow-table thead th{color:var(--bitflow-color-text-muted);font-weight:var(--bitflow-font-weight-medium);border-bottom:var(--bitflow-border-width) solid var(--bitflow-color-neutral-400)}.bitflow-table tbody th{font-weight:var(--bitflow-font-weight-medium)}.bitflow-table td{font-variant-numeric:tabular-nums}.bitflow-stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--bitflow-space-small);margin:0}.bitflow-stat{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small)}.bitflow-stat-label{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-stat-value{margin:0;font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);font-variant-numeric:tabular-nums}.bitflow-stat-note{margin:0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}', G = (e) => {
|
|
1
|
+
import { P as g, Y as m, a0 as L, a1 as O, a2 as u, a3 as I, a4 as W, a5 as K, a6 as Q, s as U, k as q, a7 as R, W as M, j as r, Q as k, a as A, b as E, p as j, a8 as B } from "./dom-B6NPWBb1.js";
|
|
2
|
+
const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--bitflow-color-primary-dark: light-dark(#004c45, #7cbfb2);--bitflow-color-primary-light: light-dark(#b5e3d8, #214640);--bitflow-color-on-primary: light-dark(#ffffff, #1e1e1e);--bitflow-color-neutral-900: light-dark(#242428, #f5f5f5);--bitflow-color-neutral-700: light-dark(#3c3c3c, #d6d6d6);--bitflow-color-neutral-400: light-dark(#a4a4a4, #7a7a7a);--bitflow-color-neutral-200: light-dark(#d6d6d6, #464646);--bitflow-color-neutral-100: light-dark(#f5f5f5, #353535);--bitflow-color-black: #000000;--bitflow-color-white: #ffffff;--bitflow-color-correct: light-dark(#017460, #57a396);--bitflow-color-correct-surface: light-dark(#e6f2ef, #18312d);--bitflow-color-wrong: light-dark(#a3282d, #c67a7d);--bitflow-color-wrong-surface: light-dark(#f8eaea, #3b2021);--bitflow-color-warning: light-dark(#8a6100, #af9452);--bitflow-color-warning-surface: light-dark(#fbf2df, #362d17);--bitflow-color-info: light-dark(#1f5673, #7496a8);--bitflow-color-info-surface: light-dark(#e8f0f4, #1e2a31);--bitflow-color-unknown: var(--bitflow-color-neutral-400);--bitflow-color-manual: light-dark(#5a4b8a, #958cb4);--bitflow-color-manual-surface: light-dark(#eeebf6, #2b2836);--bitflow-color-background: light-dark(#f5f5f5, #1e1e1e);--bitflow-color-surface: light-dark(#ffffff, #2c2c2c);--bitflow-color-border: var(--bitflow-color-neutral-200);--bitflow-color-text: var(--bitflow-color-neutral-900);--bitflow-color-text-muted: var(--bitflow-color-neutral-700);--bitflow-font-family: inherit;--bitflow-font-family-mono: "Ubuntu Mono", Menlo, Consolas, monospace;--bitflow-font-size-small: 14px;--bitflow-font-size-standard: 16px;--bitflow-font-size-large: 20px;--bitflow-font-size-xlarge: 24px;--bitflow-font-weight-standard: 400;--bitflow-font-weight-medium: 500;--bitflow-font-weight-bold: 700;--bitflow-line-height-standard: 1.5;--bitflow-line-height-tight: 1.25;--bitflow-space-xxsmall: 4px;--bitflow-space-xsmall: 8px;--bitflow-space-small: 16px;--bitflow-space-medium: 24px;--bitflow-space-large: 32px;--bitflow-space-xlarge: 48px;--bitflow-radius-small: 4px;--bitflow-radius-standard: 8px;--bitflow-radius-large: 12px;--bitflow-radius-full: 9999px;--bitflow-border-width: 2px;--bitflow-shadow-standard: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--bitflow-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--bitflow-shadow-outline: 0 0 0 3px color-mix(in srgb, var(--bitflow-color-primary) 40%, transparent);--bitflow-motion-scale: 1;--bitflow-duration-fast: calc(.12s * var(--bitflow-motion-scale));--bitflow-duration-standard: calc(.2s * var(--bitflow-motion-scale))}@media(prefers-reduced-motion:reduce){:root,:host{--bitflow-motion-scale: 0}}.bitflow-root{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text)}.bitflow-root,.bitflow-root *,.bitflow-root *:before,.bitflow-root *:after{box-sizing:border-box}.bitflow-stack{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-stack-small{gap:var(--bitflow-space-xsmall)}.bitflow-stack-large{gap:var(--bitflow-space-medium)}.bitflow-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-row-end{justify-content:flex-end}.bitflow-row-between{justify-content:space-between}.bitflow-grid{display:grid;gap:var(--bitflow-space-small);grid-template-columns:repeat(auto-fit,minmax(var(--bitflow-grid-min, 220px),1fr))}.bitflow-content{max-width:var(--bitflow-max-width-content, none);margin-inline:auto;width:100%}.bitflow-heading{font-family:var(--bitflow-font-family);font-weight:var(--bitflow-font-weight-bold);line-height:var(--bitflow-line-height-tight);margin:0}h1.bitflow-heading{font-size:var(--bitflow-font-size-xlarge)}h2.bitflow-heading{font-size:var(--bitflow-font-size-large)}h3.bitflow-heading,h4.bitflow-heading,h5.bitflow-heading,h6.bitflow-heading{font-size:var(--bitflow-font-size-standard)}.bitflow-text{margin:0}.bitflow-text-muted{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.bitflow-card{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);box-shadow:var(--bitflow-shadow-standard);padding:var(--bitflow-space-medium)}.bitflow-alert{display:flex;gap:var(--bitflow-space-xsmall);align-items:flex-start;padding:var(--bitflow-space-small);border-radius:var(--bitflow-radius-standard);border-left:4px solid var(--bitflow-alert-accent, var(--bitflow-color-info));background:var(--bitflow-alert-surface, var(--bitflow-color-info-surface));color:var(--bitflow-color-text)}.bitflow-alert[hidden]{display:none}.bitflow-alert-success{--bitflow-alert-accent: var(--bitflow-color-correct);--bitflow-alert-surface: var(--bitflow-color-correct-surface)}.bitflow-alert-error{--bitflow-alert-accent: var(--bitflow-color-wrong);--bitflow-alert-surface: var(--bitflow-color-wrong-surface)}.bitflow-alert-warning{--bitflow-alert-accent: var(--bitflow-color-warning);--bitflow-alert-surface: var(--bitflow-color-warning-surface)}.bitflow-alert-info{--bitflow-alert-accent: var(--bitflow-color-info);--bitflow-alert-surface: var(--bitflow-color-info-surface)}.bitflow-button{font:inherit;font-weight:var(--bitflow-font-weight-medium);display:inline-flex;align-items:center;justify-content:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-primary);color:var(--bitflow-color-on-primary);cursor:pointer;transition:background-color var(--bitflow-duration-fast) ease-out}.bitflow-button:hover:not(:disabled){background:var(--bitflow-color-primary-dark)}.bitflow-button:disabled{opacity:.5;cursor:not-allowed}.bitflow-button-secondary{background:transparent;color:var(--bitflow-color-primary-dark);border-color:var(--bitflow-color-border)}.bitflow-button-secondary:hover:not(:disabled){background:var(--bitflow-color-neutral-100)}.bitflow-button-quiet{background:transparent;color:var(--bitflow-color-text-muted);border-color:transparent}.bitflow-button-quiet:hover:not(:disabled){background:var(--bitflow-color-neutral-100);color:var(--bitflow-color-text)}.bitflow-input,.bitflow-select,.bitflow-textarea{font:inherit;width:100%;padding:var(--bitflow-space-xsmall);min-height:44px;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-textarea{min-height:6em;resize:vertical}.bitflow-input:hover,.bitflow-select:hover,.bitflow-textarea:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-input[aria-invalid=true],.bitflow-select[aria-invalid=true],.bitflow-textarea[aria-invalid=true]{border-color:var(--bitflow-color-wrong)}.bitflow-root :focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline);border-radius:var(--bitflow-radius-small)}.bitflow-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer;transition:border-color var(--bitflow-duration-fast) ease-out}.bitflow-option:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-option:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-correct-surface)}.bitflow-option:has(:disabled){cursor:default;opacity:.75}.bitflow-option input{margin:0;width:1.15em;height:1.15em;flex-shrink:0;accent-color:var(--bitflow-color-primary)}.bitflow-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-label{font-weight:var(--bitflow-font-weight-medium)}fieldset.bitflow-field{border:0;margin:0;padding:0;min-width:0}fieldset.bitflow-field>legend{padding:0;margin-bottom:var(--bitflow-space-xxsmall)}:is(h1,h2,h3,h4,h5,h6).bitflow-label{font-size:inherit;line-height:var(--bitflow-line-height-tight)}.bitflow-hint{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-field-error{color:var(--bitflow-color-wrong);font-size:var(--bitflow-font-size-small)}:where(.bitflow-text,.bitflow-text-muted,.bitflow-hint,.bitflow-label,.bitflow-field-error,.bitflow-alert){margin:0}.bitflow-state{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);background:var(--bitflow-state-surface, var(--bitflow-color-neutral-100));color:var(--bitflow-state-color, var(--bitflow-color-text-muted))}.bitflow-state-correct{--bitflow-state-color: var(--bitflow-color-correct);--bitflow-state-surface: var(--bitflow-color-correct-surface)}.bitflow-state-wrong{--bitflow-state-color: var(--bitflow-color-wrong);--bitflow-state-surface: var(--bitflow-color-wrong-surface)}.bitflow-state-manual{--bitflow-state-color: var(--bitflow-color-manual);--bitflow-state-surface: var(--bitflow-color-manual-surface)}.bitflow-state-unknown{--bitflow-state-color: var(--bitflow-color-text-muted);--bitflow-state-surface: var(--bitflow-color-neutral-100)}.bitflow-report{padding:var(--bitflow-space-medium) var(--bitflow-space-small)}.bitflow-report-score{font-size:var(--bitflow-font-size-xlarge);font-weight:var(--bitflow-font-weight-bold);margin:0}.bitflow-table-scroll{overflow-x:auto;max-width:100%}.bitflow-table{border-collapse:collapse;width:100%;font-size:var(--bitflow-font-size-small)}.bitflow-table th,.bitflow-table td{text-align:left;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-bottom:1px solid var(--bitflow-color-border);white-space:nowrap}.bitflow-table thead th{color:var(--bitflow-color-text-muted);font-weight:var(--bitflow-font-weight-medium);border-bottom:var(--bitflow-border-width) solid var(--bitflow-color-neutral-400)}.bitflow-table tbody th{font-weight:var(--bitflow-font-weight-medium)}.bitflow-table td{font-variant-numeric:tabular-nums}.bitflow-stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--bitflow-space-small);margin:0}.bitflow-stat{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small)}.bitflow-stat-label{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-stat-value{margin:0;font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);font-variant-numeric:tabular-nums}.bitflow-stat-note{margin:0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}', G = (e) => {
|
|
3
3
|
if (e == null) return "";
|
|
4
4
|
const o = String(e);
|
|
5
5
|
return /[",\n\r]/.test(o) ? `"${o.replace(/"/g, '""')}"` : o;
|
|
6
|
-
},
|
|
6
|
+
}, p = (e) => e.map(G).join(","), J = (e, o) => {
|
|
7
7
|
const a = e.nodeReports.find((t) => t.nodeId === o);
|
|
8
8
|
if (!a?.result) return null;
|
|
9
|
-
const
|
|
10
|
-
return
|
|
11
|
-
}, Z = (e, o) => e.nodeReports.find((a) => a.nodeId === o)?.result?.state ?? "",
|
|
9
|
+
const i = R(a.result);
|
|
10
|
+
return i.possible === 0 ? null : i.earned;
|
|
11
|
+
}, Z = (e, o) => e.nodeReports.find((a) => a.nodeId === o)?.result?.state ?? "", Y = {
|
|
12
12
|
learner: "Learner",
|
|
13
13
|
rank: "Rank",
|
|
14
14
|
earned: "Earned",
|
|
@@ -21,29 +21,29 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
21
21
|
discrimination: "Discrimination",
|
|
22
22
|
averageTries: "Average tries",
|
|
23
23
|
outcome: "Outcome"
|
|
24
|
-
},
|
|
25
|
-
const
|
|
24
|
+
}, X = (e, o, a = {}) => {
|
|
25
|
+
const i = { ...Y, ...a.headers }, t = e.items, n = [];
|
|
26
26
|
n.push(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
p([
|
|
28
|
+
i.learner,
|
|
29
|
+
i.rank,
|
|
30
|
+
i.earned,
|
|
31
|
+
i.possible,
|
|
32
|
+
i.ratio,
|
|
33
33
|
// Two columns per task: the score to compute with, and the outcome to
|
|
34
34
|
// read. Neither substitutes for the other.
|
|
35
|
-
...t.flatMap((
|
|
35
|
+
...t.flatMap((l) => [l.nodeId, `${l.nodeId} (${i.outcome})`])
|
|
36
36
|
])
|
|
37
37
|
);
|
|
38
|
-
for (const
|
|
39
|
-
const s = o.find((d) => d.attemptId ===
|
|
38
|
+
for (const l of e.scores) {
|
|
39
|
+
const s = o.find((d) => d.attemptId === l.attemptId);
|
|
40
40
|
n.push(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
p([
|
|
42
|
+
l.label,
|
|
43
|
+
l.rank,
|
|
44
|
+
l.earned,
|
|
45
|
+
l.possible,
|
|
46
|
+
l.ratio,
|
|
47
47
|
...t.flatMap(
|
|
48
48
|
(d) => s ? [J(s, d.nodeId), Z(s, d.nodeId)] : [null, null]
|
|
49
49
|
)
|
|
@@ -51,64 +51,64 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
n.push(""), n.push(
|
|
54
|
-
|
|
54
|
+
p([i.task, i.type, i.answered, i.difficulty, i.discrimination, i.averageTries])
|
|
55
55
|
);
|
|
56
|
-
for (const
|
|
56
|
+
for (const l of t)
|
|
57
57
|
n.push(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
p([
|
|
59
|
+
l.nodeId,
|
|
60
|
+
l.bitType,
|
|
61
|
+
l.answered,
|
|
62
|
+
l.difficulty,
|
|
63
|
+
l.discrimination,
|
|
64
|
+
l.averageTries
|
|
65
65
|
])
|
|
66
66
|
);
|
|
67
67
|
return n.join(`
|
|
68
68
|
`);
|
|
69
69
|
}, ee = (e) => Math.min(...e), te = (e) => Math.max(...e), v = (e) => e.length === 0 ? Number.NaN : e.reduce((o, a) => o + a, 0) / e.length, S = (e) => {
|
|
70
70
|
if (e.length === 0) return Number.NaN;
|
|
71
|
-
const o = [...e].sort((t, n) => t - n), a = (o.length - 1) / 2,
|
|
72
|
-
return a ===
|
|
71
|
+
const o = [...e].sort((t, n) => t - n), a = (o.length - 1) / 2, i = Math.floor(a);
|
|
72
|
+
return a === i ? o[i] : (o[i] + o[i + 1]) / 2;
|
|
73
73
|
}, H = (e, o) => {
|
|
74
74
|
if (e.length === 0) return Number.NaN;
|
|
75
|
-
const a = [...e].sort((t, n) => t - n),
|
|
76
|
-
return S(o === "second" || o === "median" ? a : o === "first" || o === "lower" ? a.slice(0, Math.floor(
|
|
75
|
+
const a = [...e].sort((t, n) => t - n), i = a.length / 2;
|
|
76
|
+
return S(o === "second" || o === "median" ? a : o === "first" || o === "lower" ? a.slice(0, Math.floor(i)) : a.slice(Math.ceil(i)));
|
|
77
77
|
}, oe = (e) => {
|
|
78
|
-
const o = [...e].sort((a,
|
|
78
|
+
const o = [...e].sort((a, i) => i - a);
|
|
79
79
|
return e.map((a) => o.indexOf(a) + 1);
|
|
80
80
|
}, x = (e) => {
|
|
81
81
|
if (e.length < 2) return Number.NaN;
|
|
82
82
|
const o = v(e);
|
|
83
|
-
return e.reduce((a,
|
|
83
|
+
return e.reduce((a, i) => a + (i - o) ** 2, 0) / (e.length - 1);
|
|
84
84
|
}, N = (e) => Math.sqrt(x(e)), re = (e, o) => {
|
|
85
85
|
if (e.length !== o.length)
|
|
86
86
|
throw new Error("covariance needs two series of the same length");
|
|
87
87
|
if (e.length < 2) return Number.NaN;
|
|
88
|
-
const a = v(e),
|
|
88
|
+
const a = v(e), i = v(o);
|
|
89
89
|
let t = 0;
|
|
90
90
|
for (let n = 0; n < e.length; n++)
|
|
91
|
-
t += (e[n] - a) * (o[n] -
|
|
91
|
+
t += (e[n] - a) * (o[n] - i);
|
|
92
92
|
return t / (e.length - 1);
|
|
93
|
-
}, ae = (e, o) => re(e, o) / (N(e) * N(o)),
|
|
93
|
+
}, ae = (e, o) => re(e, o) / (N(e) * N(o)), ie = (e) => {
|
|
94
94
|
const o = e.length;
|
|
95
95
|
if (o < 2) return null;
|
|
96
96
|
const a = e[0].length;
|
|
97
97
|
if (a < 2) return null;
|
|
98
98
|
if (e.some((s) => s.length !== a))
|
|
99
99
|
throw new Error("cronbachsAlpha needs one score per learner for every item");
|
|
100
|
-
let
|
|
100
|
+
let i = 0;
|
|
101
101
|
const t = new Array(a).fill(0);
|
|
102
102
|
for (const s of e) {
|
|
103
|
-
|
|
103
|
+
i += x(s);
|
|
104
104
|
for (let d = 0; d < a; d++)
|
|
105
105
|
t[d] += s[d];
|
|
106
106
|
}
|
|
107
107
|
const n = x(t);
|
|
108
108
|
if (!Number.isFinite(n) || n === 0) return null;
|
|
109
|
-
const
|
|
110
|
-
return Number.isFinite(
|
|
111
|
-
},
|
|
109
|
+
const l = o / (o - 1) * ((n - i) / n);
|
|
110
|
+
return Number.isFinite(l) ? l : null;
|
|
111
|
+
}, le = (e) => ({
|
|
112
112
|
count: e.length,
|
|
113
113
|
mean: v(e),
|
|
114
114
|
median: S(e),
|
|
@@ -129,16 +129,16 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
129
129
|
}), ne = (e) => {
|
|
130
130
|
const o = [];
|
|
131
131
|
for (const a of e)
|
|
132
|
-
for (const
|
|
133
|
-
o.some((t) => t.nodeId ===
|
|
132
|
+
for (const i of a.nodeReports)
|
|
133
|
+
o.some((t) => t.nodeId === i.nodeId) || o.push({ nodeId: i.nodeId, bitType: i.bitType });
|
|
134
134
|
return o;
|
|
135
135
|
}, T = (e, o) => {
|
|
136
136
|
const a = e.nodeReports.find((t) => t.nodeId === o);
|
|
137
137
|
if (!a?.result) return null;
|
|
138
|
-
const
|
|
139
|
-
return
|
|
138
|
+
const i = R(a.result);
|
|
139
|
+
return i.possible === 0 ? null : i.earned / i.possible;
|
|
140
140
|
}, de = (e) => {
|
|
141
|
-
const o = ne(e), a = e.map((s) => s.score?.earned ?? 0),
|
|
141
|
+
const o = ne(e), a = e.map((s) => s.score?.earned ?? 0), i = oe(a), t = e.map((s, d) => {
|
|
142
142
|
const c = s.score?.earned ?? 0, b = s.score?.possible ?? 0;
|
|
143
143
|
return {
|
|
144
144
|
attemptId: s.attemptId,
|
|
@@ -146,35 +146,35 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
146
146
|
earned: c,
|
|
147
147
|
possible: b,
|
|
148
148
|
ratio: b === 0 ? null : c / b,
|
|
149
|
-
rank:
|
|
149
|
+
rank: i[d]
|
|
150
150
|
};
|
|
151
151
|
}), n = o.map(
|
|
152
152
|
({ nodeId: s, bitType: d }) => ce(e, a, s, d)
|
|
153
|
-
),
|
|
153
|
+
), l = be(e, o);
|
|
154
154
|
return {
|
|
155
155
|
learners: e.length,
|
|
156
156
|
items: n,
|
|
157
157
|
scores: t,
|
|
158
|
-
summary: e.length >= 2 ?
|
|
159
|
-
cronbachsAlpha:
|
|
160
|
-
reliability: { common:
|
|
158
|
+
summary: e.length >= 2 ? le(a) : null,
|
|
159
|
+
cronbachsAlpha: ie(we(e, l)),
|
|
160
|
+
reliability: { common: l.length, total: o.length }
|
|
161
161
|
};
|
|
162
|
-
}, ce = (e, o, a,
|
|
163
|
-
const t = se(), n = [],
|
|
162
|
+
}, ce = (e, o, a, i) => {
|
|
163
|
+
const t = se(), n = [], l = [], s = [], d = [];
|
|
164
164
|
let c = 0;
|
|
165
|
-
return e.forEach((b,
|
|
166
|
-
const w = b.nodeReports.find((
|
|
165
|
+
return e.forEach((b, F) => {
|
|
166
|
+
const w = b.nodeReports.find((V) => V.nodeId === a);
|
|
167
167
|
if (!w) return;
|
|
168
168
|
c += 1, s.push(w.tries), w.elapsedMs !== void 0 && d.push(w.elapsedMs), w.result && (t[w.result.state] += 1);
|
|
169
169
|
const z = T(b, a);
|
|
170
|
-
z !== null && (n.push(z),
|
|
170
|
+
z !== null && (n.push(z), l.push(o[F]));
|
|
171
171
|
}), {
|
|
172
172
|
nodeId: a,
|
|
173
|
-
bitType:
|
|
173
|
+
bitType: i,
|
|
174
174
|
answered: c,
|
|
175
175
|
counts: t,
|
|
176
176
|
difficulty: n.length === 0 ? 0 : y(n),
|
|
177
|
-
discrimination: fe(n,
|
|
177
|
+
discrimination: fe(n, l),
|
|
178
178
|
averageTries: s.length === 0 ? 0 : y(s),
|
|
179
179
|
averageElapsedMs: d.length === 0 ? null : y(d)
|
|
180
180
|
};
|
|
@@ -183,9 +183,9 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
183
183
|
const a = ae(e, o);
|
|
184
184
|
return Number.isFinite(a) ? a : null;
|
|
185
185
|
}, be = (e, o) => o.filter(
|
|
186
|
-
(a) => e.every((
|
|
186
|
+
(a) => e.every((i) => T(i, a.nodeId) !== null)
|
|
187
187
|
), we = (e, o) => o.map(
|
|
188
|
-
(a) => e.map((
|
|
188
|
+
(a) => e.map((i) => T(i, a.nodeId) ?? 0)
|
|
189
189
|
), y = (e) => e.reduce((o, a) => o + a, 0) / e.length, D = {
|
|
190
190
|
en: {
|
|
191
191
|
averageTries: "Average tries",
|
|
@@ -286,15 +286,15 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
286
286
|
// sends the host results, scores, tries and timings, never what anyone
|
|
287
287
|
// wrote — is still a valid report. Statistics and CSV never read it.
|
|
288
288
|
answer: O().optional(),
|
|
289
|
-
result:
|
|
290
|
-
tries:
|
|
291
|
-
elapsedMs:
|
|
289
|
+
result: L.optional(),
|
|
290
|
+
tries: m().int().nonnegative(),
|
|
291
|
+
elapsedMs: m().nonnegative().optional()
|
|
292
292
|
}), he = g({
|
|
293
|
-
schemaVersion:
|
|
293
|
+
schemaVersion: Q($),
|
|
294
294
|
flowId: u().min(1),
|
|
295
|
-
flowSchemaVersion:
|
|
295
|
+
flowSchemaVersion: m().int(),
|
|
296
296
|
attemptId: u().min(1),
|
|
297
|
-
status:
|
|
297
|
+
status: K(["completed", "abandoned"]),
|
|
298
298
|
/**
|
|
299
299
|
* Who this report belongs to. Optional and opaque: bitflow never invents an
|
|
300
300
|
* identity, but a group report has to be able to tell one learner from
|
|
@@ -304,15 +304,15 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
304
304
|
id: u().optional(),
|
|
305
305
|
label: u().optional()
|
|
306
306
|
}).optional(),
|
|
307
|
-
nodeReports:
|
|
308
|
-
score: g({ earned:
|
|
307
|
+
nodeReports: W(ue),
|
|
308
|
+
score: g({ earned: m(), possible: m().nonnegative() }).optional(),
|
|
309
309
|
startedAt: I(),
|
|
310
310
|
completedAt: I()
|
|
311
311
|
}), ve = (e, o, a) => {
|
|
312
|
-
const
|
|
312
|
+
const i = /* @__PURE__ */ new Set(), t = [];
|
|
313
313
|
for (const s of o.history) {
|
|
314
|
-
if (
|
|
315
|
-
|
|
314
|
+
if (i.has(s)) continue;
|
|
315
|
+
i.add(s);
|
|
316
316
|
const d = e.nodes.find((c) => c.id === s);
|
|
317
317
|
d && q(d.type)?.kind === "task" && t.push({
|
|
318
318
|
nodeId: s,
|
|
@@ -323,11 +323,11 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
323
323
|
elapsedMs: o.elapsedMs[s]
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
-
let n = 0,
|
|
326
|
+
let n = 0, l = 0;
|
|
327
327
|
for (const s of t) {
|
|
328
328
|
if (!s.result) continue;
|
|
329
329
|
const d = R(s.result);
|
|
330
|
-
n += d.earned,
|
|
330
|
+
n += d.earned, l += d.possible;
|
|
331
331
|
}
|
|
332
332
|
return {
|
|
333
333
|
schemaVersion: $,
|
|
@@ -337,12 +337,12 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
337
337
|
status: o.status === "completed" ? "completed" : "abandoned",
|
|
338
338
|
...a ? { subject: a } : {},
|
|
339
339
|
nodeReports: t,
|
|
340
|
-
score: { earned: n, possible:
|
|
340
|
+
score: { earned: n, possible: l },
|
|
341
341
|
startedAt: o.startedAt,
|
|
342
342
|
completedAt: o.completedAt ?? o.updatedAt
|
|
343
343
|
};
|
|
344
|
-
},
|
|
345
|
-
const o = typeof e == "string" ?
|
|
344
|
+
}, P = (e) => {
|
|
345
|
+
const o = typeof e == "string" ? C(e) : e;
|
|
346
346
|
if (o === void 0)
|
|
347
347
|
return {
|
|
348
348
|
ok: !1,
|
|
@@ -357,8 +357,8 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
357
357
|
B(a.error.issues)
|
|
358
358
|
)
|
|
359
359
|
};
|
|
360
|
-
},
|
|
361
|
-
const o = typeof e == "string" ?
|
|
360
|
+
}, me = (e) => {
|
|
361
|
+
const o = typeof e == "string" ? C(e) : e;
|
|
362
362
|
if (!Array.isArray(o))
|
|
363
363
|
return {
|
|
364
364
|
ok: !1,
|
|
@@ -368,20 +368,20 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
368
368
|
)
|
|
369
369
|
};
|
|
370
370
|
const a = [];
|
|
371
|
-
for (const [
|
|
372
|
-
const n =
|
|
371
|
+
for (const [i, t] of o.entries()) {
|
|
372
|
+
const n = P(t);
|
|
373
373
|
if (!n.ok)
|
|
374
374
|
return {
|
|
375
375
|
ok: !1,
|
|
376
376
|
error: {
|
|
377
377
|
...n.error,
|
|
378
|
-
message: `Report ${
|
|
378
|
+
message: `Report ${i + 1}: ${n.error.message}`
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
381
|
a.push(n.value);
|
|
382
382
|
}
|
|
383
383
|
return { ok: !0, value: a };
|
|
384
|
-
},
|
|
384
|
+
}, C = (e) => {
|
|
385
385
|
try {
|
|
386
386
|
return JSON.parse(e);
|
|
387
387
|
} catch {
|
|
@@ -392,25 +392,25 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
392
392
|
locale: o,
|
|
393
393
|
onError: a
|
|
394
394
|
}) => {
|
|
395
|
-
const
|
|
396
|
-
() => e === void 0 ? void 0 :
|
|
395
|
+
const i = M(o), t = (s, d) => E(D, s, i, d), n = A.useMemo(
|
|
396
|
+
() => e === void 0 ? void 0 : me(e),
|
|
397
397
|
[e]
|
|
398
|
-
),
|
|
398
|
+
), l = A.useMemo(
|
|
399
399
|
() => n?.ok ? de(n.value) : void 0,
|
|
400
400
|
[n]
|
|
401
401
|
);
|
|
402
|
-
return n === void 0 ? /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("noReports") }) : n.ok ? !
|
|
402
|
+
return n === void 0 ? /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("noReports") }) : n.ok ? !l || l.learners === 0 ? /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("noReports") }) : /* @__PURE__ */ r.jsxs("section", { className: "bitflow-root bitflow-stack bitflow-content bitflow-report", children: [
|
|
403
403
|
/* @__PURE__ */ r.jsxs("header", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
404
404
|
/* @__PURE__ */ r.jsx("h2", { className: "bitflow-heading", children: t("groupHeading") }),
|
|
405
|
-
/* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("learners", { count:
|
|
405
|
+
/* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("learners", { count: l.learners }) }),
|
|
406
406
|
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
|
|
407
407
|
"button",
|
|
408
408
|
{
|
|
409
409
|
type: "button",
|
|
410
410
|
className: "bitflow-button bitflow-button-secondary",
|
|
411
|
-
onClick: () =>
|
|
411
|
+
onClick: () => pe(
|
|
412
412
|
`${t("csvFilename")}.csv`,
|
|
413
|
-
|
|
413
|
+
X(l, n.value, {
|
|
414
414
|
headers: {
|
|
415
415
|
learner: t("learner"),
|
|
416
416
|
rank: t("rank"),
|
|
@@ -437,34 +437,34 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
437
437
|
{
|
|
438
438
|
label: t("reliability"),
|
|
439
439
|
hint: t("reliabilityHint"),
|
|
440
|
-
value:
|
|
441
|
-
note:
|
|
442
|
-
common:
|
|
443
|
-
total:
|
|
440
|
+
value: l.cronbachsAlpha === null ? t("notEnoughData") : String(f(l.cronbachsAlpha)),
|
|
441
|
+
note: l.reliability.common < l.reliability.total ? t("reliabilityPartial", {
|
|
442
|
+
common: l.reliability.common,
|
|
443
|
+
total: l.reliability.total
|
|
444
444
|
}) : void 0
|
|
445
445
|
}
|
|
446
446
|
),
|
|
447
|
-
|
|
448
|
-
/* @__PURE__ */ r.jsx(h, { label: t("mean"), value: String(f(
|
|
447
|
+
l.summary && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
448
|
+
/* @__PURE__ */ r.jsx(h, { label: t("mean"), value: String(f(l.summary.mean)) }),
|
|
449
449
|
/* @__PURE__ */ r.jsx(
|
|
450
450
|
h,
|
|
451
451
|
{
|
|
452
452
|
label: t("median"),
|
|
453
|
-
value: String(f(
|
|
453
|
+
value: String(f(l.summary.median))
|
|
454
454
|
}
|
|
455
455
|
),
|
|
456
456
|
/* @__PURE__ */ r.jsx(
|
|
457
457
|
h,
|
|
458
458
|
{
|
|
459
459
|
label: t("range"),
|
|
460
|
-
value: `${f(
|
|
460
|
+
value: `${f(l.summary.min)} – ${f(l.summary.max)}`
|
|
461
461
|
}
|
|
462
462
|
),
|
|
463
463
|
/* @__PURE__ */ r.jsx(
|
|
464
464
|
h,
|
|
465
465
|
{
|
|
466
466
|
label: t("standardDeviation"),
|
|
467
|
-
value: String(f(
|
|
467
|
+
value: String(f(l.summary.standardDeviation))
|
|
468
468
|
}
|
|
469
469
|
)
|
|
470
470
|
] })
|
|
@@ -482,7 +482,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
482
482
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("attempts") }),
|
|
483
483
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("time") })
|
|
484
484
|
] }) }),
|
|
485
|
-
/* @__PURE__ */ r.jsx("tbody", { children:
|
|
485
|
+
/* @__PURE__ */ r.jsx("tbody", { children: l.items.map((s, d) => /* @__PURE__ */ r.jsxs("tr", { children: [
|
|
486
486
|
/* @__PURE__ */ r.jsx("th", { scope: "row", children: d + 1 }),
|
|
487
487
|
/* @__PURE__ */ r.jsxs("td", { children: [
|
|
488
488
|
Math.round(s.difficulty * 100),
|
|
@@ -504,7 +504,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
504
504
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("reportHeading") }),
|
|
505
505
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("rank") })
|
|
506
506
|
] }) }),
|
|
507
|
-
/* @__PURE__ */ r.jsx("tbody", { children:
|
|
507
|
+
/* @__PURE__ */ r.jsx("tbody", { children: l.scores.map((s) => /* @__PURE__ */ r.jsxs("tr", { children: [
|
|
508
508
|
/* @__PURE__ */ r.jsx("th", { scope: "row", children: s.label }),
|
|
509
509
|
/* @__PURE__ */ r.jsx("td", { children: t("score", {
|
|
510
510
|
earned: f(s.earned),
|
|
@@ -519,44 +519,44 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
519
519
|
label: e,
|
|
520
520
|
value: o,
|
|
521
521
|
hint: a,
|
|
522
|
-
note:
|
|
522
|
+
note: i
|
|
523
523
|
}) => /* @__PURE__ */ r.jsxs("div", { className: "bitflow-stat", children: [
|
|
524
524
|
/* @__PURE__ */ r.jsx("dt", { className: "bitflow-stat-label", title: a, children: e }),
|
|
525
525
|
/* @__PURE__ */ r.jsx("dd", { className: "bitflow-stat-value", children: o }),
|
|
526
|
-
|
|
527
|
-
] }),
|
|
526
|
+
i && /* @__PURE__ */ r.jsx("dd", { className: "bitflow-stat-note", children: i })
|
|
527
|
+
] }), pe = (e, o) => {
|
|
528
528
|
const a = new Blob([`\uFEFF${o}`], {
|
|
529
529
|
type: "text/csv;charset=utf-8"
|
|
530
|
-
}),
|
|
531
|
-
t.href =
|
|
530
|
+
}), i = URL.createObjectURL(a), t = document.createElement("a");
|
|
531
|
+
t.href = i, t.download = e, t.click(), setTimeout(() => URL.revokeObjectURL(i), 0);
|
|
532
532
|
}, ye = ({ report: e, locale: o, onError: a }) => {
|
|
533
|
-
const
|
|
533
|
+
const i = M(o), t = (d, c) => E(D, d, i, c);
|
|
534
534
|
if (e === void 0)
|
|
535
535
|
return /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: t("noReports") });
|
|
536
|
-
const n =
|
|
536
|
+
const n = P(e);
|
|
537
537
|
if (!n.ok)
|
|
538
538
|
return a?.(n.error.message), /* @__PURE__ */ r.jsx("div", { className: "bitflow-alert bitflow-alert-error", role: "alert", children: t("invalidReport") });
|
|
539
|
-
const
|
|
539
|
+
const l = n.value, s = new Date(l.completedAt).getTime() - new Date(l.startedAt).getTime();
|
|
540
540
|
return /* @__PURE__ */ r.jsxs("section", { className: "bitflow-root bitflow-stack bitflow-content bitflow-report", children: [
|
|
541
541
|
/* @__PURE__ */ r.jsxs("header", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
542
542
|
/* @__PURE__ */ r.jsx("h2", { className: "bitflow-heading", children: t("reportHeading") }),
|
|
543
|
-
/* @__PURE__ */ r.jsx("p", { className: "bitflow-report-score", children:
|
|
544
|
-
earned: f(
|
|
545
|
-
possible:
|
|
543
|
+
/* @__PURE__ */ r.jsx("p", { className: "bitflow-report-score", children: l.score && l.score.possible > 0 ? t("score", {
|
|
544
|
+
earned: f(l.score.earned),
|
|
545
|
+
possible: l.score.possible
|
|
546
546
|
}) : t("noScore") }),
|
|
547
547
|
/* @__PURE__ */ r.jsxs("p", { className: "bitflow-text-muted", children: [
|
|
548
|
-
t(
|
|
548
|
+
t(l.status),
|
|
549
549
|
Number.isFinite(s) && s > 0 ? ` · ${t("duration", { duration: k(s) })}` : ""
|
|
550
550
|
] })
|
|
551
551
|
] }),
|
|
552
|
-
|
|
552
|
+
l.nodeReports.length > 0 && /* @__PURE__ */ r.jsx("div", { className: "bitflow-table-scroll", children: /* @__PURE__ */ r.jsxs("table", { className: "bitflow-table", children: [
|
|
553
553
|
/* @__PURE__ */ r.jsx("thead", { children: /* @__PURE__ */ r.jsxs("tr", { children: [
|
|
554
554
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("task") }),
|
|
555
555
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("outcome") }),
|
|
556
556
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("attempts") }),
|
|
557
557
|
/* @__PURE__ */ r.jsx("th", { scope: "col", children: t("time") })
|
|
558
558
|
] }) }),
|
|
559
|
-
/* @__PURE__ */ r.jsx("tbody", { children:
|
|
559
|
+
/* @__PURE__ */ r.jsx("tbody", { children: l.nodeReports.map((d, c) => {
|
|
560
560
|
const b = d.result?.state ?? "unknown";
|
|
561
561
|
return /* @__PURE__ */ r.jsxs("tr", { children: [
|
|
562
562
|
/* @__PURE__ */ r.jsx("th", { scope: "row", children: c + 1 }),
|
|
@@ -568,7 +568,7 @@ const _ = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--b
|
|
|
568
568
|
] }) })
|
|
569
569
|
] });
|
|
570
570
|
};
|
|
571
|
-
|
|
571
|
+
U("bitflow-styles-report", _);
|
|
572
572
|
export {
|
|
573
573
|
ve as N,
|
|
574
574
|
xe as R,
|