@yungu-fed/question-editor 0.1.10 → 0.1.11

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 (33) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1440 -1317
  5. package/dist/index.mjs +823 -741
  6. package/dist/model/question-structure.d.ts +8 -2
  7. package/dist/model/question-structure.d.ts.map +1 -1
  8. package/dist/question/content-editor/QuestionContentElementEditor.d.ts.map +1 -1
  9. package/dist/question/content-editor/helpers.d.ts +3 -2
  10. package/dist/question/content-editor/helpers.d.ts.map +1 -1
  11. package/dist/question/content-editor/i18n.d.ts.map +1 -1
  12. package/dist/question/content-editor/structure.d.ts.map +1 -1
  13. package/dist/question/content-editor/types.d.ts +10 -3
  14. package/dist/question/content-editor/types.d.ts.map +1 -1
  15. package/dist/question/i18n/messages.d.ts +1 -0
  16. package/dist/question/i18n/messages.d.ts.map +1 -1
  17. package/dist/question/player/QuestionPlayer.d.ts.map +1 -1
  18. package/dist/question/player/QuestionPlayerElement.d.ts +5 -2
  19. package/dist/question/player/QuestionPlayerElement.d.ts.map +1 -1
  20. package/dist/question/player/QuestionTextResponsePlayer.d.ts +16 -0
  21. package/dist/question/player/QuestionTextResponsePlayer.d.ts.map +1 -0
  22. package/dist/question/player/helpers.d.ts +2 -1
  23. package/dist/question/player/helpers.d.ts.map +1 -1
  24. package/dist/question/player/types.d.ts +8 -2
  25. package/dist/question/player/types.d.ts.map +1 -1
  26. package/dist/question/renderers/QuestionContentElementView.d.ts.map +1 -1
  27. package/dist/question/rich-text/RichTextField.d.ts +9 -1
  28. package/dist/question/rich-text/RichTextField.d.ts.map +1 -1
  29. package/dist/question/shared/QuestionTextResponsePlaceholder.d.ts +6 -0
  30. package/dist/question/shared/QuestionTextResponsePlaceholder.d.ts.map +1 -0
  31. package/dist/question/structure-editor/structure-editor-labels.d.ts +2 -0
  32. package/dist/question/structure-editor/structure-editor-labels.d.ts.map +1 -1
  33. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -122,7 +122,8 @@ var ae = [
122
122
  "lineConnect",
123
123
  "matching",
124
124
  "ordering",
125
- "textMarker"
125
+ "textMarker",
126
+ "textResponse"
126
127
  ], oe = [
127
128
  "solvingProcess",
128
129
  "solvingStrategy",
@@ -161,6 +162,7 @@ var ae = [
161
162
  ordering: "\u6392\u5e8f",
162
163
  richText: "\u6587\u672c",
163
164
  textMarker: "\u6587\u672c\u6807\u6ce8",
165
+ textResponse: "\u6587\u672c\u4f5c\u7b54",
164
166
  wordBuilder: "\u7ec4\u8bcd\u62fc\u5199"
165
167
  }, ue = {
166
168
  choice: "Choice",
@@ -173,6 +175,7 @@ var ae = [
173
175
  ordering: "Ordering",
174
176
  richText: "Text",
175
177
  textMarker: "Text marker",
178
+ textResponse: "Text response",
176
179
  wordBuilder: "Word builder"
177
180
  };
178
181
  function de() {
@@ -201,7 +204,7 @@ function fe(e, t = []) {
201
204
  }
202
205
  function pe(e, t = []) {
203
206
  let n = Ee();
204
- return e === "classification" || e === "fill" || e === "richText" || e === "textMarker" || e === "ordering" ? De(e, n) : me(e, n);
207
+ return e === "classification" || e === "fill" || e === "richText" || e === "textMarker" || e === "textResponse" || e === "ordering" ? De(e, n) : me(e, n);
205
208
  }
206
209
  function me(e, t) {
207
210
  switch (e) {
@@ -1354,7 +1357,7 @@ function Ir(e, t) {
1354
1357
  return e.type === "richText" ? {
1355
1358
  content: j(),
1356
1359
  type: "richText"
1357
- } : e.type === "textMarker" ? {
1360
+ } : e.type === "textResponse" ? { type: "textResponse" } : e.type === "textMarker" ? {
1358
1361
  answers: [],
1359
1362
  content: $t(),
1360
1363
  markers: [],
@@ -1643,7 +1646,7 @@ function ji(e, t = [Rt]) {
1643
1646
  return Ai(e) ? n(e, { plugins: t }) : Ci("");
1644
1647
  }
1645
1648
  function Mi(e) {
1646
- return e.type === "richText" ? N(e.content) : e.type === "textMarker" ? N(e.content) && e.markers.length === 0 : e.type === "classification" ? zi(e) : e.type === "fill" ? e.answers.every(Ii) : Ni(e);
1649
+ return e.type === "textResponse" ? !0 : e.type === "richText" ? N(e.content) : e.type === "textMarker" ? N(e.content) && e.markers.length === 0 : e.type === "classification" ? zi(e) : e.type === "fill" ? e.answers.every(Ii) : Ni(e);
1647
1650
  }
1648
1651
  function Ni(e) {
1649
1652
  switch (e.type) {
@@ -1695,7 +1698,7 @@ function Gi(e) {
1695
1698
  return e.type === "richText" ? {
1696
1699
  content: e.content,
1697
1700
  type: "richText"
1698
- } : e.type === "ordering" ? {
1701
+ } : e.type === "textResponse" ? { type: "textResponse" } : e.type === "ordering" ? {
1699
1702
  answers: ci(e.answers, e.sortOptions),
1700
1703
  sortOptions: si(e.sortOptions),
1701
1704
  type: "ordering"
@@ -1980,6 +1983,7 @@ var fa = {
1980
1983
  tableHeader: "Column {{index}}",
1981
1984
  textContent: "Enter the question stem, material, or prompt",
1982
1985
  textMarkerContent: "Enter text, then select spans to mark",
1986
+ textResponse: "The student will enter a rich-text response here.",
1983
1987
  wordBuilderContent: "Write the stem and insert blanks for built words"
1984
1988
  },
1985
1989
  textMarker: {
@@ -2166,6 +2170,7 @@ var fa = {
2166
2170
  tableHeader: "\u7b2c {{index}} \u5217",
2167
2171
  textContent: "\u8bf7\u8f93\u5165\u9898\u5e72\u3001\u6750\u6599\u6216\u63d0\u793a\u6587\u672c",
2168
2172
  textMarkerContent: "\u8bf7\u8f93\u5165\u6b63\u6587\uff0c\u5e76\u9009\u4e2d\u7247\u6bb5\u8bbe\u4e3a\u6807\u6ce8",
2173
+ textResponse: "\u5b66\u751f\u5c06\u5728\u6b64\u5904\u8f93\u5165\u5bcc\u6587\u672c\u56de\u7b54\u3002",
2169
2174
  wordBuilderContent: "\u8bf7\u8f93\u5165\u9898\u5e72\uff0c\u5e76\u5728\u9700\u8981\u7ec4\u8bcd\u62fc\u5199\u7684\u4f4d\u7f6e\u63d2\u5165\u7a7a\u4f4d"
2170
2175
  },
2171
2176
  textMarker: {
@@ -2219,7 +2224,17 @@ var _a = {
2219
2224
  root: "_root_1ojgr_1",
2220
2225
  "rich-text-root": "_rich-text-root_1ojgr_28",
2221
2226
  "rich-text-toolbar": "_rich-text-toolbar_1ojgr_37"
2222
- }, P = {
2227
+ }, va = { placeholder: "_placeholder_xde95_1" };
2228
+ //#endregion
2229
+ //#region src/question/shared/QuestionTextResponsePlaceholder.tsx
2230
+ function ya({ label: e }) {
2231
+ return /* @__PURE__ */ a("div", {
2232
+ "aria-label": e,
2233
+ className: va.placeholder,
2234
+ children: e
2235
+ });
2236
+ }
2237
+ var P = {
2223
2238
  button: "_button_8wkgm_1",
2224
2239
  "button-small": "_button-small_8wkgm_35",
2225
2240
  "button-danger": "_button-danger_8wkgm_41",
@@ -2244,7 +2259,7 @@ var _a = {
2244
2259
  };
2245
2260
  //#endregion
2246
2261
  //#region \0@oxc-project+runtime@0.129.0/helpers/objectWithoutPropertiesLoose.js
2247
- function va(e, t) {
2262
+ function ba(e, t) {
2248
2263
  if (e == null) return {};
2249
2264
  var n = {};
2250
2265
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -2255,9 +2270,9 @@ function va(e, t) {
2255
2270
  }
2256
2271
  //#endregion
2257
2272
  //#region \0@oxc-project+runtime@0.129.0/helpers/objectWithoutProperties.js
2258
- function ya(e, t) {
2273
+ function xa(e, t) {
2259
2274
  if (e == null) return {};
2260
- var n, r, i = va(e, t);
2275
+ var n, r, i = ba(e, t);
2261
2276
  if (Object.getOwnPropertySymbols) {
2262
2277
  var a = Object.getOwnPropertySymbols(e);
2263
2278
  for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
@@ -2266,7 +2281,7 @@ function ya(e, t) {
2266
2281
  }
2267
2282
  //#endregion
2268
2283
  //#region src/question/content-editor/QuestionContentEditorUi.tsx
2269
- var ba = [
2284
+ var Sa = [
2270
2285
  "children",
2271
2286
  "className",
2272
2287
  "danger",
@@ -2275,7 +2290,7 @@ var ba = [
2275
2290
  "type"
2276
2291
  ];
2277
2292
  function F(e) {
2278
- let { children: t, className: n, danger: r = !1, icon: i, size: s, type: c } = e, l = ya(e, ba);
2293
+ let { children: t, className: n, danger: r = !1, icon: i, size: s, type: c } = e, l = xa(e, Sa);
2279
2294
  return /* @__PURE__ */ o("button", O(O({
2280
2295
  className: [
2281
2296
  P.button,
@@ -2290,7 +2305,7 @@ function F(e) {
2290
2305
  children: i
2291
2306
  }) : null, t] }));
2292
2307
  }
2293
- function xa({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, onChange: i, options: s, placeholder: c, value: l }) {
2308
+ function Ca({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, onChange: i, options: s, placeholder: c, value: l }) {
2294
2309
  function u(e) {
2295
2310
  let t = e.target.value;
2296
2311
  i(t === "" ? void 0 : t);
@@ -2311,7 +2326,7 @@ function xa({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, on
2311
2326
  }, e.value))]
2312
2327
  });
2313
2328
  }
2314
- function Sa({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okText: i, onCancel: s, onOk: c, open: l, title: u }) {
2329
+ function wa({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okText: i, onCancel: s, onOk: c, open: l, title: u }) {
2315
2330
  return l ? /* @__PURE__ */ a("div", {
2316
2331
  className: P["modal-backdrop"],
2317
2332
  role: "presentation",
@@ -2348,7 +2363,7 @@ function Sa({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okTex
2348
2363
  })
2349
2364
  }) : null;
2350
2365
  }
2351
- function Ca({ onChange: e, options: t, value: n }) {
2366
+ function Ta({ onChange: e, options: t, value: n }) {
2352
2367
  return /* @__PURE__ */ a("div", {
2353
2368
  className: P["radio-group"],
2354
2369
  children: t.map((t) => /* @__PURE__ */ o("label", {
@@ -2362,14 +2377,14 @@ function Ca({ onChange: e, options: t, value: n }) {
2362
2377
  }, t.value))
2363
2378
  });
2364
2379
  }
2365
- var wa = { Group: Ca };
2366
- function Ta({ description: e }) {
2380
+ var Ea = { Group: Ta };
2381
+ function Da({ description: e }) {
2367
2382
  return /* @__PURE__ */ a("div", {
2368
2383
  className: P.empty,
2369
2384
  children: e
2370
2385
  });
2371
2386
  }
2372
- function Ea({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
2387
+ function Oa({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
2373
2388
  return /* @__PURE__ */ a("span", {
2374
2389
  className: [
2375
2390
  P.space,
@@ -2380,7 +2395,7 @@ function Ea({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
2380
2395
  children: e
2381
2396
  });
2382
2397
  }
2383
- function Da({ children: e, className: t, strong: n = !1, type: r }) {
2398
+ function ka({ children: e, className: t, strong: n = !1, type: r }) {
2384
2399
  return /* @__PURE__ */ a("span", {
2385
2400
  className: [
2386
2401
  P.text,
@@ -2391,8 +2406,8 @@ function Da({ children: e, className: t, strong: n = !1, type: r }) {
2391
2406
  children: e
2392
2407
  });
2393
2408
  }
2394
- var I = { Text: Da };
2395
- function Oa({ columns: e, dataSource: t, rowKey: n }) {
2409
+ var I = { Text: ka };
2410
+ function Aa({ columns: e, dataSource: t, rowKey: n }) {
2396
2411
  return /* @__PURE__ */ a("div", {
2397
2412
  className: P["table-wrap"],
2398
2413
  children: /* @__PURE__ */ o("table", {
@@ -2401,19 +2416,19 @@ function Oa({ columns: e, dataSource: t, rowKey: n }) {
2401
2416
  style: { width: e.width },
2402
2417
  children: e.title
2403
2418
  }, e.key)) }) }), /* @__PURE__ */ a("tbody", { children: t.map((t, r) => /* @__PURE__ */ a("tr", { children: e.map((e) => {
2404
- let n = ka(t, e.dataIndex);
2405
- return /* @__PURE__ */ a("td", { children: e.render ? e.render(n, t, r) : Aa(n) }, e.key);
2419
+ let n = ja(t, e.dataIndex);
2420
+ return /* @__PURE__ */ a("td", { children: e.render ? e.render(n, t, r) : Ma(n) }, e.key);
2406
2421
  }) }, n(t))) })]
2407
2422
  })
2408
2423
  });
2409
2424
  }
2410
- function ka(e, t) {
2425
+ function ja(e, t) {
2411
2426
  var n;
2412
2427
  if (!t || typeof e != "object" || !e) return;
2413
2428
  let r = String(t);
2414
2429
  return (n = Object.entries(e).find(([e]) => e === r)) == null ? void 0 : n[1];
2415
2430
  }
2416
- function Aa(e) {
2431
+ function Ma(e) {
2417
2432
  return typeof e == "boolean" || typeof e == "number" || typeof e == "string" ? String(e) : "";
2418
2433
  }
2419
2434
  var L = {
@@ -2426,7 +2441,7 @@ var L = {
2426
2441
  };
2427
2442
  //#endregion
2428
2443
  //#region src/question/rich-text/RichTextFieldTestToolbar.tsx
2429
- function ja({ toolbarExtra: e }) {
2444
+ function Na({ toolbarExtra: e }) {
2430
2445
  return /* @__PURE__ */ o("div", {
2431
2446
  className: L.toolbar,
2432
2447
  role: "toolbar",
@@ -2457,30 +2472,37 @@ function ja({ toolbarExtra: e }) {
2457
2472
  }
2458
2473
  //#endregion
2459
2474
  //#region src/question/rich-text/RichTextField.tsx
2460
- function Ma({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s = [], toolbarExtra: c, uploadImage: l, value: u }) {
2461
- let d = da() && !c;
2462
- return Na() ? /* @__PURE__ */ o("div", {
2463
- className: Pa(r),
2464
- children: [/* @__PURE__ */ a(ja, { toolbarExtra: c }), /* @__PURE__ */ a("textarea", {
2475
+ function Pa({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, locale: s, placeholder: c, plugins: l = [], toolbarExtra: u, toolbarMode: d = "auto", uploadImage: f, value: p }) {
2476
+ let m = Fa({
2477
+ hasSharedToolbar: da(),
2478
+ hasToolbarExtra: !!u,
2479
+ toolbarMode: d
2480
+ });
2481
+ return Ia() ? /* @__PURE__ */ o("div", {
2482
+ className: La(r),
2483
+ children: [/* @__PURE__ */ a(Na, { toolbarExtra: u }), /* @__PURE__ */ a("textarea", {
2465
2484
  "aria-label": n,
2466
2485
  className: `${L.textarea} rich-content-editor-surface`,
2467
2486
  onChange: (e) => i(Me(e.target.value)),
2468
- value: u.text
2487
+ placeholder: c,
2488
+ value: p.text
2469
2489
  })]
2470
- }) : d ? /* @__PURE__ */ a("div", {
2471
- className: Pa(r),
2472
- children: Ia({
2490
+ }) : m ? /* @__PURE__ */ a("div", {
2491
+ className: La(r),
2492
+ children: za({
2473
2493
  apiRef: t,
2474
2494
  ariaLabel: n,
2475
2495
  compact: r,
2476
2496
  onChange: i,
2477
- value: u
2497
+ placeholder: c,
2498
+ value: p
2478
2499
  })
2479
2500
  }) : /* @__PURE__ */ a("div", {
2480
- className: Pa(r),
2501
+ className: La(r),
2481
2502
  children: /* @__PURE__ */ o(e.Root, {
2482
- plugins: s,
2483
- uploadImage: l,
2503
+ locale: s,
2504
+ plugins: l,
2505
+ uploadImage: f,
2484
2506
  children: [/* @__PURE__ */ o(e.Toolbar, {
2485
2507
  "aria-label": `${n} toolbar`,
2486
2508
  children: [
@@ -2502,34 +2524,39 @@ function Ma({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s
2502
2524
  "aria-label": "Insert",
2503
2525
  children: [/* @__PURE__ */ a(e.Toolbar.ImageButton, { "aria-label": "Image" }), /* @__PURE__ */ a(e.Toolbar.TableButton, { "aria-label": "Table" })]
2504
2526
  }),
2505
- c
2527
+ u
2506
2528
  ]
2507
2529
  }), /* @__PURE__ */ a(e.Editor, {
2508
2530
  apiRef: t,
2509
2531
  "aria-label": n,
2510
- className: Fa(r),
2511
- initialValue: u.json,
2512
- onChange: (e) => i(Ne({ json: e }))
2532
+ className: Ra(r),
2533
+ initialValue: p.json,
2534
+ onChange: (e) => i(Ne({ json: e })),
2535
+ placeholder: c
2513
2536
  })]
2514
2537
  })
2515
2538
  });
2516
2539
  }
2517
- function Na() {
2540
+ function Fa({ hasSharedToolbar: e, hasToolbarExtra: t, toolbarMode: n }) {
2541
+ return n === "auto" && e && !t;
2542
+ }
2543
+ function Ia() {
2518
2544
  return typeof navigator < "u" && navigator.userAgent.toLowerCase().includes("jsdom");
2519
2545
  }
2520
- function Pa(e) {
2546
+ function La(e) {
2521
2547
  return e ? `${L.field} ${L.compact} rich-content-editor is-compact` : `${L.field} rich-content-editor`;
2522
2548
  }
2523
- function Fa(e) {
2549
+ function Ra(e) {
2524
2550
  return e ? `${L.editor} ${L.compact} rich-content-editor-surface is-compact` : `${L.editor} rich-content-editor-surface`;
2525
2551
  }
2526
- function Ia({ apiRef: t, ariaLabel: n, compact: r, onChange: i, value: o }) {
2552
+ function za({ apiRef: t, ariaLabel: n, compact: r, onChange: i, placeholder: o, value: s }) {
2527
2553
  return /* @__PURE__ */ a(e.Editor, {
2528
2554
  apiRef: t,
2529
2555
  "aria-label": n,
2530
- className: Fa(r),
2531
- initialValue: o.json,
2532
- onChange: (e) => i(Ne({ json: e }))
2556
+ className: Ra(r),
2557
+ initialValue: s.json,
2558
+ onChange: (e) => i(Ne({ json: e })),
2559
+ placeholder: o
2533
2560
  });
2534
2561
  }
2535
2562
  //#endregion
@@ -2538,7 +2565,7 @@ function R({ controls: e, disabled: t, editorRef: n, label: r, onChange: i, plac
2538
2565
  return /* @__PURE__ */ o("div", {
2539
2566
  "aria-disabled": t,
2540
2567
  className: t ? "pointer-events-none opacity-70" : void 0,
2541
- children: [/* @__PURE__ */ a(Ma, {
2568
+ children: [/* @__PURE__ */ a(Pa, {
2542
2569
  apiRef: n,
2543
2570
  ariaLabel: r,
2544
2571
  compact: l === "compact",
@@ -2554,21 +2581,21 @@ function R({ controls: e, disabled: t, editorRef: n, label: r, onChange: i, plac
2554
2581
  }
2555
2582
  //#endregion
2556
2583
  //#region src/question/content-editor/QuestionContentBlankGroupEditor.tsx
2557
- function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: s, translator: c }) {
2584
+ function Ba({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: s, translator: c }) {
2558
2585
  let { t: l } = c, [u, d] = m(null), [f, p] = m(null), h = t ? M(n.answers, n.blanks) : [], g = Vn(h);
2559
2586
  function _(e) {
2560
2587
  r(O(O({}, e), {}, { answers: t ? M(e.answers, e.blanks) : [] }));
2561
2588
  }
2562
2589
  function v(e, t, r) {
2563
- let i = Ra(h, e);
2590
+ let i = Va(h, e);
2564
2591
  i && _(Gn(O(O({}, n), {}, { answers: h }), e, i.answerPools.map((e, n) => n === t ? r : e)));
2565
2592
  }
2566
2593
  function y(e) {
2567
- let t = Ra(h, e);
2594
+ let t = Va(h, e);
2568
2595
  t && _(Gn(O(O({}, n), {}, { answers: h }), e, [...t.answerPools, j()]));
2569
2596
  }
2570
2597
  function b(e, t) {
2571
- let r = Ra(h, e);
2598
+ let r = Va(h, e);
2572
2599
  r && _(Gn(O(O({}, n), {}, { answers: h }), e, r.answerPools.filter((e, n) => n !== t)));
2573
2600
  }
2574
2601
  function x(e, t) {
@@ -2644,7 +2671,7 @@ function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2644
2671
  }),
2645
2672
  /* @__PURE__ */ o("label", {
2646
2673
  className: "flex min-w-0 items-center gap-2",
2647
- children: [/* @__PURE__ */ a(I.Text, { children: l("questionContentEditor.blank.answers") }), /* @__PURE__ */ a(xa, {
2674
+ children: [/* @__PURE__ */ a(I.Text, { children: l("questionContentEditor.blank.answers") }), /* @__PURE__ */ a(Ca, {
2648
2675
  "aria-label": l("questionContentEditor.blank.answerSelectAria", { index: r + 1 }),
2649
2676
  className: "w-48",
2650
2677
  disabled: e,
@@ -2706,7 +2733,7 @@ function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2706
2733
  function te() {
2707
2734
  let e = /* @__PURE__ */ new Set();
2708
2735
  return n.blanks.reduce((t, n, r) => {
2709
- let i = h.findIndex((e) => e.blankIds.includes(n)), a = Ra(h, i);
2736
+ let i = h.findIndex((e) => e.blankIds.includes(n)), a = Va(h, i);
2710
2737
  if (!a) return t;
2711
2738
  if (a.blankIds.length > 1) {
2712
2739
  if (e.has(i)) return t;
@@ -2722,7 +2749,7 @@ function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2722
2749
  className: "flex min-w-0 flex-col gap-3",
2723
2750
  children: te()
2724
2751
  })
2725
- }), /* @__PURE__ */ a(Sa, {
2752
+ }), /* @__PURE__ */ a(wa, {
2726
2753
  cancelText: l("questionContentEditor.actions.cancel"),
2727
2754
  closeLabel: l("questionContentEditor.actions.close"),
2728
2755
  okButtonProps: { disabled: !f },
@@ -2736,7 +2763,7 @@ function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2736
2763
  children: [/* @__PURE__ */ a(I.Text, {
2737
2764
  type: "secondary",
2738
2765
  children: l("questionContentEditor.blank.createGroupDescription")
2739
- }), /* @__PURE__ */ a(wa.Group, {
2766
+ }), /* @__PURE__ */ a(Ea.Group, {
2740
2767
  onChange: (e) => p(String(e.target.value)),
2741
2768
  options: S(u == null ? "" : u).map((e) => ({
2742
2769
  label: l("questionContentEditor.blank.shortLabel", { index: n.blanks.indexOf(e) + 1 }),
@@ -2753,7 +2780,7 @@ function La({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2753
2780
  })
2754
2781
  });
2755
2782
  }
2756
- function Ra(e, t) {
2783
+ function Va(e, t) {
2757
2784
  return e.slice(t, t + 1)[0];
2758
2785
  }
2759
2786
  var z = {
@@ -2779,7 +2806,7 @@ var z = {
2779
2806
  };
2780
2807
  //#endregion
2781
2808
  //#region src/question/content-editor/QuestionContentClassificationEditor.tsx
2782
- function za({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
2809
+ function Ha({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
2783
2810
  let { t: c } = s, l = Sr(n, t);
2784
2811
  function u(e) {
2785
2812
  r(Sr(e, t));
@@ -2838,7 +2865,7 @@ function za({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2838
2865
  variant: "compact"
2839
2866
  })
2840
2867
  }),
2841
- Ba({
2868
+ Ua({
2842
2869
  ariaLabel: c("questionContentEditor.classification.deleteCategory", { index: n + 1 }),
2843
2870
  disabled: e || l.categories.length <= 1,
2844
2871
  onClick: () => u(wr(l, t.id))
@@ -2887,7 +2914,7 @@ function za({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2887
2914
  value: n.content,
2888
2915
  variant: "compact"
2889
2916
  })
2890
- }), Ba({
2917
+ }), Ua({
2891
2918
  ariaLabel: c("questionContentEditor.classification.deleteCard", { index: r + 1 }),
2892
2919
  disabled: e || l.items.length <= 1,
2893
2920
  onClick: () => u(Dr(l, n.id))
@@ -2897,7 +2924,7 @@ function za({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2897
2924
  children: [/* @__PURE__ */ a("span", {
2898
2925
  className: z["answer-label"],
2899
2926
  children: c("questionContentEditor.classification.correctCategory")
2900
- }), /* @__PURE__ */ a(xa, {
2927
+ }), /* @__PURE__ */ a(Ca, {
2901
2928
  allowClear: !0,
2902
2929
  "aria-label": `${c("questionContentEditor.blank.correctAnswer")} ${r + 1}`,
2903
2930
  className: z.select,
@@ -2917,7 +2944,7 @@ function za({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
2917
2944
  })]
2918
2945
  });
2919
2946
  }
2920
- function Ba({ ariaLabel: e, disabled: t, onClick: n }) {
2947
+ function Ua({ ariaLabel: e, disabled: t, onClick: n }) {
2921
2948
  return /* @__PURE__ */ a(F, {
2922
2949
  "aria-label": e,
2923
2950
  className: z["icon-button"],
@@ -2934,7 +2961,7 @@ function Ba({ ariaLabel: e, disabled: t, onClick: n }) {
2934
2961
  }
2935
2962
  //#endregion
2936
2963
  //#region src/question/content-editor/QuestionContentFillTextEditor.tsx
2937
- function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richTextControls: c, title: l, translator: u }) {
2964
+ function Wa({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richTextControls: c, title: l, translator: u }) {
2938
2965
  let { t: d } = u, f = p(null), [h, g] = m({}), [_, v] = m(null), [y, b] = m(null), x = En(r, t, n), S = {
2939
2966
  answers: x.answers.filter((e) => "answerPools" in e),
2940
2967
  blanks: x.blanks,
@@ -2977,7 +3004,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
2977
3004
  let r = D(), i = r.slice(e, e + 1)[0];
2978
3005
  if (!i) return;
2979
3006
  let a = te(i), o = (t < i.answerOptionIds.length ? i.answerOptionIds.map((e, r) => r === t ? n : e) : [...i.answerOptionIds, n]).filter((e, t, n) => !!e && n.indexOf(e) === t);
2980
- t >= i.answerOptionIds.length && n && g((e) => O(O({}, e), {}, { [a]: Math.max(0, Ha(e, a) - 1) })), ne(r.map((t, n) => n === e ? O(O({}, t), {}, { answerOptionIds: o }) : t));
3007
+ t >= i.answerOptionIds.length && n && g((e) => O(O({}, e), {}, { [a]: Math.max(0, Ga(e, a) - 1) })), ne(r.map((t, n) => n === e ? O(O({}, t), {}, { answerOptionIds: o }) : t));
2981
3008
  }
2982
3009
  function ie(e) {
2983
3010
  let t = Fn(x.blankOptionGroups, x.blanks).find((t) => t.blankId === e);
@@ -3044,7 +3071,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3044
3071
  }
3045
3072
  function ge(e) {
3046
3073
  let t = te(e);
3047
- g((e) => O(O({}, e), {}, { [t]: Ha(e, t) + 1 }));
3074
+ g((e) => O(O({}, e), {}, { [t]: Ga(e, t) + 1 }));
3048
3075
  }
3049
3076
  function _e(e, t) {
3050
3077
  return [
@@ -3136,7 +3163,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3136
3163
  return new Set(D().filter((e) => e.blankIds.every((e) => !n.has(e))).reduce((e, t) => [...e, ...t.answerOptionIds], []));
3137
3164
  }
3138
3165
  function A(t, n) {
3139
- let r = te(t), i = In(t), s = i.length ? [...i, ...Array.from({ length: Ha(h, r) }, () => "")] : Array.from({ length: Ha(h, r) + 1 }, () => ""), c = k(t), l = Se().map((e, t) => {
3166
+ let r = te(t), i = In(t), s = i.length ? [...i, ...Array.from({ length: Ga(h, r) }, () => "")] : Array.from({ length: Ga(h, r) + 1 }, () => ""), c = k(t), l = Se().map((e, t) => {
3140
3167
  let n = on("upperAlpha", t), r = i.includes(e.optionId);
3141
3168
  return {
3142
3169
  disabled: c.has(e.optionId) && !r,
@@ -3146,7 +3173,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3146
3173
  });
3147
3174
  return /* @__PURE__ */ o("div", {
3148
3175
  className: "flex min-w-0 flex-wrap items-center gap-3",
3149
- children: [s.map((t, i) => /* @__PURE__ */ a(xa, {
3176
+ children: [s.map((t, i) => /* @__PURE__ */ a(Ca, {
3150
3177
  allowClear: !0,
3151
3178
  "aria-label": d("questionContentEditor.blank.answerPool", {
3152
3179
  groupIndex: n + 1,
@@ -3203,7 +3230,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3203
3230
  strong: !0,
3204
3231
  children: d("questionContentEditor.blank.shortLabel", { index: n + 1 })
3205
3232
  }),
3206
- /* @__PURE__ */ a(xa, {
3233
+ /* @__PURE__ */ a(Ca, {
3207
3234
  "aria-label": d("questionContentEditor.blank.answerAssignmentAria", { index: n + 1 }),
3208
3235
  className: "w-48",
3209
3236
  disabled: e,
@@ -3275,7 +3302,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3275
3302
  children: [/* @__PURE__ */ a(I.Text, {
3276
3303
  strong: !0,
3277
3304
  children: d("questionContentEditor.blank.correctAnswer")
3278
- }), /* @__PURE__ */ a(xa, {
3305
+ }), /* @__PURE__ */ a(Ca, {
3279
3306
  "aria-label": d("questionContentEditor.blank.correctAnswerAria", { index: r + 1 }),
3280
3307
  className: "min-w-48",
3281
3308
  disabled: e,
@@ -3335,7 +3362,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3335
3362
  placeholder: d("questionContentEditor.placeholders.fillTextContent"),
3336
3363
  value: x.content
3337
3364
  }),
3338
- t.config.candidateMode === "none" ? /* @__PURE__ */ a(La, {
3365
+ t.config.candidateMode === "none" ? /* @__PURE__ */ a(Ba, {
3339
3366
  disabled: e,
3340
3367
  hasAnswer: n,
3341
3368
  item: S,
@@ -3343,7 +3370,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3343
3370
  richTextControls: c,
3344
3371
  translator: u
3345
3372
  }) : Me(),
3346
- /* @__PURE__ */ a(Sa, {
3373
+ /* @__PURE__ */ a(wa, {
3347
3374
  cancelText: d("questionContentEditor.actions.cancel"),
3348
3375
  closeLabel: d("questionContentEditor.actions.close"),
3349
3376
  okButtonProps: { disabled: !y },
@@ -3357,7 +3384,7 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3357
3384
  children: [/* @__PURE__ */ a(I.Text, {
3358
3385
  type: "secondary",
3359
3386
  children: d("questionContentEditor.blank.createGroupDescription")
3360
- }), /* @__PURE__ */ a(wa.Group, {
3387
+ }), /* @__PURE__ */ a(Ea.Group, {
3361
3388
  onChange: (e) => b(String(e.target.value)),
3362
3389
  options: ve(),
3363
3390
  value: y
@@ -3367,13 +3394,13 @@ function Va({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3367
3394
  ]
3368
3395
  });
3369
3396
  }
3370
- function Ha(e, t) {
3397
+ function Ga(e, t) {
3371
3398
  var n, r;
3372
3399
  return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? 0 : n;
3373
3400
  }
3374
3401
  //#endregion
3375
3402
  //#region src/question/content-editor/QuestionContentJudgementGroupEditor.tsx
3376
- function Ua({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, translator: o }) {
3403
+ function Ka({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, translator: o }) {
3377
3404
  let { t: s } = o, c = un(t.config.judgeAnswerMode), l = n ? r.answers.slice(0, 1) : [];
3378
3405
  function u(e) {
3379
3406
  i(O(O({}, r), {}, { answers: l.includes(e) ? [] : [e] }));
@@ -3399,18 +3426,18 @@ function Ua({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, trans
3399
3426
  }
3400
3427
  //#endregion
3401
3428
  //#region src/utils/cn.ts
3402
- function Wa(...e) {
3403
- return e.reduce((e, t) => [...e, ...Ga(t)], []).join(" ");
3429
+ function qa(...e) {
3430
+ return e.reduce((e, t) => [...e, ...Ja(t)], []).join(" ");
3404
3431
  }
3405
- function Ga(e) {
3406
- return e ? Ka(e) ? e.reduce((e, t) => [...e, ...Ga(t)], []) : [e] : [];
3432
+ function Ja(e) {
3433
+ return e ? Ya(e) ? e.reduce((e, t) => [...e, ...Ja(t)], []) : [e] : [];
3407
3434
  }
3408
- function Ka(e) {
3435
+ function Ya(e) {
3409
3436
  return Array.isArray(e);
3410
3437
  }
3411
3438
  //#endregion
3412
3439
  //#region src/question/line-connect/lineConnectLines.ts
3413
- function qa(e, t, n = ot) {
3440
+ function Xa(e, t, n = ot) {
3414
3441
  let r = e.columns.reduce((e, t, n) => (t.items.forEach((t, r) => e.set(t.itemId, {
3415
3442
  columnIndex: n,
3416
3443
  itemIndex: r
@@ -3431,25 +3458,25 @@ function qa(e, t, n = ot) {
3431
3458
  }, [])] : e;
3432
3459
  }, []);
3433
3460
  }
3434
- function Ja(e, t, n) {
3461
+ function Za(e, t, n) {
3435
3462
  return e.left - t.left + n + e.width / 2;
3436
3463
  }
3437
- function Ya(e, t, n) {
3464
+ function Qa(e, t, n) {
3438
3465
  return e.top - t.top + n + e.height / 2;
3439
3466
  }
3440
- function Xa(e, t, n) {
3467
+ function $a(e, t, n) {
3441
3468
  return e.left - t.left + n;
3442
3469
  }
3443
- function Za(e, t, n) {
3470
+ function eo(e, t, n) {
3444
3471
  return e.right - t.left + n;
3445
3472
  }
3446
- function Qa(e, t) {
3447
- e((e) => $a(e, t) ? e : t);
3473
+ function to(e, t) {
3474
+ e((e) => no(e, t) ? e : t);
3448
3475
  }
3449
- function $a(e, t) {
3450
- return (e == null ? void 0 : e.height) === t.height && e.width === t.width && e.lines.length === t.lines.length && e.lines.every((e, n) => eo(e, t.lines[n]));
3476
+ function no(e, t) {
3477
+ return (e == null ? void 0 : e.height) === t.height && e.width === t.width && e.lines.length === t.lines.length && e.lines.every((e, n) => ro(e, t.lines[n]));
3451
3478
  }
3452
- function eo(e, t) {
3479
+ function ro(e, t) {
3453
3480
  return t !== void 0 && e.key === t.key && e.x1 === t.x1 && e.x2 === t.x2 && e.y1 === t.y1 && e.y2 === t.y2;
3454
3481
  }
3455
3482
  var B = {
@@ -3471,7 +3498,7 @@ var B = {
3471
3498
  "connect-dot": "_connect-dot_1cqr2_56",
3472
3499
  "connect-button-connected": "_connect-button-connected_1cqr2_64",
3473
3500
  "connect-button-selected": "_connect-button-selected_1cqr2_70"
3474
- }, to = [
3501
+ }, io = [
3475
3502
  "number",
3476
3503
  "upperAlpha",
3477
3504
  "lowerAlpha",
@@ -3479,29 +3506,29 @@ var B = {
3479
3506
  "chineseNumber",
3480
3507
  "none"
3481
3508
  ];
3482
- function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
3509
+ function ao({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
3483
3510
  let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = or(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, ee = f(() => JSON.stringify({
3484
3511
  answers: x.answers,
3485
3512
  columns: x.columns.map((e) => e.items.map((e) => e.itemId))
3486
- }), [x.answers, x.columns]), C = f(() => n ? qa(x, x.answers) : [], [n, x]), w = l(() => {
3513
+ }), [x.answers, x.columns]), C = f(() => n ? Xa(x, x.answers) : [], [n, x]), w = l(() => {
3487
3514
  let e = y.current;
3488
3515
  if (!n || !e || C.length === 0) {
3489
3516
  v(null);
3490
3517
  return;
3491
3518
  }
3492
3519
  let t = e.getBoundingClientRect(), r = C.reduce((n, r) => {
3493
- let i = b.current.get(co(r.fromItemId, "outgoing")), a = b.current.get(co(r.toItemId, "incoming"));
3520
+ let i = b.current.get(fo(r.fromItemId, "outgoing")), a = b.current.get(fo(r.toItemId, "incoming"));
3494
3521
  if (!i || !a) return n;
3495
3522
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
3496
3523
  return [...n, {
3497
3524
  key: r.key,
3498
- x1: Ja(o, t, e.scrollLeft),
3499
- x2: Ja(s, t, e.scrollLeft),
3500
- y1: Ya(o, t, e.scrollTop),
3501
- y2: Ya(s, t, e.scrollTop)
3525
+ x1: Za(o, t, e.scrollLeft),
3526
+ x2: Za(s, t, e.scrollLeft),
3527
+ y1: Qa(o, t, e.scrollTop),
3528
+ y2: Qa(s, t, e.scrollTop)
3502
3529
  }];
3503
3530
  }, []);
3504
- Qa(v, {
3531
+ to(v, {
3505
3532
  height: e.scrollHeight,
3506
3533
  lines: r,
3507
3534
  width: e.scrollWidth
@@ -3521,7 +3548,7 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3521
3548
  ]);
3522
3549
  function T(e, t) {
3523
3550
  return (n) => {
3524
- let r = co(e, t);
3551
+ let r = fo(e, t);
3525
3552
  if (n) {
3526
3553
  b.current.set(r, n);
3527
3554
  return;
@@ -3569,11 +3596,11 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3569
3596
  children: u("questionContentEditor.lineConnect.column", { index: n + 1 })
3570
3597
  }), /* @__PURE__ */ o("div", {
3571
3598
  className: "flex items-center gap-2",
3572
- children: [/* @__PURE__ */ a(xa, {
3599
+ children: [/* @__PURE__ */ a(Ca, {
3573
3600
  "aria-label": u("questionContentEditor.lineConnect.labelStyle", { index: n + 1 }),
3574
3601
  disabled: e,
3575
3602
  onChange: (e) => e ? E(lr(x, t.columnId, e)) : void 0,
3576
- options: to.map((e) => ({
3603
+ options: io.map((e) => ({
3577
3604
  label: u(`questionContentEditor.lineConnect.labels.${e}`),
3578
3605
  value: e
3579
3606
  })),
@@ -3604,9 +3631,9 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3604
3631
  }, t.columnId);
3605
3632
  }
3606
3633
  function ae(t, r, i, c) {
3607
- let l = sn(t.labelStyle, c), d = l ? `${l}. ${i.content.text}` : i.content.text, f = (h == null ? void 0 : h.itemId) === i.itemId, p = ro(x, i.itemId), m = io(x, i.itemId), g = ao(p, m), _ = oo(n);
3634
+ let l = sn(t.labelStyle, c), d = l ? `${l}. ${i.content.text}` : i.content.text, f = (h == null ? void 0 : h.itemId) === i.itemId, p = oo(x, i.itemId), m = so(x, i.itemId), g = co(p, m), _ = lo(n);
3608
3635
  return /* @__PURE__ */ o("div", {
3609
- className: so(f, g),
3636
+ className: uo(f, g),
3610
3637
  "data-testid": `line-connect-item-${i.itemId}`,
3611
3638
  style: _,
3612
3639
  children: [
@@ -3642,7 +3669,7 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3642
3669
  return n ? /* @__PURE__ */ a("button", {
3643
3670
  "aria-label": ce("incoming", t, i, r.content.text),
3644
3671
  "aria-pressed": c,
3645
- className: Wa(V.marker, V["incoming-marker"], c && V["connect-button-connected"]),
3672
+ className: qa(V.marker, V["incoming-marker"], c && V["connect-button-connected"]),
3646
3673
  disabled: e,
3647
3674
  onClick: () => ne(t, r.itemId, s),
3648
3675
  ref: T(r.itemId, "incoming"),
@@ -3662,7 +3689,7 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3662
3689
  return n ? /* @__PURE__ */ a("button", {
3663
3690
  "aria-label": ce("outgoing", t, i, r.content.text),
3664
3691
  "aria-pressed": s,
3665
- className: Wa(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
3692
+ className: qa(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
3666
3693
  disabled: e,
3667
3694
  ref: T(r.itemId, "outgoing"),
3668
3695
  onClick: () => ne(t, r.itemId, o),
@@ -3722,26 +3749,26 @@ function no({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3722
3749
  ]
3723
3750
  });
3724
3751
  }
3725
- function ro(e, t) {
3752
+ function oo(e, t) {
3726
3753
  return Object.values(e.answers).some((e) => e.includes(t));
3727
3754
  }
3728
- function io(e, t) {
3755
+ function so(e, t) {
3729
3756
  var n;
3730
3757
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
3731
3758
  }
3732
- function ao(e, t) {
3759
+ function co(e, t) {
3733
3760
  return e || t;
3734
3761
  }
3735
- function oo(e) {
3762
+ function lo(e) {
3736
3763
  return { gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto" };
3737
3764
  }
3738
- function so(e, t) {
3739
- return Wa("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
3765
+ function uo(e, t) {
3766
+ return qa("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
3740
3767
  }
3741
- function co(e, t) {
3768
+ function fo(e, t) {
3742
3769
  return `${t}:${e}`;
3743
3770
  }
3744
- var lo = {
3771
+ var po = {
3745
3772
  board: "_board_30ao0_1",
3746
3773
  "connect-board": "_connect-board_30ao0_7",
3747
3774
  columns: "_columns_30ao0_14",
@@ -3751,7 +3778,7 @@ var lo = {
3751
3778
  selected: "_selected_30ao0_46",
3752
3779
  matched: "_matched_30ao0_51",
3753
3780
  marker: "_marker_30ao0_55"
3754
- }, uo = [
3781
+ }, mo = [
3755
3782
  "number",
3756
3783
  "upperAlpha",
3757
3784
  "lowerAlpha",
@@ -3759,8 +3786,8 @@ var lo = {
3759
3786
  "chineseNumber",
3760
3787
  "none"
3761
3788
  ];
3762
- function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
3763
- let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = mr(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, ee = f(() => n ? qa(x, x.answers, vt) : [], [n, x]), C = f(() => JSON.stringify({
3789
+ function ho({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
3790
+ let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = mr(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, ee = f(() => n ? Xa(x, x.answers, vt) : [], [n, x]), C = f(() => JSON.stringify({
3764
3791
  answers: x.answers,
3765
3792
  columns: x.columns.map((e) => e.items.map((e) => e.itemId))
3766
3793
  }), [x.answers, x.columns]), w = l(() => {
@@ -3770,18 +3797,18 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3770
3797
  return;
3771
3798
  }
3772
3799
  let t = e.getBoundingClientRect(), r = ee.reduce((n, r) => {
3773
- let i = b.current.get(go(r.fromItemId, "outgoing")), a = b.current.get(go(r.toItemId, "incoming"));
3800
+ let i = b.current.get(yo(r.fromItemId, "outgoing")), a = b.current.get(yo(r.toItemId, "incoming"));
3774
3801
  if (!i || !a) return n;
3775
3802
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
3776
3803
  return [...n, {
3777
3804
  key: r.key,
3778
- x1: Ja(o, t, e.scrollLeft),
3779
- x2: Ja(s, t, e.scrollLeft),
3780
- y1: Ya(o, t, e.scrollTop),
3781
- y2: Ya(s, t, e.scrollTop)
3805
+ x1: Za(o, t, e.scrollLeft),
3806
+ x2: Za(s, t, e.scrollLeft),
3807
+ y1: Qa(o, t, e.scrollTop),
3808
+ y2: Qa(s, t, e.scrollTop)
3782
3809
  }];
3783
3810
  }, []);
3784
- Qa(v, {
3811
+ to(v, {
3785
3812
  height: e.scrollHeight,
3786
3813
  lines: r,
3787
3814
  width: e.scrollWidth
@@ -3801,7 +3828,7 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3801
3828
  ]);
3802
3829
  function T(e, t) {
3803
3830
  return (n) => {
3804
- let r = go(e, t);
3831
+ let r = yo(e, t);
3805
3832
  if (n) {
3806
3833
  b.current.set(r, n);
3807
3834
  return;
@@ -3830,15 +3857,15 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3830
3857
  }
3831
3858
  function ne(t, n) {
3832
3859
  return /* @__PURE__ */ o("section", {
3833
- className: lo.column,
3860
+ className: po.column,
3834
3861
  children: [
3835
3862
  /* @__PURE__ */ a("div", {
3836
3863
  className: "flex min-w-0 flex-wrap items-center justify-end gap-2",
3837
- children: /* @__PURE__ */ a(xa, {
3864
+ children: /* @__PURE__ */ a(Ca, {
3838
3865
  "aria-label": u("questionContentEditor.matching.labelStyle", { index: n + 1 }),
3839
3866
  disabled: e,
3840
3867
  onChange: (e) => e ? E(hr(x, t.columnId, e)) : void 0,
3841
- options: uo.map((e) => ({
3868
+ options: mo.map((e) => ({
3842
3869
  label: u(`questionContentEditor.matching.labels.${e}`),
3843
3870
  value: e
3844
3871
  })),
@@ -3846,7 +3873,7 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3846
3873
  })
3847
3874
  }),
3848
3875
  /* @__PURE__ */ a("div", {
3849
- className: lo.items,
3876
+ className: po.items,
3850
3877
  children: t.items.map((e, r) => re(t, n, e, r))
3851
3878
  }),
3852
3879
  /* @__PURE__ */ a(F, {
@@ -3861,9 +3888,9 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3861
3888
  }, t.columnId);
3862
3889
  }
3863
3890
  function re(t, r, i, c) {
3864
- let l = cn(t.labelStyle, c), d = (h == null ? void 0 : h.itemId) === i.itemId, f = po(x, i.itemId), p = mo(x, i.itemId), m = f || p, g = l ? `${l}. ${i.content.text}` : i.content.text, _ = ho(n);
3891
+ let l = cn(t.labelStyle, c), d = (h == null ? void 0 : h.itemId) === i.itemId, f = go(x, i.itemId), p = _o(x, i.itemId), m = f || p, g = l ? `${l}. ${i.content.text}` : i.content.text, _ = vo(n);
3865
3892
  return /* @__PURE__ */ o("div", {
3866
- className: Wa(lo.item, d ? lo.selected : "", m ? lo.matched : ""),
3893
+ className: qa(po.item, d ? po.selected : "", m ? po.matched : ""),
3867
3894
  "data-testid": `matching-editor-item-${i.itemId}`,
3868
3895
  style: _,
3869
3896
  children: [
@@ -3899,7 +3926,7 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3899
3926
  return n ? /* @__PURE__ */ a("button", {
3900
3927
  "aria-label": oe("incoming", t, i, r.content.text),
3901
3928
  "aria-pressed": c,
3902
- className: Wa(lo.marker, V["incoming-marker"], c && V["connect-button-connected"]),
3929
+ className: qa(po.marker, V["incoming-marker"], c && V["connect-button-connected"]),
3903
3930
  disabled: e,
3904
3931
  onClick: () => te(t, r.itemId, s),
3905
3932
  ref: T(r.itemId, "incoming"),
@@ -3910,7 +3937,7 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3910
3937
  className: V["connect-dot"]
3911
3938
  })
3912
3939
  }) : o ? /* @__PURE__ */ a("span", {
3913
- className: lo.marker,
3940
+ className: po.marker,
3914
3941
  children: o
3915
3942
  }) : /* @__PURE__ */ a("span", {});
3916
3943
  }
@@ -3918,7 +3945,7 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3918
3945
  return n ? /* @__PURE__ */ a("button", {
3919
3946
  "aria-label": oe("outgoing", t, i, r.content.text),
3920
3947
  "aria-pressed": s,
3921
- className: Wa(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
3948
+ className: qa(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
3922
3949
  disabled: e,
3923
3950
  onClick: () => te(t, r.itemId, o),
3924
3951
  ref: T(r.itemId, "outgoing"),
@@ -3938,13 +3965,13 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3938
3965
  });
3939
3966
  }
3940
3967
  return /* @__PURE__ */ o("div", {
3941
- className: lo.board,
3968
+ className: po.board,
3942
3969
  children: [n ? /* @__PURE__ */ a("div", {
3943
3970
  "aria-live": "polite",
3944
3971
  className: "rounded-md border border-blue-100 bg-blue-50 px-3 py-2 text-sm text-blue-700",
3945
3972
  children: h ? u("questionContentEditor.matching.connectHintActive", { label: h.label }) : u("questionContentEditor.matching.connectHintIdle")
3946
3973
  }) : null, /* @__PURE__ */ o("div", {
3947
- className: lo["connect-board"],
3974
+ className: po["connect-board"],
3948
3975
  "data-testid": "matching-editor-board",
3949
3976
  ref: y,
3950
3977
  children: [n && _ ? /* @__PURE__ */ a("svg", {
@@ -3965,29 +3992,29 @@ function fo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
3965
3992
  y2: e.y2
3966
3993
  }, e.key))
3967
3994
  }) : null, /* @__PURE__ */ a("div", {
3968
- className: lo.columns,
3995
+ className: po.columns,
3969
3996
  style: S,
3970
3997
  children: x.columns.map((e, t) => ne(e, t))
3971
3998
  })]
3972
3999
  })]
3973
4000
  });
3974
4001
  }
3975
- function po(e, t) {
4002
+ function go(e, t) {
3976
4003
  return Object.values(e.answers).some((e) => e.includes(t));
3977
4004
  }
3978
- function mo(e, t) {
4005
+ function _o(e, t) {
3979
4006
  var n;
3980
4007
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
3981
4008
  }
3982
- function ho(e) {
4009
+ function vo(e) {
3983
4010
  return { gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto" };
3984
4011
  }
3985
- function go(e, t) {
4012
+ function yo(e, t) {
3986
4013
  return `${t}:${e}`;
3987
4014
  }
3988
4015
  //#endregion
3989
4016
  //#region src/question/content-editor/QuestionContentOptionGroupEditor.tsx
3990
- function _o({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4017
+ function bo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
3991
4018
  let { t: l } = c, u = n ? r.answers.optionIds : [], d = t.config.renderer === "table", f = fn(r, t.config.optionLabelStyle);
3992
4019
  function p(e) {
3993
4020
  i(O(O({}, e), {}, { answers: n ? e.answers : { optionIds: [] } }));
@@ -4102,7 +4129,7 @@ function _o({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4102
4129
  })]
4103
4130
  }), /* @__PURE__ */ a("div", {
4104
4131
  className: "max-w-full overflow-x-auto",
4105
- children: /* @__PURE__ */ a(Oa, {
4132
+ children: /* @__PURE__ */ a(Aa, {
4106
4133
  columns: [
4107
4134
  {
4108
4135
  dataIndex: "rowIndex",
@@ -4204,7 +4231,7 @@ function _o({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4204
4231
  }
4205
4232
  //#endregion
4206
4233
  //#region src/question/content-editor/QuestionContentOrderingEditor.tsx
4207
- function vo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
4234
+ function xo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
4208
4235
  let { t: c } = s, l = Ar(n, t), u = new Map(l.sortOptions.map((e) => [e.id, e]));
4209
4236
  function d(e) {
4210
4237
  r(Ar(e, t));
@@ -4293,7 +4320,7 @@ function vo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4293
4320
  }
4294
4321
  //#endregion
4295
4322
  //#region src/question/content-editor/QuestionContentRichTextEditor.tsx
4296
- function yo({ disabled: e, item: t, onChange: n, richTextControls: r, translator: i }) {
4323
+ function So({ disabled: e, item: t, onChange: n, richTextControls: r, translator: i }) {
4297
4324
  let { t: o } = i;
4298
4325
  return /* @__PURE__ */ a(R, {
4299
4326
  controls: r,
@@ -4304,7 +4331,7 @@ function yo({ disabled: e, item: t, onChange: n, richTextControls: r, translator
4304
4331
  value: t.content
4305
4332
  });
4306
4333
  }
4307
- var bo = {
4334
+ var Co = {
4308
4335
  stack: "_stack_1v8u9_1",
4309
4336
  "toolbar-row": "_toolbar-row_1v8u9_8",
4310
4337
  "marker-list": "_marker-list_1v8u9_13",
@@ -4315,7 +4342,7 @@ var bo = {
4315
4342
  };
4316
4343
  //#endregion
4317
4344
  //#region src/question/content-editor/QuestionContentTextMarkerEditor.tsx
4318
- function xo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
4345
+ function wo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
4319
4346
  let c = p(null), { t: l } = s, u = At(n.content.json);
4320
4347
  function d(e) {
4321
4348
  r(wn(e, e.content, t));
@@ -4333,14 +4360,14 @@ function xo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4333
4360
  d(O(O({}, n), {}, { answers: r }));
4334
4361
  }
4335
4362
  return /* @__PURE__ */ o("div", {
4336
- className: bo.stack,
4363
+ className: Co.stack,
4337
4364
  children: [
4338
4365
  /* @__PURE__ */ a(I.Text, {
4339
4366
  strong: !0,
4340
4367
  children: l("questionContentEditor.fields.textMarkerContent")
4341
4368
  }),
4342
4369
  /* @__PURE__ */ a("div", {
4343
- className: bo["toolbar-row"],
4370
+ className: Co["toolbar-row"],
4344
4371
  children: /* @__PURE__ */ a(F, {
4345
4372
  disabled: e,
4346
4373
  onClick: f,
@@ -4358,20 +4385,20 @@ function xo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4358
4385
  value: n.content
4359
4386
  }),
4360
4387
  /* @__PURE__ */ o("div", {
4361
- className: bo["marker-list"],
4388
+ className: Co["marker-list"],
4362
4389
  children: [/* @__PURE__ */ a(I.Text, {
4363
4390
  strong: !0,
4364
4391
  children: l("questionContentEditor.textMarker.markersTitle")
4365
4392
  }), u.length === 0 ? /* @__PURE__ */ a("div", {
4366
- className: bo.empty,
4393
+ className: Co.empty,
4367
4394
  children: l("questionContentEditor.textMarker.emptyMarkers")
4368
4395
  }) : u.map((r) => /* @__PURE__ */ o("label", {
4369
- className: bo["marker-card"],
4396
+ className: Co["marker-card"],
4370
4397
  children: [/* @__PURE__ */ a("span", {
4371
- className: bo["marker-text"],
4398
+ className: Co["marker-text"],
4372
4399
  children: r.text
4373
4400
  }), /* @__PURE__ */ o("span", {
4374
- className: bo["answer-toggle"],
4401
+ className: Co["answer-toggle"],
4375
4402
  children: [/* @__PURE__ */ a("input", {
4376
4403
  "aria-label": l("questionContentEditor.textMarker.answerAria", { marker: r.text }),
4377
4404
  checked: n.answers.includes(r.markerId),
@@ -4385,7 +4412,7 @@ function xo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4385
4412
  ]
4386
4413
  });
4387
4414
  }
4388
- var So = {
4415
+ var To = {
4389
4416
  root: "_root_tq733_1",
4390
4417
  head: "_head_tq733_7",
4391
4418
  section: "_section_tq733_16",
@@ -4396,7 +4423,7 @@ var So = {
4396
4423
  };
4397
4424
  //#endregion
4398
4425
  //#region src/question/content-editor/QuestionContentWordBuilderEditor.tsx
4399
- function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, title: c, translator: l }) {
4426
+ function Eo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, title: c, translator: l }) {
4400
4427
  let { t: u } = l, d = p(null), f = Tn(r, n, t);
4401
4428
  function m(e) {
4402
4429
  i(Tn(e, n, t));
@@ -4422,10 +4449,10 @@ function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4422
4449
  m(O(O({}, f), {}, { answers: O(O({}, f.answers), {}, { [e]: t.target.value }) }));
4423
4450
  }
4424
4451
  return /* @__PURE__ */ o("div", {
4425
- className: So.root,
4452
+ className: To.root,
4426
4453
  children: [
4427
4454
  /* @__PURE__ */ o("div", {
4428
- className: So.head,
4455
+ className: To.head,
4429
4456
  children: [/* @__PURE__ */ a(I.Text, {
4430
4457
  strong: !0,
4431
4458
  children: c
@@ -4448,9 +4475,9 @@ function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4448
4475
  value: f.content
4449
4476
  }),
4450
4477
  /* @__PURE__ */ o("section", {
4451
- className: So.section,
4478
+ className: To.section,
4452
4479
  children: [/* @__PURE__ */ o("div", {
4453
- className: So["section-head"],
4480
+ className: To["section-head"],
4454
4481
  children: [/* @__PURE__ */ a(I.Text, {
4455
4482
  strong: !0,
4456
4483
  children: u("questionContentEditor.fields.candidateOptions")
@@ -4462,12 +4489,12 @@ function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4462
4489
  children: u("questionContentEditor.actions.addCandidateOption")
4463
4490
  })]
4464
4491
  }), /* @__PURE__ */ a("div", {
4465
- className: So.rows,
4492
+ className: To.rows,
4466
4493
  children: f.candidateOptions.map((t, n) => /* @__PURE__ */ o("label", {
4467
- className: So.row,
4494
+ className: To.row,
4468
4495
  children: [/* @__PURE__ */ a("input", {
4469
4496
  "aria-label": u("questionContentEditor.fields.candidateOption", { index: n + 1 }),
4470
- className: So.input,
4497
+ className: To.input,
4471
4498
  disabled: e,
4472
4499
  onChange: (e) => g(n, e.target.value),
4473
4500
  value: t
@@ -4483,19 +4510,19 @@ function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4483
4510
  })]
4484
4511
  }),
4485
4512
  n ? /* @__PURE__ */ o("section", {
4486
- className: So.section,
4513
+ className: To.section,
4487
4514
  children: [/* @__PURE__ */ a(I.Text, {
4488
4515
  strong: !0,
4489
4516
  children: u("questionContentEditor.blank.correctAnswer")
4490
4517
  }), /* @__PURE__ */ a("div", {
4491
- className: So.rows,
4518
+ className: To.rows,
4492
4519
  children: f.blanks.map((t, n) => {
4493
4520
  var r;
4494
4521
  return /* @__PURE__ */ a("label", {
4495
- className: So.row,
4522
+ className: To.row,
4496
4523
  children: /* @__PURE__ */ a("input", {
4497
4524
  "aria-label": u("questionContentEditor.blank.correctAnswerAria", { index: n + 1 }),
4498
- className: So.input,
4525
+ className: To.input,
4499
4526
  disabled: e,
4500
4527
  onChange: (e) => y(t, e),
4501
4528
  placeholder: u("questionContentEditor.placeholders.blankAnswer"),
@@ -4510,9 +4537,9 @@ function Co({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4510
4537
  }
4511
4538
  //#endregion
4512
4539
  //#region src/question/content-editor/QuestionContentElementEditor.tsx
4513
- function wo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c }) {
4540
+ function Do({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c }) {
4514
4541
  let { t: l } = c;
4515
- return t.type === "inlineFill" ? /* @__PURE__ */ a(Va, {
4542
+ return t.type === "inlineFill" ? /* @__PURE__ */ a(Wa, {
4516
4543
  disabled: e,
4517
4544
  element: t,
4518
4545
  hasAnswer: n,
@@ -4521,7 +4548,7 @@ function wo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4521
4548
  richTextControls: o,
4522
4549
  title: s,
4523
4550
  translator: c
4524
- }) : t.type === "wordBuilder" ? /* @__PURE__ */ a(Co, {
4551
+ }) : t.type === "wordBuilder" ? /* @__PURE__ */ a(Eo, {
4525
4552
  disabled: e,
4526
4553
  element: t,
4527
4554
  hasAnswer: n,
@@ -4530,20 +4557,20 @@ function wo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4530
4557
  richTextControls: o,
4531
4558
  title: s,
4532
4559
  translator: c
4533
- }) : t.type === "classification" ? Eo(s, null, /* @__PURE__ */ a(za, {
4560
+ }) : t.type === "classification" ? ko(s, null, /* @__PURE__ */ a(Ha, {
4534
4561
  disabled: e,
4535
4562
  hasAnswer: n,
4536
4563
  item: r,
4537
4564
  onChange: i,
4538
4565
  richTextControls: o,
4539
4566
  translator: c
4540
- })) : t.type === "richText" ? Eo(s, null, /* @__PURE__ */ a(yo, {
4567
+ })) : t.type === "richText" ? ko(s, null, /* @__PURE__ */ a(So, {
4541
4568
  disabled: e,
4542
4569
  item: r,
4543
4570
  onChange: i,
4544
4571
  richTextControls: o,
4545
4572
  translator: c
4546
- })) : To({
4573
+ })) : t.type === "textResponse" ? ko(s, null, /* @__PURE__ */ a(ya, { label: l("questionContentEditor.placeholders.textResponse") })) : Oo({
4547
4574
  disabled: e,
4548
4575
  element: t,
4549
4576
  hasAnswer: n,
@@ -4555,15 +4582,15 @@ function wo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4555
4582
  t: l
4556
4583
  });
4557
4584
  }
4558
- function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c, t: l }) {
4585
+ function Oo({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c, t: l }) {
4559
4586
  switch (t.type) {
4560
- case "fill": return Eo(s, /* @__PURE__ */ a(F, {
4587
+ case "fill": return ko(s, /* @__PURE__ */ a(F, {
4561
4588
  "aria-label": l("questionContentEditor.actions.addBlank"),
4562
4589
  disabled: e,
4563
4590
  icon: "+",
4564
- onClick: () => i(Do(r, n)),
4591
+ onClick: () => i(Ao(r, n)),
4565
4592
  children: l("questionContentEditor.actions.addBlank")
4566
- }), /* @__PURE__ */ a(La, {
4593
+ }), /* @__PURE__ */ a(Ba, {
4567
4594
  disabled: e,
4568
4595
  hasAnswer: n,
4569
4596
  item: r,
@@ -4571,7 +4598,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4571
4598
  richTextControls: o,
4572
4599
  translator: c
4573
4600
  }));
4574
- case "choice": return Eo(s, null, /* @__PURE__ */ a(_o, {
4601
+ case "choice": return ko(s, null, /* @__PURE__ */ a(bo, {
4575
4602
  disabled: e,
4576
4603
  element: t,
4577
4604
  hasAnswer: n,
@@ -4580,7 +4607,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4580
4607
  richTextControls: o,
4581
4608
  translator: c
4582
4609
  }));
4583
- case "judgement": return Eo(s, null, /* @__PURE__ */ a(Ua, {
4610
+ case "judgement": return ko(s, null, /* @__PURE__ */ a(Ka, {
4584
4611
  disabled: e,
4585
4612
  element: t,
4586
4613
  hasAnswer: n,
@@ -4588,7 +4615,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4588
4615
  onChange: i,
4589
4616
  translator: c
4590
4617
  }));
4591
- case "lineConnect": return Eo(s, null, /* @__PURE__ */ a(no, {
4618
+ case "lineConnect": return ko(s, null, /* @__PURE__ */ a(ao, {
4592
4619
  disabled: e,
4593
4620
  element: t,
4594
4621
  hasAnswer: n,
@@ -4597,7 +4624,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4597
4624
  richTextControls: o,
4598
4625
  translator: c
4599
4626
  }));
4600
- case "matching": return Eo(s, null, /* @__PURE__ */ a(fo, {
4627
+ case "matching": return ko(s, null, /* @__PURE__ */ a(ho, {
4601
4628
  disabled: e,
4602
4629
  element: t,
4603
4630
  hasAnswer: n,
@@ -4606,7 +4633,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4606
4633
  richTextControls: o,
4607
4634
  translator: c
4608
4635
  }));
4609
- case "ordering": return Eo(s, null, /* @__PURE__ */ a(vo, {
4636
+ case "ordering": return ko(s, null, /* @__PURE__ */ a(xo, {
4610
4637
  disabled: e,
4611
4638
  hasAnswer: n,
4612
4639
  item: r,
@@ -4614,7 +4641,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4614
4641
  richTextControls: o,
4615
4642
  translator: c
4616
4643
  }));
4617
- case "textMarker": return Eo(s, null, /* @__PURE__ */ a(xo, {
4644
+ case "textMarker": return ko(s, null, /* @__PURE__ */ a(wo, {
4618
4645
  disabled: e,
4619
4646
  hasAnswer: n,
4620
4647
  item: r,
@@ -4624,7 +4651,7 @@ function To({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4624
4651
  }));
4625
4652
  }
4626
4653
  }
4627
- function Eo(e, t, n) {
4654
+ function ko(e, t, n) {
4628
4655
  return /* @__PURE__ */ o("div", {
4629
4656
  className: "flex min-w-0 flex-col gap-3",
4630
4657
  children: [/* @__PURE__ */ o("div", {
@@ -4636,19 +4663,19 @@ function Eo(e, t, n) {
4636
4663
  }), n]
4637
4664
  });
4638
4665
  }
4639
- function Do(e, t) {
4666
+ function Ao(e, t) {
4640
4667
  let n = zn(e);
4641
4668
  return t ? n : O(O({}, n), {}, { answers: [] });
4642
4669
  }
4643
4670
  //#endregion
4644
4671
  //#region src/question/content-editor/subquestion-group-editor-helpers.ts
4645
- function Oo(e, t) {
4672
+ function jo(e, t) {
4646
4673
  return Zt(ra(e.structure, t), e.questionTypeKey);
4647
4674
  }
4648
- function ko(e) {
4675
+ function Mo(e) {
4649
4676
  return e;
4650
4677
  }
4651
- function Ao(e, t, n) {
4678
+ function No(e, t, n) {
4652
4679
  let r = t + n;
4653
4680
  return t < 0 || r < 0 || r >= e.length ? e : e.map((n, i) => {
4654
4681
  if (i === t) {
@@ -4664,20 +4691,20 @@ function Ao(e, t, n) {
4664
4691
  }
4665
4692
  //#endregion
4666
4693
  //#region src/question/content-editor/QuestionContentSubquestionAddChildDropdown.tsx
4667
- function jo({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r, translator: i }) {
4694
+ function Po({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r, translator: i }) {
4668
4695
  var s, c, l;
4669
- let { t: u } = i, d = f(() => ko(r), [r]), p = f(() => new Map(d.map((e) => [String(e.questionTypeKey), e])), [d]), h = f(() => d.map((e) => ({
4696
+ let { t: u } = i, d = f(() => Mo(r), [r]), p = f(() => new Map(d.map((e) => [String(e.questionTypeKey), e])), [d]), h = f(() => d.map((e) => ({
4670
4697
  label: e.label,
4671
4698
  value: String(e.questionTypeKey)
4672
4699
  })), [d]), [g, _] = m((s = (c = h[0]) == null ? void 0 : c.value) == null ? "" : s), v = p.has(g) ? g : ((l = h[0]) == null ? void 0 : l.value) || "";
4673
4700
  function y() {
4674
4701
  let e = p.get(v);
4675
- e && n(Oo(e, t));
4702
+ e && n(jo(e, t));
4676
4703
  }
4677
4704
  let b = e || d.length === 0;
4678
4705
  return /* @__PURE__ */ o("span", {
4679
4706
  className: "flex min-w-0 flex-wrap items-center gap-2",
4680
- children: [h.length > 1 ? /* @__PURE__ */ a(xa, {
4707
+ children: [h.length > 1 ? /* @__PURE__ */ a(Ca, {
4681
4708
  "aria-label": u("questionContentEditor.subquestion.selectTemplate"),
4682
4709
  disabled: e,
4683
4710
  onChange: (e) => _(e == null ? "" : e),
@@ -4693,12 +4720,12 @@ function jo({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r
4693
4720
  }
4694
4721
  //#endregion
4695
4722
  //#region src/question/shared/subquestion-numbering.ts
4696
- function Mo(e) {
4723
+ function Fo(e) {
4697
4724
  return e.map((e) => String(e + 1)).join(".");
4698
4725
  }
4699
4726
  //#endregion
4700
4727
  //#region src/question/content-editor/QuestionContentSubquestionChildElements.tsx
4701
- function No({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
4728
+ function Io({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
4702
4729
  let { t: c } = s;
4703
4730
  function l(t, r) {
4704
4731
  n(O(O({}, e), vn(e, t, r)));
@@ -4706,11 +4733,11 @@ function No({ child: e, disabled: t, onChange: n, richTextControls: r, structure
4706
4733
  function u(t) {
4707
4734
  n(O(O({}, e), yn(e, t)));
4708
4735
  }
4709
- return i.elements.length === 0 && i.extras.length === 0 ? /* @__PURE__ */ a(Ta, { description: c("questionContentEditor.subquestion.emptyTemplate") }) : /* @__PURE__ */ o("div", {
4736
+ return i.elements.length === 0 && i.extras.length === 0 ? /* @__PURE__ */ a(Da, { description: c("questionContentEditor.subquestion.emptyTemplate") }) : /* @__PURE__ */ o("div", {
4710
4737
  className: "flex min-w-0 flex-col",
4711
4738
  children: [i.elements.map((n, o) => /* @__PURE__ */ a("section", {
4712
4739
  className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
4713
- children: /* @__PURE__ */ a(wo, {
4740
+ children: /* @__PURE__ */ a(Do, {
4714
4741
  disabled: t,
4715
4742
  element: n,
4716
4743
  hasAnswer: i.hasAnswer,
@@ -4724,11 +4751,11 @@ function No({ child: e, disabled: t, onChange: n, richTextControls: r, structure
4724
4751
  let o = an(e, n);
4725
4752
  return /* @__PURE__ */ a("section", {
4726
4753
  className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
4727
- children: /* @__PURE__ */ a(wo, {
4754
+ children: /* @__PURE__ */ a(Do, {
4728
4755
  disabled: t,
4729
- element: Po(n),
4756
+ element: Lo(n),
4730
4757
  hasAnswer: i.hasAnswer,
4731
- item: Fo(o),
4758
+ item: Ro(o),
4732
4759
  onChange: (e) => u({
4733
4760
  content: e.content,
4734
4761
  type: n.type
@@ -4741,14 +4768,14 @@ function No({ child: e, disabled: t, onChange: n, richTextControls: r, structure
4741
4768
  })]
4742
4769
  });
4743
4770
  }
4744
- function Po(e) {
4771
+ function Lo(e) {
4745
4772
  return {
4746
4773
  config: {},
4747
4774
  name: e.name,
4748
4775
  type: "richText"
4749
4776
  };
4750
4777
  }
4751
- function Fo(e) {
4778
+ function Ro(e) {
4752
4779
  return {
4753
4780
  content: e.content,
4754
4781
  type: "richText"
@@ -4756,8 +4783,8 @@ function Fo(e) {
4756
4783
  }
4757
4784
  //#endregion
4758
4785
  //#region src/question/content-editor/subquestion-editable-children.ts
4759
- var Io = 0;
4760
- function Lo(e) {
4786
+ var zo = 0;
4787
+ function Bo(e) {
4761
4788
  let t = p([]), n = /* @__PURE__ */ new Set(), r = e.map((e, r) => {
4762
4789
  let i = t.current.findIndex((t, r) => !n.has(r) && t.draft === e), a = i >= 0 ? i : n.has(r) ? -1 : r, o = t.current.slice(a, a + 1)[0];
4763
4790
  return o ? (n.add(a), {
@@ -4765,46 +4792,46 @@ function Lo(e) {
4765
4792
  runtimeId: o.runtimeId
4766
4793
  }) : {
4767
4794
  draft: e,
4768
- runtimeId: Ro()
4795
+ runtimeId: Vo()
4769
4796
  };
4770
4797
  });
4771
4798
  return t.current = r, r;
4772
4799
  }
4773
- function Ro() {
4774
- return Io += 1, `question-content-child-${Io}`;
4800
+ function Vo() {
4801
+ return zo += 1, `question-content-child-${zo}`;
4775
4802
  }
4776
4803
  //#endregion
4777
4804
  //#region src/question/content-editor/QuestionContentSubquestionChildEditor.tsx
4778
- function zo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
4779
- let { t: m } = p, h = i == null ? [t] : i, g = Mo(h), _ = Bo(e, f), v = _ ? ra(_.structure, r) : void 0, y = v ? _n(v, e) : e, b = Lo(v ? y.children : []);
4805
+ function Ho({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
4806
+ let { t: m } = p, h = i == null ? [t] : i, g = Fo(h), _ = Uo(e, f), v = _ ? ra(_.structure, r) : void 0, y = v ? _n(v, e) : e, b = Bo(v ? y.children : []);
4780
4807
  if (!v) return /* @__PURE__ */ o("section", {
4781
4808
  className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
4782
- children: [T(null), /* @__PURE__ */ a(Ta, { description: m("questionContentEditor.subquestion.missingTemplate") })]
4809
+ children: [T(null), /* @__PURE__ */ a(Da, { description: m("questionContentEditor.subquestion.missingTemplate") })]
4783
4810
  });
4784
4811
  let x = Xt(v);
4785
4812
  function S(e) {
4786
4813
  s(O(O({}, y), {}, { children: [...y.children, e] }));
4787
4814
  }
4788
4815
  function ee(e, t) {
4789
- let n = Uo(b, e);
4816
+ let n = Ko(b, e);
4790
4817
  n < 0 || s(O(O({}, y), {}, { children: y.children.map((e, r) => r === n ? t : e) }));
4791
4818
  }
4792
4819
  function C(e) {
4793
- let t = Uo(b, e);
4820
+ let t = Ko(b, e);
4794
4821
  t < 0 || s(O(O({}, y), {}, { children: y.children.filter((e, n) => n !== t) }));
4795
4822
  }
4796
4823
  function w(e, t) {
4797
- let n = Uo(b, e);
4798
- n < 0 || s(O(O({}, y), {}, { children: Ao(y.children, n, t) }));
4824
+ let n = Ko(b, e);
4825
+ n < 0 || s(O(O({}, y), {}, { children: No(y.children, n, t) }));
4799
4826
  }
4800
4827
  return /* @__PURE__ */ o("section", {
4801
4828
  className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
4802
4829
  children: [
4803
4830
  T(S),
4804
- Ho(x, n, y, s, u, v, p),
4831
+ Go(x, n, y, s, u, v, p),
4805
4832
  y.children.length === 0 ? null : /* @__PURE__ */ a("div", {
4806
4833
  className: "ml-3 flex min-w-0 flex-col pl-3 sm:ml-4 sm:pl-4",
4807
- children: b.map((e, t) => /* @__PURE__ */ a(zo, {
4834
+ children: b.map((e, t) => /* @__PURE__ */ a(Ho, {
4808
4835
  child: e.draft,
4809
4836
  childIndex: t,
4810
4837
  disabled: n,
@@ -4836,14 +4863,14 @@ function zo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4836
4863
  m("questionContentEditor.subquestion.questionKind"),
4837
4864
  " \u00b7",
4838
4865
  " ",
4839
- Vo(_, e)
4866
+ Wo(_, e)
4840
4867
  ]
4841
4868
  })]
4842
- }), /* @__PURE__ */ o(Ea, {
4869
+ }), /* @__PURE__ */ o(Oa, {
4843
4870
  size: 4,
4844
4871
  wrap: !0,
4845
4872
  children: [
4846
- i ? /* @__PURE__ */ a(jo, {
4873
+ i ? /* @__PURE__ */ a(Po, {
4847
4874
  disabled: n,
4848
4875
  hasAnswer: r,
4849
4876
  onAddChild: i,
@@ -4877,14 +4904,14 @@ function zo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4877
4904
  });
4878
4905
  }
4879
4906
  }
4880
- function Bo(e, t) {
4907
+ function Uo(e, t) {
4881
4908
  return oa(t, e.questionTypeKey);
4882
4909
  }
4883
- function Vo(e, t) {
4910
+ function Wo(e, t) {
4884
4911
  return e ? e.label : t.questionTypeKey;
4885
4912
  }
4886
- function Ho(e, t, n, r, i, o, s) {
4887
- return e ? null : /* @__PURE__ */ a(No, {
4913
+ function Go(e, t, n, r, i, o, s) {
4914
+ return e ? null : /* @__PURE__ */ a(Io, {
4888
4915
  child: n,
4889
4916
  disabled: t,
4890
4917
  onChange: r,
@@ -4893,13 +4920,13 @@ function Ho(e, t, n, r, i, o, s) {
4893
4920
  translator: s
4894
4921
  });
4895
4922
  }
4896
- function Uo(e, t) {
4923
+ function Ko(e, t) {
4897
4924
  return e.findIndex((e) => e.runtimeId === t);
4898
4925
  }
4899
4926
  //#endregion
4900
4927
  //#region src/question/content-editor/QuestionContentSubquestionGroupEditor.tsx
4901
- function Wo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
4902
- let { t: l } = c, u = Lo(n.children), d = n.children.length;
4928
+ function qo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
4929
+ let { t: l } = c, u = Bo(n.children), d = n.children.length;
4903
4930
  function f(e) {
4904
4931
  r(O(O({}, n), {}, {
4905
4932
  children: e,
@@ -4910,19 +4937,19 @@ function Wo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4910
4937
  f([...n.children, e]);
4911
4938
  }
4912
4939
  function m(e, t) {
4913
- let r = Go(u, e);
4940
+ let r = Jo(u, e);
4914
4941
  r < 0 || f(n.children.map((e, n) => n === r ? t : e));
4915
4942
  }
4916
4943
  function h(e) {
4917
- let t = Go(u, e);
4944
+ let t = Jo(u, e);
4918
4945
  t < 0 || f(n.children.filter((e, n) => n !== t));
4919
4946
  }
4920
4947
  function g(e, t) {
4921
- let r = Go(u, e);
4922
- r < 0 || f(Ao(n.children, r, t));
4948
+ let r = Jo(u, e);
4949
+ r < 0 || f(No(n.children, r, t));
4923
4950
  }
4924
4951
  function _(r, o) {
4925
- return /* @__PURE__ */ a(zo, {
4952
+ return /* @__PURE__ */ a(Ho, {
4926
4953
  child: r.draft,
4927
4954
  childIndex: o,
4928
4955
  disabled: e,
@@ -4950,10 +4977,10 @@ function Wo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4950
4977
  type: "secondary",
4951
4978
  children: l("questionContentEditor.subquestion.structureCheck", { nodeCount: d })
4952
4979
  })]
4953
- }), /* @__PURE__ */ a(Ea, {
4980
+ }), /* @__PURE__ */ a(Oa, {
4954
4981
  className: "min-w-0 justify-end",
4955
4982
  wrap: !0,
4956
- children: /* @__PURE__ */ a(jo, {
4983
+ children: /* @__PURE__ */ a(Po, {
4957
4984
  disabled: e,
4958
4985
  hasAnswer: t,
4959
4986
  onAddChild: p,
@@ -4963,16 +4990,16 @@ function Wo({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
4963
4990
  })]
4964
4991
  }), /* @__PURE__ */ a("div", {
4965
4992
  className: "flex min-w-0 flex-col",
4966
- children: d === 0 ? /* @__PURE__ */ a(Ta, { description: l("questionContentEditor.subquestion.emptyNodes") }) : u.map(_)
4993
+ children: d === 0 ? /* @__PURE__ */ a(Da, { description: l("questionContentEditor.subquestion.emptyNodes") }) : u.map(_)
4967
4994
  })]
4968
4995
  });
4969
4996
  }
4970
- function Go(e, t) {
4997
+ function Jo(e, t) {
4971
4998
  return e.findIndex((e) => e.runtimeId === t);
4972
4999
  }
4973
5000
  //#endregion
4974
5001
  //#region src/question/content-editor/QuestionContentEditor.tsx
4975
- function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
5002
+ function Yo({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
4976
5003
  let l = pa(n), { t: u } = l, d = ia(i, c), p = f(() => ({
4977
5004
  plugins: [Rt, ca],
4978
5005
  uploadImage: s
@@ -4984,7 +5011,7 @@ function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
4984
5011
  r(yn(c, e));
4985
5012
  }
4986
5013
  function g(e, n, r) {
4987
- return /* @__PURE__ */ a(wo, {
5014
+ return /* @__PURE__ */ a(Do, {
4988
5015
  disabled: t,
4989
5016
  element: e,
4990
5017
  hasAnswer: r,
@@ -4997,11 +5024,11 @@ function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
4997
5024
  }
4998
5025
  function _(e, n) {
4999
5026
  let r = an(c, e);
5000
- return /* @__PURE__ */ a(wo, {
5027
+ return /* @__PURE__ */ a(Do, {
5001
5028
  disabled: t,
5002
- element: qo(e),
5029
+ element: Xo(e),
5003
5030
  hasAnswer: n,
5004
- item: Jo(r),
5031
+ item: Zo(r),
5005
5032
  onChange: (t) => h({
5006
5033
  content: t.content,
5007
5034
  type: e.type
@@ -5011,7 +5038,7 @@ function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5011
5038
  translator: l
5012
5039
  });
5013
5040
  }
5014
- let v = d ? Xt(d) ? /* @__PURE__ */ a(Wo, {
5041
+ let v = d ? Xt(d) ? /* @__PURE__ */ a(qo, {
5015
5042
  disabled: t,
5016
5043
  hasAnswer: d.hasAnswer,
5017
5044
  item: O(O({}, c), {}, { elements: [] }),
@@ -5028,7 +5055,7 @@ function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5028
5055
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white p-4",
5029
5056
  children: _(e, d.hasAnswer)
5030
5057
  }, e.type))]
5031
- }) : /* @__PURE__ */ a(Ta, { description: u("questionContentEditor.subquestion.missingTemplate") });
5058
+ }) : /* @__PURE__ */ a(Da, { description: u("questionContentEditor.subquestion.missingTemplate") });
5032
5059
  return /* @__PURE__ */ o(e.Root, {
5033
5060
  className: [
5034
5061
  "question-content-editor",
@@ -5046,14 +5073,14 @@ function Ko({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5046
5073
  })]
5047
5074
  });
5048
5075
  }
5049
- function qo(e) {
5076
+ function Xo(e) {
5050
5077
  return {
5051
5078
  config: {},
5052
5079
  name: e.name,
5053
5080
  type: "richText"
5054
5081
  };
5055
5082
  }
5056
- function Jo(e) {
5083
+ function Zo(e) {
5057
5084
  return {
5058
5085
  content: e.content,
5059
5086
  type: "richText"
@@ -5061,40 +5088,40 @@ function Jo(e) {
5061
5088
  }
5062
5089
  //#endregion
5063
5090
  //#region src/question/content-editor/structure.ts
5064
- function Yo(e, t) {
5091
+ function Qo(e, t) {
5065
5092
  return {
5066
- elements: e.elements.map((e) => os(e, t)),
5093
+ elements: e.elements.map((e) => ls(e, t)),
5067
5094
  extras: e.extras.map((e) => ({
5068
- name: cs(e, Ce(e.type), we(e.type), t),
5095
+ name: ds(e, Ce(e.type), we(e.type), t),
5069
5096
  type: e.type
5070
5097
  })),
5071
5098
  hasAnswer: e.globalConfig.hasAnswer,
5072
5099
  systemQuestionType: ""
5073
5100
  };
5074
5101
  }
5075
- function Xo(e, t) {
5102
+ function $o(e, t) {
5076
5103
  if (!e) return null;
5077
5104
  let n = na(t, e.questionTypeKey);
5078
- return n ? O(O({}, gn(n, $o(e))), {}, { children: e.children.map((e) => {
5079
- let n = Xo(e, t);
5105
+ return n ? O(O({}, gn(n, ns(e))), {}, { children: e.children.map((e) => {
5106
+ let n = $o(e, t);
5080
5107
  if (!n) throw Error("\u5b50\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a");
5081
5108
  return n;
5082
5109
  }) }) : null;
5083
5110
  }
5084
- function Zo(e) {
5111
+ function es(e) {
5085
5112
  return {
5086
5113
  description: e.description,
5087
- elements: e.elements.map(ns),
5088
- extras: e.extras.map(as),
5114
+ elements: e.elements.map(as),
5115
+ extras: e.extras.map(cs),
5089
5116
  globalConfig: O({}, e.globalConfig),
5090
5117
  isSubjective: e.isSubjective,
5091
5118
  version: e.version
5092
5119
  };
5093
5120
  }
5094
- function Qo(e, t) {
5095
- return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || es(e.elements, t.elements) || ts(e.extras, t.extras) ? "shape" : "metadata";
5121
+ function ts(e, t) {
5122
+ return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || rs(e.elements, t.elements) || is(e.extras, t.extras) ? "shape" : "metadata";
5096
5123
  }
5097
- function $o(e) {
5124
+ function ns(e) {
5098
5125
  return {
5099
5126
  questionTypeKey: e.questionTypeKey,
5100
5127
  children: [],
@@ -5104,22 +5131,22 @@ function $o(e) {
5104
5131
  version: e.version
5105
5132
  };
5106
5133
  }
5107
- function es(e, t) {
5134
+ function rs(e, t) {
5108
5135
  return e.some((e, n) => {
5109
5136
  let r = t.slice(n, n + 1)[0];
5110
5137
  return !r || e.clientId !== r.clientId || e.type !== r.type || JSON.stringify(e.config) !== JSON.stringify(r.config);
5111
5138
  });
5112
5139
  }
5113
- function ts(e, t) {
5140
+ function is(e, t) {
5114
5141
  return e.some((e, n) => {
5115
5142
  let r = t.slice(n, n + 1)[0];
5116
5143
  return !r || e.clientId !== r.clientId || e.type !== r.type;
5117
5144
  });
5118
5145
  }
5119
- function ns(e) {
5120
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? is(e) : rs(e);
5146
+ function as(e) {
5147
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? ss(e) : os(e);
5121
5148
  }
5122
- function rs(e) {
5149
+ function os(e) {
5123
5150
  switch (e.type) {
5124
5151
  case "inlineFill": return {
5125
5152
  config: O({}, e.config),
@@ -5159,7 +5186,7 @@ function rs(e) {
5159
5186
  };
5160
5187
  }
5161
5188
  }
5162
- function is(e) {
5189
+ function ss(e) {
5163
5190
  return {
5164
5191
  config: {},
5165
5192
  enName: e.enName,
@@ -5167,38 +5194,38 @@ function is(e) {
5167
5194
  type: e.type
5168
5195
  };
5169
5196
  }
5170
- function as(e) {
5197
+ function cs(e) {
5171
5198
  return {
5172
5199
  enName: e.enName,
5173
5200
  name: e.name,
5174
5201
  type: e.type
5175
5202
  };
5176
5203
  }
5177
- function os(e, t) {
5178
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? {
5204
+ function ls(e, t) {
5205
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? {
5179
5206
  config: {},
5180
- name: cs(e, k(e.type), A(e.type), t),
5207
+ name: ds(e, k(e.type), A(e.type), t),
5181
5208
  type: e.type
5182
- } : ss(e, t);
5209
+ } : us(e, t);
5183
5210
  }
5184
- function ss(e, t) {
5211
+ function us(e, t) {
5185
5212
  switch (e.type) {
5186
5213
  case "inlineFill": return {
5187
5214
  config: {
5188
5215
  allowCandidateReuse: !!e.config.allowCandidateReuse,
5189
5216
  candidateMode: e.config.candidateMode
5190
5217
  },
5191
- name: cs(e, k("inlineFill"), A("inlineFill"), t),
5218
+ name: ds(e, k("inlineFill"), A("inlineFill"), t),
5192
5219
  type: "inlineFill"
5193
5220
  };
5194
5221
  case "wordBuilder": return {
5195
5222
  config: { builderMode: e.config.builderMode },
5196
- name: cs(e, k("wordBuilder"), A("wordBuilder"), t),
5223
+ name: ds(e, k("wordBuilder"), A("wordBuilder"), t),
5197
5224
  type: "wordBuilder"
5198
5225
  };
5199
5226
  case "judgement": return {
5200
5227
  config: { judgeAnswerMode: e.config.judgeAnswerMode },
5201
- name: cs(e, k("judgement"), A("judgement"), t),
5228
+ name: ds(e, k("judgement"), A("judgement"), t),
5202
5229
  type: "judgement"
5203
5230
  };
5204
5231
  case "choice": return {
@@ -5207,22 +5234,22 @@ function ss(e, t) {
5207
5234
  renderer: e.config.renderer,
5208
5235
  selectionType: e.config.selectionType
5209
5236
  },
5210
- name: cs(e, k("choice"), A("choice"), t),
5237
+ name: ds(e, k("choice"), A("choice"), t),
5211
5238
  type: "choice"
5212
5239
  };
5213
5240
  case "lineConnect": return {
5214
5241
  config: { columns: e.config.columns.map((e) => O({}, e)) },
5215
- name: cs(e, k("lineConnect"), A("lineConnect"), t),
5242
+ name: ds(e, k("lineConnect"), A("lineConnect"), t),
5216
5243
  type: "lineConnect"
5217
5244
  };
5218
5245
  case "matching": return {
5219
5246
  config: { columns: e.config.columns.map((e) => O({}, e)) },
5220
- name: cs(e, k("matching"), A("matching"), t),
5247
+ name: ds(e, k("matching"), A("matching"), t),
5221
5248
  type: "matching"
5222
5249
  };
5223
5250
  }
5224
5251
  }
5225
- function cs(e, t, n, r) {
5252
+ function ds(e, t, n, r) {
5226
5253
  var i;
5227
5254
  if (r === "en-US") {
5228
5255
  var a;
@@ -5232,200 +5259,210 @@ function cs(e, t, n, r) {
5232
5259
  }
5233
5260
  //#endregion
5234
5261
  //#region src/question/player/helpers.ts
5235
- function ls(e, t) {
5262
+ function fs(e, t) {
5236
5263
  let n = na(t, e.questionTypeKey), r = n ? Xt(n) : !1;
5237
5264
  return {
5238
5265
  questionTypeKey: e.questionTypeKey,
5239
- children: e.children.map((e) => ls(e, t)),
5266
+ children: e.children.map((e) => fs(e, t)),
5240
5267
  id: e.id,
5241
5268
  items: !n || r ? [] : n.elements.reduce((t, n, r) => {
5242
- let i = ks(n, rn(e, r, n));
5269
+ let i = Ns(n, rn(e, r, n));
5243
5270
  return i ? [...t, i] : t;
5244
5271
  }, []),
5245
5272
  version: e.version
5246
5273
  };
5247
5274
  }
5248
- function us(e, t) {
5275
+ function ps(e, t) {
5249
5276
  var n;
5250
- return (n = Ws(e, t, "choice")) == null ? {
5277
+ return (n = Js(e, t, "choice")) == null ? {
5251
5278
  selectedOptionIds: [],
5252
5279
  type: "choice"
5253
5280
  } : n;
5254
5281
  }
5255
- function ds(e, t, n) {
5282
+ function ms(e, t, n) {
5256
5283
  var r;
5257
- return (r = Ws(e, t, "fill")) == null ? {
5258
- answers: Hs(n),
5284
+ return (r = Js(e, t, "fill")) == null ? {
5285
+ answers: Ks(n),
5259
5286
  type: "fill"
5260
5287
  } : r;
5261
5288
  }
5262
- function fs(e, t, n, r) {
5289
+ function hs(e, t, n, r) {
5263
5290
  var i;
5264
- return (i = Ws(e, t, "inlineFill")) == null ? {
5265
- answers: Us(n, r),
5291
+ return (i = Js(e, t, "inlineFill")) == null ? {
5292
+ answers: qs(n, r),
5266
5293
  type: "inlineFill"
5267
5294
  } : i;
5268
5295
  }
5269
- function ps(e, t, n) {
5296
+ function gs(e, t, n) {
5270
5297
  var r;
5271
- return (r = Ws(e, t, "wordBuilder")) == null ? {
5272
- answers: Hs(n),
5298
+ return (r = Js(e, t, "wordBuilder")) == null ? {
5299
+ answers: Ks(n),
5273
5300
  type: "wordBuilder"
5274
5301
  } : r;
5275
5302
  }
5276
- function ms(e, t) {
5303
+ function _s(e, t) {
5277
5304
  var n;
5278
- return (n = Ws(e, t, "judgement")) == null ? {
5305
+ return (n = Js(e, t, "judgement")) == null ? {
5279
5306
  selectedValues: [],
5280
5307
  type: "judgement"
5281
5308
  } : n;
5282
5309
  }
5283
- function hs(e, t) {
5310
+ function vs(e, t) {
5284
5311
  var n;
5285
- return (n = Ws(e, t, "classification")) == null ? {
5312
+ return (n = Js(e, t, "classification")) == null ? {
5286
5313
  placements: {},
5287
5314
  type: "classification"
5288
5315
  } : n;
5289
5316
  }
5290
- function gs(e, t) {
5317
+ function ys(e, t) {
5291
5318
  var n;
5292
- return (n = Ws(e, t, "lineConnect")) == null ? {
5319
+ return (n = Js(e, t, "lineConnect")) == null ? {
5293
5320
  connections: {},
5294
5321
  type: "lineConnect"
5295
5322
  } : n;
5296
5323
  }
5297
- function _s(e, t) {
5324
+ function bs(e, t) {
5298
5325
  var n;
5299
- return (n = Ws(e, t, "matching")) == null ? {
5326
+ return (n = Js(e, t, "matching")) == null ? {
5300
5327
  connections: {},
5301
5328
  type: "matching"
5302
5329
  } : n;
5303
5330
  }
5304
- function vs(e, t, n) {
5331
+ function xs(e, t, n) {
5305
5332
  var r;
5306
- return (r = Ws(e, t, "ordering")) == null ? {
5333
+ return (r = Js(e, t, "ordering")) == null ? {
5307
5334
  orderedOptionIds: n.sortOptions.map((e) => e.id),
5308
5335
  type: "ordering"
5309
5336
  } : r;
5310
5337
  }
5311
- function ys(e, t) {
5338
+ function Ss(e, t) {
5312
5339
  var n;
5313
- return (n = Ws(e, t, "textMarker")) == null ? {
5340
+ return (n = Js(e, t, "textMarker")) == null ? {
5314
5341
  selectedMarkers: [],
5315
5342
  type: "textMarker"
5316
5343
  } : n;
5317
5344
  }
5318
- function bs(e, t, n) {
5345
+ function Cs(e, t) {
5346
+ var n;
5347
+ return (n = Js(e, t, "textResponse")) == null ? {
5348
+ content: j(),
5349
+ type: "textResponse"
5350
+ } : n;
5351
+ }
5352
+ function ws(e, t, n) {
5319
5353
  return O(O({}, e), {}, { items: e.items.map((e, r) => r === t ? n : e) });
5320
5354
  }
5321
- function xs(e, t, n) {
5355
+ function Ts(e, t, n) {
5322
5356
  return O(O({}, e), {}, { children: e.children.map((e, r) => r === t ? n : e) });
5323
5357
  }
5324
- function Ss(e, t, n) {
5358
+ function Es(e, t, n) {
5325
5359
  return He(e, t, n);
5326
5360
  }
5327
- function Cs(e, t, n = "single") {
5361
+ function Ds(e, t, n = "single") {
5328
5362
  return {
5329
5363
  kind: "option",
5330
5364
  optionIds: He((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
5331
5365
  };
5332
5366
  }
5333
- function ws(e, t, n) {
5367
+ function Os(e, t, n) {
5334
5368
  return pt(e, t, n);
5335
5369
  }
5336
- function Ts(e, t, n) {
5370
+ function ks(e, t, n) {
5337
5371
  return St(e, t, n);
5338
5372
  }
5339
- function Es(e, t, n) {
5373
+ function As(e, t, n) {
5340
5374
  return rt(e, t, n);
5341
5375
  }
5342
- function Ds(e, t, n, r) {
5376
+ function js(e, t, n, r) {
5343
5377
  return Fr(e, t.sortOptions, n, r);
5344
5378
  }
5345
- function Os(e, t) {
5379
+ function Ms(e, t) {
5346
5380
  return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
5347
5381
  }
5348
- function ks(e, t) {
5349
- return e.type === "richText" ? null : e.type === "ordering" ? Bs(t) : e.type === "classification" ? js(t) : e.type === "fill" ? Ps(t) : As(e, t);
5382
+ function Ns(e, t) {
5383
+ return e.type === "richText" ? null : e.type === "textResponse" ? {
5384
+ content: j(),
5385
+ type: "textResponse"
5386
+ } : e.type === "ordering" ? Ws(t) : e.type === "classification" ? Fs(t) : e.type === "fill" ? Rs(t) : Ps(e, t);
5350
5387
  }
5351
- function As(e, t) {
5388
+ function Ps(e, t) {
5352
5389
  switch (e.type) {
5353
- case "choice": return Ns();
5354
- case "inlineFill": return Fs(e, t);
5355
- case "wordBuilder": return Ms(t);
5356
- case "judgement": return Is();
5357
- case "lineConnect": return Ls();
5358
- case "matching": return Rs();
5359
- case "textMarker": return Vs();
5390
+ case "choice": return Ls();
5391
+ case "inlineFill": return zs(e, t);
5392
+ case "wordBuilder": return Is(t);
5393
+ case "judgement": return Bs();
5394
+ case "lineConnect": return Vs();
5395
+ case "matching": return Hs();
5396
+ case "textMarker": return Gs();
5360
5397
  }
5361
5398
  }
5362
- function js(e) {
5399
+ function Fs(e) {
5363
5400
  return e.type === "classification" ? {
5364
- placements: zs({}, e),
5401
+ placements: Us({}, e),
5365
5402
  type: "classification"
5366
5403
  } : null;
5367
5404
  }
5368
- function Ms(e) {
5405
+ function Is(e) {
5369
5406
  return e.type === "wordBuilder" ? {
5370
- answers: Hs(e.blanks),
5407
+ answers: Ks(e.blanks),
5371
5408
  type: "wordBuilder"
5372
5409
  } : null;
5373
5410
  }
5374
- function Ns() {
5411
+ function Ls() {
5375
5412
  return {
5376
5413
  selectedOptionIds: [],
5377
5414
  type: "choice"
5378
5415
  };
5379
5416
  }
5380
- function Ps(e) {
5417
+ function Rs(e) {
5381
5418
  return e.type === "fill" ? {
5382
- answers: Hs(e.blanks),
5419
+ answers: Ks(e.blanks),
5383
5420
  type: "fill"
5384
5421
  } : null;
5385
5422
  }
5386
- function Fs(e, t) {
5423
+ function zs(e, t) {
5387
5424
  return t.type === "inlineFill" ? {
5388
- answers: Us(e, t.blanks),
5425
+ answers: qs(e, t.blanks),
5389
5426
  type: "inlineFill"
5390
5427
  } : null;
5391
5428
  }
5392
- function Is() {
5429
+ function Bs() {
5393
5430
  return {
5394
5431
  selectedValues: [],
5395
5432
  type: "judgement"
5396
5433
  };
5397
5434
  }
5398
- function Ls() {
5435
+ function Vs() {
5399
5436
  return {
5400
5437
  connections: {},
5401
5438
  type: "lineConnect"
5402
5439
  };
5403
5440
  }
5404
- function Rs() {
5441
+ function Hs() {
5405
5442
  return {
5406
5443
  connections: {},
5407
5444
  type: "matching"
5408
5445
  };
5409
5446
  }
5410
- function zs(e, t) {
5447
+ function Us(e, t) {
5411
5448
  return nt(e, t.categories, t.items);
5412
5449
  }
5413
- function Bs(e) {
5450
+ function Ws(e) {
5414
5451
  return e.type === "ordering" ? {
5415
5452
  orderedOptionIds: e.sortOptions.map((e) => e.id),
5416
5453
  type: "ordering"
5417
5454
  } : null;
5418
5455
  }
5419
- function Vs() {
5456
+ function Gs() {
5420
5457
  return {
5421
5458
  selectedMarkers: [],
5422
5459
  type: "textMarker"
5423
5460
  };
5424
5461
  }
5425
- function Hs(e) {
5462
+ function Ks(e) {
5426
5463
  return e.reduce((e, t) => O(O({}, e), {}, { [t]: "" }), {});
5427
5464
  }
5428
- function Us(e, t) {
5465
+ function qs(e, t) {
5429
5466
  return t.reduce((t, n) => O(O({}, t), {}, { [n]: e.config.candidateMode === "none" ? {
5430
5467
  kind: "text",
5431
5468
  value: ""
@@ -5434,13 +5471,13 @@ function Us(e, t) {
5434
5471
  optionIds: []
5435
5472
  } }), {});
5436
5473
  }
5437
- function Ws(e, t, n) {
5474
+ function Js(e, t, n) {
5438
5475
  let r = e.items[t];
5439
5476
  return (r == null ? void 0 : r.type) === n ? r : void 0;
5440
5477
  }
5441
5478
  //#endregion
5442
5479
  //#region src/question/i18n/messages.ts
5443
- var Gs = {
5480
+ var Ys = {
5444
5481
  "en-US": {
5445
5482
  addBlank: "Add blank",
5446
5483
  addCard: "Add card",
@@ -5496,6 +5533,7 @@ var Gs = {
5496
5533
  subquestionStructure: "Subquestion structure",
5497
5534
  tableColumn: "Column",
5498
5535
  tableRenderer: "Table",
5536
+ textResponsePlaceholder: "Enter your response",
5499
5537
  trueLabel: "True",
5500
5538
  unassigned: "Unassigned",
5501
5539
  userAnswer: "Your answer",
@@ -5560,6 +5598,7 @@ var Gs = {
5560
5598
  subquestionStructure: "\u5b50\u9898\u7ed3\u6784",
5561
5599
  tableColumn: "\u5217",
5562
5600
  tableRenderer: "\u8868\u683c",
5601
+ textResponsePlaceholder: "\u8bf7\u8f93\u5165\u4f60\u7684\u56de\u7b54",
5563
5602
  trueLabel: "\u6b63\u786e",
5564
5603
  unassigned: "\u672a\u5f52\u7c7b",
5565
5604
  userAnswer: "\u4f60\u7684\u7b54\u6848",
@@ -5570,10 +5609,10 @@ var Gs = {
5570
5609
  previewEmpty: "\u6682\u65e0\u9898\u76ee\u5185\u5bb9\u3002"
5571
5610
  }
5572
5611
  };
5573
- function Ks(e = "zh-CN") {
5612
+ function Xs(e = "zh-CN") {
5574
5613
  switch (e) {
5575
- case "en-US": return Gs["en-US"];
5576
- case "zh-CN": return Gs["zh-CN"];
5614
+ case "en-US": return Ys["en-US"];
5615
+ case "zh-CN": return Ys["zh-CN"];
5577
5616
  }
5578
5617
  }
5579
5618
  //#endregion
@@ -5581,42 +5620,42 @@ function Ks(e = "zh-CN") {
5581
5620
  function H(...e) {
5582
5621
  return e.filter(Boolean).join(" ");
5583
5622
  }
5584
- function qs(e, t, n) {
5623
+ function Zs(e, t, n) {
5585
5624
  return e.map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => `${n}${e}`).join(" ");
5586
5625
  }
5587
- function Js(e) {
5626
+ function Qs(e) {
5588
5627
  return "answerPools" in e;
5589
5628
  }
5590
- function Ys(e) {
5629
+ function $s(e) {
5591
5630
  return "answerOptionId" in e;
5592
5631
  }
5593
- function Xs(e) {
5632
+ function ec(e) {
5594
5633
  return "answerOptionIds" in e;
5595
5634
  }
5596
- function Zs(e, t) {
5635
+ function tc(e, t) {
5597
5636
  var n, r;
5598
5637
  return (n = e == null || (r = e.find((e) => e.optionId === t)) == null ? void 0 : r.content) == null ? null : n;
5599
5638
  }
5600
- function Qs(e, t, n) {
5639
+ function nc(e, t, n) {
5601
5640
  var r, i;
5602
5641
  return (r = e == null || (i = e.find((e) => e.blankId === t)) == null || (i = i.options.find((e) => e.optionId === n)) == null ? void 0 : i.content) == null ? null : r;
5603
5642
  }
5604
- function $s(e) {
5643
+ function rc(e) {
5605
5644
  return e.answers.reduce((t, n) => {
5606
- if (Js(n)) return ec(t, {
5645
+ if (Qs(n)) return ic(t, {
5607
5646
  blankIds: n.blankIds,
5608
5647
  contents: n.answerPools
5609
5648
  });
5610
- if (Ys(n)) {
5611
- let r = Qs(e.blankOptionGroups, n.blankId, n.answerOptionId);
5612
- return ec(t, {
5649
+ if ($s(n)) {
5650
+ let r = nc(e.blankOptionGroups, n.blankId, n.answerOptionId);
5651
+ return ic(t, {
5613
5652
  blankIds: [n.blankId],
5614
5653
  contents: r ? [r] : []
5615
5654
  });
5616
5655
  }
5617
- if (Xs(n)) {
5618
- let r = n.answerOptionIds.map((t) => Zs(e.candidateOptions, t)).filter((e) => !!e);
5619
- return ec(t, {
5656
+ if (ec(n)) {
5657
+ let r = n.answerOptionIds.map((t) => tc(e.candidateOptions, t)).filter((e) => !!e);
5658
+ return ic(t, {
5620
5659
  blankIds: n.blankIds,
5621
5660
  contents: r
5622
5661
  });
@@ -5624,7 +5663,7 @@ function $s(e) {
5624
5663
  return t;
5625
5664
  }, []);
5626
5665
  }
5627
- function ec(e, t) {
5666
+ function ic(e, t) {
5628
5667
  let n = t.contents.filter((e) => e.text.trim() !== "");
5629
5668
  return n.length > 0 ? [...e, {
5630
5669
  blankIds: t.blankIds,
@@ -5648,7 +5687,7 @@ var U = {
5648
5687
  };
5649
5688
  //#endregion
5650
5689
  //#region src/question/player/QuestionPlayerComposite.tsx
5651
- function tc({ messages: e, numberPath: t = [], onChildResponseChange: n, renderChild: r, response: i, value: s }) {
5690
+ function ac({ messages: e, numberPath: t = [], onChildResponseChange: n, renderChild: r, response: i, value: s }) {
5652
5691
  return s.children.length === 0 ? /* @__PURE__ */ a("div", {
5653
5692
  className: U.empty,
5654
5693
  children: e.previewEmpty
@@ -5663,7 +5702,7 @@ function tc({ messages: e, numberPath: t = [], onChildResponseChange: n, renderC
5663
5702
  children: [
5664
5703
  e.subquestion,
5665
5704
  " ",
5666
- Mo(l)
5705
+ Fo(l)
5667
5706
  ]
5668
5707
  }), u ? r(s, u, (e) => n(c, e), l) : /* @__PURE__ */ a("div", {
5669
5708
  className: U.empty,
@@ -5699,7 +5738,7 @@ function G({ className: e, content: t }) {
5699
5738
  }
5700
5739
  //#endregion
5701
5740
  //#region src/question/renderers/QuestionStandardAnswerPanel.module.css
5702
- var nc = {
5741
+ var oc = {
5703
5742
  "answer-panel": "_answer-panel_1a0m0_1",
5704
5743
  "answer-title": "_answer-title_1a0m0_12",
5705
5744
  "answer-list": "_answer-list_1a0m0_30",
@@ -5714,21 +5753,21 @@ function K({ groups: e, title: t }) {
5714
5753
  let n = e.filter((e) => e.contents.length > 0);
5715
5754
  return n.length === 0 ? null : /* @__PURE__ */ o("section", {
5716
5755
  "aria-label": t,
5717
- className: nc["answer-panel"],
5756
+ className: oc["answer-panel"],
5718
5757
  children: [/* @__PURE__ */ a("span", {
5719
- className: nc["answer-title"],
5758
+ className: oc["answer-title"],
5720
5759
  children: t
5721
5760
  }), /* @__PURE__ */ a("ol", {
5722
- className: nc["answer-list"],
5761
+ className: oc["answer-list"],
5723
5762
  children: n.map((e, t) => /* @__PURE__ */ o("li", {
5724
- className: nc["answer-row"],
5763
+ className: oc["answer-row"],
5725
5764
  children: [e.marker ? /* @__PURE__ */ a("span", {
5726
- className: nc["answer-marker"],
5765
+ className: oc["answer-marker"],
5727
5766
  children: e.marker
5728
5767
  }) : null, /* @__PURE__ */ a("div", {
5729
- className: nc["answer-content-list"],
5768
+ className: oc["answer-content-list"],
5730
5769
  children: e.contents.map((e, t) => /* @__PURE__ */ a("div", {
5731
- className: nc["answer-value"],
5770
+ className: oc["answer-value"],
5732
5771
  children: e
5733
5772
  }, `answer-${t}`))
5734
5773
  })]
@@ -5738,10 +5777,10 @@ function K({ groups: e, title: t }) {
5738
5777
  }
5739
5778
  //#endregion
5740
5779
  //#region src/question/player/QuestionBlankGroupPlayer.tsx
5741
- function rc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
5742
- let l = ds(i, s, t.blanks), u = M(t.answers, t.blanks).map((e, r) => ({
5780
+ function sc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
5781
+ let l = ms(i, s, t.blanks), u = M(t.answers, t.blanks).map((e, r) => ({
5743
5782
  contents: e.answerPools.map((e, t) => /* @__PURE__ */ a(G, { content: e }, `group-${r}-answer-${t}`)),
5744
- marker: qs(e.blankIds, t.blanks, n.blankLabel)
5783
+ marker: Zs(e.blankIds, t.blanks, n.blankLabel)
5745
5784
  }));
5746
5785
  function d(e, t) {
5747
5786
  r(O(O({}, l), {}, { answers: O(O({}, l.answers), {}, { [e]: t }) }));
@@ -5761,24 +5800,24 @@ function rc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
5761
5800
  className: U.input,
5762
5801
  disabled: e,
5763
5802
  onChange: (e) => d(t, e.target.value),
5764
- value: ac(l.answers, t)
5803
+ value: lc(l.answers, t)
5765
5804
  })]
5766
- }, ic(t, r))), c ? /* @__PURE__ */ a(K, {
5805
+ }, cc(t, r))), c ? /* @__PURE__ */ a(K, {
5767
5806
  groups: u,
5768
5807
  title: n.standardAnswer
5769
5808
  }) : null]
5770
5809
  });
5771
5810
  }
5772
- function ic(e, t) {
5811
+ function cc(e, t) {
5773
5812
  return e || `blank-${t + 1}`;
5774
5813
  }
5775
- function ac(e, t) {
5814
+ function lc(e, t) {
5776
5815
  var n, r;
5777
5816
  return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? "" : n;
5778
5817
  }
5779
5818
  //#endregion
5780
5819
  //#region src/question/renderers/classificationAnswers.tsx
5781
- function oc(e) {
5820
+ function uc(e) {
5782
5821
  return e.categories.map((t) => ({
5783
5822
  contents: e.items.filter((n) => e.answers[n.id] === t.id).map((e) => /* @__PURE__ */ a(G, { content: e.content }, `${t.id}-${e.id}`)),
5784
5823
  marker: t.content.text || t.id
@@ -5799,10 +5838,10 @@ var q = {
5799
5838
  };
5800
5839
  //#endregion
5801
5840
  //#region src/question/player/QuestionClassificationPlayer.tsx
5802
- function sc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
5803
- let [l, u] = m(""), d = hs(i, s), f = lc(d.placements, t), p = t.items.find((e) => e.id === l);
5841
+ function dc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
5842
+ let [l, u] = m(""), d = vs(i, s), f = pc(d.placements, t), p = t.items.find((e) => e.id === l);
5804
5843
  function h(e, n) {
5805
- r(O(O({}, d), {}, { placements: lc(Es(f, e, n), t) })), u("");
5844
+ r(O(O({}, d), {}, { placements: pc(As(f, e, n), t) })), u("");
5806
5845
  }
5807
5846
  function g(t, n) {
5808
5847
  t.preventDefault();
@@ -5810,7 +5849,7 @@ function sc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
5810
5849
  !e && r && h(r, n);
5811
5850
  }
5812
5851
  function _(n) {
5813
- let r = l === n.id, i = cc(n.id, f, t, c);
5852
+ let r = l === n.id, i = fc(n.id, f, t, c);
5814
5853
  return /* @__PURE__ */ a("button", {
5815
5854
  "aria-pressed": r,
5816
5855
  className: H(q.item, r && q.selected, i === "correct" && q.correct, i === "incorrect" && q.incorrect, i === "unanswered" && q.unanswered),
@@ -5860,62 +5899,62 @@ function sc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
5860
5899
  children: t.items.filter((e) => !f[e.id]).map((e) => _(e))
5861
5900
  })]
5862
5901
  }), c ? /* @__PURE__ */ a(K, {
5863
- groups: oc(t),
5902
+ groups: uc(t),
5864
5903
  title: n.standardAnswer
5865
5904
  }) : null]
5866
5905
  });
5867
5906
  }
5868
- function cc(e, t, n, r) {
5907
+ function fc(e, t, n, r) {
5869
5908
  var i, a;
5870
5909
  let o = (i = t[e]) == null ? "" : i, s = (a = n.answers[e]) == null ? "" : a;
5871
5910
  if (!(!r || !s)) return o ? s === o ? "correct" : "incorrect" : "unanswered";
5872
5911
  }
5873
- function lc(e, t) {
5912
+ function pc(e, t) {
5874
5913
  return nt(e, t.categories, t.items);
5875
5914
  }
5876
5915
  //#endregion
5877
5916
  //#region src/question/renderers/QuestionRichContentWithBlankView.tsx
5878
- function uc({ className: e, content: t, renderBlank: n }) {
5917
+ function mc({ className: e, content: t, renderBlank: n }) {
5879
5918
  let r = /* @__PURE__ */ new Map();
5880
5919
  return /* @__PURE__ */ a("div", {
5881
5920
  className: [W["rich-content"], e == null ? "" : e].filter(Boolean).join(" "),
5882
- children: t.json.map((e, t) => dc(e, {
5921
+ children: t.json.map((e, t) => hc(e, {
5883
5922
  blankIndexes: r,
5884
5923
  key: `node-${t}`,
5885
5924
  renderBlank: n
5886
5925
  }))
5887
5926
  });
5888
5927
  }
5889
- function dc(e, t) {
5928
+ function hc(e, t) {
5890
5929
  if (typeof e.text == "string") return /* @__PURE__ */ a(s, { children: e.text }, t.key);
5891
- if (e.type === "blank") return /* @__PURE__ */ a(s, { children: fc(e, t) }, t.key);
5892
- let n = mc(e.children, t);
5930
+ if (e.type === "blank") return /* @__PURE__ */ a(s, { children: gc(e, t) }, t.key);
5931
+ let n = vc(e.children, t);
5893
5932
  switch (e.type) {
5894
- case "heading": return hc(e, n, t.key);
5933
+ case "heading": return yc(e, n, t.key);
5895
5934
  case "table": return /* @__PURE__ */ a("table", { children: n }, t.key);
5896
5935
  case "table-row": return /* @__PURE__ */ a("tr", { children: n }, t.key);
5897
5936
  case "table-cell": return /* @__PURE__ */ a("td", { children: n }, t.key);
5898
5937
  default: return /* @__PURE__ */ a("p", { children: n }, t.key);
5899
5938
  }
5900
5939
  }
5901
- function fc(e, t) {
5902
- let n = gc(e.blankId), r = pc(t.blankIndexes, n);
5940
+ function gc(e, t) {
5941
+ let n = bc(e.blankId), r = _c(t.blankIndexes, n);
5903
5942
  return t.renderBlank({
5904
5943
  blankId: n,
5905
5944
  index: r,
5906
- label: gc(e.label)
5945
+ label: bc(e.label)
5907
5946
  });
5908
5947
  }
5909
- function pc(e, t) {
5948
+ function _c(e, t) {
5910
5949
  let n = e.get(t);
5911
5950
  if (n !== void 0) return n;
5912
5951
  let r = e.size;
5913
5952
  return e.set(t, r), r;
5914
5953
  }
5915
- function mc(e, t) {
5916
- return (e == null ? [] : e).map((e, n) => dc(e, O(O({}, t), {}, { key: `${t.key}-${n}` })));
5954
+ function vc(e, t) {
5955
+ return (e == null ? [] : e).map((e, n) => hc(e, O(O({}, t), {}, { key: `${t.key}-${n}` })));
5917
5956
  }
5918
- function hc(e, t, n) {
5957
+ function yc(e, t, n) {
5919
5958
  switch (e.level) {
5920
5959
  case 1: return /* @__PURE__ */ a("h1", { children: t }, n);
5921
5960
  case 2: return /* @__PURE__ */ a("h2", { children: t }, n);
@@ -5923,7 +5962,7 @@ function hc(e, t, n) {
5923
5962
  default: return /* @__PURE__ */ a("p", { children: t }, n);
5924
5963
  }
5925
5964
  }
5926
- function gc(e) {
5965
+ function bc(e) {
5927
5966
  return typeof e == "string" ? e : "";
5928
5967
  }
5929
5968
  var J = {
@@ -5944,10 +5983,10 @@ var J = {
5944
5983
  };
5945
5984
  //#endregion
5946
5985
  //#region src/question/player/QuestionFillTextContentPlayer.tsx
5947
- function _c({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
5948
- return /* @__PURE__ */ a(uc, {
5986
+ function xc({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
5987
+ return /* @__PURE__ */ a(mc, {
5949
5988
  content: n.content,
5950
- renderBlank: (a) => vc(a, {
5989
+ renderBlank: (a) => Sc(a, {
5951
5990
  answers: e,
5952
5991
  blankLabel: r.blankLabel,
5953
5992
  disabled: t,
@@ -5957,10 +5996,10 @@ function _c({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i,
5957
5996
  })
5958
5997
  });
5959
5998
  }
5960
- function vc(e, t) {
5961
- let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = wc(e.label, t.blankLabel, r);
5999
+ function Sc(e, t) {
6000
+ let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = Oc(e.label, t.blankLabel, r);
5962
6001
  if (t.structure.config.candidateMode === "none") {
5963
- let e = bc(t.answers, n);
6002
+ let e = wc(t.answers, n);
5964
6003
  return /* @__PURE__ */ a("input", {
5965
6004
  "aria-label": i,
5966
6005
  className: J["inline-input"],
@@ -5972,8 +6011,8 @@ function vc(e, t) {
5972
6011
  value: (e == null ? void 0 : e.kind) === "text" ? e.value : ""
5973
6012
  });
5974
6013
  }
5975
- if (t.structure.config.candidateMode === "sharedPool") return yc(n, i, t);
5976
- let o = bc(t.answers, n), s = Sc(t.item, n, t.structure.config.candidateMode, o);
6014
+ if (t.structure.config.candidateMode === "sharedPool") return Cc(n, i, t);
6015
+ let o = wc(t.answers, n), s = Ec(t.item, n, t.structure.config.candidateMode, o);
5977
6016
  return /* @__PURE__ */ a("span", {
5978
6017
  "aria-label": i,
5979
6018
  className: J["inline-blank-underline"],
@@ -5983,9 +6022,9 @@ function vc(e, t) {
5983
6022
  }) : i
5984
6023
  });
5985
6024
  }
5986
- function yc(e, t, n) {
6025
+ function Cc(e, t, n) {
5987
6026
  var r, i;
5988
- let s = bc(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = Cc(n.answers, e);
6027
+ let s = wc(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = Dc(n.answers, e);
5989
6028
  return /* @__PURE__ */ o("select", {
5990
6029
  "aria-label": t,
5991
6030
  className: J["inline-select"],
@@ -6005,11 +6044,11 @@ function yc(e, t, n) {
6005
6044
  }, e.optionId))]
6006
6045
  });
6007
6046
  }
6008
- function bc(e, t) {
6047
+ function wc(e, t) {
6009
6048
  var n;
6010
6049
  return (n = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : n[1];
6011
6050
  }
6012
- function xc(e, t, n) {
6051
+ function Tc(e, t, n) {
6013
6052
  var r, i;
6014
6053
  if (n === "sharedPool") {
6015
6054
  var a;
@@ -6017,24 +6056,24 @@ function xc(e, t, n) {
6017
6056
  }
6018
6057
  return (r = (i = e.blankOptionGroups) == null || (i = i.find((e) => e.blankId === t)) == null ? void 0 : i.options) == null ? [] : r;
6019
6058
  }
6020
- function Sc(e, t, n, r) {
6059
+ function Ec(e, t, n, r) {
6021
6060
  let i = (r == null ? void 0 : r.kind) === "option" ? r.optionIds[0] : void 0;
6022
- if (i) return xc(e, t, n).find((e) => e.optionId === i);
6061
+ if (i) return Tc(e, t, n).find((e) => e.optionId === i);
6023
6062
  }
6024
- function Cc(e, t) {
6063
+ function Dc(e, t) {
6025
6064
  let n = /* @__PURE__ */ new Set(), r = Object.entries(e);
6026
6065
  for (let [e, i] of r) if (e !== t && i.kind === "option") for (let e of i.optionIds) n.add(e);
6027
6066
  return n;
6028
6067
  }
6029
- function wc(e, t, n) {
6068
+ function Oc(e, t, n) {
6030
6069
  return e || `${t} ${n + 1}`;
6031
6070
  }
6032
6071
  //#endregion
6033
6072
  //#region src/question/player/QuestionFillTextPlayer.tsx
6034
- function Tc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6035
- let u = En(n, t, !0), d = $s(u), f = fs(s, c, t, u.blanks), p = d.map((e, t) => ({
6073
+ function kc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6074
+ let u = En(n, t, !0), d = rc(u), f = hs(s, c, t, u.blanks), p = d.map((e, t) => ({
6036
6075
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(G, { content: e }, `group-${t}-answer-${n}`)),
6037
- marker: qs(e.blankIds, u.blanks, r.blankLabel)
6076
+ marker: Zs(e.blankIds, u.blanks, r.blankLabel)
6038
6077
  }));
6039
6078
  function m(e, t) {
6040
6079
  i(O(O({}, f), {}, { answers: O(O({}, f.answers), {}, { [e]: t }) }));
@@ -6042,7 +6081,7 @@ function Tc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6042
6081
  return /* @__PURE__ */ o("div", {
6043
6082
  className: U["fill-text"],
6044
6083
  children: [
6045
- /* @__PURE__ */ a(_c, {
6084
+ /* @__PURE__ */ a(xc, {
6046
6085
  answers: f.answers,
6047
6086
  disabled: e,
6048
6087
  item: u,
@@ -6050,8 +6089,8 @@ function Tc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6050
6089
  onAnswerChange: m,
6051
6090
  structure: t
6052
6091
  }),
6053
- Ec(u, t.config.candidateMode, r.candidateOptions),
6054
- Dc({
6092
+ Ac(u, t.config.candidateMode, r.candidateOptions),
6093
+ jc({
6055
6094
  disabled: e,
6056
6095
  item: u,
6057
6096
  onAnswerChange: m,
@@ -6064,7 +6103,7 @@ function Tc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6064
6103
  ]
6065
6104
  });
6066
6105
  }
6067
- function Ec(e, t, n) {
6106
+ function Ac(e, t, n) {
6068
6107
  var r;
6069
6108
  let i = (r = e.candidateOptions) == null ? [] : r;
6070
6109
  return t !== "sharedPool" || i.length === 0 ? null : /* @__PURE__ */ o("div", {
@@ -6084,7 +6123,7 @@ function Ec(e, t, n) {
6084
6123
  })]
6085
6124
  });
6086
6125
  }
6087
- function Dc({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6126
+ function jc({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6088
6127
  let i = t.blanks.reduce((e, n, r) => {
6089
6128
  var i;
6090
6129
  let a = (i = t.blankOptionGroups) == null ? void 0 : i.find((e) => e.blankId === n);
@@ -6095,7 +6134,7 @@ function Dc({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6095
6134
  }, []);
6096
6135
  return i.length === 0 ? null : /* @__PURE__ */ a("div", {
6097
6136
  className: J["per-blank-candidate-options"],
6098
- children: i.map(({ group: t, marker: i }) => Oc({
6137
+ children: i.map(({ group: t, marker: i }) => Mc({
6099
6138
  disabled: e,
6100
6139
  group: t,
6101
6140
  marker: i,
@@ -6104,7 +6143,7 @@ function Dc({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6104
6143
  }))
6105
6144
  });
6106
6145
  }
6107
- function Oc({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6146
+ function Mc({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6108
6147
  let s = i.answers[t.blankId];
6109
6148
  return /* @__PURE__ */ o("section", {
6110
6149
  "aria-label": n,
@@ -6114,7 +6153,7 @@ function Oc({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
6114
6153
  children: n
6115
6154
  }), /* @__PURE__ */ a("div", {
6116
6155
  className: J["per-blank-candidate-list"],
6117
- children: t.options.map((n) => kc({
6156
+ children: t.options.map((n) => Nc({
6118
6157
  activeAnswer: s,
6119
6158
  blankId: t.blankId,
6120
6159
  disabled: e,
@@ -6124,14 +6163,14 @@ function Oc({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
6124
6163
  })]
6125
6164
  }, t.blankId);
6126
6165
  }
6127
- function kc({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i }) {
6166
+ function Nc({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i }) {
6128
6167
  let o = (e == null ? void 0 : e.kind) === "option" && e.optionIds.includes(i.optionId);
6129
6168
  return /* @__PURE__ */ a("button", {
6130
6169
  "aria-pressed": o,
6131
6170
  className: o ? J.selected : void 0,
6132
6171
  "data-selected": o ? "true" : void 0,
6133
6172
  disabled: n,
6134
- onClick: () => r(t, Cs(e, i.optionId, "single")),
6173
+ onClick: () => r(t, Ds(e, i.optionId, "single")),
6135
6174
  type: "button",
6136
6175
  children: /* @__PURE__ */ a(G, { content: i.content })
6137
6176
  }, i.optionId);
@@ -6152,8 +6191,8 @@ var Y = {
6152
6191
  };
6153
6192
  //#endregion
6154
6193
  //#region src/question/player/QuestionJudgementGroupPlayer.tsx
6155
- function Ac({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6156
- let u = ms(s, c), d = un(t.config.judgeAnswerMode), f = [{
6194
+ function Pc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6195
+ let u = _s(s, c), d = un(t.config.judgeAnswerMode), f = [{
6157
6196
  contents: dn(t.config.judgeAnswerMode, n.answers),
6158
6197
  marker: ""
6159
6198
  }];
@@ -6187,8 +6226,8 @@ function Ac({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6187
6226
  }
6188
6227
  //#endregion
6189
6228
  //#region src/question/renderers/lineConnectAnswers.tsx
6190
- function jc(e) {
6191
- let t = Mc(e);
6229
+ function Fc(e) {
6230
+ let t = Ic(e);
6192
6231
  return e.columns.reduce((n, r, i) => {
6193
6232
  let o = r.items.map((n, o) => {
6194
6233
  var s;
@@ -6203,7 +6242,7 @@ function jc(e) {
6203
6242
  return [...n, ...o];
6204
6243
  }, []);
6205
6244
  }
6206
- function Mc(e) {
6245
+ function Ic(e) {
6207
6246
  return e.columns.reduce((e, t, n) => (t.items.forEach((t) => e.set(t.itemId, {
6208
6247
  columnIndex: n,
6209
6248
  item: t
@@ -6211,8 +6250,8 @@ function Mc(e) {
6211
6250
  }
6212
6251
  //#endregion
6213
6252
  //#region src/question/player/QuestionLineConnectPlayer.tsx
6214
- function Nc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6215
- let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b = gs(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = f(() => qa(t, b.connections), [t, b.connections]), ee = f(() => JSON.stringify({
6253
+ function Lc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6254
+ let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b = ys(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = f(() => Xa(t, b.connections), [t, b.connections]), ee = f(() => JSON.stringify({
6216
6255
  columns: t.columns.map((e) => e.items.map((e) => e.itemId)),
6217
6256
  connections: b.connections
6218
6257
  }), [t.columns, b.connections]), C = l(() => {
@@ -6227,13 +6266,13 @@ function Nc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6227
6266
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
6228
6267
  return [...n, {
6229
6268
  key: r.key,
6230
- x1: Za(o, t, e.scrollLeft),
6231
- x2: Xa(s, t, e.scrollLeft),
6232
- y1: Ya(o, t, e.scrollTop),
6233
- y2: Ya(s, t, e.scrollTop)
6269
+ x1: eo(o, t, e.scrollLeft),
6270
+ x2: $a(s, t, e.scrollLeft),
6271
+ y1: Qa(o, t, e.scrollTop),
6272
+ y2: Qa(s, t, e.scrollTop)
6234
6273
  }];
6235
6274
  }, []);
6236
- Qa(_, {
6275
+ to(_, {
6237
6276
  height: e.scrollHeight,
6238
6277
  lines: n,
6239
6278
  width: e.scrollWidth
@@ -6263,7 +6302,7 @@ function Nc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6263
6302
  itemId: n
6264
6303
  }) : null;
6265
6304
  if (i) {
6266
- r(O(O({}, b), {}, { connections: ws(b.connections, i.fromItemId, i.toItemId) })), h(null);
6305
+ r(O(O({}, b), {}, { connections: Os(b.connections, i.fromItemId, i.toItemId) })), h(null);
6267
6306
  return;
6268
6307
  }
6269
6308
  h({
@@ -6328,14 +6367,14 @@ function Nc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6328
6367
  }, t.columnId))
6329
6368
  })]
6330
6369
  }), c ? /* @__PURE__ */ a(K, {
6331
- groups: jc(t),
6370
+ groups: Fc(t),
6332
6371
  title: n.standardAnswer
6333
6372
  }) : null]
6334
6373
  });
6335
6374
  }
6336
6375
  //#endregion
6337
6376
  //#region src/question/renderers/matchingAnswers.tsx
6338
- function Pc(e) {
6377
+ function Rc(e) {
6339
6378
  var t, n;
6340
6379
  let r = e.columns[0], i = e.columns[1], o = new Map((t = i == null ? void 0 : i.items.map((e) => [e.itemId, e])) == null ? [] : t);
6341
6380
  return ((n = r == null ? void 0 : r.items) == null ? [] : n).map((t, n) => {
@@ -6349,7 +6388,7 @@ function Pc(e) {
6349
6388
  };
6350
6389
  });
6351
6390
  }
6352
- var Fc = {
6391
+ var zc = {
6353
6392
  board: "_board_1q6ar_1",
6354
6393
  "matched-rows": "_matched-rows_1q6ar_6",
6355
6394
  "matched-row": "_matched-row_1q6ar_6",
@@ -6362,8 +6401,8 @@ var Fc = {
6362
6401
  };
6363
6402
  //#endregion
6364
6403
  //#region src/question/player/QuestionMatchingPlayer.tsx
6365
- function Ic({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6366
- let [l, u] = m(null), d = _s(i, s), f = Lc(t, d.connections);
6404
+ function Bc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6405
+ let [l, u] = m(null), d = bs(i, s), f = Vc(t, d.connections);
6367
6406
  function p(t, n) {
6368
6407
  if (e) return;
6369
6408
  let i = l ? yt(l, {
@@ -6371,7 +6410,7 @@ function Ic({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6371
6410
  itemId: n
6372
6411
  }) : null;
6373
6412
  if (i) {
6374
- r(O(O({}, d), {}, { connections: Ts(d.connections, i.fromItemId, i.toItemId) })), u(null);
6413
+ r(O(O({}, d), {}, { connections: ks(d.connections, i.fromItemId, i.toItemId) })), u(null);
6375
6414
  return;
6376
6415
  }
6377
6416
  u((l == null ? void 0 : l.itemId) === n ? null : {
@@ -6383,13 +6422,13 @@ function Ic({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6383
6422
  let r = (l == null ? void 0 : l.itemId) === t.item.itemId;
6384
6423
  return /* @__PURE__ */ o("button", {
6385
6424
  "aria-pressed": r,
6386
- className: H(Fc.item, r && Fc.selected, n && Fc.matched),
6425
+ className: H(zc.item, r && zc.selected, n && zc.matched),
6387
6426
  "data-testid": `matching-player-item-${t.item.itemId}`,
6388
6427
  disabled: e,
6389
6428
  onClick: () => p(t.columnIndex, t.item.itemId),
6390
6429
  type: "button",
6391
6430
  children: [t.marker ? /* @__PURE__ */ a("span", {
6392
- className: Fc.marker,
6431
+ className: zc.marker,
6393
6432
  children: t.marker
6394
6433
  }) : null, /* @__PURE__ */ a(G, { content: t.item.content })]
6395
6434
  }, t.item.itemId);
@@ -6397,31 +6436,31 @@ function Ic({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6397
6436
  return /* @__PURE__ */ o("div", {
6398
6437
  className: W.element,
6399
6438
  children: [/* @__PURE__ */ o("div", {
6400
- className: Fc.board,
6439
+ className: zc.board,
6401
6440
  children: [f.rows.length > 0 ? /* @__PURE__ */ a("div", {
6402
- className: Fc["matched-rows"],
6441
+ className: zc["matched-rows"],
6403
6442
  children: f.rows.map((e) => /* @__PURE__ */ o("div", {
6404
- className: Fc["matched-row"],
6443
+ className: zc["matched-row"],
6405
6444
  "data-testid": `matching-player-row-${e.from.item.itemId}-${e.to.item.itemId}`,
6406
6445
  children: [h(e.from, !0), h(e.to, !0)]
6407
6446
  }, `${e.from.item.itemId}-${e.to.item.itemId}`))
6408
6447
  }) : null, f.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
6409
- className: Fc.columns,
6448
+ className: zc.columns,
6410
6449
  children: f.unmatchedColumns.map((e, n) => {
6411
6450
  var r, i;
6412
6451
  return /* @__PURE__ */ a("section", {
6413
- className: Fc.column,
6452
+ className: zc.column,
6414
6453
  children: e.map((e) => h(e, !1))
6415
6454
  }, (r = (i = t.columns[n]) == null ? void 0 : i.columnId) == null ? n : r);
6416
6455
  })
6417
6456
  }) : null]
6418
6457
  }), c ? /* @__PURE__ */ a(K, {
6419
- groups: Pc(t),
6458
+ groups: Rc(t),
6420
6459
  title: n.standardAnswer
6421
6460
  }) : null]
6422
6461
  });
6423
6462
  }
6424
- function Lc(e, t) {
6463
+ function Vc(e, t) {
6425
6464
  var n;
6426
6465
  let r = e.columns.map((e, t) => e.items.map((n, r) => ({
6427
6466
  columnIndex: t,
@@ -6442,7 +6481,7 @@ function Lc(e, t) {
6442
6481
  }
6443
6482
  //#endregion
6444
6483
  //#region src/question/renderers/optionGroupAnswers.tsx
6445
- function Rc(e, t) {
6484
+ function Hc(e, t) {
6446
6485
  let n = pn(t, e.config.optionLabelStyle);
6447
6486
  return e.config.renderer === "table" ? n.map((e) => ({
6448
6487
  contents: e.cells.map((t, n) => /* @__PURE__ */ a(G, { content: t }, `${e.optionId}-cell-${n}`)),
@@ -6452,7 +6491,7 @@ function Rc(e, t) {
6452
6491
  marker: e.marker
6453
6492
  }));
6454
6493
  }
6455
- var zc = {
6494
+ var Uc = {
6456
6495
  "table-wrap": "_table-wrap_n67ah_1",
6457
6496
  table: "_table_n67ah_1",
6458
6497
  "table-option-column": "_table-option-column_n67ah_17",
@@ -6460,21 +6499,21 @@ var zc = {
6460
6499
  };
6461
6500
  //#endregion
6462
6501
  //#region src/question/player/QuestionOptionGroupPlayer.tsx
6463
- function Bc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6464
- let u = us(s, c), d = fn(n, t.config.optionLabelStyle);
6502
+ function Wc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6503
+ let u = ps(s, c), d = fn(n, t.config.optionLabelStyle);
6465
6504
  function f(e) {
6466
- i(O(O({}, u), {}, { selectedOptionIds: Ss(u.selectedOptionIds, e, t.config.selectionType) }));
6505
+ i(O(O({}, u), {}, { selectedOptionIds: Es(u.selectedOptionIds, e, t.config.selectionType) }));
6467
6506
  }
6468
6507
  if (t.config.renderer === "table") {
6469
- let i = Rc(t, n);
6508
+ let i = Hc(t, n);
6470
6509
  return /* @__PURE__ */ o("div", {
6471
6510
  className: W.element,
6472
6511
  children: [/* @__PURE__ */ a("div", {
6473
- className: zc["table-wrap"],
6512
+ className: Uc["table-wrap"],
6474
6513
  children: /* @__PURE__ */ o("table", {
6475
- className: zc.table,
6514
+ className: Uc.table,
6476
6515
  children: [
6477
- /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: zc["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
6516
+ /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Uc["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
6478
6517
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: r.option }), n.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(G, { content: e.content }) }, e.id))] }) }),
6479
6518
  /* @__PURE__ */ a("tbody", { children: d.map((t) => {
6480
6519
  let n = u.selectedOptionIds.includes(t.optionId);
@@ -6510,7 +6549,7 @@ function Bc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6510
6549
  }) : null]
6511
6550
  });
6512
6551
  }
6513
- let p = Rc(t, n);
6552
+ let p = Hc(t, n);
6514
6553
  return /* @__PURE__ */ o("div", {
6515
6554
  className: W.element,
6516
6555
  children: [/* @__PURE__ */ a("ol", {
@@ -6542,7 +6581,7 @@ function Bc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6542
6581
  }
6543
6582
  //#endregion
6544
6583
  //#region src/question/renderers/orderingAnswerGroups.tsx
6545
- function Vc(e) {
6584
+ function Gc(e) {
6546
6585
  let t = new Map(e.sortOptions.map((e) => [e.id, e]));
6547
6586
  return e.answers.map((e, n) => {
6548
6587
  let r = t.get(e);
@@ -6554,10 +6593,10 @@ function Vc(e) {
6554
6593
  }
6555
6594
  //#endregion
6556
6595
  //#region src/question/player/QuestionOrderingPlayer.tsx
6557
- function Hc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6558
- let l = vs(i, s, t), u = new Map(t.sortOptions.map((e) => [e.id, e])), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
6596
+ function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6597
+ let l = xs(i, s, t), u = new Map(t.sortOptions.map((e) => [e.id, e])), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
6559
6598
  function f(e, n) {
6560
- r(O(O({}, l), {}, { orderedOptionIds: Ds(l.orderedOptionIds, t, e, n) }));
6599
+ r(O(O({}, l), {}, { orderedOptionIds: js(l.orderedOptionIds, t, e, n) }));
6561
6600
  }
6562
6601
  return /* @__PURE__ */ o("div", {
6563
6602
  className: W.element,
@@ -6592,12 +6631,12 @@ function Hc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6592
6631
  ]
6593
6632
  }, t.id))
6594
6633
  }), c ? /* @__PURE__ */ a(K, {
6595
- groups: Vc(t),
6634
+ groups: Gc(t),
6596
6635
  title: n.standardAnswer
6597
6636
  }) : null]
6598
6637
  });
6599
6638
  }
6600
- var Uc = {
6639
+ var qc = {
6601
6640
  content: "_content_63948_1",
6602
6641
  paragraph: "_paragraph_63948_10",
6603
6642
  marker: "_marker_63948_14",
@@ -6607,21 +6646,21 @@ var Uc = {
6607
6646
  };
6608
6647
  //#endregion
6609
6648
  //#region src/question/renderers/QuestionTextMarkerContent.tsx
6610
- function Wc({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
6649
+ function Jc({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
6611
6650
  let c = t.json.length ? t.json : [{
6612
6651
  children: [{ text: t.text }],
6613
6652
  type: "paragraph"
6614
6653
  }];
6615
6654
  return /* @__PURE__ */ a("div", {
6616
- className: Uc.content,
6655
+ className: qc.content,
6617
6656
  children: c.map((e, t) => l(e, `node-${t}`))
6618
6657
  });
6619
6658
  function l(e, t) {
6620
- if (Kc(e)) return u(e, t);
6621
- if (!Gc(e)) return null;
6659
+ if (Xc(e)) return u(e, t);
6660
+ if (!Yc(e)) return null;
6622
6661
  let n = e.children.map((e, n) => l(e, `${t}-${n}`));
6623
6662
  return e.type === "paragraph" ? /* @__PURE__ */ a("p", {
6624
- className: Uc.paragraph,
6663
+ className: qc.paragraph,
6625
6664
  children: n
6626
6665
  }, t) : /* @__PURE__ */ a("span", { children: n }, t);
6627
6666
  }
@@ -6635,7 +6674,7 @@ function Wc({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
6635
6674
  let n = i.includes(t), a = o && e.includes(t);
6636
6675
  return {
6637
6676
  answer: a,
6638
- className: Wa(Uc.marker, r ? Uc["marker-button"] : "", n ? Uc["marker-selected"] : "", a ? Uc["marker-answer"] : ""),
6677
+ className: qa(qc.marker, r ? qc["marker-button"] : "", n ? qc["marker-selected"] : "", a ? qc["marker-answer"] : ""),
6639
6678
  selected: n
6640
6679
  };
6641
6680
  }
@@ -6661,17 +6700,17 @@ function Wc({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
6661
6700
  }, n);
6662
6701
  }
6663
6702
  }
6664
- function Gc(e) {
6703
+ function Yc(e) {
6665
6704
  return !!(e && typeof e == "object" && "children" in e && Array.isArray(e.children));
6666
6705
  }
6667
- function Kc(e) {
6706
+ function Xc(e) {
6668
6707
  return !!(e && typeof e == "object" && "text" in e && typeof e.text == "string");
6669
6708
  }
6670
6709
  //#endregion
6671
6710
  //#region src/question/renderers/QuestionTextMarkerView.tsx
6672
- function qc({ item: e, messages: t, showAnswer: n }) {
6711
+ function Zc({ item: e, messages: t, showAnswer: n }) {
6673
6712
  let r = At(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
6674
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Wc, {
6713
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Jc, {
6675
6714
  answerMarkers: e.answers,
6676
6715
  content: e.content,
6677
6716
  showAnswer: n
@@ -6685,42 +6724,59 @@ function qc({ item: e, messages: t, showAnswer: n }) {
6685
6724
  }
6686
6725
  //#endregion
6687
6726
  //#region src/question/player/QuestionTextMarkerPlayer.tsx
6688
- function Jc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
6689
- let c = ys(i, o);
6690
- return s ? /* @__PURE__ */ a(qc, {
6727
+ function Qc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
6728
+ let c = Ss(i, o);
6729
+ return s ? /* @__PURE__ */ a(Zc, {
6691
6730
  item: t,
6692
6731
  messages: n,
6693
6732
  showAnswer: s
6694
- }) : /* @__PURE__ */ a(Wc, {
6733
+ }) : /* @__PURE__ */ a(Jc, {
6695
6734
  answerMarkers: t.answers,
6696
6735
  content: t.content,
6697
6736
  disabled: e,
6698
- onMarkerClick: (e) => r(O(O({}, c), {}, { selectedMarkers: Os(c.selectedMarkers, e) })),
6737
+ onMarkerClick: (e) => r(O(O({}, c), {}, { selectedMarkers: Ms(c.selectedMarkers, e) })),
6699
6738
  selectedMarkers: c.selectedMarkers
6700
6739
  });
6701
6740
  }
6702
6741
  //#endregion
6742
+ //#region src/question/player/QuestionTextResponsePlayer.tsx
6743
+ function $c({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
6744
+ let l = Cs(o, s);
6745
+ return e ? N(l.content) ? /* @__PURE__ */ a(ya, { label: r.textResponsePlaceholder }) : /* @__PURE__ */ a(G, { content: l.content }) : /* @__PURE__ */ a(Pa, {
6746
+ ariaLabel: n,
6747
+ locale: t,
6748
+ onChange: (e) => i({
6749
+ content: e,
6750
+ type: "textResponse"
6751
+ }),
6752
+ placeholder: r.textResponsePlaceholder,
6753
+ toolbarMode: "local",
6754
+ uploadImage: c,
6755
+ value: l.content
6756
+ });
6757
+ }
6758
+ //#endregion
6703
6759
  //#region src/question/renderers/wordBuilderAnswers.tsx
6704
- function Yc(e, t) {
6760
+ function el(e, t) {
6705
6761
  return e.blanks.reduce((n, r) => {
6706
6762
  var i;
6707
6763
  let o = (i = e.answers[r]) == null ? void 0 : i.trim();
6708
6764
  return o ? [...n, {
6709
6765
  contents: [/* @__PURE__ */ a(G, { content: j(o) }, `${r}-answer`)],
6710
- marker: qs([r], e.blanks, t)
6766
+ marker: Zs([r], e.blanks, t)
6711
6767
  }] : n;
6712
6768
  }, []);
6713
6769
  }
6714
6770
  //#endregion
6715
6771
  //#region src/question/player/QuestionPlayerWordBuilder.module.css
6716
- var Xc = {
6772
+ var tl = {
6717
6773
  "word-builder-blank": "_word-builder-blank_ftw6q_1",
6718
6774
  "word-builder-candidate-list": "_word-builder-candidate-list_ftw6q_30"
6719
6775
  };
6720
6776
  //#endregion
6721
6777
  //#region src/question/player/QuestionWordBuilderPlayer.tsx
6722
- function Zc({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6723
- let u = Tn(n, !0, t), d = ps(s, c, u.blanks), f = Yc(u, r.blankLabel);
6778
+ function nl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6779
+ let u = Tn(n, !0, t), d = gs(s, c, u.blanks), f = el(u, r.blankLabel);
6724
6780
  function p(e, t) {
6725
6781
  i(O(O({}, d), {}, { answers: O(O({}, d.answers), {}, { [e]: t }) }));
6726
6782
  }
@@ -6748,11 +6804,11 @@ function Zc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6748
6804
  return /* @__PURE__ */ o("div", {
6749
6805
  className: U["fill-text"],
6750
6806
  children: [
6751
- /* @__PURE__ */ a(uc, {
6807
+ /* @__PURE__ */ a(mc, {
6752
6808
  content: u.content,
6753
6809
  renderBlank: ({ blankId: t, index: n, label: i }) => {
6754
6810
  var o, s;
6755
- let c = (o = d.answers[t]) == null ? "" : o, l = Qc({
6811
+ let c = (o = d.answers[t]) == null ? "" : o, l = rl({
6756
6812
  answers: c,
6757
6813
  blankLabel: r.blankLabel,
6758
6814
  canClear: !e && !!c.trim(),
@@ -6761,7 +6817,7 @@ function Zc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6761
6817
  });
6762
6818
  return /* @__PURE__ */ a("button", {
6763
6819
  "aria-label": l,
6764
- className: Xc["word-builder-blank"],
6820
+ className: tl["word-builder-blank"],
6765
6821
  disabled: e,
6766
6822
  onClick: () => m(t),
6767
6823
  onDragOver: (e) => e.preventDefault(),
@@ -6773,7 +6829,7 @@ function Zc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6773
6829
  }
6774
6830
  }),
6775
6831
  /* @__PURE__ */ a("div", {
6776
- className: Xc["word-builder-candidate-list"],
6832
+ className: tl["word-builder-candidate-list"],
6777
6833
  children: u.candidateOptions.map((t, n) => /* @__PURE__ */ a("button", {
6778
6834
  disabled: e,
6779
6835
  draggable: !e,
@@ -6792,51 +6848,62 @@ function Zc({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6792
6848
  ]
6793
6849
  });
6794
6850
  }
6795
- function Qc({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
6851
+ function rl({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
6796
6852
  let a = i || `${t}${r + 1}`;
6797
6853
  return !n || !e.trim() ? a : t === "\u7a7a" ? `${a}\uff0c\u70b9\u51fb\u6e05\u7a7a` : `${a}, click to clear`;
6798
6854
  }
6799
6855
  //#endregion
6800
6856
  //#region src/question/player/QuestionPlayerElement.tsx
6801
- function $c({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
6802
- return t.type === n.type ? t.type === "richText" ? /* @__PURE__ */ a(G, { content: n.content }) : t.type === "ordering" ? /* @__PURE__ */ a(Hc, {
6857
+ function il({ disabled: e, element: t, item: n, locale: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l, uploadImage: u }) {
6858
+ return t.type === n.type ? t.type === "richText" ? /* @__PURE__ */ a(G, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a($c, {
6859
+ disabled: e,
6860
+ label: t.name,
6861
+ locale: r,
6862
+ messages: i,
6863
+ onChange: o,
6864
+ response: s,
6865
+ responseIndex: c,
6866
+ uploadImage: u
6867
+ }) : t.type === "ordering" ? /* @__PURE__ */ a(Kc, {
6803
6868
  disabled: e,
6804
6869
  item: n,
6805
- messages: r,
6806
- onChange: i,
6807
- response: o,
6808
- responseIndex: s,
6809
- showAnswer: c
6810
- }) : t.type === "classification" ? /* @__PURE__ */ a(sc, {
6870
+ messages: i,
6871
+ onChange: o,
6872
+ response: s,
6873
+ responseIndex: c,
6874
+ showAnswer: l
6875
+ }) : t.type === "classification" ? /* @__PURE__ */ a(dc, {
6811
6876
  disabled: e,
6812
6877
  item: n,
6813
- messages: r,
6814
- onChange: i,
6815
- response: o,
6816
- responseIndex: s,
6817
- showAnswer: c
6818
- }) : t.type === "textMarker" ? /* @__PURE__ */ a(Jc, {
6878
+ messages: i,
6879
+ onChange: o,
6880
+ response: s,
6881
+ responseIndex: c,
6882
+ showAnswer: l
6883
+ }) : t.type === "textMarker" ? /* @__PURE__ */ a(Qc, {
6819
6884
  disabled: e,
6820
6885
  item: n,
6821
- messages: r,
6822
- onChange: i,
6823
- response: o,
6824
- responseIndex: s,
6825
- showAnswer: c
6826
- }) : el({
6886
+ messages: i,
6887
+ onChange: o,
6888
+ response: s,
6889
+ responseIndex: c,
6890
+ showAnswer: l
6891
+ }) : al({
6827
6892
  disabled: e,
6828
6893
  element: t,
6829
6894
  item: n,
6830
- messages: r,
6831
- onResponseItemChange: i,
6832
- response: o,
6833
- responseIndex: s,
6834
- showAnswer: c
6895
+ locale: r,
6896
+ messages: i,
6897
+ onResponseItemChange: o,
6898
+ response: s,
6899
+ responseIndex: c,
6900
+ showAnswer: l,
6901
+ uploadImage: u
6835
6902
  }) : null;
6836
6903
  }
6837
- function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
6904
+ function al({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
6838
6905
  switch (t.type) {
6839
- case "choice": return /* @__PURE__ */ a(Bc, {
6906
+ case "choice": return /* @__PURE__ */ a(Wc, {
6840
6907
  disabled: e,
6841
6908
  element: t,
6842
6909
  item: n,
@@ -6846,7 +6913,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6846
6913
  responseIndex: s,
6847
6914
  showAnswer: c
6848
6915
  });
6849
- case "fill": return /* @__PURE__ */ a(rc, {
6916
+ case "fill": return /* @__PURE__ */ a(sc, {
6850
6917
  disabled: e,
6851
6918
  item: n,
6852
6919
  messages: r,
@@ -6855,7 +6922,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6855
6922
  responseIndex: s,
6856
6923
  showAnswer: c
6857
6924
  });
6858
- case "inlineFill": return /* @__PURE__ */ a(Tc, {
6925
+ case "inlineFill": return /* @__PURE__ */ a(kc, {
6859
6926
  disabled: e,
6860
6927
  element: t,
6861
6928
  item: n,
@@ -6865,7 +6932,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6865
6932
  responseIndex: s,
6866
6933
  showAnswer: c
6867
6934
  });
6868
- case "wordBuilder": return /* @__PURE__ */ a(Zc, {
6935
+ case "wordBuilder": return /* @__PURE__ */ a(nl, {
6869
6936
  disabled: e,
6870
6937
  element: t,
6871
6938
  item: n,
@@ -6875,7 +6942,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6875
6942
  responseIndex: s,
6876
6943
  showAnswer: c
6877
6944
  });
6878
- case "judgement": return /* @__PURE__ */ a(Ac, {
6945
+ case "judgement": return /* @__PURE__ */ a(Pc, {
6879
6946
  disabled: e,
6880
6947
  element: t,
6881
6948
  item: n,
@@ -6885,7 +6952,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6885
6952
  responseIndex: s,
6886
6953
  showAnswer: c
6887
6954
  });
6888
- case "lineConnect": return /* @__PURE__ */ a(Nc, {
6955
+ case "lineConnect": return /* @__PURE__ */ a(Lc, {
6889
6956
  disabled: e,
6890
6957
  item: n,
6891
6958
  messages: r,
@@ -6894,7 +6961,7 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6894
6961
  responseIndex: s,
6895
6962
  showAnswer: c
6896
6963
  });
6897
- case "matching": return /* @__PURE__ */ a(Ic, {
6964
+ case "matching": return /* @__PURE__ */ a(Bc, {
6898
6965
  disabled: e,
6899
6966
  item: n,
6900
6967
  messages: r,
@@ -6907,117 +6974,126 @@ function el({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
6907
6974
  }
6908
6975
  //#endregion
6909
6976
  //#region src/question/player/QuestionPlayer.tsx
6910
- var tl = ["locale"];
6911
- function nl(e) {
6977
+ var ol = ["locale"];
6978
+ function sl(e) {
6912
6979
  let { locale: t = "zh-CN" } = e;
6913
- return /* @__PURE__ */ a(rl, O(O({}, ya(e, tl)), {}, {
6914
- messages: Ks(t),
6980
+ return /* @__PURE__ */ a(cl, O(O({}, xa(e, ol)), {}, {
6981
+ locale: t,
6982
+ messages: Xs(t),
6915
6983
  numberPath: []
6916
6984
  }));
6917
6985
  }
6918
- function rl({ className: e, disabled: t = !1, messages: n, numberPath: r, onResponseChange: i, response: o, showAnswer: s = !1, showExtraAttributes: c = !1, questionTypeTemplates: l, value: u }) {
6919
- let d = ia(l, u);
6920
- if (!d) return /* @__PURE__ */ a("div", {
6986
+ function cl({ className: e, disabled: t = !1, locale: n = "zh-CN", messages: r, numberPath: i, onResponseChange: o, response: s, showAnswer: c = !1, showExtraAttributes: l = !1, questionTypeTemplates: u, uploadImage: d, value: f }) {
6987
+ let p = ia(u, f);
6988
+ if (!p) return /* @__PURE__ */ a("div", {
6921
6989
  className: H(U.root, e),
6922
6990
  children: /* @__PURE__ */ a("div", {
6923
6991
  className: U.empty,
6924
- children: n.missingQuestionTypeTemplate
6992
+ children: r.missingQuestionTypeTemplate
6925
6993
  })
6926
6994
  });
6927
- let f = il({
6995
+ let m = ll({
6928
6996
  disabled: t,
6929
- messages: n,
6930
- numberPath: r,
6931
- onResponseChange: i,
6932
- response: o,
6933
- showAnswer: s,
6934
- showExtraAttributes: c,
6935
- structure: d,
6936
- questionTypeTemplates: l,
6937
- value: u
6997
+ locale: n,
6998
+ messages: r,
6999
+ numberPath: i,
7000
+ onResponseChange: o,
7001
+ response: s,
7002
+ showAnswer: c,
7003
+ showExtraAttributes: l,
7004
+ structure: p,
7005
+ uploadImage: d,
7006
+ questionTypeTemplates: u,
7007
+ value: f
6938
7008
  });
6939
7009
  return /* @__PURE__ */ a("div", {
6940
7010
  className: H(U.root, e),
6941
- children: sl(d, u) ? /* @__PURE__ */ a("div", {
7011
+ children: fl(p, f) ? /* @__PURE__ */ a("div", {
6942
7012
  className: U.empty,
6943
- children: n.previewEmpty
6944
- }) : f
7013
+ children: r.previewEmpty
7014
+ }) : m
6945
7015
  });
6946
7016
  }
6947
- function il(e) {
6948
- return /* @__PURE__ */ o(i, { children: [al(e), ol(e)] });
7017
+ function ll(e) {
7018
+ return /* @__PURE__ */ o(i, { children: [ul(e), dl(e)] });
6949
7019
  }
6950
- function al({ disabled: e, messages: t, onResponseChange: n, response: r, showAnswer: i, showExtraAttributes: s, structure: c, value: l }) {
6951
- return Xt(c) ? null : /* @__PURE__ */ o("div", {
7020
+ function ul({ disabled: e, locale: t, messages: n, onResponseChange: r, response: i, showAnswer: s, showExtraAttributes: c, structure: l, uploadImage: u, value: d }) {
7021
+ return Xt(l) ? null : /* @__PURE__ */ o("div", {
6952
7022
  className: U["element-list"],
6953
- children: [c.elements.map((o, s) => {
6954
- let u = rn(l, s, o), d = c.elements.slice(0, s).filter((e) => e.type !== "richText").length;
7023
+ children: [l.elements.map((o, c) => {
7024
+ let f = rn(d, c, o), p = l.elements.slice(0, c).filter((e) => e.type !== "richText").length;
6955
7025
  return /* @__PURE__ */ a("section", {
6956
7026
  className: U.element,
6957
- children: /* @__PURE__ */ a($c, {
7027
+ children: /* @__PURE__ */ a(il, {
6958
7028
  disabled: e,
6959
7029
  element: o,
6960
- item: u,
6961
- messages: t,
6962
- onResponseItemChange: (e) => n(bs(r, d, e)),
6963
- response: r,
6964
- responseIndex: d,
6965
- showAnswer: i && c.hasAnswer
7030
+ item: f,
7031
+ locale: t,
7032
+ messages: n,
7033
+ onResponseItemChange: (e) => r(ws(i, p, e)),
7034
+ response: i,
7035
+ responseIndex: p,
7036
+ showAnswer: s && l.hasAnswer,
7037
+ uploadImage: u
6966
7038
  })
6967
- }, `${o.type}-${s}`);
6968
- }), s ? c.extras.map((n) => {
6969
- let i = an(l, n);
7039
+ }, `${o.type}-${c}`);
7040
+ }), c ? l.extras.map((r) => {
7041
+ let s = an(d, r);
6970
7042
  return /* @__PURE__ */ o("section", {
6971
7043
  className: U.element,
6972
7044
  children: [/* @__PURE__ */ a("h3", {
6973
7045
  className: U["section-title"],
6974
- children: n.name
6975
- }), /* @__PURE__ */ a($c, {
7046
+ children: r.name
7047
+ }), /* @__PURE__ */ a(il, {
6976
7048
  disabled: e,
6977
- element: cl(n),
6978
- item: ll(i),
6979
- messages: t,
7049
+ element: pl(r),
7050
+ item: ml(s),
7051
+ locale: t,
7052
+ messages: n,
6980
7053
  onResponseItemChange: () => void 0,
6981
- response: r,
7054
+ response: i,
6982
7055
  responseIndex: -1,
6983
- showAnswer: !1
7056
+ showAnswer: !1,
7057
+ uploadImage: u
6984
7058
  })]
6985
- }, n.type);
7059
+ }, r.type);
6986
7060
  }) : null]
6987
7061
  });
6988
7062
  }
6989
- function ol({ disabled: e, messages: t, numberPath: n, onResponseChange: r, response: i, showAnswer: o, showExtraAttributes: s, questionTypeTemplates: c, value: l }) {
6990
- return l.children.length === 0 ? null : /* @__PURE__ */ a(tc, {
7063
+ function dl({ disabled: e, locale: t, messages: n, numberPath: r, onResponseChange: i, response: o, showAnswer: s, showExtraAttributes: c, questionTypeTemplates: l, uploadImage: u, value: d }) {
7064
+ return d.children.length === 0 ? null : /* @__PURE__ */ a(ac, {
6991
7065
  disabled: e,
6992
- messages: t,
6993
- numberPath: n,
6994
- onChildResponseChange: (e, t) => r(xs(i, e, t)),
6995
- response: i,
6996
- renderChild: (n, r, i, l) => /* @__PURE__ */ a(rl, {
7066
+ messages: n,
7067
+ numberPath: r,
7068
+ onChildResponseChange: (e, t) => i(Ts(o, e, t)),
7069
+ response: o,
7070
+ renderChild: (r, i, o, d) => /* @__PURE__ */ a(cl, {
6997
7071
  disabled: e,
6998
- messages: t,
6999
- numberPath: l,
7000
- onResponseChange: i,
7001
- response: r,
7002
- showAnswer: o,
7003
- showExtraAttributes: s,
7004
- questionTypeTemplates: c,
7005
- value: n
7072
+ locale: t,
7073
+ messages: n,
7074
+ numberPath: d,
7075
+ onResponseChange: o,
7076
+ response: i,
7077
+ showAnswer: s,
7078
+ showExtraAttributes: c,
7079
+ questionTypeTemplates: l,
7080
+ uploadImage: u,
7081
+ value: r
7006
7082
  }),
7007
- value: l
7083
+ value: d
7008
7084
  });
7009
7085
  }
7010
- function sl(e, t) {
7086
+ function fl(e, t) {
7011
7087
  return Xt(e) && t.children.length === 0;
7012
7088
  }
7013
- function cl(e) {
7089
+ function pl(e) {
7014
7090
  return {
7015
7091
  config: {},
7016
7092
  name: e.name,
7017
7093
  type: "richText"
7018
7094
  };
7019
7095
  }
7020
- function ll(e) {
7096
+ function ml(e) {
7021
7097
  return {
7022
7098
  content: e.content,
7023
7099
  type: "richText"
@@ -7025,45 +7101,45 @@ function ll(e) {
7025
7101
  }
7026
7102
  //#endregion
7027
7103
  //#region src/question/renderers/QuestionBlankGroupView.module.css
7028
- var ul = {
7104
+ var hl = {
7029
7105
  "blank-list": "_blank-list_12ccp_1",
7030
7106
  "blank-item": "_blank-item_12ccp_11",
7031
7107
  "blank-field": "_blank-field_12ccp_17"
7032
7108
  };
7033
7109
  //#endregion
7034
7110
  //#region src/question/renderers/QuestionBlankGroupView.tsx
7035
- function dl({ item: e, messages: t, showAnswer: n }) {
7111
+ function gl({ item: e, messages: t, showAnswer: n }) {
7036
7112
  let r = M(e.answers, e.blanks).map((n, r) => ({
7037
7113
  contents: n.answerPools.map((e, t) => /* @__PURE__ */ a(G, { content: e }, `group-${r}-answer-${t}`)),
7038
- marker: qs(n.blankIds, e.blanks, t.blankLabel)
7114
+ marker: Zs(n.blankIds, e.blanks, t.blankLabel)
7039
7115
  }));
7040
7116
  return /* @__PURE__ */ o("div", {
7041
7117
  className: W.element,
7042
7118
  children: [/* @__PURE__ */ a("ol", {
7043
- className: ul["blank-list"],
7119
+ className: hl["blank-list"],
7044
7120
  children: e.blanks.map((e, n) => /* @__PURE__ */ a("li", {
7045
- className: ul["blank-item"],
7121
+ className: hl["blank-item"],
7046
7122
  children: /* @__PURE__ */ o("span", {
7047
- className: ul["blank-field"],
7123
+ className: hl["blank-field"],
7048
7124
  children: [
7049
7125
  t.blankLabel,
7050
7126
  " ",
7051
7127
  n + 1
7052
7128
  ]
7053
7129
  })
7054
- }, fl(e, n)))
7130
+ }, _l(e, n)))
7055
7131
  }), n ? /* @__PURE__ */ a(K, {
7056
7132
  groups: r,
7057
7133
  title: t.standardAnswer
7058
7134
  }) : null]
7059
7135
  });
7060
7136
  }
7061
- function fl(e, t) {
7137
+ function _l(e, t) {
7062
7138
  return e || `blank-${t + 1}`;
7063
7139
  }
7064
7140
  //#endregion
7065
7141
  //#region src/question/renderers/QuestionClassificationView.tsx
7066
- function pl({ item: e, messages: t, showAnswer: n }) {
7142
+ function vl({ item: e, messages: t, showAnswer: n }) {
7067
7143
  return /* @__PURE__ */ o("div", {
7068
7144
  className: W.element,
7069
7145
  children: [/* @__PURE__ */ o("div", {
@@ -7088,23 +7164,23 @@ function pl({ item: e, messages: t, showAnswer: n }) {
7088
7164
  }, e.id))
7089
7165
  })]
7090
7166
  }), n ? /* @__PURE__ */ a(K, {
7091
- groups: oc(e),
7167
+ groups: uc(e),
7092
7168
  title: t.standardAnswer
7093
7169
  }) : null]
7094
7170
  });
7095
7171
  }
7096
7172
  //#endregion
7097
7173
  //#region src/question/renderers/QuestionFillTextView.tsx
7098
- function ml({ element: e, item: t, messages: n, showAnswer: r }) {
7099
- let i = En(t, e, !0), s = $s(i).map((e, t) => ({
7174
+ function yl({ element: e, item: t, messages: n, showAnswer: r }) {
7175
+ let i = En(t, e, !0), s = rc(i).map((e, t) => ({
7100
7176
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(G, { content: e }, `group-${t}-answer-${n}`)),
7101
- marker: qs(e.blankIds, i.blanks, n.blankLabel)
7177
+ marker: Zs(e.blankIds, i.blanks, n.blankLabel)
7102
7178
  }));
7103
7179
  return /* @__PURE__ */ o("div", {
7104
7180
  className: W.element,
7105
7181
  children: [
7106
7182
  /* @__PURE__ */ a(G, { content: i.content }),
7107
- hl(i, n.candidateOptions),
7183
+ bl(i, n.candidateOptions),
7108
7184
  r ? /* @__PURE__ */ a(K, {
7109
7185
  groups: s,
7110
7186
  title: n.standardAnswer
@@ -7112,7 +7188,7 @@ function ml({ element: e, item: t, messages: n, showAnswer: r }) {
7112
7188
  ]
7113
7189
  });
7114
7190
  }
7115
- function hl(e, t) {
7191
+ function bl(e, t) {
7116
7192
  var n, r;
7117
7193
  let i = (n = e.candidateOptions) == null ? [] : n, s = (r = e.blankOptionGroups) == null ? [] : r;
7118
7194
  return !i.length && !s.length ? null : /* @__PURE__ */ o("div", {
@@ -7134,7 +7210,7 @@ function hl(e, t) {
7134
7210
  }
7135
7211
  //#endregion
7136
7212
  //#region src/question/renderers/QuestionJudgementGroupView.tsx
7137
- function gl({ element: e, item: t, messages: n, showAnswer: r }) {
7213
+ function xl({ element: e, item: t, messages: n, showAnswer: r }) {
7138
7214
  let i = un(e.config.judgeAnswerMode), s = [{
7139
7215
  contents: dn(e.config.judgeAnswerMode, t.answers),
7140
7216
  marker: ""
@@ -7155,7 +7231,7 @@ function gl({ element: e, item: t, messages: n, showAnswer: r }) {
7155
7231
  }
7156
7232
  //#endregion
7157
7233
  //#region src/question/renderers/QuestionLineConnectView.tsx
7158
- function _l({ item: e, messages: t, showAnswer: n }) {
7234
+ function Sl({ item: e, messages: t, showAnswer: n }) {
7159
7235
  let r = { gridTemplateColumns: `repeat(${e.columns.length}, minmax(12rem, 1fr))` };
7160
7236
  return /* @__PURE__ */ o("div", {
7161
7237
  className: W.element,
@@ -7186,12 +7262,12 @@ function _l({ item: e, messages: t, showAnswer: n }) {
7186
7262
  }, e.columnId))
7187
7263
  })
7188
7264
  }), n ? /* @__PURE__ */ a(K, {
7189
- groups: jc(e),
7265
+ groups: Fc(e),
7190
7266
  title: t.standardAnswer
7191
7267
  }) : null]
7192
7268
  });
7193
7269
  }
7194
- var vl = {
7270
+ var Cl = {
7195
7271
  board: "_board_5xarh_1",
7196
7272
  columns: "_columns_5xarh_6",
7197
7273
  column: "_column_5xarh_6",
@@ -7200,21 +7276,21 @@ var vl = {
7200
7276
  };
7201
7277
  //#endregion
7202
7278
  //#region src/question/renderers/QuestionMatchingView.tsx
7203
- function yl({ item: e, messages: t, showAnswer: n }) {
7279
+ function wl({ item: e, messages: t, showAnswer: n }) {
7204
7280
  return /* @__PURE__ */ o("div", {
7205
7281
  className: W.element,
7206
7282
  children: [/* @__PURE__ */ a("div", {
7207
- className: vl.board,
7283
+ className: Cl.board,
7208
7284
  children: /* @__PURE__ */ a("div", {
7209
- className: vl.columns,
7285
+ className: Cl.columns,
7210
7286
  children: e.columns.map((e) => /* @__PURE__ */ a("section", {
7211
- className: vl.column,
7287
+ className: Cl.column,
7212
7288
  children: e.items.map((t, n) => {
7213
7289
  let r = cn(e.labelStyle, n);
7214
7290
  return /* @__PURE__ */ o("div", {
7215
- className: vl.item,
7291
+ className: Cl.item,
7216
7292
  children: [r ? /* @__PURE__ */ a("span", {
7217
- className: vl.marker,
7293
+ className: Cl.marker,
7218
7294
  children: r
7219
7295
  }) : null, /* @__PURE__ */ a(G, { content: t.content })]
7220
7296
  }, t.itemId);
@@ -7222,28 +7298,28 @@ function yl({ item: e, messages: t, showAnswer: n }) {
7222
7298
  }, e.columnId))
7223
7299
  })
7224
7300
  }), n ? /* @__PURE__ */ a(K, {
7225
- groups: Pc(e),
7301
+ groups: Rc(e),
7226
7302
  title: t.standardAnswer
7227
7303
  }) : null]
7228
7304
  });
7229
7305
  }
7230
7306
  //#endregion
7231
7307
  //#region src/question/renderers/QuestionOptionGroupView.tsx
7232
- function bl({ element: e, item: t, messages: n, showAnswer: r }) {
7308
+ function Tl({ element: e, item: t, messages: n, showAnswer: r }) {
7233
7309
  let i = fn(t, e.config.optionLabelStyle);
7234
7310
  if (e.config.renderer === "table") {
7235
- let s = Rc(e, t);
7311
+ let s = Hc(e, t);
7236
7312
  return /* @__PURE__ */ o("div", {
7237
7313
  className: W.element,
7238
7314
  children: [/* @__PURE__ */ a("div", {
7239
- className: zc["table-wrap"],
7315
+ className: Uc["table-wrap"],
7240
7316
  children: /* @__PURE__ */ o("table", {
7241
- className: zc.table,
7317
+ className: Uc.table,
7242
7318
  children: [
7243
- /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: zc["table-option-column"] }), t.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7319
+ /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Uc["table-option-column"] }), t.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7244
7320
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: n.option }), t.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(G, { content: e.content }) }, e.id))] }) }),
7245
7321
  /* @__PURE__ */ a("tbody", { children: i.map((e) => /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("span", {
7246
- className: zc["table-option-marker"],
7322
+ className: Uc["table-option-marker"],
7247
7323
  children: e.marker
7248
7324
  }) }), e.cells.map((t, n) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(G, { content: t }) }, `${e.optionId}-cell-${n}`))] }, e.optionId)) })
7249
7325
  ]
@@ -7254,7 +7330,7 @@ function bl({ element: e, item: t, messages: n, showAnswer: r }) {
7254
7330
  }) : null]
7255
7331
  });
7256
7332
  }
7257
- let s = Rc(e, t);
7333
+ let s = Hc(e, t);
7258
7334
  return /* @__PURE__ */ o("div", {
7259
7335
  className: W.element,
7260
7336
  children: [/* @__PURE__ */ a("ol", {
@@ -7274,7 +7350,7 @@ function bl({ element: e, item: t, messages: n, showAnswer: r }) {
7274
7350
  }
7275
7351
  //#endregion
7276
7352
  //#region src/question/renderers/QuestionOrderingView.tsx
7277
- function xl({ item: e, messages: t, showAnswer: n }) {
7353
+ function El({ item: e, messages: t, showAnswer: n }) {
7278
7354
  return /* @__PURE__ */ o("div", {
7279
7355
  className: W.element,
7280
7356
  children: [/* @__PURE__ */ a("ol", {
@@ -7287,19 +7363,19 @@ function xl({ item: e, messages: t, showAnswer: n }) {
7287
7363
  }), /* @__PURE__ */ a(G, { content: e.content })]
7288
7364
  }, e.id))
7289
7365
  }), n ? /* @__PURE__ */ a(K, {
7290
- groups: Vc(e),
7366
+ groups: Gc(e),
7291
7367
  title: t.standardAnswer
7292
7368
  }) : null]
7293
7369
  });
7294
7370
  }
7295
7371
  //#endregion
7296
7372
  //#region src/question/renderers/QuestionWordBuilderView.tsx
7297
- function Sl({ element: e, item: t, messages: n, showAnswer: r }) {
7298
- let i = Tn(t, !0, e), s = Yc(i, n.blankLabel);
7373
+ function Dl({ element: e, item: t, messages: n, showAnswer: r }) {
7374
+ let i = Tn(t, !0, e), s = el(i, n.blankLabel);
7299
7375
  return /* @__PURE__ */ o("div", {
7300
7376
  className: W.element,
7301
7377
  children: [
7302
- /* @__PURE__ */ a(uc, {
7378
+ /* @__PURE__ */ a(mc, {
7303
7379
  content: i.content,
7304
7380
  renderBlank: ({ blankId: e, index: t, label: r }) => /* @__PURE__ */ a("span", {
7305
7381
  "aria-label": r || `${n.blankLabel}${t + 1}`,
@@ -7329,63 +7405,63 @@ function Sl({ element: e, item: t, messages: n, showAnswer: r }) {
7329
7405
  }
7330
7406
  //#endregion
7331
7407
  //#region src/question/renderers/QuestionContentElementView.tsx
7332
- function Cl({ element: e, item: t, messages: n, showAnswer: r }) {
7333
- return e.type === t.type ? e.type === "richText" ? /* @__PURE__ */ a(G, { content: t.content }) : e.type === "ordering" ? /* @__PURE__ */ a(xl, {
7408
+ function Ol({ element: e, item: t, messages: n, showAnswer: r }) {
7409
+ return e.type === t.type ? e.type === "richText" ? /* @__PURE__ */ a(G, { content: t.content }) : e.type === "textResponse" ? /* @__PURE__ */ a(ya, { label: n.textResponsePlaceholder }) : e.type === "ordering" ? /* @__PURE__ */ a(El, {
7334
7410
  item: t,
7335
7411
  messages: n,
7336
7412
  showAnswer: r
7337
- }) : e.type === "classification" ? /* @__PURE__ */ a(pl, {
7413
+ }) : e.type === "classification" ? /* @__PURE__ */ a(vl, {
7338
7414
  item: t,
7339
7415
  messages: n,
7340
7416
  showAnswer: r
7341
- }) : e.type === "textMarker" ? /* @__PURE__ */ a(qc, {
7417
+ }) : e.type === "textMarker" ? /* @__PURE__ */ a(Zc, {
7342
7418
  item: t,
7343
7419
  messages: n,
7344
7420
  showAnswer: r
7345
- }) : wl({
7421
+ }) : kl({
7346
7422
  element: e,
7347
7423
  item: t,
7348
7424
  messages: n,
7349
7425
  showAnswer: r
7350
7426
  }) : null;
7351
7427
  }
7352
- function wl({ element: e, item: t, messages: n, showAnswer: r }) {
7428
+ function kl({ element: e, item: t, messages: n, showAnswer: r }) {
7353
7429
  switch (e.type) {
7354
- case "choice": return /* @__PURE__ */ a(bl, {
7430
+ case "choice": return /* @__PURE__ */ a(Tl, {
7355
7431
  element: e,
7356
7432
  item: t,
7357
7433
  messages: n,
7358
7434
  showAnswer: r
7359
7435
  });
7360
- case "fill": return /* @__PURE__ */ a(dl, {
7436
+ case "fill": return /* @__PURE__ */ a(gl, {
7361
7437
  item: t,
7362
7438
  messages: n,
7363
7439
  showAnswer: r
7364
7440
  });
7365
- case "inlineFill": return /* @__PURE__ */ a(ml, {
7441
+ case "inlineFill": return /* @__PURE__ */ a(yl, {
7366
7442
  element: e,
7367
7443
  item: t,
7368
7444
  messages: n,
7369
7445
  showAnswer: r
7370
7446
  });
7371
- case "wordBuilder": return /* @__PURE__ */ a(Sl, {
7447
+ case "wordBuilder": return /* @__PURE__ */ a(Dl, {
7372
7448
  element: e,
7373
7449
  item: t,
7374
7450
  messages: n,
7375
7451
  showAnswer: r
7376
7452
  });
7377
- case "judgement": return /* @__PURE__ */ a(gl, {
7453
+ case "judgement": return /* @__PURE__ */ a(xl, {
7378
7454
  element: e,
7379
7455
  item: t,
7380
7456
  messages: n,
7381
7457
  showAnswer: r
7382
7458
  });
7383
- case "lineConnect": return /* @__PURE__ */ a(_l, {
7459
+ case "lineConnect": return /* @__PURE__ */ a(Sl, {
7384
7460
  item: t,
7385
7461
  messages: n,
7386
7462
  showAnswer: r
7387
7463
  });
7388
- case "matching": return /* @__PURE__ */ a(yl, {
7464
+ case "matching": return /* @__PURE__ */ a(wl, {
7389
7465
  item: t,
7390
7466
  messages: n,
7391
7467
  showAnswer: r
@@ -7404,7 +7480,7 @@ var X = {
7404
7480
  };
7405
7481
  //#endregion
7406
7482
  //#region src/question/preview/QuestionCompositePreview.tsx
7407
- function Tl({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
7483
+ function Al({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
7408
7484
  return r.children.length === 0 ? /* @__PURE__ */ a("div", {
7409
7485
  className: X.empty,
7410
7486
  children: e.previewEmpty
@@ -7419,7 +7495,7 @@ function Tl({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
7419
7495
  children: [
7420
7496
  e.subquestion,
7421
7497
  " ",
7422
- Mo(a)
7498
+ Fo(a)
7423
7499
  ]
7424
7500
  }), n(r, a)]
7425
7501
  }, r.id || i);
@@ -7428,15 +7504,15 @@ function Tl({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
7428
7504
  }
7429
7505
  //#endregion
7430
7506
  //#region src/question/preview/QuestionPreview.tsx
7431
- var El = ["locale"];
7432
- function Dl(e) {
7507
+ var jl = ["locale"];
7508
+ function Ml(e) {
7433
7509
  let { locale: t = "zh-CN" } = e;
7434
- return /* @__PURE__ */ a(Ol, O(O({}, ya(e, El)), {}, {
7435
- messages: Ks(t),
7510
+ return /* @__PURE__ */ a(Nl, O(O({}, xa(e, jl)), {}, {
7511
+ messages: Xs(t),
7436
7512
  numberPath: []
7437
7513
  }));
7438
7514
  }
7439
- function Ol({ className: e, messages: t, numberPath: n, showAnswer: r = !1, showExtraAttributes: s = !1, questionTypeTemplates: c, value: l }) {
7515
+ function Nl({ className: e, messages: t, numberPath: n, showAnswer: r = !1, showExtraAttributes: s = !1, questionTypeTemplates: c, value: l }) {
7440
7516
  let u = ia(c, l);
7441
7517
  if (!u) return /* @__PURE__ */ a("div", {
7442
7518
  className: H(X.root, e),
@@ -7451,7 +7527,7 @@ function Ol({ className: e, messages: t, numberPath: n, showAnswer: r = !1, show
7451
7527
  let i = rn(l, n, e);
7452
7528
  return /* @__PURE__ */ a("section", {
7453
7529
  className: X.element,
7454
- children: /* @__PURE__ */ a(Cl, {
7530
+ children: /* @__PURE__ */ a(Ol, {
7455
7531
  element: e,
7456
7532
  item: i,
7457
7533
  messages: t,
@@ -7465,18 +7541,18 @@ function Ol({ className: e, messages: t, numberPath: n, showAnswer: r = !1, show
7465
7541
  children: [/* @__PURE__ */ a("h3", {
7466
7542
  className: X["section-title"],
7467
7543
  children: e.name
7468
- }), /* @__PURE__ */ a(Cl, {
7469
- element: Al(e),
7470
- item: jl(n),
7544
+ }), /* @__PURE__ */ a(Ol, {
7545
+ element: Fl(e),
7546
+ item: Il(n),
7471
7547
  messages: t,
7472
7548
  showAnswer: !1
7473
7549
  })]
7474
7550
  }, e.type);
7475
7551
  }) : null]
7476
- }), l.children.length === 0 ? null : /* @__PURE__ */ a(Tl, {
7552
+ }), l.children.length === 0 ? null : /* @__PURE__ */ a(Al, {
7477
7553
  messages: t,
7478
7554
  numberPath: n,
7479
- renderChild: (e, n) => /* @__PURE__ */ a(Ol, {
7555
+ renderChild: (e, n) => /* @__PURE__ */ a(Nl, {
7480
7556
  numberPath: n,
7481
7557
  messages: t,
7482
7558
  showAnswer: r,
@@ -7488,29 +7564,29 @@ function Ol({ className: e, messages: t, numberPath: n, showAnswer: r = !1, show
7488
7564
  })] });
7489
7565
  return /* @__PURE__ */ a("div", {
7490
7566
  className: H(X.root, e),
7491
- children: kl(u, l) ? /* @__PURE__ */ a("div", {
7567
+ children: Pl(u, l) ? /* @__PURE__ */ a("div", {
7492
7568
  className: X.empty,
7493
7569
  children: t.previewEmpty
7494
7570
  }) : d
7495
7571
  });
7496
7572
  }
7497
- function kl(e, t) {
7573
+ function Pl(e, t) {
7498
7574
  return Xt(e) && t.children.length === 0;
7499
7575
  }
7500
- function Al(e) {
7576
+ function Fl(e) {
7501
7577
  return {
7502
7578
  config: {},
7503
7579
  name: e.name,
7504
7580
  type: "richText"
7505
7581
  };
7506
7582
  }
7507
- function jl(e) {
7583
+ function Il(e) {
7508
7584
  return {
7509
7585
  content: e.content,
7510
7586
  type: "richText"
7511
7587
  };
7512
7588
  }
7513
- var Ml = {
7589
+ var Ll = {
7514
7590
  root: "_root_17bqr_1",
7515
7591
  toolbar: "_toolbar_17bqr_26",
7516
7592
  "toolbar-title": "_toolbar-title_17bqr_36",
@@ -7562,7 +7638,7 @@ var Ml = {
7562
7638
  "palette-section": "_palette-section_vhj2r_56",
7563
7639
  "palette-section-title": "_palette-section-title_vhj2r_62",
7564
7640
  "palette-button": "_palette-button_vhj2r_70"
7565
- }, Nl = {
7641
+ }, Rl = {
7566
7642
  "en-US": {
7567
7643
  addElement: "Add element",
7568
7644
  addExtra: "Add extra attribute",
@@ -7668,6 +7744,8 @@ var Ml = {
7668
7744
  structureName: "Structure name",
7669
7745
  textMarkerDescription: "Mark selectable text spans as answer targets.",
7670
7746
  textMarkerLabel: "Text marker",
7747
+ textResponseDescription: "Rich-text response entered by the student.",
7748
+ textResponseLabel: "Text response",
7671
7749
  wordBuilderDescription: "Build words or sentences from candidate pieces.",
7672
7750
  wordBuilderLabel: "Word builder"
7673
7751
  },
@@ -7776,28 +7854,30 @@ var Ml = {
7776
7854
  structureName: "\u7ed3\u6784\u540d\u79f0",
7777
7855
  textMarkerDescription: "\u5728\u6b63\u6587\u4e2d\u6807\u51fa\u53ef\u9009\u62e9\u7684\u4f5c\u7b54\u7247\u6bb5\u3002",
7778
7856
  textMarkerLabel: "\u6587\u672c\u6807\u6ce8",
7857
+ textResponseDescription: "\u5b66\u751f\u8f93\u5165\u5bcc\u6587\u672c\u56de\u7b54\u3002",
7858
+ textResponseLabel: "\u6587\u672c\u4f5c\u7b54",
7779
7859
  wordBuilderDescription: "\u7528\u5019\u9009\u8bcd\u5757\u62fc\u5199\u5355\u8bcd\u6216\u7ec4\u6210\u53e5\u5b50\u3002",
7780
7860
  wordBuilderLabel: "\u7ec4\u8bcd\u62fc\u5199"
7781
7861
  }
7782
7862
  };
7783
- function Pl(e, t) {
7863
+ function zl(e, t) {
7784
7864
  var n;
7785
7865
  return (n = e.extraDescriptions.get(t)) == null ? t : n;
7786
7866
  }
7787
- function Fl(e, t) {
7867
+ function Bl(e, t) {
7788
7868
  var n;
7789
7869
  return (n = e.extraLabels.get(t)) == null ? t : n;
7790
7870
  }
7791
- function Il(e) {
7871
+ function Vl(e) {
7792
7872
  switch (e) {
7793
- case "en-US": return Nl["en-US"];
7794
- case "zh-CN": return Nl["zh-CN"];
7873
+ case "en-US": return Rl["en-US"];
7874
+ case "zh-CN": return Rl["zh-CN"];
7795
7875
  }
7796
7876
  }
7797
- function Ll(e, t) {
7798
- return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : Bl(e, t);
7877
+ function Hl(e, t) {
7878
+ return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : Gl(e, t);
7799
7879
  }
7800
- var Rl = {
7880
+ var Ul = {
7801
7881
  choice: (e) => e.optionGroupDescription,
7802
7882
  classification: (e) => e.classificationDescription,
7803
7883
  fill: (e) => e.blankGroupDescription,
@@ -7806,8 +7886,9 @@ var Rl = {
7806
7886
  lineConnect: (e) => e.lineConnectDescription,
7807
7887
  matching: (e) => e.matchingDescription,
7808
7888
  textMarker: (e) => e.textMarkerDescription,
7889
+ textResponse: (e) => e.textResponseDescription,
7809
7890
  wordBuilder: (e) => e.wordBuilderDescription
7810
- }, zl = {
7891
+ }, Wl = {
7811
7892
  choice: (e) => e.optionGroupLabel,
7812
7893
  classification: (e) => e.classificationLabel,
7813
7894
  fill: (e) => e.blankGroupLabel,
@@ -7816,32 +7897,33 @@ var Rl = {
7816
7897
  lineConnect: (e) => e.lineConnectLabel,
7817
7898
  matching: (e) => e.matchingLabel,
7818
7899
  textMarker: (e) => e.textMarkerLabel,
7900
+ textResponse: (e) => e.textResponseLabel,
7819
7901
  wordBuilder: (e) => e.wordBuilderLabel
7820
7902
  };
7821
- function Bl(e, t) {
7822
- return Rl[t](e);
7903
+ function Gl(e, t) {
7904
+ return Ul[t](e);
7823
7905
  }
7824
- function Vl(e, t) {
7825
- return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Hl(e, t);
7906
+ function Kl(e, t) {
7907
+ return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : ql(e, t);
7826
7908
  }
7827
- function Hl(e, t) {
7828
- return zl[t](e);
7909
+ function ql(e, t) {
7910
+ return Wl[t](e);
7829
7911
  }
7830
- function Ul(e, t) {
7912
+ function Jl(e, t) {
7831
7913
  var n;
7832
7914
  return (n = e.optionValueLabels.get(t)) == null ? t : n;
7833
7915
  }
7834
- function Wl(e, t) {
7916
+ function Yl(e, t) {
7835
7917
  var n;
7836
7918
  return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
7837
7919
  }
7838
- function Gl(e, t) {
7920
+ function Xl(e, t) {
7839
7921
  var n;
7840
7922
  return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
7841
7923
  }
7842
7924
  //#endregion
7843
7925
  //#region src/question/structure-editor/QuestionStructureCanvas.tsx
7844
- function Kl({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
7926
+ function Zl({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
7845
7927
  let [u, d] = m(null);
7846
7928
  return /* @__PURE__ */ o("section", {
7847
7929
  className: Q.panel,
@@ -7861,7 +7943,7 @@ function Kl({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
7861
7943
  className: Z["element-list"],
7862
7944
  children: [
7863
7945
  e.map((t, i) => {
7864
- let f = t.clientId === l, p = Vl(n, t.type);
7946
+ let f = t.clientId === l, p = Kl(n, t.type);
7865
7947
  return /* @__PURE__ */ o("div", {
7866
7948
  className: `${Z["element-card"]} ${f ? Z.active : ""}`,
7867
7949
  onClick: () => c(t.clientId),
@@ -7925,7 +8007,7 @@ function Kl({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
7925
8007
  children: n.extraTitle
7926
8008
  }) : null,
7927
8009
  t.map((t, r) => {
7928
- let s = t.clientId === l, f = Fl(n, t.type);
8010
+ let s = t.clientId === l, f = Bl(n, t.type);
7929
8011
  return /* @__PURE__ */ o("div", {
7930
8012
  className: `${Z["element-card"]} ${s ? Z.active : ""}`,
7931
8013
  onClick: () => c(t.clientId),
@@ -7974,7 +8056,7 @@ function Kl({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
7974
8056
  }
7975
8057
  //#endregion
7976
8058
  //#region src/question/structure-editor/QuestionStructurePalette.tsx
7977
- function ql({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8059
+ function Ql({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
7978
8060
  let i = new Set(e);
7979
8061
  return /* @__PURE__ */ o("aside", {
7980
8062
  className: Q.panel,
@@ -7989,11 +8071,11 @@ function ql({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
7989
8071
  /* @__PURE__ */ a("div", {
7990
8072
  className: Q.palette,
7991
8073
  children: ae.map((e) => /* @__PURE__ */ o("button", {
7992
- "aria-label": `${t.addElement}: ${Vl(t, e)}`,
8074
+ "aria-label": `${t.addElement}: ${Kl(t, e)}`,
7993
8075
  className: Q["palette-button"],
7994
8076
  onClick: () => n(e),
7995
8077
  type: "button",
7996
- children: [/* @__PURE__ */ a("strong", { children: Vl(t, e) }), /* @__PURE__ */ a("small", { children: Ll(t, e) })]
8078
+ children: [/* @__PURE__ */ a("strong", { children: Kl(t, e) }), /* @__PURE__ */ a("small", { children: Hl(t, e) })]
7997
8079
  }, e))
7998
8080
  }),
7999
8081
  /* @__PURE__ */ o("div", {
@@ -8006,12 +8088,12 @@ function ql({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8006
8088
  children: oe.map((e) => {
8007
8089
  let n = i.has(e);
8008
8090
  return /* @__PURE__ */ o("button", {
8009
- "aria-label": `${t.addExtra}: ${Fl(t, e)}`,
8091
+ "aria-label": `${t.addExtra}: ${Bl(t, e)}`,
8010
8092
  className: Q["palette-button"],
8011
8093
  disabled: n,
8012
8094
  onClick: () => r(e),
8013
8095
  type: "button",
8014
- children: [/* @__PURE__ */ a("strong", { children: Fl(t, e) }), /* @__PURE__ */ a("small", { children: Pl(t, e) })]
8096
+ children: [/* @__PURE__ */ a("strong", { children: Bl(t, e) }), /* @__PURE__ */ a("small", { children: zl(t, e) })]
8015
8097
  }, e);
8016
8098
  })
8017
8099
  })]
@@ -8028,27 +8110,27 @@ var $ = {
8028
8110
  select: "_select_tgswd_27",
8029
8111
  textarea: "_textarea_tgswd_28",
8030
8112
  empty: "_empty_tgswd_61"
8031
- }, Jl = [
8113
+ }, $l = [
8032
8114
  "none",
8033
8115
  "sharedPool",
8034
8116
  "perBlankOptions"
8035
- ], Yl = [
8117
+ ], eu = [
8036
8118
  "upperAlpha",
8037
8119
  "lowerAlpha",
8038
8120
  "number"
8039
- ], Xl = [
8121
+ ], tu = [
8040
8122
  "number",
8041
8123
  "upperAlpha",
8042
8124
  "lowerAlpha",
8043
8125
  "lowerRoman",
8044
8126
  "chineseNumber",
8045
8127
  "none"
8046
- ], Zl = [
8128
+ ], nu = [
8047
8129
  2,
8048
8130
  3,
8049
8131
  4,
8050
8132
  5
8051
- ], Ql = ["standard", "table"], $l = ["single", "multiple"], eu = ["spelling", "sentence"], tu = [
8133
+ ], ru = ["standard", "table"], iu = ["single", "multiple"], au = ["spelling", "sentence"], ou = [
8052
8134
  "correctWrong",
8053
8135
  "yesNo",
8054
8136
  "validInvalid",
@@ -8056,8 +8138,8 @@ var $ = {
8056
8138
  "rightWrong",
8057
8139
  "checkCross"
8058
8140
  ];
8059
- function nu({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
8060
- let f = ru({
8141
+ function su({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
8142
+ let f = cu({
8061
8143
  labels: r,
8062
8144
  onElementChange: i,
8063
8145
  onExtraChange: s,
@@ -8139,7 +8221,7 @@ function nu({ description: e, globalConfig: t, isSubjective: n, labels: r, onEle
8139
8221
  })]
8140
8222
  });
8141
8223
  }
8142
- function ru({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
8224
+ function cu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
8143
8225
  return r ? /* @__PURE__ */ o("div", {
8144
8226
  className: $["form-stack"],
8145
8227
  children: [
@@ -8159,7 +8241,7 @@ function ru({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
8159
8241
  value: r.enName
8160
8242
  })]
8161
8243
  }),
8162
- iu(r, e, t)
8244
+ lu(r, e, t)
8163
8245
  ]
8164
8246
  }) : i ? /* @__PURE__ */ o("div", {
8165
8247
  className: $["form-stack"],
@@ -8183,10 +8265,10 @@ function ru({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
8183
8265
  children: e.noElement
8184
8266
  });
8185
8267
  }
8186
- function iu(e, t, n) {
8187
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? null : au(e, t, n);
8268
+ function lu(e, t, n) {
8269
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : uu(e, t, n);
8188
8270
  }
8189
- function au(e, t, n) {
8271
+ function uu(e, t, n) {
8190
8272
  switch (e.type) {
8191
8273
  case "inlineFill": return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
8192
8274
  className: $["form-row"],
@@ -8194,9 +8276,9 @@ function au(e, t, n) {
8194
8276
  className: $.select,
8195
8277
  onChange: (t) => n(O(O({}, e), {}, { config: O(O({}, e.config), {}, { candidateMode: t.target.value }) })),
8196
8278
  value: e.config.candidateMode,
8197
- children: Jl.map((e) => /* @__PURE__ */ a("option", {
8279
+ children: $l.map((e) => /* @__PURE__ */ a("option", {
8198
8280
  value: e,
8199
- children: Wl(t, e)
8281
+ children: Yl(t, e)
8200
8282
  }, e))
8201
8283
  })]
8202
8284
  }), /* @__PURE__ */ o("label", {
@@ -8213,9 +8295,9 @@ function au(e, t, n) {
8213
8295
  className: $.select,
8214
8296
  onChange: (t) => n(O(O({}, e), {}, { config: { builderMode: t.target.value } })),
8215
8297
  value: e.config.builderMode,
8216
- children: eu.map((e) => /* @__PURE__ */ a("option", {
8298
+ children: au.map((e) => /* @__PURE__ */ a("option", {
8217
8299
  value: e,
8218
- children: Ul(t, e)
8300
+ children: Jl(t, e)
8219
8301
  }, e))
8220
8302
  })]
8221
8303
  });
@@ -8225,18 +8307,18 @@ function au(e, t, n) {
8225
8307
  className: $.select,
8226
8308
  onChange: (t) => n(O(O({}, e), {}, { config: { judgeAnswerMode: t.target.value } })),
8227
8309
  value: e.config.judgeAnswerMode,
8228
- children: tu.map((e) => /* @__PURE__ */ a("option", {
8310
+ children: ou.map((e) => /* @__PURE__ */ a("option", {
8229
8311
  value: e,
8230
- children: Ul(t, e)
8312
+ children: Jl(t, e)
8231
8313
  }, e))
8232
8314
  })]
8233
8315
  });
8234
- case "choice": return ou(e, t, n);
8235
- case "lineConnect": return su(e, t, n);
8236
- case "matching": return cu(e, t, n);
8316
+ case "choice": return du(e, t, n);
8317
+ case "lineConnect": return fu(e, t, n);
8318
+ case "matching": return pu(e, t, n);
8237
8319
  }
8238
8320
  }
8239
- function ou(e, t, n) {
8321
+ function du(e, t, n) {
8240
8322
  return /* @__PURE__ */ o(i, { children: [
8241
8323
  /* @__PURE__ */ o("label", {
8242
8324
  className: $["form-row"],
@@ -8244,9 +8326,9 @@ function ou(e, t, n) {
8244
8326
  className: $.select,
8245
8327
  onChange: (t) => n(O(O({}, e), {}, { config: O(O({}, e.config), {}, { selectionType: t.target.value }) })),
8246
8328
  value: e.config.selectionType,
8247
- children: $l.map((e) => /* @__PURE__ */ a("option", {
8329
+ children: iu.map((e) => /* @__PURE__ */ a("option", {
8248
8330
  value: e,
8249
- children: Ul(t, e)
8331
+ children: Jl(t, e)
8250
8332
  }, e))
8251
8333
  })]
8252
8334
  }),
@@ -8256,9 +8338,9 @@ function ou(e, t, n) {
8256
8338
  className: $.select,
8257
8339
  onChange: (t) => n(O(O({}, e), {}, { config: O(O({}, e.config), {}, { optionLabelStyle: t.target.value }) })),
8258
8340
  value: e.config.optionLabelStyle,
8259
- children: Yl.map((e) => /* @__PURE__ */ a("option", {
8341
+ children: eu.map((e) => /* @__PURE__ */ a("option", {
8260
8342
  value: e,
8261
- children: Ul(t, e)
8343
+ children: Jl(t, e)
8262
8344
  }, e))
8263
8345
  })]
8264
8346
  }),
@@ -8268,23 +8350,23 @@ function ou(e, t, n) {
8268
8350
  className: $.select,
8269
8351
  onChange: (t) => n(O(O({}, e), {}, { config: O(O({}, e.config), {}, { renderer: t.target.value }) })),
8270
8352
  value: e.config.renderer,
8271
- children: Ql.map((e) => /* @__PURE__ */ a("option", {
8353
+ children: ru.map((e) => /* @__PURE__ */ a("option", {
8272
8354
  value: e,
8273
- children: Ul(t, e)
8355
+ children: Jl(t, e)
8274
8356
  }, e))
8275
8357
  })]
8276
8358
  })
8277
8359
  ] });
8278
8360
  }
8279
- function su(e, t, n) {
8280
- let r = lu(e.config.columns);
8361
+ function fu(e, t, n) {
8362
+ let r = mu(e.config.columns);
8281
8363
  return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
8282
8364
  className: $["form-row"],
8283
8365
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnCount }), /* @__PURE__ */ a("select", {
8284
8366
  className: $.select,
8285
- onChange: (t) => n(O(O({}, e), {}, { config: { columns: du(r, Number(t.target.value)) } })),
8367
+ onChange: (t) => n(O(O({}, e), {}, { config: { columns: gu(r, Number(t.target.value)) } })),
8286
8368
  value: r.length,
8287
- children: Zl.map((e) => /* @__PURE__ */ a("option", {
8369
+ children: nu.map((e) => /* @__PURE__ */ a("option", {
8288
8370
  value: e,
8289
8371
  children: e
8290
8372
  }, e))
@@ -8295,47 +8377,47 @@ function su(e, t, n) {
8295
8377
  className: $.select,
8296
8378
  onChange: (t) => n(O(O({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
8297
8379
  value: i.labelStyle,
8298
- children: Xl.map((e) => /* @__PURE__ */ a("option", {
8380
+ children: tu.map((e) => /* @__PURE__ */ a("option", {
8299
8381
  value: e,
8300
- children: Gl(t, e)
8382
+ children: Xl(t, e)
8301
8383
  }, e))
8302
8384
  })]
8303
8385
  }, `line-column-${s}`))] });
8304
8386
  }
8305
- function cu(e, t, n) {
8306
- let r = uu(e.config.columns);
8387
+ function pu(e, t, n) {
8388
+ let r = hu(e.config.columns);
8307
8389
  return /* @__PURE__ */ a(i, { children: r.map((i, s) => /* @__PURE__ */ o("label", {
8308
8390
  className: $["form-row"],
8309
8391
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnLabel(s + 1) }), /* @__PURE__ */ a("select", {
8310
8392
  className: $.select,
8311
8393
  onChange: (t) => n(O(O({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
8312
8394
  value: i.labelStyle,
8313
- children: Xl.map((e) => /* @__PURE__ */ a("option", {
8395
+ children: tu.map((e) => /* @__PURE__ */ a("option", {
8314
8396
  value: e,
8315
- children: Gl(t, e)
8397
+ children: Xl(t, e)
8316
8398
  }, e))
8317
8399
  })]
8318
8400
  }, `matching-column-${s}`)) });
8319
8401
  }
8320
- function lu(e) {
8402
+ function mu(e) {
8321
8403
  let t = e.slice(0, 5);
8322
- return t.length >= 2 ? t : [...t, ...Xl.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8404
+ return t.length >= 2 ? t : [...t, ...tu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8323
8405
  }
8324
- function uu(e) {
8406
+ function hu(e) {
8325
8407
  let t = e.slice(0, 2);
8326
- return t.length >= 2 ? t : [...t, ...Xl.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8408
+ return t.length >= 2 ? t : [...t, ...tu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8327
8409
  }
8328
- function du(e, t) {
8410
+ function gu(e, t) {
8329
8411
  return Array.from({ length: Math.min(5, Math.max(2, t)) }, (t, n) => {
8330
8412
  var r, i;
8331
- return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = Xl[n]) == null ? "number" : i } : r;
8413
+ return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = tu[n]) == null ? "number" : i } : r;
8332
8414
  });
8333
8415
  }
8334
8416
  //#endregion
8335
8417
  //#region src/question/structure-editor/QuestionStructureEditor.tsx
8336
- function fu({ locale: e = "zh-CN", onChange: t, value: n }) {
8418
+ function _u({ locale: e = "zh-CN", onChange: t, value: n }) {
8337
8419
  var r, i, s, c;
8338
- let l = Il(e), [u, d] = m((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = pu(n, u);
8420
+ let l = Vl(e), [u, d] = m((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = vu(n, u);
8339
8421
  function h(e) {
8340
8422
  let r = pe(e, n.elements);
8341
8423
  t(O(O({}, n), {}, { elements: [...n.elements, r] })), d(r.clientId);
@@ -8347,11 +8429,11 @@ function fu({ locale: e = "zh-CN", onChange: t, value: n }) {
8347
8429
  }
8348
8430
  function _(e) {
8349
8431
  let r = _e(n, e);
8350
- t(r), d(mu(r));
8432
+ t(r), d(yu(r));
8351
8433
  }
8352
8434
  function v(e) {
8353
8435
  let r = ge(n, e);
8354
- t(r), d(mu(r));
8436
+ t(r), d(yu(r));
8355
8437
  }
8356
8438
  function y(e) {
8357
8439
  t(be(n, e.clientId, e));
@@ -8366,19 +8448,19 @@ function fu({ locale: e = "zh-CN", onChange: t, value: n }) {
8366
8448
  t(Se(n, e));
8367
8449
  }
8368
8450
  return /* @__PURE__ */ a("section", {
8369
- className: Ml.root,
8451
+ className: Ll.root,
8370
8452
  children: /* @__PURE__ */ a("div", {
8371
8453
  className: Q.shell,
8372
8454
  children: /* @__PURE__ */ o("div", {
8373
8455
  className: Q.grid,
8374
8456
  children: [
8375
- /* @__PURE__ */ a(ql, {
8457
+ /* @__PURE__ */ a(Ql, {
8376
8458
  addedExtraTypes: n.extras.map((e) => e.type),
8377
8459
  labels: l,
8378
8460
  onAddElement: h,
8379
8461
  onAddExtra: g
8380
8462
  }),
8381
- /* @__PURE__ */ a(Kl, {
8463
+ /* @__PURE__ */ a(Zl, {
8382
8464
  elements: n.elements,
8383
8465
  extras: n.extras,
8384
8466
  labels: l,
@@ -8388,7 +8470,7 @@ function fu({ locale: e = "zh-CN", onChange: t, value: n }) {
8388
8470
  onSelectElement: d,
8389
8471
  selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
8390
8472
  }),
8391
- /* @__PURE__ */ a(nu, {
8473
+ /* @__PURE__ */ a(su, {
8392
8474
  description: n.description,
8393
8475
  globalConfig: n.globalConfig,
8394
8476
  isSubjective: n.isSubjective,
@@ -8405,7 +8487,7 @@ function fu({ locale: e = "zh-CN", onChange: t, value: n }) {
8405
8487
  })
8406
8488
  });
8407
8489
  }
8408
- function pu(e, t) {
8490
+ function vu(e, t) {
8409
8491
  var n, r, i, a;
8410
8492
  let o = (n = e.elements.find((e) => e.clientId === t)) == null ? null : n, s = (r = e.extras.find((e) => e.clientId === t)) == null ? null : r;
8411
8493
  return o || s ? {
@@ -8416,9 +8498,9 @@ function pu(e, t) {
8416
8498
  selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
8417
8499
  };
8418
8500
  }
8419
- function mu(e) {
8501
+ function yu(e) {
8420
8502
  var t, n, r, i;
8421
8503
  return (t = (n = (r = e.elements[0]) == null ? void 0 : r.clientId) == null ? (i = e.extras[0]) == null ? void 0 : i.clientId : n) == null ? null : t;
8422
8504
  }
8423
8505
  //#endregion
8424
- export { Ko as QuestionContentEditor, nl as QuestionPlayer, Dl as QuestionPreview, G as QuestionRichContentView, fu as QuestionStructureEditor, zn as addBlankToGroup, _n as alignQuestionContentDraftWithStructure, Hn as assignBlankToAnswerGroup, Wa as cn, Un as createBlankAnswerGroupWithBlank, Zt as createEmptyQuestionContentDraft, ls as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, gn as createQuestionContentDraftFromSerialized, Yo as createQuestionContentStructureFromDraft, Xo as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, j as createRichContentValue, Qt as createRichContentValueFromDocument, Me as createRichTextContent, Bn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, Wn as detachBlankFromAnswerGroup, na as findQuestionContentQuestionTypeStructure, oa as findQuestionContentQuestionTypeTemplate, ln as getQuestionContentJudgementOptions, on as getQuestionContentOptionMarker, tn as getQuestionContentTextMarkerAnswerText, Qo as getQuestionStructureDraftChangeKind, A as getQuestionStructureElementDefaultEnName, k as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, nn as getRichContentDocument, Vn as getSharedBlankAnswerGroups, Xt as isCompositeQuestionContentStructure, mn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, En as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, hn as serializeQuestionContentDraft, Zo as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };
8506
+ export { Yo as QuestionContentEditor, sl as QuestionPlayer, Ml as QuestionPreview, G as QuestionRichContentView, _u as QuestionStructureEditor, zn as addBlankToGroup, _n as alignQuestionContentDraftWithStructure, Hn as assignBlankToAnswerGroup, qa as cn, Un as createBlankAnswerGroupWithBlank, Zt as createEmptyQuestionContentDraft, fs as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, gn as createQuestionContentDraftFromSerialized, Qo as createQuestionContentStructureFromDraft, $o as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, j as createRichContentValue, Qt as createRichContentValueFromDocument, Me as createRichTextContent, Bn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, Wn as detachBlankFromAnswerGroup, na as findQuestionContentQuestionTypeStructure, oa as findQuestionContentQuestionTypeTemplate, ln as getQuestionContentJudgementOptions, on as getQuestionContentOptionMarker, tn as getQuestionContentTextMarkerAnswerText, ts as getQuestionStructureDraftChangeKind, A as getQuestionStructureElementDefaultEnName, k as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, nn as getRichContentDocument, Vn as getSharedBlankAnswerGroups, Xt as isCompositeQuestionContentStructure, mn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, En as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, hn as serializeQuestionContentDraft, es as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };