@yungu-fed/question-editor 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- require('./index.css');function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n5 = 0, F = function F() {}; return { s: F, n: function n() { return _n5 >= r.length ? { done: !0 } : { done: !1, value: r[_n5++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
1
+ require('./index.css');function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n6 = 0, F = function F() {}; return { s: F, n: function n() { return _n6 >= r.length ? { done: !0 } : { done: !1, value: r[_n6++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
2
2
  function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }
3
3
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
4
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
@@ -155,8 +155,8 @@ function C(e) {
155
155
  return e;
156
156
  }
157
157
  var ee = ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement", "classification", "lineConnect", "matching", "ordering", "textMarker", "textResponse"],
158
- te = ["solvingProcess", "solvingStrategy", "keyInformation", "commonMistake", "solvingHint", "scoringRule", "sampleAnswer", "extensionExplanation"],
159
- w = {
158
+ w = ["solvingProcess", "solvingStrategy", "keyInformation", "commonMistake", "solvingHint", "scoringRule", "sampleAnswer", "extensionExplanation"],
159
+ T = {
160
160
  commonMistake: "\u6613\u9519\u63D0\u9192",
161
161
  extensionExplanation: "\u62D3\u5C55\u8BB2\u89E3",
162
162
  keyInformation: "\u5173\u952E\u4FE1\u606F",
@@ -166,7 +166,7 @@ var ee = ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement"
166
166
  solvingProcess: "\u89E3\u9898\u8FC7\u7A0B",
167
167
  solvingStrategy: "\u89E3\u9898\u7B56\u7565"
168
168
  },
169
- ne = {
169
+ te = {
170
170
  commonMistake: "Common mistake reminder",
171
171
  extensionExplanation: "Extension explanation",
172
172
  keyInformation: "Key information",
@@ -176,7 +176,7 @@ var ee = ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement"
176
176
  solvingProcess: "Solving process",
177
177
  solvingStrategy: "Solving strategy"
178
178
  },
179
- re = {
179
+ ne = {
180
180
  choice: "\u9009\u62E9",
181
181
  classification: "\u5206\u7C7B",
182
182
  fill: "\u586B\u7A7A",
@@ -190,7 +190,7 @@ var ee = ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement"
190
190
  textResponse: "\u6587\u672C\u4F5C\u7B54",
191
191
  wordBuilder: "\u7EC4\u8BCD\u62FC\u5199"
192
192
  },
193
- ie = {
193
+ re = {
194
194
  choice: "Choice",
195
195
  classification: "Classification",
196
196
  fill: "Blank group",
@@ -204,7 +204,7 @@ var ee = ["richText", "inlineFill", "wordBuilder", "fill", "choice", "judgement"
204
204
  textResponse: "Text response",
205
205
  wordBuilder: "Word builder"
206
206
  };
207
- function ae() {
207
+ function ie() {
208
208
  return {
209
209
  description: "",
210
210
  elements: [],
@@ -220,21 +220,21 @@ function ae() {
220
220
  version: ""
221
221
  };
222
222
  }
223
- function oe(e) {
223
+ function ae(e) {
224
224
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
225
225
  return {
226
- clientId: be(),
227
- enName: ve(e),
228
- name: _e(e),
226
+ clientId: ye(),
227
+ enName: _e(e),
228
+ name: ge(e),
229
229
  type: e
230
230
  };
231
231
  }
232
- function se(e) {
232
+ function oe(e) {
233
233
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
234
- var n = be();
235
- return e === "classification" || e === "fill" || e === "richText" || e === "textMarker" || e === "textResponse" || e === "ordering" ? xe(e, n) : ce(e, n);
234
+ var n = ye();
235
+ return e === "classification" || e === "fill" || e === "richText" || e === "textMarker" || e === "textResponse" || e === "ordering" ? be(e, n) : se(e, n);
236
236
  }
237
- function ce(e, t) {
237
+ function se(e, t) {
238
238
  switch (e) {
239
239
  case "inlineFill":
240
240
  return {
@@ -243,8 +243,8 @@ function ce(e, t) {
243
243
  allowCandidateReuse: !1,
244
244
  candidateMode: "none"
245
245
  },
246
- enName: E(e),
247
- name: T(e),
246
+ enName: D(e),
247
+ name: E(e),
248
248
  type: e
249
249
  };
250
250
  case "wordBuilder":
@@ -253,8 +253,8 @@ function ce(e, t) {
253
253
  config: {
254
254
  builderMode: "spelling"
255
255
  },
256
- enName: E(e),
257
- name: T(e),
256
+ enName: D(e),
257
+ name: E(e),
258
258
  type: e
259
259
  };
260
260
  case "judgement":
@@ -263,8 +263,8 @@ function ce(e, t) {
263
263
  config: {
264
264
  judgeAnswerMode: "correctWrong"
265
265
  },
266
- enName: E(e),
267
- name: T(e),
266
+ enName: D(e),
267
+ name: E(e),
268
268
  type: e
269
269
  };
270
270
  case "choice":
@@ -275,17 +275,17 @@ function ce(e, t) {
275
275
  renderer: "standard",
276
276
  selectionType: "single"
277
277
  },
278
- enName: E(e),
279
- name: T(e),
278
+ enName: D(e),
279
+ name: E(e),
280
280
  type: e
281
281
  };
282
282
  case "lineConnect":
283
- return le(e, t);
283
+ return ce(e, t);
284
284
  case "matching":
285
- return le(e, t);
285
+ return ce(e, t);
286
286
  }
287
287
  }
288
- function le(e, t) {
288
+ function ce(e, t) {
289
289
  return {
290
290
  clientId: t,
291
291
  config: {
@@ -295,74 +295,74 @@ function le(e, t) {
295
295
  labelStyle: "upperAlpha"
296
296
  }]
297
297
  },
298
- enName: E(e),
299
- name: T(e),
298
+ enName: D(e),
299
+ name: E(e),
300
300
  type: e
301
301
  };
302
302
  }
303
- function ue(e, t) {
303
+ function le(e, t) {
304
304
  return C(C({}, e), {}, {
305
305
  extras: e.extras.filter(function (e) {
306
306
  return e.clientId !== t;
307
307
  })
308
308
  });
309
309
  }
310
- function de(e, t) {
310
+ function ue(e, t) {
311
311
  return C(C({}, e), {}, {
312
312
  elements: e.elements.filter(function (e) {
313
313
  return e.clientId !== t;
314
314
  })
315
315
  });
316
316
  }
317
- function fe(e, t, n) {
317
+ function de(e, t, n) {
318
318
  var r = e.elements.findIndex(function (e) {
319
319
  return e.clientId === t;
320
320
  }),
321
321
  i = r + n;
322
322
  if (r < 0 || i < 0 || i >= e.elements.length) return e;
323
- var a = Se(e.elements, r),
324
- o = Se(e.elements, i);
323
+ var a = xe(e.elements, r),
324
+ o = xe(e.elements, i);
325
325
  return !a || !o ? e : C(C({}, e), {}, {
326
326
  elements: e.elements.map(function (e, t) {
327
327
  return t === r ? o : t === i ? a : e;
328
328
  })
329
329
  });
330
330
  }
331
- function pe(e, t, n) {
331
+ function fe(e, t, n) {
332
332
  return C(C({}, e), {}, {
333
333
  extras: e.extras.map(function (e) {
334
334
  return e.clientId === t ? n : e;
335
335
  })
336
336
  });
337
337
  }
338
- function me(e, t, n) {
338
+ function pe(e, t, n) {
339
339
  return C(C({}, e), {}, {
340
340
  elements: e.elements.map(function (e) {
341
341
  return e.clientId === t ? n : e;
342
342
  })
343
343
  });
344
344
  }
345
- function he(e, t) {
345
+ function me(e, t) {
346
346
  return C(C({}, e), {}, {
347
347
  globalConfig: C(C({}, e.globalConfig), t)
348
348
  });
349
349
  }
350
- function ge(e, t) {
350
+ function he(e, t) {
351
351
  return C(C({}, e), t);
352
352
  }
353
- function T(e) {
353
+ function E(e) {
354
+ return ne[e];
355
+ }
356
+ function D(e) {
354
357
  return re[e];
355
358
  }
356
- function E(e) {
357
- return ie[e];
359
+ function ge(e) {
360
+ return ve(T, e);
358
361
  }
359
362
  function _e(e) {
360
- return ye(w, e);
361
- }
362
- function ve(e) {
363
- return ye(ne, e);
363
+ return ve(te, e);
364
364
  }
365
- function ye(e, t) {
365
+ function ve(e, t) {
366
366
  var n, r;
367
367
  return (n = (r = Object.entries(e).find(function (_ref) {
368
368
  var _ref2 = _slicedToArray(_ref, 1),
@@ -370,24 +370,24 @@ function ye(e, t) {
370
370
  return e === t;
371
371
  })) == null ? void 0 : r[1]) == null ? "" : n;
372
372
  }
373
- function be() {
373
+ function ye() {
374
374
  return h();
375
375
  }
376
- function xe(e, t) {
376
+ function be(e, t) {
377
377
  return {
378
378
  clientId: t,
379
379
  config: {},
380
- enName: E(e),
381
- name: T(e),
380
+ enName: D(e),
381
+ name: E(e),
382
382
  type: e
383
383
  };
384
384
  }
385
- function Se(e, t) {
385
+ function xe(e, t) {
386
386
  return e.find(function (e, n) {
387
387
  return n === t;
388
388
  });
389
389
  }
390
- var Ce = {
390
+ var Se = {
391
391
  nodes: [{
392
392
  codecs: {
393
393
  html: {
@@ -405,15 +405,15 @@ var Ce = {
405
405
  },
406
406
  serialize: function serialize(_ref4) {
407
407
  var e = _ref4.node;
408
- return e.type === "blank" ? "<span data-rte-node=\"blank\" data-blank-id=\"".concat(Te(e.blankId), "\" data-label=\"").concat(Te(e.label), "\"></span>") : null;
408
+ return e.type === "blank" ? "<span data-rte-node=\"blank\" data-blank-id=\"".concat(we(e.blankId), "\" data-label=\"").concat(we(e.label), "\"></span>") : null;
409
409
  }
410
410
  },
411
411
  json: {
412
412
  deserialize: function deserialize(_ref5) {
413
413
  var e = _ref5.input;
414
- return we(e) ? {
415
- blankId: Te(e.blankId),
416
- label: Te(e.label),
414
+ return Ce(e) ? {
415
+ blankId: we(e.blankId),
416
+ label: we(e.label),
417
417
  children: [{
418
418
  text: ""
419
419
  }],
@@ -423,8 +423,8 @@ var Ce = {
423
423
  serialize: function serialize(_ref6) {
424
424
  var e = _ref6.node;
425
425
  return e.type === "blank" ? {
426
- blankId: Te(e.blankId),
427
- label: Te(e.label),
426
+ blankId: we(e.blankId),
427
+ label: we(e.label),
428
428
  type: "blank"
429
429
  } : null;
430
430
  }
@@ -438,35 +438,35 @@ var Ce = {
438
438
  type: "blank"
439
439
  }]
440
440
  };
441
- function we(e) {
441
+ function Ce(e) {
442
442
  return !!(e && _typeof(e) == "object" && "type" in e && e.type === "blank");
443
443
  }
444
- function Te(e) {
444
+ function we(e) {
445
445
  return _typeof(e) == "string" ? e : "";
446
446
  }
447
- function Ee() {
447
+ function Te() {
448
448
  var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
449
- return De({
450
- json: ke(e)
449
+ return Ee({
450
+ json: Oe(e)
451
451
  });
452
452
  }
453
- function De(e) {
454
- var t = Oe(e);
453
+ function Ee(e) {
454
+ var t = De(e);
455
455
  return {
456
- html: Me(t),
456
+ html: je(t),
457
457
  json: t,
458
- text: Ae(t)
458
+ text: ke(t)
459
459
  };
460
460
  }
461
- function Oe(t) {
461
+ function De(t) {
462
462
  var n;
463
463
  return t != null && t.json ? (0, e.deserializeRichTextEditorJson)(t.json, {
464
- plugins: [Ce]
464
+ plugins: [Se]
465
465
  }) : t != null && t.html ? (0, e.deserializeRichTextEditorHtml)(t.html, {
466
- plugins: [Ce]
467
- }) : ke((n = t == null ? void 0 : t.text) == null ? "" : n);
466
+ plugins: [Se]
467
+ }) : Oe((n = t == null ? void 0 : t.text) == null ? "" : n);
468
468
  }
469
- function ke(e) {
469
+ function Oe(e) {
470
470
  return [{
471
471
  children: [{
472
472
  text: e
@@ -474,22 +474,22 @@ function ke(e) {
474
474
  type: "paragraph"
475
475
  }];
476
476
  }
477
- function Ae(e) {
478
- return e.map(je).join("\n");
477
+ function ke(e) {
478
+ return e.map(Ae).join("\n");
479
479
  }
480
- function je(e) {
481
- return "text" in e && _typeof(e.text) == "string" ? e.text : Ne(e) ? e.type === "blank" ? "____" : e.children.map(je).join("") : "";
480
+ function Ae(e) {
481
+ return "text" in e && _typeof(e.text) == "string" ? e.text : Me(e) ? e.type === "blank" ? "____" : e.children.map(Ae).join("") : "";
482
482
  }
483
- function Me(t) {
483
+ function je(t) {
484
484
  return (0, e.serializeRichTextEditorHtml)(t, {
485
- plugins: [Ce]
485
+ plugins: [Se]
486
486
  });
487
487
  }
488
- function Ne(e) {
488
+ function Me(e) {
489
489
  return !!(e && _typeof(e) == "object" && "children" in e && Array.isArray(e.children));
490
490
  }
491
- var Pe = ["A", "B", "C", "D"];
492
- function Fe(e, t) {
491
+ var Ne = ["A", "B", "C", "D"];
492
+ function Pe(e, t) {
493
493
  return e.columns.length <= 1 || t < 0 ? e : C(C({}, e), {}, {
494
494
  columns: e.columns.filter(function (e, n) {
495
495
  return n !== t;
@@ -503,67 +503,67 @@ function Fe(e, t) {
503
503
  })
504
504
  });
505
505
  }
506
- function Ie(e, t, n) {
506
+ function Fe(e, t, n) {
507
507
  return n === "single" ? e.includes(t) ? [] : [t] : e.includes(t) ? e.filter(function (e) {
508
508
  return e !== t;
509
509
  }) : [].concat(_toConsumableArray(e), [t]);
510
510
  }
511
- function Le(e) {
512
- return e === "table" ? [We(1), We(2)] : [{
513
- content: Ee("\u9009\u9879"),
511
+ function Ie(e) {
512
+ return e === "table" ? [Ue(1), Ue(2)] : [{
513
+ content: Te("\u9009\u9879"),
514
514
  id: g()
515
515
  }];
516
516
  }
517
- function Re(e, t) {
518
- var n = Ge(e.map(function (e) {
517
+ function Le(e, t) {
518
+ var n = We(e.map(function (e) {
519
519
  return e.id;
520
520
  })),
521
521
  r = e.map(function (e, t) {
522
522
  var r;
523
523
  return {
524
- content: De(e.content),
524
+ content: Ee(e.content),
525
525
  id: (r = n[t]) == null ? g() : r
526
526
  };
527
527
  });
528
- return r.length > 0 ? r : Le(t);
528
+ return r.length > 0 ? r : Ie(t);
529
529
  }
530
- function ze(e) {
531
- return Pe.map(function (t) {
530
+ function Re(e) {
531
+ return Ne.map(function (t) {
532
532
  return {
533
533
  cells: e.map(function (e, n) {
534
- return Ee(n === 0 ? "\u9009\u9879 ".concat(t) : "");
534
+ return Te(n === 0 ? "\u9009\u9879 ".concat(t) : "");
535
535
  }),
536
536
  id: g()
537
537
  };
538
538
  });
539
539
  }
540
- function Be(e, t) {
540
+ function ze(e, t) {
541
541
  var n = e.length;
542
542
  return {
543
543
  cells: t.map(function (e, t) {
544
- return Ee(t === 0 ? "\u9009\u9879 ".concat(n + 1) : "");
544
+ return Te(t === 0 ? "\u9009\u9879 ".concat(n + 1) : "");
545
545
  }),
546
546
  id: g()
547
547
  };
548
548
  }
549
- function Ve(e, t) {
550
- var n = Ge(e.map(function (e) {
549
+ function Be(e, t) {
550
+ var n = We(e.map(function (e) {
551
551
  return e.id;
552
552
  })),
553
553
  r = e.map(function (e, r) {
554
554
  var i;
555
555
  return {
556
556
  cells: t.map(function (t, n) {
557
- return De(e.cells.find(function (e, t) {
557
+ return Ee(e.cells.find(function (e, t) {
558
558
  return t === n;
559
559
  }));
560
560
  }),
561
561
  id: (i = n[r]) == null ? g() : i
562
562
  };
563
563
  });
564
- return r.length > 0 ? r : ze(t);
564
+ return r.length > 0 ? r : Re(t);
565
565
  }
566
- function He(e, t, n) {
566
+ function Ve(e, t, n) {
567
567
  var r;
568
568
  var i = new Set(t.map(function (e) {
569
569
  return e.id;
@@ -575,22 +575,22 @@ function He(e, t, n) {
575
575
  optionIds: n === "single" ? a.slice(0, 1) : a
576
576
  };
577
577
  }
578
- function Ue(e) {
579
- return We(e.length + 1);
578
+ function He(e) {
579
+ return Ue(e.length + 1);
580
580
  }
581
- function We(e) {
581
+ function Ue(e) {
582
582
  return {
583
- content: Ee("\u5217 ".concat(e)),
583
+ content: Te("\u5217 ".concat(e)),
584
584
  id: g()
585
585
  };
586
586
  }
587
- function Ge(e) {
587
+ function We(e) {
588
588
  var t = new Set();
589
589
  return e.map(function (e) {
590
590
  return _(String(e || ""), t);
591
591
  });
592
592
  }
593
- function Ke(e, t, n) {
593
+ function Ge(e, t, n) {
594
594
  var r = new Set(t.map(function (e) {
595
595
  return e.id;
596
596
  })),
@@ -604,22 +604,22 @@ function Ke(e, t, n) {
604
604
  return i.has(t) && r.has(n) ? C(C({}, e), {}, _defineProperty({}, t, n)) : e;
605
605
  }, {});
606
606
  }
607
- function qe(e, t, n) {
607
+ function Ke(e, t, n) {
608
608
  if (!n) {
609
609
  var _n2 = C({}, e);
610
610
  return delete _n2[t], _n2;
611
611
  }
612
612
  return C(C({}, e), {}, _defineProperty({}, t, n));
613
613
  }
614
- var Je = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"],
615
- Ye = {
614
+ var qe = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"],
615
+ Je = {
616
616
  max: 5,
617
617
  min: 2
618
618
  };
619
- function Xe(e, t) {
619
+ function Ye(e, t) {
620
620
  return t > e;
621
621
  }
622
- function Ze(e, t) {
622
+ function Xe(e, t) {
623
623
  return e.columnIndex === t.columnIndex ? null : e.columnIndex < t.columnIndex ? {
624
624
  fromItemId: e.itemId,
625
625
  toItemId: t.itemId
@@ -628,20 +628,20 @@ function Ze(e, t) {
628
628
  toItemId: e.itemId
629
629
  };
630
630
  }
631
- var Qe = ["number", "upperAlpha"],
632
- $e = ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94"],
633
- et = ["i", "ii", "iii", "iv", "v"],
634
- tt = {
631
+ var Ze = ["number", "upperAlpha"],
632
+ Qe = ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94"],
633
+ $e = ["i", "ii", "iii", "iv", "v"],
634
+ et = {
635
635
  chineseNumber: function chineseNumber(e) {
636
636
  var t;
637
- return (t = $e[e]) == null ? String(e + 1) : t;
637
+ return (t = Qe[e]) == null ? String(e + 1) : t;
638
638
  },
639
639
  lowerAlpha: function lowerAlpha(e) {
640
640
  return String.fromCharCode(97 + e);
641
641
  },
642
642
  lowerRoman: function lowerRoman(e) {
643
643
  var t;
644
- return (t = et[e]) == null ? String(e + 1) : t;
644
+ return (t = $e[e]) == null ? String(e + 1) : t;
645
645
  },
646
646
  none: function none() {
647
647
  return "";
@@ -653,7 +653,7 @@ var Qe = ["number", "upperAlpha"],
653
653
  return String.fromCharCode(65 + e);
654
654
  }
655
655
  };
656
- function nt(e, t) {
656
+ function tt(e, t) {
657
657
  return Object.entries(e == null ? {} : e).reduce(function (e, _ref9) {
658
658
  var _ref0 = _slicedToArray(_ref9, 2),
659
659
  n = _ref0[0],
@@ -662,12 +662,12 @@ function nt(e, t) {
662
662
  if (i === void 0) return e;
663
663
  var a = r.filter(function (e, n, r) {
664
664
  var a = t.get(e);
665
- return a !== void 0 && Xe(i, a) && r.indexOf(e) === n;
665
+ return a !== void 0 && Ye(i, a) && r.indexOf(e) === n;
666
666
  });
667
667
  return a.length > 0 ? C(C({}, e), {}, _defineProperty({}, n, a)) : e;
668
668
  }, {});
669
669
  }
670
- function rt(e, t, n) {
670
+ function nt(e, t, n) {
671
671
  var r;
672
672
  var i = (r = e[t]) == null ? [] : r,
673
673
  a = i.includes(n) ? i.filter(function (e) {
@@ -681,34 +681,34 @@ function rt(e, t, n) {
681
681
  }, {});
682
682
  return a.length > 0 ? C(C({}, o), {}, _defineProperty({}, t, a)) : o;
683
683
  }
684
- function it(e) {
684
+ function rt(e) {
685
685
  var t;
686
- var n = (t = e == null ? void 0 : e.slice(0, Ye.max).map(function (e, t) {
686
+ var n = (t = e == null ? void 0 : e.slice(0, Je.max).map(function (e, t) {
687
687
  var n;
688
688
  return {
689
- labelStyle: ot(e.labelStyle, (n = Qe[t]) == null ? "number" : n)
689
+ labelStyle: at(e.labelStyle, (n = Ze[t]) == null ? "number" : n)
690
690
  };
691
691
  })) == null ? [] : t;
692
- return n.length >= Ye.min ? n : [].concat(_toConsumableArray(n), _toConsumableArray(Qe.slice(n.length, Ye.min).map(function (e) {
692
+ return n.length >= Je.min ? n : [].concat(_toConsumableArray(n), _toConsumableArray(Ze.slice(n.length, Je.min).map(function (e) {
693
693
  return {
694
694
  labelStyle: e
695
695
  };
696
696
  })));
697
697
  }
698
- function at(e, t) {
699
- return tt[e](t);
698
+ function it(e, t) {
699
+ return et[e](t);
700
700
  }
701
- function ot(e, t) {
702
- return Je.includes(e) ? e : t;
701
+ function at(e, t) {
702
+ return qe.includes(e) ? e : t;
703
703
  }
704
- var st = {
704
+ var ot = {
705
705
  max: 2,
706
706
  min: 2
707
707
  };
708
- function ct(e, t) {
708
+ function st(e, t) {
709
709
  return e === 0 && t === 1;
710
710
  }
711
- function lt(e, t) {
711
+ function ct(e, t) {
712
712
  if (e.columnIndex === t.columnIndex) return null;
713
713
  var n = e.columnIndex < t.columnIndex ? {
714
714
  fromItemId: e.itemId,
@@ -717,10 +717,10 @@ function lt(e, t) {
717
717
  fromItemId: t.itemId,
718
718
  toItemId: e.itemId
719
719
  };
720
- return ct(Math.min(e.columnIndex, t.columnIndex), Math.max(e.columnIndex, t.columnIndex)) ? n : null;
720
+ return st(Math.min(e.columnIndex, t.columnIndex), Math.max(e.columnIndex, t.columnIndex)) ? n : null;
721
721
  }
722
- var ut = ["number", "upperAlpha"];
723
- function dt(e, t) {
722
+ var lt = ["number", "upperAlpha"];
723
+ function ut(e, t) {
724
724
  var n = new Set();
725
725
  return Object.entries(e == null ? {} : e).reduce(function (e, _ref11) {
726
726
  var _ref12 = _slicedToArray(_ref11, 2),
@@ -733,7 +733,7 @@ function dt(e, t) {
733
733
  return a ? (n.add(a), C(C({}, e), {}, _defineProperty({}, r, [a]))) : e;
734
734
  }, {});
735
735
  }
736
- function ft(e, t, n) {
736
+ function dt(e, t, n) {
737
737
  var r, i;
738
738
  return (r = (i = e[t]) == null ? void 0 : i.includes(n)) != null && r ? Object.entries(e).reduce(function (e, _ref13) {
739
739
  var _ref14 = _slicedToArray(_ref13, 2),
@@ -751,29 +751,29 @@ function ft(e, t, n) {
751
751
  return a.length > 0 ? C(C({}, e), {}, _defineProperty({}, r, a)) : e;
752
752
  }, {})), {}, _defineProperty({}, t, [n]));
753
753
  }
754
- function pt(e) {
754
+ function ft(e) {
755
755
  var t;
756
- var n = (t = e == null ? void 0 : e.slice(0, st.max).map(function (e, t) {
756
+ var n = (t = e == null ? void 0 : e.slice(0, ot.max).map(function (e, t) {
757
757
  var n;
758
758
  return {
759
- labelStyle: ot(e.labelStyle, (n = ut[t]) == null ? "number" : n)
759
+ labelStyle: at(e.labelStyle, (n = lt[t]) == null ? "number" : n)
760
760
  };
761
761
  })) == null ? [] : t;
762
- return n.length >= st.min ? n : [].concat(_toConsumableArray(n), _toConsumableArray(ut.slice(n.length, st.min).map(function (e) {
762
+ return n.length >= ot.min ? n : [].concat(_toConsumableArray(n), _toConsumableArray(lt.slice(n.length, ot.min).map(function (e) {
763
763
  return {
764
764
  labelStyle: e
765
765
  };
766
766
  })));
767
767
  }
768
- function mt(e, t) {
769
- return at(e, t);
768
+ function pt(e, t) {
769
+ return it(e, t);
770
770
  }
771
- var ht = "mark.textMarker",
772
- gt = "markerId",
773
- _t = {
774
- marks: [vt()]
771
+ var mt = "mark.textMarker",
772
+ ht = "markerId",
773
+ gt = {
774
+ marks: [_t()]
775
775
  };
776
- function vt(e) {
776
+ function _t(e) {
777
777
  return {
778
778
  behavior: {
779
779
  clearOnSelectionDelete: !0
@@ -782,36 +782,36 @@ function vt(e) {
782
782
  html: {
783
783
  deserialize: function deserialize(_ref17) {
784
784
  var e = _ref17.element;
785
- var t = wt(e.dataset.markerId);
786
- return t ? _defineProperty({}, gt, t) : null;
785
+ var t = Ct(e.dataset.markerId);
786
+ return t ? _defineProperty({}, ht, t) : null;
787
787
  },
788
788
  serialize: function serialize(_ref19) {
789
789
  var e = _ref19.leaf,
790
790
  t = _ref19.text;
791
- var n = St(e);
792
- return n ? "<span data-marker-id=\"".concat(Tt(n), "\">").concat(t, "</span>") : null;
791
+ var n = xt(e);
792
+ return n ? "<span data-marker-id=\"".concat(wt(n), "\">").concat(t, "</span>") : null;
793
793
  }
794
794
  }
795
795
  },
796
796
  commands: [{
797
- command: ht,
798
- markKey: gt
797
+ command: mt,
798
+ markKey: ht
799
799
  }],
800
800
  render: e
801
801
  };
802
802
  }
803
- function yt(e) {
803
+ function vt(e) {
804
804
  var t = [];
805
- return Ct(e == null ? [] : e, function (e) {
806
- var n = St(e);
805
+ return St(e == null ? [] : e, function (e) {
806
+ var n = xt(e);
807
807
  n && !t.includes(n) && t.push(n);
808
808
  }), t;
809
809
  }
810
- function bt(e) {
810
+ function yt(e) {
811
811
  var t = [];
812
- return Ct(e == null ? [] : e, function (e) {
813
- var n = St(e),
814
- r = Et(e) && _typeof(e.text) == "string" ? e.text : "";
812
+ return St(e == null ? [] : e, function (e) {
813
+ var n = xt(e),
814
+ r = Tt(e) && _typeof(e.text) == "string" ? e.text : "";
815
815
  if (!n || !r) return;
816
816
  var i = t.slice(t.length - 1)[0];
817
817
  if ((i == null ? void 0 : i.markerId) === n) {
@@ -827,30 +827,30 @@ function bt(e) {
827
827
  });
828
828
  }), t;
829
829
  }
830
- function xt() {
830
+ function bt() {
831
831
  return g();
832
832
  }
833
- function St(e) {
834
- return Et(e) ? wt(e[gt]) : "";
833
+ function xt(e) {
834
+ return Tt(e) ? Ct(e[ht]) : "";
835
835
  }
836
- function Ct(e, t) {
836
+ function St(e, t) {
837
837
  e.forEach(function (e) {
838
- t(e), Et(e) && Array.isArray(e.children) && Ct(e.children, t);
838
+ t(e), Tt(e) && Array.isArray(e.children) && St(e.children, t);
839
839
  });
840
840
  }
841
- function wt(e) {
841
+ function Ct(e) {
842
842
  return _typeof(e) == "string" ? e.trim() : "";
843
843
  }
844
- function Tt(e) {
844
+ function wt(e) {
845
845
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
846
846
  }
847
- function Et(e) {
847
+ function Tt(e) {
848
848
  return _typeof(e) == "object" && !!e;
849
849
  }
850
- var Dt = {
850
+ var Et = {
851
851
  "blank-underline": "_blank-underline_1wnlx_1"
852
852
  },
853
- Ot = {
853
+ Dt = {
854
854
  nodes: [{
855
855
  codecs: {
856
856
  html: {
@@ -868,15 +868,15 @@ var Dt = {
868
868
  },
869
869
  serialize: function serialize(_ref21) {
870
870
  var e = _ref21.node;
871
- return e.type === "blank" ? "<span data-rte-node=\"blank\" data-blank-id=\"".concat(D(e.blankId), "\" data-label=\"").concat(D(e.label), "\"></span>") : null;
871
+ return e.type === "blank" ? "<span data-rte-node=\"blank\" data-blank-id=\"".concat(jt(e.blankId), "\" data-label=\"").concat(jt(e.label), "\"></span>") : null;
872
872
  }
873
873
  },
874
874
  json: {
875
875
  deserialize: function deserialize(_ref22) {
876
876
  var e = _ref22.input;
877
- return kt(e) ? {
878
- blankId: D(e.blankId),
879
- label: D(e.label),
877
+ return Ot(e) ? {
878
+ blankId: jt(e.blankId),
879
+ label: jt(e.label),
880
880
  children: [{
881
881
  text: ""
882
882
  }],
@@ -886,8 +886,8 @@ var Dt = {
886
886
  serialize: function serialize(_ref23) {
887
887
  var e = _ref23.node;
888
888
  return e.type === "blank" ? {
889
- blankId: D(e.blankId),
890
- label: D(e.label),
889
+ blankId: jt(e.blankId),
890
+ label: jt(e.label),
891
891
  type: "blank"
892
892
  } : null;
893
893
  }
@@ -897,8 +897,8 @@ var Dt = {
897
897
  insert: function insert(_ref24) {
898
898
  var e = _ref24.payload;
899
899
  return {
900
- blankId: At(e),
901
- label: jt(e),
900
+ blankId: kt(e),
901
+ label: At(e),
902
902
  type: "blank"
903
903
  };
904
904
  }
@@ -910,25 +910,25 @@ var Dt = {
910
910
  var e = _ref25.element,
911
911
  n = _ref25.selected;
912
912
  return (0, t.jsx)("span", {
913
- className: Dt["blank-underline"],
913
+ className: Et["blank-underline"],
914
914
  "data-selected": n ? "true" : void 0,
915
- children: D(e.label) || D(e.blankId) || "Blank"
915
+ children: jt(e.label) || jt(e.blankId) || "Blank"
916
916
  });
917
917
  }
918
918
  },
919
919
  type: "blank"
920
920
  }]
921
921
  };
922
- function kt(e) {
922
+ function Ot(e) {
923
923
  return !!(e && _typeof(e) == "object" && "type" in e && e.type === "blank");
924
924
  }
925
+ function kt(e) {
926
+ return e && _typeof(e) == "object" && "blankId" in e ? jt(e.blankId) : "";
927
+ }
925
928
  function At(e) {
926
- return e && _typeof(e) == "object" && "blankId" in e ? D(e.blankId) : "";
929
+ return e && _typeof(e) == "object" && "label" in e ? jt(e.label) : "";
927
930
  }
928
931
  function jt(e) {
929
- return e && _typeof(e) == "object" && "label" in e ? D(e.label) : "";
930
- }
931
- function D(e) {
932
932
  return _typeof(e) == "string" ? e : "";
933
933
  }
934
934
  var Mt = 1,
@@ -1030,7 +1030,7 @@ function O() {
1030
1030
  return Wt(t == null ? gi(e) : t);
1031
1031
  }
1032
1032
  function Wt(t) {
1033
- var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [Ot];
1033
+ var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [Dt];
1034
1034
  var r = wi(t, n);
1035
1035
  return {
1036
1036
  html: (0, e.serializeRichTextEditorHtml)(r, {
@@ -1044,15 +1044,15 @@ function Gt() {
1044
1044
  var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
1045
1045
  var t = arguments.length > 1 ? arguments[1] : undefined;
1046
1046
  var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
1047
- return Wt(Kt(e, t, n), [_t]);
1047
+ return Wt(Kt(e, t, n), [gt]);
1048
1048
  }
1049
1049
  function Kt(t, n, r) {
1050
1050
  return n && Ci(n) ? n : r ? (0, e.deserializeRichTextEditorHtml)(r, {
1051
- plugins: [_t]
1051
+ plugins: [gt]
1052
1052
  }) : gi(t);
1053
1053
  }
1054
1054
  function qt(e) {
1055
- return bt(e.content.json).filter(function (t) {
1055
+ return yt(e.content.json).filter(function (t) {
1056
1056
  return e.answers.includes(t.markerId);
1057
1057
  }).map(function (e) {
1058
1058
  return e.text.trim();
@@ -1081,10 +1081,10 @@ function Zt(e, t) {
1081
1081
  return Lt[e](t);
1082
1082
  }
1083
1083
  function Qt(e, t) {
1084
- return at(e, t);
1084
+ return it(e, t);
1085
1085
  }
1086
1086
  function $t(e, t) {
1087
- return mt(e, t);
1087
+ return pt(e, t);
1088
1088
  }
1089
1089
  function en(e) {
1090
1090
  switch (e) {
@@ -1214,7 +1214,7 @@ function hn(e, t, n, r) {
1214
1214
  }
1215
1215
  function gn(e, t, n) {
1216
1216
  var r = Gt(t.text, t.json, t.html),
1217
- i = yt(r.json);
1217
+ i = vt(r.json);
1218
1218
  return C(C({}, e), {}, {
1219
1219
  answers: n ? li(e.answers, i) : [],
1220
1220
  content: r,
@@ -1578,15 +1578,15 @@ function Wn(e, t) {
1578
1578
  return n !== t;
1579
1579
  });
1580
1580
  return C(C({}, e), {}, {
1581
- answers: He(e.answers, n, "multiple"),
1581
+ answers: Ve(e.answers, n, "multiple"),
1582
1582
  options: n
1583
1583
  });
1584
1584
  }
1585
1585
  function Gn(e, t, n) {
1586
- return Ie(e, t, n);
1586
+ return Fe(e, t, n);
1587
1587
  }
1588
1588
  function Kn(e) {
1589
- var t = [].concat(_toConsumableArray(e.columns), [Ue(e.columns)]);
1589
+ var t = [].concat(_toConsumableArray(e.columns), [He(e.columns)]);
1590
1590
  return C(C({}, e), {}, {
1591
1591
  columns: t,
1592
1592
  options: e.options.map(function (e) {
@@ -1597,7 +1597,7 @@ function Kn(e) {
1597
1597
  });
1598
1598
  }
1599
1599
  function qn(e, t) {
1600
- return Fe(e, t);
1600
+ return Pe(e, t);
1601
1601
  }
1602
1602
  function Jn(e) {
1603
1603
  return tr(e);
@@ -1608,7 +1608,7 @@ function Yn(e, t) {
1608
1608
  return n !== t;
1609
1609
  });
1610
1610
  return C(C({}, e), {}, {
1611
- answers: He(e.answers, n, "multiple"),
1611
+ answers: Ve(e.answers, n, "multiple"),
1612
1612
  options: n
1613
1613
  });
1614
1614
  }
@@ -1634,10 +1634,10 @@ function Zn(e, t, n) {
1634
1634
  }
1635
1635
  function Qn(e, t, n) {
1636
1636
  er(e);
1637
- var r = Re(e.columns, t.config.renderer),
1638
- i = Ve(e.options, r);
1637
+ var r = Le(e.columns, t.config.renderer),
1638
+ i = Be(e.options, r);
1639
1639
  return C(C({}, e), {}, {
1640
- answers: n ? He(e.answers, i, t.config.selectionType) : {
1640
+ answers: n ? Ve(e.answers, i, t.config.selectionType) : {
1641
1641
  optionIds: []
1642
1642
  },
1643
1643
  columns: r,
@@ -1662,7 +1662,7 @@ function er(e) {
1662
1662
  }
1663
1663
  function tr(e) {
1664
1664
  return C(C({}, e), {}, {
1665
- options: [].concat(_toConsumableArray(e.options), [Be(e.options, e.columns)])
1665
+ options: [].concat(_toConsumableArray(e.options), [ze(e.options, e.columns)])
1666
1666
  });
1667
1667
  }
1668
1668
  function nr(e, t, n) {
@@ -1673,14 +1673,14 @@ function nr(e, t, n) {
1673
1673
  });
1674
1674
  }
1675
1675
  function rr(e) {
1676
- if (e.columns.length >= Ye.max) return e;
1676
+ if (e.columns.length >= Je.max) return e;
1677
1677
  var t = e.columns.length;
1678
1678
  return C(C({}, e), {}, {
1679
1679
  columns: [].concat(_toConsumableArray(e.columns), [ni(ei(t))])
1680
1680
  });
1681
1681
  }
1682
1682
  function ir(e, t) {
1683
- if (e.columns.length <= Ye.min) return e;
1683
+ if (e.columns.length <= Je.min) return e;
1684
1684
  var n = e.columns.filter(function (e) {
1685
1685
  return e.columnId !== t;
1686
1686
  });
@@ -1712,7 +1712,7 @@ function cr(e, t, n) {
1712
1712
  return vr(e, t, n);
1713
1713
  }
1714
1714
  function lr(e, t, n) {
1715
- return rt(e, t, n);
1715
+ return nt(e, t, n);
1716
1716
  }
1717
1717
  function ur(e, t, n) {
1718
1718
  var r = ai(e.columns, t);
@@ -1756,7 +1756,7 @@ function hr(e, t, n) {
1756
1756
  return vr(e, t, n);
1757
1757
  }
1758
1758
  function gr(e, t, n) {
1759
- return ft(e, t, n);
1759
+ return dt(e, t, n);
1760
1760
  }
1761
1761
  function _r(e, t, n) {
1762
1762
  return C(C({}, e), {}, {
@@ -1784,7 +1784,7 @@ function yr(e, t) {
1784
1784
  var n = qr(e.categories),
1785
1785
  r = Jr(e.items);
1786
1786
  return C(C({}, e), {}, {
1787
- answers: t ? Ke(e.answers, n, r) : {},
1787
+ answers: t ? Ge(e.answers, n, r) : {},
1788
1788
  categories: n,
1789
1789
  items: r
1790
1790
  });
@@ -1802,7 +1802,7 @@ function xr(e, t) {
1802
1802
  return e.id !== t;
1803
1803
  });
1804
1804
  return C(C({}, e), {}, {
1805
- answers: Ke(e.answers, n, e.items),
1805
+ answers: Ge(e.answers, n, e.items),
1806
1806
  categories: n
1807
1807
  });
1808
1808
  }
@@ -1828,7 +1828,7 @@ function wr(e, t) {
1828
1828
  return e.id !== t;
1829
1829
  });
1830
1830
  return C(C({}, e), {}, {
1831
- answers: Ke(e.answers, e.categories, n),
1831
+ answers: Ge(e.answers, e.categories, n),
1832
1832
  items: n
1833
1833
  });
1834
1834
  }
@@ -1842,7 +1842,7 @@ function Tr(e, t, n) {
1842
1842
  });
1843
1843
  }
1844
1844
  function Er(e, t, n) {
1845
- return qe(e, t, n);
1845
+ return Ke(e, t, n);
1846
1846
  }
1847
1847
  function Dr(e, t) {
1848
1848
  var n = ui(e.sortOptions);
@@ -2039,13 +2039,13 @@ function Gr(e) {
2039
2039
  };
2040
2040
  }
2041
2041
  function Kr(e) {
2042
- var t = Le(e.config.renderer);
2042
+ var t = Ie(e.config.renderer);
2043
2043
  return {
2044
2044
  answers: {
2045
2045
  optionIds: []
2046
2046
  },
2047
2047
  columns: t,
2048
- options: ze(t),
2048
+ options: Re(t),
2049
2049
  type: "choice"
2050
2050
  };
2051
2051
  }
@@ -2094,12 +2094,12 @@ function Zr(e, t) {
2094
2094
  r = new Set(),
2095
2095
  i = new Set(),
2096
2096
  a = $r(t);
2097
- return n.slice(0, Ye.max).map(function (e, t) {
2097
+ return n.slice(0, Je.max).map(function (e, t) {
2098
2098
  var n, o;
2099
2099
  return {
2100
2100
  columnId: _(e.columnId, r),
2101
2101
  items: ti(e.items, i),
2102
- labelStyle: ot(e.labelStyle, (n = (o = a[t]) == null ? void 0 : o.labelStyle) == null ? "number" : n)
2102
+ labelStyle: at(e.labelStyle, (n = (o = a[t]) == null ? void 0 : o.labelStyle) == null ? "number" : n)
2103
2103
  };
2104
2104
  });
2105
2105
  }
@@ -2109,11 +2109,11 @@ function Qr(e) {
2109
2109
  });
2110
2110
  }
2111
2111
  function $r(e) {
2112
- return it(e.config.columns);
2112
+ return rt(e.config.columns);
2113
2113
  }
2114
2114
  function ei(e) {
2115
2115
  var t, n;
2116
- return (t = (n = it([])[e]) == null ? void 0 : n.labelStyle) == null ? "number" : t;
2116
+ return (t = (n = rt([])[e]) == null ? void 0 : n.labelStyle) == null ? "number" : t;
2117
2117
  }
2118
2118
  function ti(e, t) {
2119
2119
  var n = e.map(function (e) {
@@ -2143,24 +2143,24 @@ function ri(e) {
2143
2143
  });
2144
2144
  }
2145
2145
  function ii(e, t) {
2146
- return nt(e, mi(t));
2146
+ return tt(e, mi(t));
2147
2147
  }
2148
2148
  function ai(e, t) {
2149
2149
  var n = e.length > 0 ? e : oi(t),
2150
2150
  r = new Set(),
2151
2151
  i = new Set(),
2152
- a = pt(t.config.columns);
2153
- return n.slice(0, st.max).map(function (e, t) {
2152
+ a = ft(t.config.columns);
2153
+ return n.slice(0, ot.max).map(function (e, t) {
2154
2154
  var n, o;
2155
2155
  return {
2156
2156
  columnId: _(e.columnId, r),
2157
2157
  items: ti(e.items, i),
2158
- labelStyle: ot(e.labelStyle, (n = (o = a[t]) == null ? void 0 : o.labelStyle) == null ? "number" : n)
2158
+ labelStyle: at(e.labelStyle, (n = (o = a[t]) == null ? void 0 : o.labelStyle) == null ? "number" : n)
2159
2159
  };
2160
2160
  });
2161
2161
  }
2162
2162
  function oi(e) {
2163
- return pt(e.config.columns).map(function (e) {
2163
+ return ft(e.config.columns).map(function (e) {
2164
2164
  return si(e.labelStyle);
2165
2165
  });
2166
2166
  }
@@ -2180,7 +2180,7 @@ function si(e) {
2180
2180
  };
2181
2181
  }
2182
2182
  function ci(e, t) {
2183
- return dt(e, mi(t));
2183
+ return ut(e, mi(t));
2184
2184
  }
2185
2185
  function li(e, t) {
2186
2186
  var n = new Set(t);
@@ -2277,7 +2277,7 @@ function Ci(e) {
2277
2277
  return Array.isArray(e) && e.length > 0;
2278
2278
  }
2279
2279
  function wi(t) {
2280
- var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [Ot];
2280
+ var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [Dt];
2281
2281
  return Ci(t) ? (0, e.deserializeRichTextEditorJson)(t, {
2282
2282
  plugins: n
2283
2283
  }) : gi("");
@@ -2521,10 +2521,10 @@ var na = {
2521
2521
  marker: "_marker_rlnj7_1"
2522
2522
  },
2523
2523
  ra = {
2524
- marks: [vt(function (_ref35) {
2524
+ marks: [_t(function (_ref35) {
2525
2525
  var e = _ref35.children,
2526
2526
  t = _ref35.leaf;
2527
- return St(t) ? ia(e) : e;
2527
+ return xt(t) ? ia(e) : e;
2528
2528
  })]
2529
2529
  };
2530
2530
  function ia(e) {
@@ -2949,9 +2949,10 @@ function da(e) {
2949
2949
  }, e);
2950
2950
  }
2951
2951
  var fa = {
2952
- root: "_root_1ojgr_1",
2953
- "rich-text-root": "_rich-text-root_1ojgr_28",
2954
- "rich-text-toolbar": "_rich-text-toolbar_1ojgr_37"
2952
+ root: "_root_1n8kd_1",
2953
+ "rich-text-root": "_rich-text-root_1n8kd_28",
2954
+ "rich-text-toolbar-sticky": "_rich-text-toolbar-sticky_1n8kd_37",
2955
+ "rich-text-toolbar": "_rich-text-toolbar_1n8kd_37"
2955
2956
  },
2956
2957
  j = {
2957
2958
  button: "_button_8wkgm_1",
@@ -3263,7 +3264,7 @@ function Da(_ref50) {
3263
3264
  "aria-label": r,
3264
3265
  className: "".concat(P.textarea, " rich-content-editor-surface"),
3265
3266
  onChange: function onChange(e) {
3266
- return a(Ee(e.target.value));
3267
+ return a(Te(e.target.value));
3267
3268
  },
3268
3269
  placeholder: s,
3269
3270
  value: f.text
@@ -3316,7 +3317,7 @@ function Da(_ref50) {
3316
3317
  className: ja(i),
3317
3318
  initialValue: f.json,
3318
3319
  onChange: function onChange(e) {
3319
- return a(De({
3320
+ return a(Ee({
3320
3321
  json: e
3321
3322
  }));
3322
3323
  },
@@ -3353,7 +3354,7 @@ function Ma(_ref52) {
3353
3354
  className: ja(i),
3354
3355
  initialValue: s.json,
3355
3356
  onChange: function onChange(e) {
3356
- return a(De({
3357
+ return a(Ee({
3357
3358
  json: e
3358
3359
  }));
3359
3360
  },
@@ -3469,7 +3470,7 @@ function Na(_ref54) {
3469
3470
  answers: p
3470
3471
  }), l, d)), S());
3471
3472
  }
3472
- function te(n, r) {
3473
+ function w(n, r) {
3473
3474
  return (0, t.jsxs)("div", {
3474
3475
  className: "flex min-w-0 flex-wrap items-start gap-3",
3475
3476
  children: [r.answerPools.map(function (i, a) {
@@ -3513,7 +3514,7 @@ function Na(_ref54) {
3513
3514
  })]
3514
3515
  });
3515
3516
  }
3516
- function w(n, r, a, o) {
3517
+ function T(n, r, a, o) {
3517
3518
  var s = b(n);
3518
3519
  return (0, t.jsxs)("section", {
3519
3520
  className: "flex min-w-0 flex-wrap items-center gap-4 rounded-md border border-slate-200 bg-white px-4 py-3",
@@ -3555,7 +3556,7 @@ function Na(_ref54) {
3555
3556
  })]
3556
3557
  }), (0, t.jsx)("div", {
3557
3558
  className: "min-w-72 flex-1",
3558
- children: te(a, o)
3559
+ children: w(a, o)
3559
3560
  }), (0, t.jsx)(M, {
3560
3561
  "aria-label": c("questionContentEditor.actions.deleteBlank", {
3561
3562
  index: r + 1
@@ -3573,7 +3574,7 @@ function Na(_ref54) {
3573
3574
  })]
3574
3575
  }, n);
3575
3576
  }
3576
- function ne(n, r, a) {
3577
+ function te(n, r, a) {
3577
3578
  return (0, t.jsxs)("section", {
3578
3579
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-blue-200 bg-blue-50/40 px-4 py-3",
3579
3580
  children: [(0, t.jsxs)("div", {
@@ -3603,10 +3604,10 @@ function Na(_ref54) {
3603
3604
  strong: !0,
3604
3605
  children: c("questionContentEditor.blank.sharedAnswer")
3605
3606
  })]
3606
- }), te(r, n)]
3607
+ }), w(r, n)]
3607
3608
  }, "shared-group-".concat(r));
3608
3609
  }
3609
- function re() {
3610
+ function ne() {
3610
3611
  var e = new Set();
3611
3612
  return i.blanks.reduce(function (t, n, r) {
3612
3613
  var i = p.findIndex(function (e) {
@@ -3619,9 +3620,9 @@ function Na(_ref54) {
3619
3620
  var _n4 = m.findIndex(function (e) {
3620
3621
  return e.groupIndex === i;
3621
3622
  });
3622
- return e.add(i), t.push(ne(a, i, _n4)), t;
3623
+ return e.add(i), t.push(te(a, i, _n4)), t;
3623
3624
  }
3624
- return t.push(w(n, r, i, a)), t;
3625
+ return t.push(T(n, r, i, a)), t;
3625
3626
  }, []);
3626
3627
  }
3627
3628
  return r ? (0, t.jsxs)(t.Fragment, {
@@ -3629,7 +3630,7 @@ function Na(_ref54) {
3629
3630
  className: "flex min-w-0 flex-col gap-4",
3630
3631
  children: (0, t.jsx)("div", {
3631
3632
  className: "flex min-w-0 flex-col gap-3",
3632
- children: re()
3633
+ children: ne()
3633
3634
  })
3634
3635
  }), (0, t.jsx)(_a, {
3635
3636
  cancelText: c("questionContentEditor.actions.cancel"),
@@ -3938,7 +3939,7 @@ function La(_ref62) {
3938
3939
  candidateOptions: bn(e)
3939
3940
  }));
3940
3941
  }
3941
- function te(e, t) {
3942
+ function w(e, t) {
3942
3943
  var n = jn(v.blankOptionGroups, v.blanks).map(function (n) {
3943
3944
  return n.blankId === e ? C(C({}, t), {}, {
3944
3945
  blankId: e
@@ -3948,24 +3949,24 @@ function La(_ref62) {
3948
3949
  blankOptionGroups: n
3949
3950
  }));
3950
3951
  }
3951
- function w() {
3952
+ function T() {
3952
3953
  return v.answers.filter(function (e) {
3953
3954
  return "answerOptionIds" in e;
3954
3955
  });
3955
3956
  }
3956
- function ne(e) {
3957
+ function te(e) {
3957
3958
  return e.blankIds.join("__");
3958
3959
  }
3959
- function re(e) {
3960
+ function ne(e) {
3960
3961
  x(C(C({}, v), {}, {
3961
3962
  answers: e
3962
3963
  }));
3963
3964
  }
3964
- function ie(e, t, n) {
3965
- var r = w(),
3965
+ function re(e, t, n) {
3966
+ var r = T(),
3966
3967
  i = r.slice(e, e + 1)[0];
3967
3968
  if (!i) return;
3968
- var a = ne(i),
3969
+ var a = te(i),
3969
3970
  o = (t < i.answerOptionIds.length ? i.answerOptionIds.map(function (e, r) {
3970
3971
  return r === t ? n : e;
3971
3972
  }) : [].concat(_toConsumableArray(i.answerOptionIds), [n])).filter(function (e, t, n) {
@@ -3973,41 +3974,41 @@ function La(_ref62) {
3973
3974
  });
3974
3975
  t >= i.answerOptionIds.length && n && p(function (e) {
3975
3976
  return C(C({}, e), {}, _defineProperty({}, a, Math.max(0, Ra(e, a) - 1)));
3976
- }), re(r.map(function (t, n) {
3977
+ }), ne(r.map(function (t, n) {
3977
3978
  return n === e ? C(C({}, t), {}, {
3978
3979
  answerOptionIds: o
3979
3980
  }) : t;
3980
3981
  }));
3981
3982
  }
3982
- function ae(e) {
3983
+ function ie(e) {
3983
3984
  var t = jn(v.blankOptionGroups, v.blanks).find(function (t) {
3984
3985
  return t.blankId === e;
3985
3986
  });
3986
3987
  if (!t) throw Error("Missing option group for blank ".concat(e, "."));
3987
3988
  return t;
3988
3989
  }
3989
- function oe(e, t, n, r) {
3990
+ function ae(e, t, n, r) {
3990
3991
  t(e.map(function (e) {
3991
3992
  return e.optionId === n ? C(C({}, e), {}, {
3992
3993
  content: r
3993
3994
  }) : e;
3994
3995
  }));
3995
3996
  }
3996
- function se(e, t, n) {
3997
+ function oe(e, t, n) {
3997
3998
  t(e.filter(function (e) {
3998
3999
  return e.optionId !== n;
3999
4000
  }));
4000
4001
  }
4001
- function ce() {
4002
- return w().reduce(function (e, t, n) {
4002
+ function se() {
4003
+ return T().reduce(function (e, t, n) {
4003
4004
  return t.blankIds.length >= 2 && e.push({
4004
4005
  group: t,
4005
4006
  groupIndex: n
4006
4007
  }), e;
4007
4008
  }, []);
4008
4009
  }
4009
- function le(e) {
4010
- return w().filter(function (e) {
4010
+ function ce(e) {
4011
+ return T().filter(function (e) {
4011
4012
  return e.blankIds.length === 1;
4012
4013
  }).map(function (e) {
4013
4014
  return e.blankIds[0];
@@ -4015,22 +4016,22 @@ function La(_ref62) {
4015
4016
  return !!t && t !== e;
4016
4017
  });
4017
4018
  }
4018
- function ue(e, t) {
4019
+ function le(e, t) {
4019
4020
  if (t === "__single__") {
4020
- ge(e);
4021
+ he(e);
4021
4022
  return;
4022
4023
  }
4023
4024
  if (t === "__new__") {
4024
- fe(e);
4025
+ de(e);
4025
4026
  return;
4026
4027
  }
4027
4028
  var n = Number(t.replace("group:", ""));
4028
- Number.isNaN(n) || de(e, n);
4029
+ Number.isNaN(n) || ue(e, n);
4029
4030
  }
4030
- function de(e, t) {
4031
- var n = w(),
4031
+ function ue(e, t) {
4032
+ var n = T(),
4032
4033
  r = n.slice(t, t + 1)[0];
4033
- !r || r.blankIds.length < 2 || r.blankIds.includes(e) || re(n.map(function (n, r) {
4034
+ !r || r.blankIds.length < 2 || r.blankIds.includes(e) || ne(n.map(function (n, r) {
4034
4035
  return r === t ? C(C({}, n), {}, {
4035
4036
  blankIds: [].concat(_toConsumableArray(n.blankIds), [e])
4036
4037
  }) : C(C({}, n), {}, {
@@ -4042,24 +4043,24 @@ function La(_ref62) {
4042
4043
  return e.blankIds.length > 0;
4043
4044
  }));
4044
4045
  }
4045
- function fe(e) {
4046
- var t = le(e)[0];
4046
+ function de(e) {
4047
+ var t = ce(e)[0];
4047
4048
  t && (h(e), _(t));
4048
4049
  }
4049
- function pe() {
4050
+ function fe() {
4050
4051
  h(null), _(null);
4051
4052
  }
4052
- function me() {
4053
- !m || !g || (he(m, g), pe());
4053
+ function pe() {
4054
+ !m || !g || (me(m, g), fe());
4054
4055
  }
4055
- function he(e, t) {
4056
+ function me(e, t) {
4056
4057
  var n;
4057
4058
  if (e === t) return;
4058
- var r = w(),
4059
+ var r = T(),
4059
4060
  i = r.find(function (t) {
4060
4061
  return t.blankIds.includes(e);
4061
4062
  });
4062
- re([].concat(_toConsumableArray(r.map(function (n) {
4063
+ ne([].concat(_toConsumableArray(r.map(function (n) {
4063
4064
  return C(C({}, n), {}, {
4064
4065
  blankIds: n.blankIds.filter(function (n) {
4065
4066
  return n !== e && n !== t;
@@ -4072,13 +4073,13 @@ function La(_ref62) {
4072
4073
  return e.blankIds.length > 0;
4073
4074
  }));
4074
4075
  }
4075
- function ge(e) {
4076
+ function he(e) {
4076
4077
  var t;
4077
- var n = w(),
4078
+ var n = T(),
4078
4079
  r = n.find(function (t) {
4079
4080
  return t.blankIds.includes(e);
4080
4081
  });
4081
- re([].concat(_toConsumableArray(n.map(function (t) {
4082
+ ne([].concat(_toConsumableArray(n.map(function (t) {
4082
4083
  return C(C({}, t), {}, {
4083
4084
  blankIds: t.blankIds.filter(function (t) {
4084
4085
  return t !== e;
@@ -4091,13 +4092,13 @@ function La(_ref62) {
4091
4092
  return e.blankIds.length > 0;
4092
4093
  }));
4093
4094
  }
4094
- function T(e) {
4095
- var t = ne(e);
4095
+ function E(e) {
4096
+ var t = te(e);
4096
4097
  p(function (e) {
4097
4098
  return C(C({}, e), {}, _defineProperty({}, t, Ra(e, t) + 1));
4098
4099
  });
4099
4100
  }
4100
- function E(e, t) {
4101
+ function D(e, t) {
4101
4102
  return [{
4102
4103
  label: u("questionContentEditor.blank.singleAnswer"),
4103
4104
  value: "__single__"
@@ -4109,13 +4110,13 @@ function La(_ref62) {
4109
4110
  }),
4110
4111
  value: "group:".concat(e)
4111
4112
  };
4112
- })), _toConsumableArray(le(e).length > 0 ? [{
4113
+ })), _toConsumableArray(ce(e).length > 0 ? [{
4113
4114
  label: u("questionContentEditor.blank.newAnswerGroup"),
4114
4115
  value: "__new__"
4115
4116
  }] : []));
4116
4117
  }
4117
- function _e() {
4118
- return le(m == null ? "" : m).map(function (e) {
4118
+ function ge() {
4119
+ return ce(m == null ? "" : m).map(function (e) {
4119
4120
  return {
4120
4121
  label: u("questionContentEditor.blank.shortLabel", {
4121
4122
  index: v.blanks.indexOf(e) + 1
@@ -4124,7 +4125,7 @@ function La(_ref62) {
4124
4125
  };
4125
4126
  });
4126
4127
  }
4127
- function ve(e, t) {
4128
+ function _e(e, t) {
4128
4129
  var n = new Set(e.map(function (e) {
4129
4130
  return e.optionId;
4130
4131
  })),
@@ -4133,7 +4134,7 @@ function La(_ref62) {
4133
4134
  for (; n.has(i);) r += 1, i = "".concat(t).concat(r);
4134
4135
  return i;
4135
4136
  }
4136
- function ye(n, r) {
4137
+ function ve(n, r) {
4137
4138
  return (0, t.jsx)("div", {
4138
4139
  className: "flex min-w-0 flex-col gap-2",
4139
4140
  children: n.map(function (i, a) {
@@ -4151,7 +4152,7 @@ function La(_ref62) {
4151
4152
  index: a + 1
4152
4153
  }),
4153
4154
  onChange: function onChange(e) {
4154
- return oe(n, r, i.optionId, e);
4155
+ return ae(n, r, i.optionId, e);
4155
4156
  },
4156
4157
  placeholder: u("questionContentEditor.placeholders.candidateOption"),
4157
4158
  value: i.content,
@@ -4164,7 +4165,7 @@ function La(_ref62) {
4164
4165
  disabled: e || n.length <= 1,
4165
4166
  icon: "\xD7",
4166
4167
  onClick: function onClick() {
4167
- return se(n, r, i.optionId);
4168
+ return oe(n, r, i.optionId);
4168
4169
  },
4169
4170
  size: "small"
4170
4171
  })]
@@ -4172,7 +4173,7 @@ function La(_ref62) {
4172
4173
  })
4173
4174
  });
4174
4175
  }
4175
- function be(n, r, i, a) {
4176
+ function ye(n, r, i, a) {
4176
4177
  return (0, t.jsxs)("section", {
4177
4178
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white px-4 py-3",
4178
4179
  children: [(0, t.jsxs)("div", {
@@ -4184,22 +4185,22 @@ function La(_ref62) {
4184
4185
  disabled: e,
4185
4186
  icon: "+",
4186
4187
  onClick: function onClick() {
4187
- return r([].concat(_toConsumableArray(n), [yn(ve(n, a))]));
4188
+ return r([].concat(_toConsumableArray(n), [yn(_e(n, a))]));
4188
4189
  },
4189
4190
  size: "small",
4190
4191
  children: u("questionContentEditor.actions.addCandidateOption")
4191
4192
  })]
4192
- }), ye(n, r)]
4193
+ }), ve(n, r)]
4193
4194
  });
4194
4195
  }
4195
- function xe() {
4196
+ function be() {
4196
4197
  var e;
4197
4198
  return (e = v.candidateOptions) == null ? [] : e;
4198
4199
  }
4199
- function Se(e) {
4200
+ function xe(e) {
4200
4201
  if (r.config.candidateMode !== "sharedPool" || r.config.allowCandidateReuse) return new Set();
4201
4202
  var t = new Set(e.blankIds);
4202
- return new Set(w().filter(function (e) {
4203
+ return new Set(T().filter(function (e) {
4203
4204
  return e.blankIds.every(function (e) {
4204
4205
  return !t.has(e);
4205
4206
  });
@@ -4207,8 +4208,8 @@ function La(_ref62) {
4207
4208
  return [].concat(_toConsumableArray(e), _toConsumableArray(t.answerOptionIds));
4208
4209
  }, []));
4209
4210
  }
4210
- function Ce(n, r) {
4211
- var i = ne(n),
4211
+ function Se(n, r) {
4212
+ var i = te(n),
4212
4213
  a = Mn(n),
4213
4214
  o = a.length ? [].concat(_toConsumableArray(a), _toConsumableArray(Array.from({
4214
4215
  length: Ra(f, i)
@@ -4219,8 +4220,8 @@ function La(_ref62) {
4219
4220
  }, function () {
4220
4221
  return "";
4221
4222
  }),
4222
- s = Se(n),
4223
- c = xe().map(function (e, t) {
4223
+ s = xe(n),
4224
+ c = be().map(function (e, t) {
4224
4225
  var n = Zt("upperAlpha", t),
4225
4226
  r = a.includes(e.optionId);
4226
4227
  return {
@@ -4243,7 +4244,7 @@ function La(_ref62) {
4243
4244
  className: "min-w-60",
4244
4245
  disabled: e,
4245
4246
  onChange: function onChange(e) {
4246
- return ie(r, a, e);
4247
+ return re(r, a, e);
4247
4248
  },
4248
4249
  options: c,
4249
4250
  placeholder: u("questionContentEditor.placeholders.blankAnswer"),
@@ -4254,18 +4255,18 @@ function La(_ref62) {
4254
4255
  disabled: e,
4255
4256
  icon: "+",
4256
4257
  onClick: function onClick() {
4257
- return T(n);
4258
+ return E(n);
4258
4259
  },
4259
4260
  type: "dashed",
4260
4261
  children: u("questionContentEditor.actions.addAnswerPool")
4261
4262
  })]
4262
4263
  });
4263
4264
  }
4264
- function we(n) {
4265
+ function Ce(n) {
4265
4266
  return (0, t.jsx)(M, {
4266
4267
  disabled: e,
4267
4268
  onClick: function onClick() {
4268
- return ge(n);
4269
+ return he(n);
4269
4270
  },
4270
4271
  size: "small",
4271
4272
  children: u("questionContentEditor.blank.memberDetach", {
@@ -4273,7 +4274,7 @@ function La(_ref62) {
4273
4274
  })
4274
4275
  }, n);
4275
4276
  }
4276
- function Te(e, n, r) {
4277
+ function we(e, n, r) {
4277
4278
  return (0, t.jsxs)("section", {
4278
4279
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-blue-200 bg-blue-50/40 px-4 py-3",
4279
4280
  children: [(0, t.jsxs)("div", {
@@ -4285,15 +4286,15 @@ function La(_ref62) {
4285
4286
  children: u("questionContentEditor.blank.answerGroup", {
4286
4287
  index: r + 1
4287
4288
  })
4288
- }), e.blankIds.map(we)]
4289
+ }), e.blankIds.map(Ce)]
4289
4290
  }), (0, t.jsx)(N.Text, {
4290
4291
  strong: !0,
4291
4292
  children: u("questionContentEditor.blank.sharedAnswer")
4292
4293
  })]
4293
- }), Ce(e, n)]
4294
+ }), Se(e, n)]
4294
4295
  }, "candidate-shared-group-".concat(n));
4295
4296
  }
4296
- function Ee(n, r, i, a, o) {
4297
+ function Te(n, r, i, a, o) {
4297
4298
  return (0, t.jsxs)("section", {
4298
4299
  className: "flex min-w-0 flex-wrap items-center gap-4 rounded-md border border-slate-200 bg-white px-4 py-3",
4299
4300
  children: [(0, t.jsx)(N.Text, {
@@ -4309,18 +4310,18 @@ function La(_ref62) {
4309
4310
  className: "w-48",
4310
4311
  disabled: e,
4311
4312
  onChange: function onChange(e) {
4312
- return ue(n, e == null ? "__single__" : e);
4313
+ return le(n, e == null ? "__single__" : e);
4313
4314
  },
4314
- options: E(n, o),
4315
+ options: D(n, o),
4315
4316
  value: "__single__"
4316
4317
  }), (0, t.jsx)("div", {
4317
4318
  className: "min-w-72 flex-1",
4318
- children: Ce(i, a)
4319
+ children: Se(i, a)
4319
4320
  })]
4320
4321
  }, n);
4321
4322
  }
4322
- function De() {
4323
- return w().map(function (e, t) {
4323
+ function Ee() {
4324
+ return T().map(function (e, t) {
4324
4325
  return {
4325
4326
  firstBlankIndex: Math.min.apply(Math, _toConsumableArray(e.blankIds.map(function (e) {
4326
4327
  return v.blanks.indexOf(e);
@@ -4332,36 +4333,36 @@ function La(_ref62) {
4332
4333
  return e.firstBlankIndex - t.firstBlankIndex;
4333
4334
  });
4334
4335
  }
4335
- function Oe() {
4336
- var e = ce();
4336
+ function De() {
4337
+ var e = se();
4337
4338
  return (0, t.jsxs)("div", {
4338
4339
  className: "flex min-w-0 flex-col gap-3",
4339
4340
  children: [(0, t.jsx)(N.Text, {
4340
4341
  strong: !0,
4341
4342
  children: u("questionContentEditor.blank.groupsTitle")
4342
- }), De().map(function (_ref70) {
4343
+ }), Ee().map(function (_ref70) {
4343
4344
  var t = _ref70.group,
4344
4345
  n = _ref70.groupIndex;
4345
- if (t.blankIds.length > 1) return Te(t, n, e.findIndex(function (e) {
4346
+ if (t.blankIds.length > 1) return we(t, n, e.findIndex(function (e) {
4346
4347
  return e.groupIndex === n;
4347
4348
  }));
4348
4349
  var r = t.blankIds[0];
4349
- return r ? Ee(r, v.blanks.indexOf(r), t, n, e) : null;
4350
+ return r ? Te(r, v.blanks.indexOf(r), t, n, e) : null;
4350
4351
  })]
4351
4352
  });
4352
4353
  }
4353
- function ke(e) {
4354
+ function Oe(e) {
4354
4355
  var t, n;
4355
4356
  var r = v.answers.find(function (t) {
4356
4357
  return "answerOptionId" in t && t.blankId === e;
4357
4358
  }),
4358
- i = (t = (n = ae(e).options[0]) == null ? void 0 : n.optionId) == null ? "" : t;
4359
+ i = (t = (n = ie(e).options[0]) == null ? void 0 : n.optionId) == null ? "" : t;
4359
4360
  return {
4360
4361
  answerOptionId: (r == null ? void 0 : r.answerOptionId) || i,
4361
4362
  blankId: e
4362
4363
  };
4363
4364
  }
4364
- function Ae(e, t) {
4365
+ function ke(e, t) {
4365
4366
  x(C(C({}, v), {}, {
4366
4367
  answers: v.answers.map(function (n) {
4367
4368
  return "answerOptionId" in n && n.blankId === e ? C(C({}, n), {}, {
@@ -4370,14 +4371,14 @@ function La(_ref62) {
4370
4371
  })
4371
4372
  }));
4372
4373
  }
4373
- function je(e, t) {
4374
- te(e, {
4374
+ function Ae(e, t) {
4375
+ w(e, {
4375
4376
  blankId: e,
4376
4377
  options: t
4377
4378
  });
4378
4379
  }
4379
- function Me(n, r) {
4380
- var a = ke(n.blankId),
4380
+ function je(n, r) {
4381
+ var a = Oe(n.blankId),
4381
4382
  o = n.options.map(function (e, t) {
4382
4383
  return {
4383
4384
  label: "".concat(Zt("upperAlpha", t), ". ").concat(e.content.text || u("questionContentEditor.fields.candidateOption", {
@@ -4409,7 +4410,7 @@ function La(_ref62) {
4409
4410
  className: "min-w-48",
4410
4411
  disabled: e,
4411
4412
  onChange: function onChange(e) {
4412
- return e ? Ae(n.blankId, e) : void 0;
4413
+ return e ? ke(n.blankId, e) : void 0;
4413
4414
  },
4414
4415
  options: o,
4415
4416
  value: a.answerOptionId
@@ -4417,22 +4418,22 @@ function La(_ref62) {
4417
4418
  }) : null, (0, t.jsx)(M, {
4418
4419
  disabled: e,
4419
4420
  onClick: function onClick() {
4420
- return je(n.blankId, [].concat(_toConsumableArray(n.options), [yn(ve(n.options, "".concat(n.blankId, "_option_")))]));
4421
+ return Ae(n.blankId, [].concat(_toConsumableArray(n.options), [yn(_e(n.options, "".concat(n.blankId, "_option_")))]));
4421
4422
  },
4422
4423
  size: "small",
4423
4424
  children: u("questionContentEditor.actions.addBlankOption")
4424
4425
  })]
4425
4426
  })]
4426
- }), ye(n.options, function (e) {
4427
- return je(n.blankId, e);
4427
+ }), ve(n.options, function (e) {
4428
+ return Ae(n.blankId, e);
4428
4429
  })]
4429
4430
  }, n.blankId);
4430
4431
  }
4431
- function Ne() {
4432
+ function Me() {
4432
4433
  if (r.config.candidateMode === "sharedPool") {
4433
4434
  var e;
4434
4435
  return (0, t.jsxs)(t.Fragment, {
4435
- children: [be((e = v.candidateOptions) == null ? [] : e, ee, u("questionContentEditor.fields.candidateOptions"), "option_"), i ? Oe() : null]
4436
+ children: [ye((e = v.candidateOptions) == null ? [] : e, ee, u("questionContentEditor.fields.candidateOptions"), "option_"), i ? De() : null]
4436
4437
  });
4437
4438
  }
4438
4439
  var n = jn(v.blankOptionGroups, v.blanks);
@@ -4441,7 +4442,7 @@ function La(_ref62) {
4441
4442
  children: [(0, t.jsx)(N.Text, {
4442
4443
  strong: !0,
4443
4444
  children: u("questionContentEditor.blank.perBlankOptionsTitle")
4444
- }), n.map(Me)]
4445
+ }), n.map(je)]
4445
4446
  });
4446
4447
  }
4447
4448
  return (0, t.jsxs)("div", {
@@ -4476,15 +4477,15 @@ function La(_ref62) {
4476
4477
  onChange: S,
4477
4478
  richTextControls: s,
4478
4479
  translator: l
4479
- }) : Ne(), (0, t.jsx)(_a, {
4480
+ }) : Me(), (0, t.jsx)(_a, {
4480
4481
  cancelText: u("questionContentEditor.actions.cancel"),
4481
4482
  closeLabel: u("questionContentEditor.actions.close"),
4482
4483
  okButtonProps: {
4483
4484
  disabled: !g
4484
4485
  },
4485
4486
  okText: u("questionContentEditor.actions.confirmCreateAnswerGroup"),
4486
- onCancel: pe,
4487
- onOk: me,
4487
+ onCancel: fe,
4488
+ onOk: pe,
4488
4489
  open: !!m,
4489
4490
  title: u("questionContentEditor.blank.createGroupTitle"),
4490
4491
  children: (0, t.jsxs)("div", {
@@ -4496,7 +4497,7 @@ function La(_ref62) {
4496
4497
  onChange: function onChange(e) {
4497
4498
  return _(String(e.target.value));
4498
4499
  },
4499
- options: _e(),
4500
+ options: ge(),
4500
4501
  value: g
4501
4502
  })]
4502
4503
  })
@@ -4570,7 +4571,7 @@ function Ha(e) {
4570
4571
  return Array.isArray(e);
4571
4572
  }
4572
4573
  function Ua(e, t) {
4573
- var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Xe;
4574
+ var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Ye;
4574
4575
  var r = e.columns.reduce(function (e, t, n) {
4575
4576
  return t.items.forEach(function (t, r) {
4576
4577
  return e.set(t.itemId, {
@@ -4740,26 +4741,26 @@ function Qa(_ref77) {
4740
4741
  function ee(e, t) {
4741
4742
  S(cr(g, e, t));
4742
4743
  }
4743
- function te(e, t) {
4744
+ function w(e, t) {
4744
4745
  S(C(C({}, g), {}, {
4745
4746
  answers: lr(g.answers, e, t)
4746
4747
  }));
4747
4748
  }
4748
- function w(t, n, r) {
4749
+ function T(t, n, r) {
4749
4750
  if (e || !i) return;
4750
4751
  var a = {
4751
4752
  columnIndex: t,
4752
4753
  itemId: n,
4753
4754
  label: r
4754
4755
  },
4755
- o = u ? Ze(u, a) : null;
4756
+ o = u ? Xe(u, a) : null;
4756
4757
  if (o) {
4757
- te(o.fromItemId, o.toItemId), d(null);
4758
+ w(o.fromItemId, o.toItemId), d(null);
4758
4759
  return;
4759
4760
  }
4760
4761
  d(a);
4761
4762
  }
4762
- function ne() {
4763
+ function te() {
4763
4764
  return i ? (0, t.jsx)("div", {
4764
4765
  "aria-live": "polite",
4765
4766
  className: "rounded-md border border-blue-100 bg-blue-50 px-3 py-2 text-sm text-blue-700",
@@ -4768,7 +4769,7 @@ function Qa(_ref77) {
4768
4769
  }) : l("questionContentEditor.lineConnect.connectHintIdle")
4769
4770
  }) : null;
4770
4771
  }
4771
- function re(n, r) {
4772
+ function ne(n, r) {
4772
4773
  return (0, t.jsxs)("section", {
4773
4774
  className: L.column,
4774
4775
  children: [(0, t.jsxs)("div", {
@@ -4811,7 +4812,7 @@ function Qa(_ref77) {
4811
4812
  }), (0, t.jsx)("div", {
4812
4813
  className: "flex min-w-0 flex-col gap-2",
4813
4814
  children: n.items.map(function (e, t) {
4814
- return ie(n, r, e, t);
4815
+ return re(n, r, e, t);
4815
4816
  })
4816
4817
  }), (0, t.jsx)(M, {
4817
4818
  "aria-label": l("questionContentEditor.lineConnect.addItem", {
@@ -4829,7 +4830,7 @@ function Qa(_ref77) {
4829
4830
  })]
4830
4831
  }, n.columnId);
4831
4832
  }
4832
- function ie(n, r, a, o) {
4833
+ function re(n, r, a, o) {
4833
4834
  var c = Qt(n.labelStyle, o),
4834
4835
  d = c ? "".concat(c, ". ").concat(a.content.text) : a.content.text,
4835
4836
  f = (u == null ? void 0 : u.itemId) === a.itemId,
@@ -4841,7 +4842,7 @@ function Qa(_ref77) {
4841
4842
  className: ro(f, h),
4842
4843
  "data-testid": "line-connect-item-".concat(a.itemId),
4843
4844
  style: _,
4844
- children: [ae(r, a, o, c, d, p), (0, t.jsx)(F, {
4845
+ children: [ie(r, a, o, c, d, p), (0, t.jsx)(F, {
4845
4846
  controls: s,
4846
4847
  disabled: e,
4847
4848
  label: l("questionContentEditor.lineConnect.itemAria", {
@@ -4868,17 +4869,17 @@ function Qa(_ref77) {
4868
4869
  return S(sr(g, a.itemId));
4869
4870
  },
4870
4871
  size: "small"
4871
- }), oe(r, a, o, d, f, m)]
4872
+ }), ae(r, a, o, d, f, m)]
4872
4873
  }, a.itemId);
4873
4874
  }
4874
- function ae(n, r, a, o, s, c) {
4875
+ function ie(n, r, a, o, s, c) {
4875
4876
  return i ? (0, t.jsx)("button", {
4876
- "aria-label": se("incoming", n, a, r.content.text),
4877
+ "aria-label": oe("incoming", n, a, r.content.text),
4877
4878
  "aria-pressed": c,
4878
4879
  className: Ba(R.marker, R["incoming-marker"], c && R["connect-button-connected"]),
4879
4880
  disabled: e,
4880
4881
  onClick: function onClick() {
4881
- return w(n, r.itemId, s);
4882
+ return T(n, r.itemId, s);
4882
4883
  },
4883
4884
  ref: x(r.itemId, "incoming"),
4884
4885
  title: u ? l("questionContentEditor.lineConnect.connectHintActive", {
@@ -4895,15 +4896,15 @@ function Qa(_ref77) {
4895
4896
  children: o
4896
4897
  });
4897
4898
  }
4898
- function oe(n, r, a, o, s, c) {
4899
+ function ae(n, r, a, o, s, c) {
4899
4900
  return i ? (0, t.jsx)("button", {
4900
- "aria-label": se("outgoing", n, a, r.content.text),
4901
+ "aria-label": oe("outgoing", n, a, r.content.text),
4901
4902
  "aria-pressed": s,
4902
4903
  className: Ba(R["connect-handle"], R["connect-handle-outgoing"], s && R["connect-button-selected"], c && R["connect-button-connected"]),
4903
4904
  disabled: e,
4904
4905
  ref: x(r.itemId, "outgoing"),
4905
4906
  onClick: function onClick() {
4906
- return w(n, r.itemId, o);
4907
+ return T(n, r.itemId, o);
4907
4908
  },
4908
4909
  title: u ? l("questionContentEditor.lineConnect.connectHintActive", {
4909
4910
  label: u.label
@@ -4915,7 +4916,7 @@ function Qa(_ref77) {
4915
4916
  })
4916
4917
  }) : null;
4917
4918
  }
4918
- function se(e, t, n, r) {
4919
+ function oe(e, t, n, r) {
4919
4920
  return l("questionContentEditor.lineConnect.".concat(e === "incoming" ? "connectToAria" : "connectFromAria"), {
4920
4921
  column: t + 1,
4921
4922
  content: r,
@@ -4924,7 +4925,7 @@ function Qa(_ref77) {
4924
4925
  }
4925
4926
  return (0, t.jsxs)("div", {
4926
4927
  className: "flex min-w-0 flex-col gap-4",
4927
- children: [ne(), (0, t.jsxs)("div", {
4928
+ children: [te(), (0, t.jsxs)("div", {
4928
4929
  className: L.board,
4929
4930
  "data-testid": "line-connect-editor-board",
4930
4931
  ref: m,
@@ -4950,7 +4951,7 @@ function Qa(_ref77) {
4950
4951
  }) : null, (0, t.jsx)("div", {
4951
4952
  className: L.columns,
4952
4953
  style: _,
4953
- children: g.columns.map(re)
4954
+ children: g.columns.map(ne)
4954
4955
  })]
4955
4956
  }), (0, t.jsx)(M, {
4956
4957
  "aria-label": l("questionContentEditor.lineConnect.addColumn"),
@@ -5022,7 +5023,7 @@ function oo(_ref82) {
5022
5023
  gridTemplateColumns: "repeat(".concat(g.columns.length, ", minmax(16rem, 1fr))")
5023
5024
  },
5024
5025
  v = (0, n.useMemo)(function () {
5025
- return i ? Ua(g, g.answers, ct) : [];
5026
+ return i ? Ua(g, g.answers, st) : [];
5026
5027
  }, [i, g]),
5027
5028
  y = (0, n.useMemo)(function () {
5028
5029
  return JSON.stringify({
@@ -5093,14 +5094,14 @@ function oo(_ref82) {
5093
5094
  function ee(e, t) {
5094
5095
  S(hr(g, e, t));
5095
5096
  }
5096
- function te(t, n, r) {
5097
+ function w(t, n, r) {
5097
5098
  if (e || !i) return;
5098
5099
  var a = {
5099
5100
  columnIndex: t,
5100
5101
  itemId: n,
5101
5102
  label: r
5102
5103
  },
5103
- o = u ? lt(u, a) : null;
5104
+ o = u ? ct(u, a) : null;
5104
5105
  if (o) {
5105
5106
  S(C(C({}, g), {}, {
5106
5107
  answers: gr(g.answers, o.fromItemId, o.toItemId)
@@ -5109,7 +5110,7 @@ function oo(_ref82) {
5109
5110
  }
5110
5111
  d(a);
5111
5112
  }
5112
- function w(n, r) {
5113
+ function T(n, r) {
5113
5114
  return (0, t.jsxs)("section", {
5114
5115
  className: z.column,
5115
5116
  children: [(0, t.jsx)("div", {
@@ -5133,7 +5134,7 @@ function oo(_ref82) {
5133
5134
  }), (0, t.jsx)("div", {
5134
5135
  className: z.items,
5135
5136
  children: n.items.map(function (e, t) {
5136
- return ne(n, r, e, t);
5137
+ return te(n, r, e, t);
5137
5138
  })
5138
5139
  }), (0, t.jsx)(M, {
5139
5140
  "aria-label": l("questionContentEditor.matching.addItem", {
@@ -5149,7 +5150,7 @@ function oo(_ref82) {
5149
5150
  })]
5150
5151
  }, n.columnId);
5151
5152
  }
5152
- function ne(n, r, a, o) {
5153
+ function te(n, r, a, o) {
5153
5154
  var c = $t(n.labelStyle, o),
5154
5155
  d = (u == null ? void 0 : u.itemId) === a.itemId,
5155
5156
  f = so(g, a.itemId),
@@ -5161,7 +5162,7 @@ function oo(_ref82) {
5161
5162
  className: Ba(z.item, d ? z.selected : "", m ? z.matched : ""),
5162
5163
  "data-testid": "matching-editor-item-".concat(a.itemId),
5163
5164
  style: _,
5164
- children: [re(r, a, o, c, h, f), (0, t.jsx)(F, {
5165
+ children: [ne(r, a, o, c, h, f), (0, t.jsx)(F, {
5165
5166
  controls: s,
5166
5167
  disabled: e,
5167
5168
  label: l("questionContentEditor.matching.itemAria", {
@@ -5188,17 +5189,17 @@ function oo(_ref82) {
5188
5189
  return S(mr(g, a.itemId));
5189
5190
  },
5190
5191
  size: "small"
5191
- }), ie(r, a, o, h, d, p)]
5192
+ }), re(r, a, o, h, d, p)]
5192
5193
  }, a.itemId);
5193
5194
  }
5194
- function re(n, r, a, o, s, c) {
5195
+ function ne(n, r, a, o, s, c) {
5195
5196
  return i ? (0, t.jsx)("button", {
5196
- "aria-label": ae("incoming", n, a, r.content.text),
5197
+ "aria-label": ie("incoming", n, a, r.content.text),
5197
5198
  "aria-pressed": c,
5198
5199
  className: Ba(z.marker, R["incoming-marker"], c && R["connect-button-connected"]),
5199
5200
  disabled: e,
5200
5201
  onClick: function onClick() {
5201
- return te(n, r.itemId, s);
5202
+ return w(n, r.itemId, s);
5202
5203
  },
5203
5204
  ref: x(r.itemId, "incoming"),
5204
5205
  title: u ? l("questionContentEditor.matching.connectHintActive", {
@@ -5214,14 +5215,14 @@ function oo(_ref82) {
5214
5215
  children: o
5215
5216
  }) : (0, t.jsx)("span", {});
5216
5217
  }
5217
- function ie(n, r, a, o, s, c) {
5218
+ function re(n, r, a, o, s, c) {
5218
5219
  return i ? (0, t.jsx)("button", {
5219
- "aria-label": ae("outgoing", n, a, r.content.text),
5220
+ "aria-label": ie("outgoing", n, a, r.content.text),
5220
5221
  "aria-pressed": s,
5221
5222
  className: Ba(R["connect-handle"], R["connect-handle-outgoing"], s && R["connect-button-selected"], c && R["connect-button-connected"]),
5222
5223
  disabled: e,
5223
5224
  onClick: function onClick() {
5224
- return te(n, r.itemId, o);
5225
+ return w(n, r.itemId, o);
5225
5226
  },
5226
5227
  ref: x(r.itemId, "outgoing"),
5227
5228
  title: u ? l("questionContentEditor.matching.connectHintActive", {
@@ -5234,7 +5235,7 @@ function oo(_ref82) {
5234
5235
  })
5235
5236
  }) : null;
5236
5237
  }
5237
- function ae(e, t, n, r) {
5238
+ function ie(e, t, n, r) {
5238
5239
  return l("questionContentEditor.matching.".concat(e === "incoming" ? "connectToAria" : "connectFromAria"), {
5239
5240
  column: t + 1,
5240
5241
  content: r,
@@ -5276,7 +5277,7 @@ function oo(_ref82) {
5276
5277
  className: z.columns,
5277
5278
  style: _,
5278
5279
  children: g.columns.map(function (e, t) {
5279
- return w(e, t);
5280
+ return T(e, t);
5280
5281
  })
5281
5282
  })]
5282
5283
  })]
@@ -5334,20 +5335,20 @@ function fo(_ref87) {
5334
5335
  }
5335
5336
  }));
5336
5337
  }
5337
- function _(n, r, i, a) {
5338
- var o = l.includes(n);
5339
- return (0, t.jsxs)("button", {
5338
+ function _(n, r, i) {
5339
+ var a = l.includes(n);
5340
+ return (0, t.jsx)("button", {
5340
5341
  "aria-label": c("questionContentEditor.option.answerAria", {
5341
5342
  index: r + 1
5342
5343
  }),
5343
- "aria-pressed": o,
5344
- className: "min-h-12 rounded-md border px-3 py-2 text-left text-sm font-medium transition ".concat(o ? "border-blue-600 bg-blue-50 text-blue-700" : "border-slate-200 bg-white text-slate-900 hover:border-blue-300"),
5344
+ "aria-pressed": a,
5345
+ className: "min-h-12 rounded-md border px-3 py-2 text-left text-sm font-medium transition ".concat(a ? "border-blue-600 bg-blue-50 text-blue-700" : "border-slate-200 bg-white text-slate-900 hover:border-blue-300"),
5345
5346
  disabled: e,
5346
5347
  onClick: function onClick() {
5347
5348
  return g(n);
5348
5349
  },
5349
5350
  type: "button",
5350
- children: [i, ". ", a]
5351
+ children: i
5351
5352
  }, "answer-option-".concat(n));
5352
5353
  }
5353
5354
  function v() {
@@ -5533,34 +5534,7 @@ function fo(_ref87) {
5533
5534
  });
5534
5535
  }
5535
5536
  function x() {
5536
- return d.map(function (e) {
5537
- return {
5538
- marker: e.marker,
5539
- optionId: e.optionId,
5540
- text: e.standardContent.text || c("questionContentEditor.placeholders.option", {
5541
- marker: e.marker
5542
- })
5543
- };
5544
- });
5545
- }
5546
- function S() {
5547
- return d.map(function (e) {
5548
- var t = e.cells.map(function (e) {
5549
- return e.text.trim();
5550
- }).filter(Boolean).join(" / ") || c("questionContentEditor.placeholders.option", {
5551
- marker: e.marker
5552
- });
5553
- return {
5554
- marker: e.marker,
5555
- optionId: e.optionId,
5556
- text: t
5557
- };
5558
- });
5559
- }
5560
- function ee() {
5561
- if (!r) return null;
5562
- var e = u ? S() : x();
5563
- return (0, t.jsxs)("div", {
5537
+ return r ? (0, t.jsxs)("div", {
5564
5538
  className: "mt-2 border-t border-slate-200 pt-4",
5565
5539
  children: [(0, t.jsx)(N.Text, {
5566
5540
  className: "mb-3 block text-base",
@@ -5568,18 +5542,17 @@ function fo(_ref87) {
5568
5542
  children: c("questionContentEditor.option.answerSettings")
5569
5543
  }), (0, t.jsx)("div", {
5570
5544
  className: "grid min-w-0 grid-cols-1 gap-2 md:grid-cols-2 xl:grid-cols-4",
5571
- children: e.map(function (_ref88, r) {
5545
+ children: d.map(function (_ref88, n) {
5572
5546
  var e = _ref88.marker,
5573
- t = _ref88.optionId,
5574
- n = _ref88.text;
5575
- return _(t, r, e, n);
5547
+ t = _ref88.optionId;
5548
+ return _(t, n, e);
5576
5549
  })
5577
5550
  })]
5578
- });
5551
+ }) : null;
5579
5552
  }
5580
5553
  return (0, t.jsxs)("div", {
5581
5554
  className: "flex min-w-0 flex-col gap-3",
5582
- children: [u ? b() : v(), ee()]
5555
+ children: [u ? b() : v(), x()]
5583
5556
  });
5584
5557
  }
5585
5558
  function po(_ref89) {
@@ -5730,13 +5703,13 @@ function go(_ref91) {
5730
5703
  c = _ref91.translator;
5731
5704
  var l = (0, n.useRef)(null),
5732
5705
  u = c.t,
5733
- d = bt(i.content.json);
5706
+ d = yt(i.content.json);
5734
5707
  function f(e) {
5735
5708
  a(gn(e, e.content, r));
5736
5709
  }
5737
5710
  function p() {
5738
5711
  var e;
5739
- var t = xt();
5712
+ var t = bt();
5740
5713
  (e = l.current) == null || e.runCommand({
5741
5714
  command: "mark.textMarker",
5742
5715
  payload: t
@@ -6362,7 +6335,7 @@ function Bo(_ref100) {
6362
6335
  y = Io(_ ? v.children : []);
6363
6336
  if (!_) return (0, t.jsxs)("section", {
6364
6337
  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",
6365
- children: [te(null), w((0, t.jsx)(ba, {
6338
+ children: [w(null), T((0, t.jsx)(ba, {
6366
6339
  description: p("questionContentEditor.subquestion.missingTemplate")
6367
6340
  }))]
6368
6341
  });
@@ -6395,7 +6368,7 @@ function Bo(_ref100) {
6395
6368
  }
6396
6369
  return (0, t.jsxs)("section", {
6397
6370
  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",
6398
- children: [te(b), w(Uo(i, v, o, l, _, f)), v.children.length === 0 ? null : (0, t.jsx)("div", {
6371
+ children: [w(b), T(Uo(i, v, o, l, _, f)), v.children.length === 0 ? null : (0, t.jsx)("div", {
6399
6372
  className: "ml-3 flex min-w-0 flex-col pl-3 sm:ml-4 sm:pl-4",
6400
6373
  children: y.map(function (e, n) {
6401
6374
  return (0, t.jsx)(Bo, {
@@ -6421,7 +6394,7 @@ function Bo(_ref100) {
6421
6394
  })
6422
6395
  })]
6423
6396
  });
6424
- function te(r) {
6397
+ function w(r) {
6425
6398
  return (0, t.jsxs)("div", {
6426
6399
  className: "flex min-w-0 flex-wrap items-start justify-between gap-3",
6427
6400
  children: [(0, t.jsx)("span", {
@@ -6472,7 +6445,7 @@ function Bo(_ref100) {
6472
6445
  })]
6473
6446
  });
6474
6447
  }
6475
- function w(e) {
6448
+ function T(e) {
6476
6449
  return (0, t.jsx)(Ao, {
6477
6450
  number: Do(m, u) ? h : null,
6478
6451
  children: e
@@ -6612,7 +6585,7 @@ function qo(_ref102) {
6612
6585
  f = Zi(o, l),
6613
6586
  p = (0, n.useMemo)(function () {
6614
6587
  return {
6615
- plugins: [Ot, ra],
6588
+ plugins: [Dt, ra],
6616
6589
  uploadImage: s
6617
6590
  };
6618
6591
  }, [s]);
@@ -6682,9 +6655,12 @@ function qo(_ref102) {
6682
6655
  className: ["question-content-editor", fa.root, fa["rich-text-root"]].join(" "),
6683
6656
  plugins: p.plugins,
6684
6657
  uploadImage: s,
6685
- children: [r ? null : (0, t.jsx)(e.RichTextEditor.Toolbar, {
6686
- "aria-label": "Rich text toolbar",
6687
- className: fa["rich-text-toolbar"]
6658
+ children: [r ? null : (0, t.jsx)("div", {
6659
+ className: fa["rich-text-toolbar-sticky"],
6660
+ children: (0, t.jsx)(e.RichTextEditor.Toolbar, {
6661
+ "aria-label": "Rich text toolbar",
6662
+ className: fa["rich-text-toolbar"]
6663
+ })
6688
6664
  }), (0, t.jsx)(aa.Provider, {
6689
6665
  value: !0,
6690
6666
  children: v
@@ -6711,7 +6687,7 @@ function Xo(e, t) {
6711
6687
  }),
6712
6688
  extras: e.extras.map(function (e) {
6713
6689
  return {
6714
- name: ls(e, _e(e.type), ve(e.type), t),
6690
+ name: ls(e, ge(e.type), _e(e.type), t),
6715
6691
  type: e.type
6716
6692
  };
6717
6693
  }),
@@ -6832,7 +6808,7 @@ function os(e) {
6832
6808
  function ss(e, t) {
6833
6809
  return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? {
6834
6810
  config: {},
6835
- name: ls(e, T(e.type), E(e.type), t),
6811
+ name: ls(e, E(e.type), D(e.type), t),
6836
6812
  type: e.type
6837
6813
  } : cs(e, t);
6838
6814
  }
@@ -6844,7 +6820,7 @@ function cs(e, t) {
6844
6820
  allowCandidateReuse: !!e.config.allowCandidateReuse,
6845
6821
  candidateMode: e.config.candidateMode
6846
6822
  },
6847
- name: ls(e, T("inlineFill"), E("inlineFill"), t),
6823
+ name: ls(e, E("inlineFill"), D("inlineFill"), t),
6848
6824
  type: "inlineFill"
6849
6825
  };
6850
6826
  case "wordBuilder":
@@ -6852,7 +6828,7 @@ function cs(e, t) {
6852
6828
  config: {
6853
6829
  builderMode: e.config.builderMode
6854
6830
  },
6855
- name: ls(e, T("wordBuilder"), E("wordBuilder"), t),
6831
+ name: ls(e, E("wordBuilder"), D("wordBuilder"), t),
6856
6832
  type: "wordBuilder"
6857
6833
  };
6858
6834
  case "judgement":
@@ -6860,7 +6836,7 @@ function cs(e, t) {
6860
6836
  config: {
6861
6837
  judgeAnswerMode: e.config.judgeAnswerMode
6862
6838
  },
6863
- name: ls(e, T("judgement"), E("judgement"), t),
6839
+ name: ls(e, E("judgement"), D("judgement"), t),
6864
6840
  type: "judgement"
6865
6841
  };
6866
6842
  case "choice":
@@ -6870,7 +6846,7 @@ function cs(e, t) {
6870
6846
  renderer: e.config.renderer,
6871
6847
  selectionType: e.config.selectionType
6872
6848
  },
6873
- name: ls(e, T("choice"), E("choice"), t),
6849
+ name: ls(e, E("choice"), D("choice"), t),
6874
6850
  type: "choice"
6875
6851
  };
6876
6852
  case "lineConnect":
@@ -6880,7 +6856,7 @@ function cs(e, t) {
6880
6856
  return C({}, e);
6881
6857
  })
6882
6858
  },
6883
- name: ls(e, T("lineConnect"), E("lineConnect"), t),
6859
+ name: ls(e, E("lineConnect"), D("lineConnect"), t),
6884
6860
  type: "lineConnect"
6885
6861
  };
6886
6862
  case "matching":
@@ -6890,7 +6866,7 @@ function cs(e, t) {
6890
6866
  return C({}, e);
6891
6867
  })
6892
6868
  },
6893
- name: ls(e, T("matching"), E("matching"), t),
6869
+ name: ls(e, E("matching"), D("matching"), t),
6894
6870
  type: "matching"
6895
6871
  };
6896
6872
  }
@@ -7301,23 +7277,23 @@ function Js(e, t, n) {
7301
7277
  });
7302
7278
  }
7303
7279
  function Ys(e, t, n) {
7304
- return Ie(e, t, n);
7280
+ return Fe(e, t, n);
7305
7281
  }
7306
7282
  function Xs(e, t) {
7307
7283
  var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "single";
7308
7284
  return {
7309
7285
  kind: "option",
7310
- optionIds: Ie((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
7286
+ optionIds: Fe((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
7311
7287
  };
7312
7288
  }
7313
7289
  function Zs(e, t, n) {
7314
- return rt(e, t, n);
7290
+ return nt(e, t, n);
7315
7291
  }
7316
7292
  function Qs(e, t, n) {
7317
- return ft(e, t, n);
7293
+ return dt(e, t, n);
7318
7294
  }
7319
7295
  function $s(e, t, n) {
7320
- return qe(e, t, n);
7296
+ return Ke(e, t, n);
7321
7297
  }
7322
7298
  function ec(e, t, n, r) {
7323
7299
  return Mr(e, t.sortOptions, n, r);
@@ -7400,7 +7376,7 @@ function dc() {
7400
7376
  };
7401
7377
  }
7402
7378
  function fc(e, t) {
7403
- return Ke(e, t.categories, t.items);
7379
+ return Ge(e, t.categories, t.items);
7404
7380
  }
7405
7381
  function pc(e) {
7406
7382
  return e.type === "ordering" ? {
@@ -7729,7 +7705,7 @@ function G(_ref107) {
7729
7705
  var n = _ref107.className,
7730
7706
  r = _ref107.content;
7731
7707
  var i = r.html || (0, e.serializeRichTextEditorHtml)(Jt(r), {
7732
- plugins: [Ot]
7708
+ plugins: [Dt]
7733
7709
  });
7734
7710
  return (0, t.jsx)("div", {
7735
7711
  className: n ? "".concat(W["rich-content"], " ").concat(n) : W["rich-content"],
@@ -7982,7 +7958,7 @@ function Lc(e, t, n, r) {
7982
7958
  if (!(!r || !s)) return o ? s === o ? "correct" : "incorrect" : "unanswered";
7983
7959
  }
7984
7960
  function Rc(e, t) {
7985
- return Ke(e, t.categories, t.items);
7961
+ return Ge(e, t.categories, t.items);
7986
7962
  }
7987
7963
  function zc(_ref115) {
7988
7964
  var e = _ref115.className,
@@ -8370,17 +8346,17 @@ function il(_ref123) {
8370
8346
  }, a.optionId);
8371
8347
  }
8372
8348
  var Y = {
8373
- "choice-button": "_choice-button_rer43_1",
8374
- "table-row-button": "_table-row-button_rer43_2",
8375
- "judgement-button": "_judgement-button_rer43_26",
8376
- "ordering-controls": "_ordering-controls_rer43_41",
8377
- "ordering-button": "_ordering-button_rer43_49",
8378
- "choice-option": "_choice-option_rer43_66",
8379
- "table-choice-row": "_table-choice-row_rer43_71",
8380
- "judgement-option": "_judgement-option_rer43_75",
8381
- selected: "_selected_rer43_79",
8382
- "option-marker": "_option-marker_rer43_84",
8383
- "table-option-marker": "_table-option-marker_rer43_85"
8349
+ "choice-button": "_choice-button_3nny2_1",
8350
+ "table-row-button": "_table-row-button_3nny2_2",
8351
+ "judgement-button": "_judgement-button_3nny2_28",
8352
+ "ordering-controls": "_ordering-controls_3nny2_43",
8353
+ "ordering-button": "_ordering-button_3nny2_51",
8354
+ "choice-option": "_choice-option_3nny2_68",
8355
+ "table-choice-row": "_table-choice-row_3nny2_73",
8356
+ "judgement-option": "_judgement-option_3nny2_77",
8357
+ selected: "_selected_3nny2_81",
8358
+ "option-marker": "_option-marker_3nny2_86",
8359
+ "table-option-marker": "_table-option-marker_3nny2_87"
8384
8360
  };
8385
8361
  function al(_ref124) {
8386
8362
  var e = _ref124.disabled,
@@ -8441,7 +8417,7 @@ function ol(e) {
8441
8417
  kind: "detailed",
8442
8418
  contents: ((s = e.answers[r.itemId]) == null ? [] : s).map(function (e) {
8443
8419
  var t = n.get(e);
8444
- return t && Xe(a, t.columnIndex) ? t.item : void 0;
8420
+ return t && Ye(a, t.columnIndex) ? t.item : void 0;
8445
8421
  }).filter(function (e) {
8446
8422
  return !!e;
8447
8423
  }).map(function (e, n) {
@@ -8554,7 +8530,7 @@ function cl(_ref126) {
8554
8530
  }
8555
8531
  function x(t, n) {
8556
8532
  if (e) return;
8557
- var r = l ? Ze(l, {
8533
+ var r = l ? Xe(l, {
8558
8534
  columnIndex: t,
8559
8535
  itemId: n
8560
8536
  }) : null;
@@ -8686,7 +8662,7 @@ function dl(_ref131) {
8686
8662
  f = fl(r, d.connections);
8687
8663
  function p(t, n) {
8688
8664
  if (e) return;
8689
- var r = l ? lt(l, {
8665
+ var r = l ? ct(l, {
8690
8666
  columnIndex: t,
8691
8667
  itemId: n
8692
8668
  }) : null;
@@ -8799,21 +8775,100 @@ function pl(e, t) {
8799
8775
  };
8800
8776
  });
8801
8777
  }
8802
- var ml = {
8778
+ function ml(_ref134) {
8779
+ var e = _ref134.availableWidth,
8780
+ t = _ref134.columnGap,
8781
+ n = _ref134.optionCount,
8782
+ r = _ref134.widestOptionWidth;
8783
+ var i = Math.max(1, Math.trunc(n));
8784
+ if (e <= 0 || r <= 0) return 1;
8785
+ for (var _n5 = i; _n5 >= 2; --_n5) if (i % _n5 === 0 && (e - Math.max(0, t) * (_n5 - 1)) / _n5 >= r) return _n5;
8786
+ return 1;
8787
+ }
8788
+ var hl = {
8789
+ list: "_list_1xo1n_1"
8790
+ };
8791
+ function gl(_ref135) {
8792
+ var e = _ref135.children;
8793
+ var r = (0, n.useRef)(null),
8794
+ _ref136 = (0, n.useState)(1),
8795
+ _ref137 = _slicedToArray(_ref136, 2),
8796
+ i = _ref137[0],
8797
+ a = _ref137[1],
8798
+ o = {
8799
+ gridTemplateColumns: "repeat(".concat(i, ", minmax(0, 1fr))")
8800
+ };
8801
+ return (0, n.useLayoutEffect)(function () {
8802
+ if (!r.current) return;
8803
+ var t = r.current,
8804
+ i = null;
8805
+ function o() {
8806
+ var r = t.getBoundingClientRect().width,
8807
+ i = Number.parseFloat(getComputedStyle(t).columnGap) || 0,
8808
+ o = _l(t),
8809
+ s = ml({
8810
+ availableWidth: r,
8811
+ columnGap: i,
8812
+ optionCount: n.Children.count(e),
8813
+ widestOptionWidth: o
8814
+ });
8815
+ a(function (e) {
8816
+ return e === s ? e : s;
8817
+ });
8818
+ }
8819
+ function s() {
8820
+ i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(o);
8821
+ }
8822
+ if (o(), t.addEventListener("load", s, !0), (typeof ResizeObserver === "undefined" ? "undefined" : _typeof(ResizeObserver)) > "u") return window.addEventListener("resize", s), function () {
8823
+ i !== null && cancelAnimationFrame(i), t.removeEventListener("load", s, !0), window.removeEventListener("resize", s);
8824
+ };
8825
+ var c = new ResizeObserver(s);
8826
+ return c.observe(t), function () {
8827
+ i !== null && cancelAnimationFrame(i), t.removeEventListener("load", s, !0), c.disconnect();
8828
+ };
8829
+ }), (0, t.jsx)("ol", {
8830
+ className: "".concat(W["option-list"], " ").concat(hl.list),
8831
+ "data-column-count": i,
8832
+ "data-question-option-grid": "true",
8833
+ ref: r,
8834
+ style: o,
8835
+ children: e
8836
+ });
8837
+ }
8838
+ function _l(e) {
8839
+ var t = e.parentElement;
8840
+ if (!t || e.children.length === 0) return 0;
8841
+ var n = e.cloneNode(!1);
8842
+ n.removeAttribute("style"), n.setAttribute("aria-hidden", "true"), n.setAttribute("data-question-option-measurement", "true"), Object.assign(n.style, {
8843
+ display: "grid",
8844
+ gridTemplateColumns: "max-content",
8845
+ left: "-100000px",
8846
+ maxWidth: "none",
8847
+ pointerEvents: "none",
8848
+ position: "fixed",
8849
+ visibility: "hidden",
8850
+ width: "max-content"
8851
+ }), Array.from(e.children).forEach(function (e) {
8852
+ n.append(e.cloneNode(!0));
8853
+ }), t.append(n);
8854
+ var r = n.getBoundingClientRect().width;
8855
+ return n.remove(), r;
8856
+ }
8857
+ var vl = {
8803
8858
  "table-wrap": "_table-wrap_n67ah_1",
8804
8859
  table: "_table_n67ah_1",
8805
8860
  "table-option-column": "_table-option-column_n67ah_17",
8806
8861
  "table-option-marker": "_table-option-marker_n67ah_45"
8807
8862
  };
8808
- function hl(_ref134) {
8809
- var e = _ref134.disabled,
8810
- n = _ref134.element,
8811
- r = _ref134.item,
8812
- i = _ref134.messages,
8813
- a = _ref134.onChange,
8814
- o = _ref134.response,
8815
- s = _ref134.responseIndex,
8816
- c = _ref134.showAnswer;
8863
+ function yl(_ref138) {
8864
+ var e = _ref138.disabled,
8865
+ n = _ref138.element,
8866
+ r = _ref138.item,
8867
+ i = _ref138.messages,
8868
+ a = _ref138.onChange,
8869
+ o = _ref138.response,
8870
+ s = _ref138.responseIndex,
8871
+ c = _ref138.showAnswer;
8817
8872
  var l = Is(o, s),
8818
8873
  u = rn(r, n.config.optionLabelStyle);
8819
8874
  function d(e) {
@@ -8826,12 +8881,12 @@ function hl(_ref134) {
8826
8881
  return (0, t.jsxs)("div", {
8827
8882
  className: W.element,
8828
8883
  children: [(0, t.jsx)("div", {
8829
- className: ml["table-wrap"],
8884
+ className: vl["table-wrap"],
8830
8885
  children: (0, t.jsxs)("table", {
8831
- className: ml.table,
8886
+ className: vl.table,
8832
8887
  children: [(0, t.jsxs)("colgroup", {
8833
8888
  children: [(0, t.jsx)("col", {
8834
- className: ml["table-option-column"]
8889
+ className: vl["table-option-column"]
8835
8890
  }), r.columns.map(function (e) {
8836
8891
  return (0, t.jsx)("col", {}, e.id);
8837
8892
  })]
@@ -8897,8 +8952,7 @@ function hl(_ref134) {
8897
8952
  var f = pl(n, r);
8898
8953
  return (0, t.jsxs)("div", {
8899
8954
  className: W.element,
8900
- children: [(0, t.jsx)("ol", {
8901
- className: W["option-list"],
8955
+ children: [(0, t.jsx)(gl, {
8902
8956
  children: u.map(function (n) {
8903
8957
  var r = l.selectedOptionIds.includes(n.optionId);
8904
8958
  return (0, t.jsx)("li", {
@@ -8928,7 +8982,7 @@ function hl(_ref134) {
8928
8982
  }) : null]
8929
8983
  });
8930
8984
  }
8931
- function gl(e) {
8985
+ function bl(e) {
8932
8986
  var n = new Map(e.sortOptions.map(function (e) {
8933
8987
  return [e.id, e];
8934
8988
  }));
@@ -8943,14 +8997,14 @@ function gl(e) {
8943
8997
  };
8944
8998
  });
8945
8999
  }
8946
- function _l(_ref135) {
8947
- var e = _ref135.disabled,
8948
- n = _ref135.item,
8949
- r = _ref135.messages,
8950
- i = _ref135.onChange,
8951
- a = _ref135.response,
8952
- o = _ref135.responseIndex,
8953
- s = _ref135.showAnswer;
9000
+ function xl(_ref139) {
9001
+ var e = _ref139.disabled,
9002
+ n = _ref139.item,
9003
+ r = _ref139.messages,
9004
+ i = _ref139.onChange,
9005
+ a = _ref139.response,
9006
+ o = _ref139.responseIndex,
9007
+ s = _ref139.showAnswer;
8954
9008
  var c = Ws(a, o, n),
8955
9009
  l = new Map(n.sortOptions.map(function (e) {
8956
9010
  return [e.id, e];
@@ -9002,12 +9056,12 @@ function _l(_ref135) {
9002
9056
  }, n.id);
9003
9057
  })
9004
9058
  }), s ? (0, t.jsx)(K, {
9005
- groups: gl(n),
9059
+ groups: bl(n),
9006
9060
  title: r.standardAnswer
9007
9061
  }) : null]
9008
9062
  });
9009
9063
  }
9010
- var vl = {
9064
+ var Sl = {
9011
9065
  content: "_content_63948_1",
9012
9066
  paragraph: "_paragraph_63948_10",
9013
9067
  marker: "_marker_63948_14",
@@ -9015,17 +9069,17 @@ var vl = {
9015
9069
  "marker-selected": "_marker-selected_63948_31",
9016
9070
  "marker-answer": "_marker-answer_63948_37"
9017
9071
  };
9018
- function yl(_ref136) {
9019
- var _ref136$answerMarkers = _ref136.answerMarkers,
9020
- e = _ref136$answerMarkers === void 0 ? [] : _ref136$answerMarkers,
9021
- r = _ref136.content,
9022
- _ref136$disabled = _ref136.disabled,
9023
- i = _ref136$disabled === void 0 ? !1 : _ref136$disabled,
9024
- a = _ref136.onMarkerClick,
9025
- _ref136$selectedMarke = _ref136.selectedMarkers,
9026
- o = _ref136$selectedMarke === void 0 ? [] : _ref136$selectedMarke,
9027
- _ref136$showAnswer = _ref136.showAnswer,
9028
- s = _ref136$showAnswer === void 0 ? !1 : _ref136$showAnswer;
9072
+ function Cl(_ref140) {
9073
+ var _ref140$answerMarkers = _ref140.answerMarkers,
9074
+ e = _ref140$answerMarkers === void 0 ? [] : _ref140$answerMarkers,
9075
+ r = _ref140.content,
9076
+ _ref140$disabled = _ref140.disabled,
9077
+ i = _ref140$disabled === void 0 ? !1 : _ref140$disabled,
9078
+ a = _ref140.onMarkerClick,
9079
+ _ref140$selectedMarke = _ref140.selectedMarkers,
9080
+ o = _ref140$selectedMarke === void 0 ? [] : _ref140$selectedMarke,
9081
+ _ref140$showAnswer = _ref140.showAnswer,
9082
+ s = _ref140$showAnswer === void 0 ? !1 : _ref140$showAnswer;
9029
9083
  var c = r.json.length ? r.json : [{
9030
9084
  children: [{
9031
9085
  text: r.text
@@ -9033,26 +9087,26 @@ function yl(_ref136) {
9033
9087
  type: "paragraph"
9034
9088
  }];
9035
9089
  return (0, t.jsx)("div", {
9036
- className: vl.content,
9090
+ className: Sl.content,
9037
9091
  children: c.map(function (e, t) {
9038
9092
  return l(e, "node-".concat(t));
9039
9093
  })
9040
9094
  });
9041
9095
  function l(e, n) {
9042
- if (xl(e)) return u(e, n);
9043
- if (!bl(e)) return null;
9096
+ if (Tl(e)) return u(e, n);
9097
+ if (!wl(e)) return null;
9044
9098
  var r = e.children.map(function (e, t) {
9045
9099
  return l(e, "".concat(n, "-").concat(t));
9046
9100
  });
9047
9101
  return e.type === "paragraph" ? (0, t.jsx)("p", {
9048
- className: vl.paragraph,
9102
+ className: Sl.paragraph,
9049
9103
  children: r
9050
9104
  }, n) : (0, t.jsx)("span", {
9051
9105
  children: r
9052
9106
  }, n);
9053
9107
  }
9054
9108
  function u(e, r) {
9055
- var i = St(e);
9109
+ var i = xt(e);
9056
9110
  if (!i) return (0, t.jsx)(n.Fragment, {
9057
9111
  children: e.text
9058
9112
  }, r);
@@ -9064,7 +9118,7 @@ function yl(_ref136) {
9064
9118
  r = s && e.includes(t);
9065
9119
  return {
9066
9120
  answer: r,
9067
- className: Ba(vl.marker, a ? vl["marker-button"] : "", n ? vl["marker-selected"] : "", r ? vl["marker-answer"] : ""),
9121
+ className: Ba(Sl.marker, a ? Sl["marker-button"] : "", n ? Sl["marker-selected"] : "", r ? Sl["marker-answer"] : ""),
9068
9122
  selected: n
9069
9123
  };
9070
9124
  }
@@ -9092,23 +9146,23 @@ function yl(_ref136) {
9092
9146
  }, r);
9093
9147
  }
9094
9148
  }
9095
- function bl(e) {
9149
+ function wl(e) {
9096
9150
  return !!(e && _typeof(e) == "object" && "children" in e && Array.isArray(e.children));
9097
9151
  }
9098
- function xl(e) {
9152
+ function Tl(e) {
9099
9153
  return !!(e && _typeof(e) == "object" && "text" in e && _typeof(e.text) == "string");
9100
9154
  }
9101
- function Sl(_ref137) {
9102
- var e = _ref137.item,
9103
- n = _ref137.messages,
9104
- r = _ref137.showAnswer;
9105
- var i = bt(e.content.json).filter(function (t) {
9155
+ function El(_ref141) {
9156
+ var e = _ref141.item,
9157
+ n = _ref141.messages,
9158
+ r = _ref141.showAnswer;
9159
+ var i = yt(e.content.json).filter(function (t) {
9106
9160
  return e.answers.includes(t.markerId);
9107
9161
  }).map(function (e) {
9108
9162
  return e.text;
9109
9163
  });
9110
9164
  return (0, t.jsxs)(t.Fragment, {
9111
- children: [(0, t.jsx)(yl, {
9165
+ children: [(0, t.jsx)(Cl, {
9112
9166
  answerMarkers: e.answers,
9113
9167
  content: e.content,
9114
9168
  showAnswer: r
@@ -9122,20 +9176,20 @@ function Sl(_ref137) {
9122
9176
  }) : null]
9123
9177
  });
9124
9178
  }
9125
- function Cl(_ref138) {
9126
- var e = _ref138.disabled,
9127
- n = _ref138.item,
9128
- r = _ref138.messages,
9129
- i = _ref138.onChange,
9130
- a = _ref138.response,
9131
- o = _ref138.responseIndex,
9132
- s = _ref138.showAnswer;
9179
+ function Dl(_ref142) {
9180
+ var e = _ref142.disabled,
9181
+ n = _ref142.item,
9182
+ r = _ref142.messages,
9183
+ i = _ref142.onChange,
9184
+ a = _ref142.response,
9185
+ o = _ref142.responseIndex,
9186
+ s = _ref142.showAnswer;
9133
9187
  var c = Gs(a, o);
9134
- return s ? (0, t.jsx)(Sl, {
9188
+ return s ? (0, t.jsx)(El, {
9135
9189
  item: n,
9136
9190
  messages: r,
9137
9191
  showAnswer: s
9138
- }) : (0, t.jsx)(yl, {
9192
+ }) : (0, t.jsx)(Cl, {
9139
9193
  answerMarkers: n.answers,
9140
9194
  content: n.content,
9141
9195
  disabled: e,
@@ -9147,28 +9201,28 @@ function Cl(_ref138) {
9147
9201
  selectedMarkers: c.selectedMarkers
9148
9202
  });
9149
9203
  }
9150
- var wl = {
9204
+ var Ol = {
9151
9205
  placeholder: "_placeholder_xde95_1"
9152
9206
  };
9153
- function Tl(_ref139) {
9154
- var e = _ref139.label;
9207
+ function kl(_ref143) {
9208
+ var e = _ref143.label;
9155
9209
  return (0, t.jsx)("div", {
9156
9210
  "aria-label": e,
9157
- className: wl.placeholder,
9211
+ className: Ol.placeholder,
9158
9212
  children: e
9159
9213
  });
9160
9214
  }
9161
- function El(_ref140) {
9162
- var e = _ref140.disabled,
9163
- n = _ref140.locale,
9164
- r = _ref140.label,
9165
- i = _ref140.messages,
9166
- a = _ref140.onChange,
9167
- o = _ref140.response,
9168
- s = _ref140.responseIndex,
9169
- c = _ref140.uploadImage;
9215
+ function Al(_ref144) {
9216
+ var e = _ref144.disabled,
9217
+ n = _ref144.locale,
9218
+ r = _ref144.label,
9219
+ i = _ref144.messages,
9220
+ a = _ref144.onChange,
9221
+ o = _ref144.response,
9222
+ s = _ref144.responseIndex,
9223
+ c = _ref144.uploadImage;
9170
9224
  var l = Ks(o, s);
9171
- return e ? A(l.content) ? (0, t.jsx)(Tl, {
9225
+ return e ? A(l.content) ? (0, t.jsx)(kl, {
9172
9226
  label: i.textResponsePlaceholder
9173
9227
  }) : (0, t.jsx)(G, {
9174
9228
  content: l.content
@@ -9187,7 +9241,7 @@ function El(_ref140) {
9187
9241
  value: l.content
9188
9242
  });
9189
9243
  }
9190
- function Dl(e, n) {
9244
+ function jl(e, n) {
9191
9245
  return e.blanks.reduce(function (r, i) {
9192
9246
  var a;
9193
9247
  var o = (a = e.answers[i]) == null ? void 0 : a.trim();
@@ -9200,22 +9254,22 @@ function Dl(e, n) {
9200
9254
  }]) : r;
9201
9255
  }, []);
9202
9256
  }
9203
- var Ol = {
9257
+ var Ml = {
9204
9258
  "word-builder-blank": "_word-builder-blank_ftw6q_1",
9205
9259
  "word-builder-candidate-list": "_word-builder-candidate-list_ftw6q_30"
9206
9260
  };
9207
- function kl(_ref141) {
9208
- var e = _ref141.disabled,
9209
- n = _ref141.element,
9210
- r = _ref141.item,
9211
- i = _ref141.messages,
9212
- a = _ref141.onChange,
9213
- o = _ref141.response,
9214
- s = _ref141.responseIndex,
9215
- c = _ref141.showAnswer;
9261
+ function Nl(_ref145) {
9262
+ var e = _ref145.disabled,
9263
+ n = _ref145.element,
9264
+ r = _ref145.item,
9265
+ i = _ref145.messages,
9266
+ a = _ref145.onChange,
9267
+ o = _ref145.response,
9268
+ s = _ref145.responseIndex,
9269
+ c = _ref145.showAnswer;
9216
9270
  var l = _n(r, !0, n),
9217
9271
  u = zs(o, s, l.blanks),
9218
- d = Dl(l, i.blankLabel);
9272
+ d = jl(l, i.blankLabel);
9219
9273
  function f(e, t) {
9220
9274
  a(C(C({}, u), {}, {
9221
9275
  answers: C(C({}, u.answers), {}, _defineProperty({}, e, t))
@@ -9246,13 +9300,13 @@ function kl(_ref141) {
9246
9300
  className: U["fill-text"],
9247
9301
  children: [(0, t.jsx)(zc, {
9248
9302
  content: l.content,
9249
- renderBlank: function renderBlank(_ref142) {
9250
- var n = _ref142.blankId,
9251
- r = _ref142.index,
9252
- a = _ref142.label;
9303
+ renderBlank: function renderBlank(_ref146) {
9304
+ var n = _ref146.blankId,
9305
+ r = _ref146.index,
9306
+ a = _ref146.label;
9253
9307
  var o, s;
9254
9308
  var c = (o = u.answers[n]) == null ? "" : o,
9255
- l = Al({
9309
+ l = Pl({
9256
9310
  answers: c,
9257
9311
  blankLabel: i.blankLabel,
9258
9312
  canClear: !e && !!c.trim(),
@@ -9261,7 +9315,7 @@ function kl(_ref141) {
9261
9315
  });
9262
9316
  return (0, t.jsx)("button", {
9263
9317
  "aria-label": l,
9264
- className: Ol["word-builder-blank"],
9318
+ className: Ml["word-builder-blank"],
9265
9319
  disabled: e,
9266
9320
  onClick: function onClick() {
9267
9321
  return p(n);
@@ -9278,7 +9332,7 @@ function kl(_ref141) {
9278
9332
  });
9279
9333
  }
9280
9334
  }), (0, t.jsx)("div", {
9281
- className: Ol["word-builder-candidate-list"],
9335
+ className: Ml["word-builder-candidate-list"],
9282
9336
  children: l.candidateOptions.map(function (n, r) {
9283
9337
  return (0, t.jsx)("button", {
9284
9338
  disabled: e,
@@ -9299,30 +9353,30 @@ function kl(_ref141) {
9299
9353
  }) : null]
9300
9354
  });
9301
9355
  }
9302
- function Al(_ref143) {
9303
- var e = _ref143.answers,
9304
- t = _ref143.blankLabel,
9305
- n = _ref143.canClear,
9306
- r = _ref143.index,
9307
- i = _ref143.label;
9356
+ function Pl(_ref147) {
9357
+ var e = _ref147.answers,
9358
+ t = _ref147.blankLabel,
9359
+ n = _ref147.canClear,
9360
+ r = _ref147.index,
9361
+ i = _ref147.label;
9308
9362
  var a = i || "".concat(t).concat(r + 1);
9309
9363
  return !n || !e.trim() ? a : t === "\u7A7A" ? "".concat(a, "\uFF0C\u70B9\u51FB\u6E05\u7A7A") : "".concat(a, ", click to clear");
9310
9364
  }
9311
- function jl(_ref144) {
9312
- var e = _ref144.disabled,
9313
- n = _ref144.element,
9314
- r = _ref144.item,
9315
- i = _ref144.locale,
9316
- a = _ref144.messages,
9317
- o = _ref144.onResponseItemChange,
9318
- s = _ref144.response,
9319
- c = _ref144.responseIndex,
9320
- l = _ref144.showAnswer,
9321
- u = _ref144.uploadImage;
9365
+ function Fl(_ref148) {
9366
+ var e = _ref148.disabled,
9367
+ n = _ref148.element,
9368
+ r = _ref148.item,
9369
+ i = _ref148.locale,
9370
+ a = _ref148.messages,
9371
+ o = _ref148.onResponseItemChange,
9372
+ s = _ref148.response,
9373
+ c = _ref148.responseIndex,
9374
+ l = _ref148.showAnswer,
9375
+ u = _ref148.uploadImage;
9322
9376
  if (n.type !== r.type) throw Error("\u9898\u76EE\u5143\u7D20\u7ED3\u6784\u4E0D\u5339\u914D\uFF0Cexpected=".concat(n.type, "\uFF0Cactual=").concat(r.type));
9323
9377
  return n.type === "richText" ? (0, t.jsx)(G, {
9324
9378
  content: r.content
9325
- }) : n.type === "textResponse" ? (0, t.jsx)(El, {
9379
+ }) : n.type === "textResponse" ? (0, t.jsx)(Al, {
9326
9380
  disabled: e,
9327
9381
  label: n.name,
9328
9382
  locale: i,
@@ -9331,7 +9385,7 @@ function jl(_ref144) {
9331
9385
  response: s,
9332
9386
  responseIndex: c,
9333
9387
  uploadImage: u
9334
- }) : n.type === "ordering" ? (0, t.jsx)(_l, {
9388
+ }) : n.type === "ordering" ? (0, t.jsx)(xl, {
9335
9389
  disabled: e,
9336
9390
  item: r,
9337
9391
  messages: a,
@@ -9347,7 +9401,7 @@ function jl(_ref144) {
9347
9401
  response: s,
9348
9402
  responseIndex: c,
9349
9403
  showAnswer: l
9350
- }) : n.type === "textMarker" ? (0, t.jsx)(Cl, {
9404
+ }) : n.type === "textMarker" ? (0, t.jsx)(Dl, {
9351
9405
  disabled: e,
9352
9406
  item: r,
9353
9407
  messages: a,
@@ -9355,7 +9409,7 @@ function jl(_ref144) {
9355
9409
  response: s,
9356
9410
  responseIndex: c,
9357
9411
  showAnswer: l
9358
- }) : Ml({
9412
+ }) : Il({
9359
9413
  disabled: e,
9360
9414
  element: n,
9361
9415
  item: r,
@@ -9368,18 +9422,18 @@ function jl(_ref144) {
9368
9422
  uploadImage: u
9369
9423
  });
9370
9424
  }
9371
- function Ml(_ref145) {
9372
- var e = _ref145.disabled,
9373
- n = _ref145.element,
9374
- r = _ref145.item,
9375
- i = _ref145.messages,
9376
- a = _ref145.onResponseItemChange,
9377
- o = _ref145.response,
9378
- s = _ref145.responseIndex,
9379
- c = _ref145.showAnswer;
9425
+ function Il(_ref149) {
9426
+ var e = _ref149.disabled,
9427
+ n = _ref149.element,
9428
+ r = _ref149.item,
9429
+ i = _ref149.messages,
9430
+ a = _ref149.onResponseItemChange,
9431
+ o = _ref149.response,
9432
+ s = _ref149.responseIndex,
9433
+ c = _ref149.showAnswer;
9380
9434
  switch (n.type) {
9381
9435
  case "choice":
9382
- return (0, t.jsx)(hl, {
9436
+ return (0, t.jsx)(yl, {
9383
9437
  disabled: e,
9384
9438
  element: n,
9385
9439
  item: r,
@@ -9411,7 +9465,7 @@ function Ml(_ref145) {
9411
9465
  showAnswer: c
9412
9466
  });
9413
9467
  case "wordBuilder":
9414
- return (0, t.jsx)(kl, {
9468
+ return (0, t.jsx)(Nl, {
9415
9469
  disabled: e,
9416
9470
  element: n,
9417
9471
  item: r,
@@ -9454,14 +9508,14 @@ function Ml(_ref145) {
9454
9508
  });
9455
9509
  }
9456
9510
  }
9457
- var Nl = ["locale"];
9458
- function Pl(e) {
9511
+ var Ll = ["locale"];
9512
+ function Rl(e) {
9459
9513
  var _e$locale = e.locale,
9460
9514
  n = _e$locale === void 0 ? "zh-CN" : _e$locale,
9461
- r = ma(e, Nl),
9515
+ r = ma(e, Ll),
9462
9516
  i = us(r.value, r.questionTypeTemplates),
9463
9517
  a = hs(r.response, i);
9464
- return (0, t.jsx)(Fl, C(C({}, r), {}, {
9518
+ return (0, t.jsx)(zl, C(C({}, r), {}, {
9465
9519
  childIndexPath: [],
9466
9520
  locale: n,
9467
9521
  messages: yc(n),
@@ -9472,24 +9526,24 @@ function Pl(e) {
9472
9526
  value: i
9473
9527
  }));
9474
9528
  }
9475
- function Fl(_ref146) {
9476
- var e = _ref146.childIndexPath,
9477
- n = _ref146.className,
9478
- _ref146$disabled = _ref146.disabled,
9479
- r = _ref146$disabled === void 0 ? !1 : _ref146$disabled,
9480
- _ref146$locale = _ref146.locale,
9481
- i = _ref146$locale === void 0 ? "zh-CN" : _ref146$locale,
9482
- a = _ref146.messages,
9483
- o = _ref146.onResponseChange,
9484
- s = _ref146.response,
9485
- c = _ref146.rootQuestionNumber,
9486
- _ref146$showAnswer = _ref146.showAnswer,
9487
- l = _ref146$showAnswer === void 0 ? !1 : _ref146$showAnswer,
9488
- _ref146$showExtraAttr = _ref146.showExtraAttributes,
9489
- u = _ref146$showExtraAttr === void 0 ? !1 : _ref146$showExtraAttr,
9490
- d = _ref146.questionTypeTemplates,
9491
- f = _ref146.uploadImage,
9492
- p = _ref146.value;
9529
+ function zl(_ref150) {
9530
+ var e = _ref150.childIndexPath,
9531
+ n = _ref150.className,
9532
+ _ref150$disabled = _ref150.disabled,
9533
+ r = _ref150$disabled === void 0 ? !1 : _ref150$disabled,
9534
+ _ref150$locale = _ref150.locale,
9535
+ i = _ref150$locale === void 0 ? "zh-CN" : _ref150$locale,
9536
+ a = _ref150.messages,
9537
+ o = _ref150.onResponseChange,
9538
+ s = _ref150.response,
9539
+ c = _ref150.rootQuestionNumber,
9540
+ _ref150$showAnswer = _ref150.showAnswer,
9541
+ l = _ref150$showAnswer === void 0 ? !1 : _ref150$showAnswer,
9542
+ _ref150$showExtraAttr = _ref150.showExtraAttributes,
9543
+ u = _ref150$showExtraAttr === void 0 ? !1 : _ref150$showExtraAttr,
9544
+ d = _ref150.questionTypeTemplates,
9545
+ f = _ref150.uploadImage,
9546
+ p = _ref150.value;
9493
9547
  var m = Zi(d, p);
9494
9548
  if (!m) return (0, t.jsx)("div", {
9495
9549
  className: H(U.root, n),
@@ -9498,7 +9552,7 @@ function Fl(_ref146) {
9498
9552
  children: a.missingQuestionTypeTemplate
9499
9553
  })
9500
9554
  });
9501
- var h = Il({
9555
+ var h = Bl({
9502
9556
  childIndexPath: e,
9503
9557
  disabled: r,
9504
9558
  locale: i,
@@ -9515,27 +9569,27 @@ function Fl(_ref146) {
9515
9569
  });
9516
9570
  return (0, t.jsx)("div", {
9517
9571
  className: H(U.root, n),
9518
- children: Bl(m, p) ? (0, t.jsx)("div", {
9572
+ children: Wl(m, p) ? (0, t.jsx)("div", {
9519
9573
  className: U.empty,
9520
9574
  children: a.previewEmpty
9521
9575
  }) : h
9522
9576
  });
9523
9577
  }
9524
- function Il(e) {
9578
+ function Bl(e) {
9525
9579
  return (0, t.jsxs)(t.Fragment, {
9526
- children: [Ll(e), zl(e), Rl(e)]
9527
- });
9528
- }
9529
- function Ll(_ref147) {
9530
- var e = _ref147.disabled,
9531
- n = _ref147.locale,
9532
- r = _ref147.messages,
9533
- i = _ref147.onResponseChange,
9534
- a = _ref147.response,
9535
- o = _ref147.showAnswer,
9536
- s = _ref147.structure,
9537
- c = _ref147.uploadImage,
9538
- l = _ref147.value;
9580
+ children: [Vl(e), Ul(e), Hl(e)]
9581
+ });
9582
+ }
9583
+ function Vl(_ref151) {
9584
+ var e = _ref151.disabled,
9585
+ n = _ref151.locale,
9586
+ r = _ref151.messages,
9587
+ i = _ref151.onResponseChange,
9588
+ a = _ref151.response,
9589
+ o = _ref151.showAnswer,
9590
+ s = _ref151.structure,
9591
+ c = _ref151.uploadImage,
9592
+ l = _ref151.value;
9539
9593
  return s.elements.length === 0 ? null : (0, t.jsx)("div", {
9540
9594
  className: U["element-list"],
9541
9595
  children: s.elements.map(function (u, d) {
@@ -9545,7 +9599,7 @@ function Ll(_ref147) {
9545
9599
  }).length;
9546
9600
  return (0, t.jsx)("section", {
9547
9601
  className: U.element,
9548
- children: (0, t.jsx)(jl, {
9602
+ children: (0, t.jsx)(Fl, {
9549
9603
  disabled: e,
9550
9604
  element: u,
9551
9605
  item: f,
@@ -9563,15 +9617,15 @@ function Ll(_ref147) {
9563
9617
  })
9564
9618
  });
9565
9619
  }
9566
- function Rl(_ref148) {
9567
- var e = _ref148.disabled,
9568
- n = _ref148.locale,
9569
- r = _ref148.messages,
9570
- i = _ref148.response,
9571
- a = _ref148.showExtraAttributes,
9572
- o = _ref148.structure,
9573
- s = _ref148.uploadImage,
9574
- c = _ref148.value;
9620
+ function Hl(_ref152) {
9621
+ var e = _ref152.disabled,
9622
+ n = _ref152.locale,
9623
+ r = _ref152.messages,
9624
+ i = _ref152.response,
9625
+ a = _ref152.showExtraAttributes,
9626
+ o = _ref152.structure,
9627
+ s = _ref152.uploadImage,
9628
+ c = _ref152.value;
9575
9629
  return a ? (0, t.jsx)("div", {
9576
9630
  className: U["element-list"],
9577
9631
  children: o.extras.map(function (a, o) {
@@ -9580,10 +9634,10 @@ function Rl(_ref148) {
9580
9634
  className: U.extra,
9581
9635
  children: [(0, t.jsx)(kc, {
9582
9636
  children: a.name
9583
- }), (0, t.jsx)(jl, {
9637
+ }), (0, t.jsx)(Fl, {
9584
9638
  disabled: e,
9585
- element: Vl(a),
9586
- item: Hl(l),
9639
+ element: Gl(a),
9640
+ item: Kl(l),
9587
9641
  locale: n,
9588
9642
  messages: r,
9589
9643
  onResponseItemChange: function onResponseItemChange() {
@@ -9598,19 +9652,19 @@ function Rl(_ref148) {
9598
9652
  })
9599
9653
  }) : null;
9600
9654
  }
9601
- function zl(_ref149) {
9602
- var e = _ref149.childIndexPath,
9603
- n = _ref149.disabled,
9604
- r = _ref149.locale,
9605
- i = _ref149.messages,
9606
- a = _ref149.onResponseChange,
9607
- o = _ref149.response,
9608
- s = _ref149.rootQuestionNumber,
9609
- c = _ref149.showAnswer,
9610
- l = _ref149.showExtraAttributes,
9611
- u = _ref149.questionTypeTemplates,
9612
- d = _ref149.uploadImage,
9613
- f = _ref149.value;
9655
+ function Ul(_ref153) {
9656
+ var e = _ref153.childIndexPath,
9657
+ n = _ref153.disabled,
9658
+ r = _ref153.locale,
9659
+ i = _ref153.messages,
9660
+ a = _ref153.onResponseChange,
9661
+ o = _ref153.response,
9662
+ s = _ref153.rootQuestionNumber,
9663
+ c = _ref153.showAnswer,
9664
+ l = _ref153.showExtraAttributes,
9665
+ u = _ref153.questionTypeTemplates,
9666
+ d = _ref153.uploadImage,
9667
+ f = _ref153.value;
9614
9668
  return f.children.length === 0 ? null : (0, t.jsx)(Ac, {
9615
9669
  childIndexPath: e,
9616
9670
  disabled: n,
@@ -9620,7 +9674,7 @@ function zl(_ref149) {
9620
9674
  },
9621
9675
  response: o,
9622
9676
  renderChild: function renderChild(e, a, o, f) {
9623
- return (0, t.jsx)(Fl, {
9677
+ return (0, t.jsx)(zl, {
9624
9678
  childIndexPath: f,
9625
9679
  disabled: n,
9626
9680
  locale: r,
@@ -9639,31 +9693,31 @@ function zl(_ref149) {
9639
9693
  value: f
9640
9694
  });
9641
9695
  }
9642
- function Bl(e, t) {
9696
+ function Wl(e, t) {
9643
9697
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
9644
9698
  }
9645
- function Vl(e) {
9699
+ function Gl(e) {
9646
9700
  return {
9647
9701
  config: {},
9648
9702
  name: e.name,
9649
9703
  type: "richText"
9650
9704
  };
9651
9705
  }
9652
- function Hl(e) {
9706
+ function Kl(e) {
9653
9707
  return {
9654
9708
  content: e.content,
9655
9709
  type: "richText"
9656
9710
  };
9657
9711
  }
9658
- var Ul = {
9712
+ var ql = {
9659
9713
  "blank-list": "_blank-list_12ccp_1",
9660
9714
  "blank-item": "_blank-item_12ccp_11",
9661
9715
  "blank-field": "_blank-field_12ccp_17"
9662
9716
  };
9663
- function Wl(_ref150) {
9664
- var e = _ref150.item,
9665
- n = _ref150.messages,
9666
- r = _ref150.showAnswer;
9717
+ function Jl(_ref154) {
9718
+ var e = _ref154.item,
9719
+ n = _ref154.messages,
9720
+ r = _ref154.showAnswer;
9667
9721
  var i = k(e.answers, e.blanks).map(function (r, i) {
9668
9722
  return {
9669
9723
  kind: "detailed",
@@ -9678,15 +9732,15 @@ function Wl(_ref150) {
9678
9732
  return (0, t.jsxs)("div", {
9679
9733
  className: W.element,
9680
9734
  children: [(0, t.jsx)("ol", {
9681
- className: Ul["blank-list"],
9735
+ className: ql["blank-list"],
9682
9736
  children: e.blanks.map(function (e, r) {
9683
9737
  return (0, t.jsx)("li", {
9684
- className: Ul["blank-item"],
9738
+ className: ql["blank-item"],
9685
9739
  children: (0, t.jsxs)("span", {
9686
- className: Ul["blank-field"],
9740
+ className: ql["blank-field"],
9687
9741
  children: [n.blankLabel, " ", r + 1]
9688
9742
  })
9689
- }, Gl(e, r));
9743
+ }, Yl(e, r));
9690
9744
  })
9691
9745
  }), r ? (0, t.jsx)(K, {
9692
9746
  groups: i,
@@ -9694,13 +9748,13 @@ function Wl(_ref150) {
9694
9748
  }) : null]
9695
9749
  });
9696
9750
  }
9697
- function Gl(e, t) {
9751
+ function Yl(e, t) {
9698
9752
  return e || "blank-".concat(t + 1);
9699
9753
  }
9700
- function Kl(_ref151) {
9701
- var e = _ref151.item,
9702
- n = _ref151.messages,
9703
- r = _ref151.showAnswer;
9754
+ function Xl(_ref155) {
9755
+ var e = _ref155.item,
9756
+ n = _ref155.messages,
9757
+ r = _ref155.showAnswer;
9704
9758
  return (0, t.jsxs)("div", {
9705
9759
  className: W.element,
9706
9760
  children: [(0, t.jsxs)("div", {
@@ -9738,11 +9792,11 @@ function Kl(_ref151) {
9738
9792
  }) : null]
9739
9793
  });
9740
9794
  }
9741
- function ql(_ref152) {
9742
- var e = _ref152.element,
9743
- n = _ref152.item,
9744
- r = _ref152.messages,
9745
- i = _ref152.showAnswer;
9795
+ function Zl(_ref156) {
9796
+ var e = _ref156.element,
9797
+ n = _ref156.item,
9798
+ r = _ref156.messages,
9799
+ i = _ref156.showAnswer;
9746
9800
  var a = vn(n, e, !0),
9747
9801
  o = Ec(a).map(function (e, n) {
9748
9802
  return {
@@ -9759,13 +9813,13 @@ function ql(_ref152) {
9759
9813
  className: W.element,
9760
9814
  children: [(0, t.jsx)(G, {
9761
9815
  content: a.content
9762
- }), Jl(a, r.candidateOptions), i ? (0, t.jsx)(K, {
9816
+ }), Ql(a, r.candidateOptions), i ? (0, t.jsx)(K, {
9763
9817
  groups: o,
9764
9818
  title: r.standardAnswer
9765
9819
  }) : null]
9766
9820
  });
9767
9821
  }
9768
- function Jl(e, n) {
9822
+ function Ql(e, n) {
9769
9823
  var r, i;
9770
9824
  var a = (r = e.candidateOptions) == null ? [] : r,
9771
9825
  o = (i = e.blankOptionGroups) == null ? [] : i;
@@ -9796,11 +9850,11 @@ function Jl(e, n) {
9796
9850
  })]
9797
9851
  });
9798
9852
  }
9799
- function Yl(_ref153) {
9800
- var e = _ref153.element,
9801
- n = _ref153.item,
9802
- r = _ref153.messages,
9803
- i = _ref153.showAnswer;
9853
+ function $l(_ref157) {
9854
+ var e = _ref157.element,
9855
+ n = _ref157.item,
9856
+ r = _ref157.messages,
9857
+ i = _ref157.showAnswer;
9804
9858
  var a = tn(e.config.judgeAnswerMode),
9805
9859
  o = [{
9806
9860
  kind: "detailed",
@@ -9811,9 +9865,9 @@ function Yl(_ref153) {
9811
9865
  className: W.element,
9812
9866
  children: [(0, t.jsx)("ol", {
9813
9867
  className: W["judgement-list"],
9814
- children: a.map(function (_ref154) {
9815
- var e = _ref154.label,
9816
- n = _ref154.value;
9868
+ children: a.map(function (_ref158) {
9869
+ var e = _ref158.label,
9870
+ n = _ref158.value;
9817
9871
  return (0, t.jsx)("li", {
9818
9872
  className: W["judgement-item"],
9819
9873
  children: e
@@ -9825,10 +9879,10 @@ function Yl(_ref153) {
9825
9879
  }) : null]
9826
9880
  });
9827
9881
  }
9828
- function Xl(_ref155) {
9829
- var e = _ref155.item,
9830
- n = _ref155.messages,
9831
- r = _ref155.showAnswer;
9882
+ function eu(_ref159) {
9883
+ var e = _ref159.item,
9884
+ n = _ref159.messages,
9885
+ r = _ref159.showAnswer;
9832
9886
  var i = {
9833
9887
  gridTemplateColumns: "repeat(".concat(e.columns.length, ", minmax(12rem, 1fr))")
9834
9888
  };
@@ -9866,32 +9920,32 @@ function Xl(_ref155) {
9866
9920
  }) : null]
9867
9921
  });
9868
9922
  }
9869
- var Zl = {
9923
+ var tu = {
9870
9924
  board: "_board_5xarh_1",
9871
9925
  columns: "_columns_5xarh_6",
9872
9926
  column: "_column_5xarh_6",
9873
9927
  item: "_item_5xarh_18",
9874
9928
  marker: "_marker_5xarh_42"
9875
9929
  };
9876
- function Ql(_ref156) {
9877
- var e = _ref156.item,
9878
- n = _ref156.messages,
9879
- r = _ref156.showAnswer;
9930
+ function nu(_ref160) {
9931
+ var e = _ref160.item,
9932
+ n = _ref160.messages,
9933
+ r = _ref160.showAnswer;
9880
9934
  return (0, t.jsxs)("div", {
9881
9935
  className: W.element,
9882
9936
  children: [(0, t.jsx)("div", {
9883
- className: Zl.board,
9937
+ className: tu.board,
9884
9938
  children: (0, t.jsx)("div", {
9885
- className: Zl.columns,
9939
+ className: tu.columns,
9886
9940
  children: e.columns.map(function (e) {
9887
9941
  return (0, t.jsx)("section", {
9888
- className: Zl.column,
9942
+ className: tu.column,
9889
9943
  children: e.items.map(function (n, r) {
9890
9944
  var i = $t(e.labelStyle, r);
9891
9945
  return (0, t.jsxs)("div", {
9892
- className: Zl.item,
9946
+ className: tu.item,
9893
9947
  children: [i ? (0, t.jsx)("span", {
9894
- className: Zl.marker,
9948
+ className: tu.marker,
9895
9949
  children: i
9896
9950
  }) : null, (0, t.jsx)(G, {
9897
9951
  content: n.content
@@ -9907,23 +9961,23 @@ function Ql(_ref156) {
9907
9961
  }) : null]
9908
9962
  });
9909
9963
  }
9910
- function $l(_ref157) {
9911
- var e = _ref157.element,
9912
- n = _ref157.item,
9913
- r = _ref157.messages,
9914
- i = _ref157.showAnswer;
9964
+ function ru(_ref161) {
9965
+ var e = _ref161.element,
9966
+ n = _ref161.item,
9967
+ r = _ref161.messages,
9968
+ i = _ref161.showAnswer;
9915
9969
  var a = rn(n, e.config.optionLabelStyle);
9916
9970
  if (e.config.renderer === "table") {
9917
9971
  var _o3 = pl(e, n);
9918
9972
  return (0, t.jsxs)("div", {
9919
9973
  className: W.element,
9920
9974
  children: [(0, t.jsx)("div", {
9921
- className: ml["table-wrap"],
9975
+ className: vl["table-wrap"],
9922
9976
  children: (0, t.jsxs)("table", {
9923
- className: ml.table,
9977
+ className: vl.table,
9924
9978
  children: [(0, t.jsxs)("colgroup", {
9925
9979
  children: [(0, t.jsx)("col", {
9926
- className: ml["table-option-column"]
9980
+ className: vl["table-option-column"]
9927
9981
  }), n.columns.map(function (e) {
9928
9982
  return (0, t.jsx)("col", {}, e.id);
9929
9983
  })]
@@ -9944,7 +9998,7 @@ function $l(_ref157) {
9944
9998
  return (0, t.jsxs)("tr", {
9945
9999
  children: [(0, t.jsx)("td", {
9946
10000
  children: (0, t.jsx)("span", {
9947
- className: ml["table-option-marker"],
10001
+ className: vl["table-option-marker"],
9948
10002
  children: e.marker
9949
10003
  })
9950
10004
  }), e.cells.map(function (n, r) {
@@ -9967,8 +10021,7 @@ function $l(_ref157) {
9967
10021
  var o = pl(e, n);
9968
10022
  return (0, t.jsxs)("div", {
9969
10023
  className: W.element,
9970
- children: [(0, t.jsx)("ol", {
9971
- className: W["option-list"],
10024
+ children: [(0, t.jsx)(gl, {
9972
10025
  children: a.map(function (e) {
9973
10026
  return (0, t.jsxs)("li", {
9974
10027
  className: W["option-item"],
@@ -9986,10 +10039,10 @@ function $l(_ref157) {
9986
10039
  }) : null]
9987
10040
  });
9988
10041
  }
9989
- function eu(_ref158) {
9990
- var e = _ref158.item,
9991
- n = _ref158.messages,
9992
- r = _ref158.showAnswer;
10042
+ function iu(_ref162) {
10043
+ var e = _ref162.item,
10044
+ n = _ref162.messages,
10045
+ r = _ref162.showAnswer;
9993
10046
  return (0, t.jsxs)("div", {
9994
10047
  className: W.element,
9995
10048
  children: [(0, t.jsx)("ol", {
@@ -10006,26 +10059,26 @@ function eu(_ref158) {
10006
10059
  }, e.id);
10007
10060
  })
10008
10061
  }), r ? (0, t.jsx)(K, {
10009
- groups: gl(e),
10062
+ groups: bl(e),
10010
10063
  title: n.standardAnswer
10011
10064
  }) : null]
10012
10065
  });
10013
10066
  }
10014
- function tu(_ref159) {
10015
- var e = _ref159.element,
10016
- n = _ref159.item,
10017
- r = _ref159.messages,
10018
- i = _ref159.showAnswer;
10067
+ function au(_ref163) {
10068
+ var e = _ref163.element,
10069
+ n = _ref163.item,
10070
+ r = _ref163.messages,
10071
+ i = _ref163.showAnswer;
10019
10072
  var a = _n(n, !0, e),
10020
- o = Dl(a, r.blankLabel);
10073
+ o = jl(a, r.blankLabel);
10021
10074
  return (0, t.jsxs)("div", {
10022
10075
  className: W.element,
10023
10076
  children: [(0, t.jsx)(zc, {
10024
10077
  content: a.content,
10025
- renderBlank: function renderBlank(_ref160) {
10026
- var e = _ref160.blankId,
10027
- n = _ref160.index,
10028
- i = _ref160.label;
10078
+ renderBlank: function renderBlank(_ref164) {
10079
+ var e = _ref164.blankId,
10080
+ n = _ref164.index,
10081
+ i = _ref164.label;
10029
10082
  return (0, t.jsx)("span", {
10030
10083
  "aria-label": i || "".concat(r.blankLabel).concat(n + 1),
10031
10084
  className: W["word-builder-blank"],
@@ -10052,81 +10105,81 @@ function tu(_ref159) {
10052
10105
  }) : null]
10053
10106
  });
10054
10107
  }
10055
- function nu(_ref161) {
10056
- var e = _ref161.element,
10057
- n = _ref161.item,
10058
- r = _ref161.messages,
10059
- i = _ref161.showAnswer;
10108
+ function ou(_ref165) {
10109
+ var e = _ref165.element,
10110
+ n = _ref165.item,
10111
+ r = _ref165.messages,
10112
+ i = _ref165.showAnswer;
10060
10113
  if (e.type !== n.type) throw Error("\u9898\u76EE\u5143\u7D20\u7ED3\u6784\u4E0D\u5339\u914D\uFF0Cexpected=".concat(e.type, "\uFF0Cactual=").concat(n.type));
10061
10114
  return e.type === "richText" ? (0, t.jsx)(G, {
10062
10115
  content: n.content
10063
- }) : e.type === "textResponse" ? null : e.type === "ordering" ? (0, t.jsx)(eu, {
10116
+ }) : e.type === "textResponse" ? null : e.type === "ordering" ? (0, t.jsx)(iu, {
10064
10117
  item: n,
10065
10118
  messages: r,
10066
10119
  showAnswer: i
10067
- }) : e.type === "classification" ? (0, t.jsx)(Kl, {
10120
+ }) : e.type === "classification" ? (0, t.jsx)(Xl, {
10068
10121
  item: n,
10069
10122
  messages: r,
10070
10123
  showAnswer: i
10071
- }) : e.type === "textMarker" ? (0, t.jsx)(Sl, {
10124
+ }) : e.type === "textMarker" ? (0, t.jsx)(El, {
10072
10125
  item: n,
10073
10126
  messages: r,
10074
10127
  showAnswer: i
10075
- }) : ru({
10128
+ }) : su({
10076
10129
  element: e,
10077
10130
  item: n,
10078
10131
  messages: r,
10079
10132
  showAnswer: i
10080
10133
  });
10081
10134
  }
10082
- function ru(_ref162) {
10083
- var e = _ref162.element,
10084
- n = _ref162.item,
10085
- r = _ref162.messages,
10086
- i = _ref162.showAnswer;
10135
+ function su(_ref166) {
10136
+ var e = _ref166.element,
10137
+ n = _ref166.item,
10138
+ r = _ref166.messages,
10139
+ i = _ref166.showAnswer;
10087
10140
  switch (e.type) {
10088
10141
  case "choice":
10089
- return (0, t.jsx)($l, {
10142
+ return (0, t.jsx)(ru, {
10090
10143
  element: e,
10091
10144
  item: n,
10092
10145
  messages: r,
10093
10146
  showAnswer: i
10094
10147
  });
10095
10148
  case "fill":
10096
- return (0, t.jsx)(Wl, {
10149
+ return (0, t.jsx)(Jl, {
10097
10150
  item: n,
10098
10151
  messages: r,
10099
10152
  showAnswer: i
10100
10153
  });
10101
10154
  case "inlineFill":
10102
- return (0, t.jsx)(ql, {
10155
+ return (0, t.jsx)(Zl, {
10103
10156
  element: e,
10104
10157
  item: n,
10105
10158
  messages: r,
10106
10159
  showAnswer: i
10107
10160
  });
10108
10161
  case "wordBuilder":
10109
- return (0, t.jsx)(tu, {
10162
+ return (0, t.jsx)(au, {
10110
10163
  element: e,
10111
10164
  item: n,
10112
10165
  messages: r,
10113
10166
  showAnswer: i
10114
10167
  });
10115
10168
  case "judgement":
10116
- return (0, t.jsx)(Yl, {
10169
+ return (0, t.jsx)($l, {
10117
10170
  element: e,
10118
10171
  item: n,
10119
10172
  messages: r,
10120
10173
  showAnswer: i
10121
10174
  });
10122
10175
  case "lineConnect":
10123
- return (0, t.jsx)(Xl, {
10176
+ return (0, t.jsx)(eu, {
10124
10177
  item: n,
10125
10178
  messages: r,
10126
10179
  showAnswer: i
10127
10180
  });
10128
10181
  case "matching":
10129
- return (0, t.jsx)(Ql, {
10182
+ return (0, t.jsx)(nu, {
10130
10183
  item: n,
10131
10184
  messages: r,
10132
10185
  showAnswer: i
@@ -10142,13 +10195,13 @@ var X = {
10142
10195
  extra: "_extra_1jseb_41",
10143
10196
  child: "_child_1jseb_31"
10144
10197
  };
10145
- function iu(_ref163) {
10146
- var _ref163$childIndexPat = _ref163.childIndexPath,
10147
- e = _ref163$childIndexPat === void 0 ? [] : _ref163$childIndexPat,
10148
- n = _ref163.messages,
10149
- r = _ref163.renderChild,
10150
- i = _ref163.rootQuestionNumber,
10151
- a = _ref163.value;
10198
+ function cu(_ref167) {
10199
+ var _ref167$childIndexPat = _ref167.childIndexPath,
10200
+ e = _ref167$childIndexPat === void 0 ? [] : _ref167$childIndexPat,
10201
+ n = _ref167.messages,
10202
+ r = _ref167.renderChild,
10203
+ i = _ref167.rootQuestionNumber,
10204
+ a = _ref167.value;
10152
10205
  return a.children.length === 0 ? (0, t.jsx)("div", {
10153
10206
  className: X.empty,
10154
10207
  children: n.previewEmpty
@@ -10168,29 +10221,29 @@ function iu(_ref163) {
10168
10221
  })
10169
10222
  });
10170
10223
  }
10171
- var au = ["locale"];
10172
- function ou(e) {
10224
+ var lu = ["locale"];
10225
+ function uu(e) {
10173
10226
  var _e$locale2 = e.locale,
10174
10227
  n = _e$locale2 === void 0 ? "zh-CN" : _e$locale2,
10175
- r = ma(e, au),
10228
+ r = ma(e, lu),
10176
10229
  i = us(r.value, r.questionTypeTemplates);
10177
- return (0, t.jsx)(su, C(C({}, r), {}, {
10230
+ return (0, t.jsx)(du, C(C({}, r), {}, {
10178
10231
  childIndexPath: [],
10179
10232
  messages: yc(n),
10180
10233
  value: i
10181
10234
  }));
10182
10235
  }
10183
- function su(_ref164) {
10184
- var e = _ref164.childIndexPath,
10185
- n = _ref164.className,
10186
- r = _ref164.messages,
10187
- i = _ref164.rootQuestionNumber,
10188
- _ref164$showAnswer = _ref164.showAnswer,
10189
- a = _ref164$showAnswer === void 0 ? !1 : _ref164$showAnswer,
10190
- _ref164$showExtraAttr = _ref164.showExtraAttributes,
10191
- o = _ref164$showExtraAttr === void 0 ? !1 : _ref164$showExtraAttr,
10192
- s = _ref164.questionTypeTemplates,
10193
- c = _ref164.value;
10236
+ function du(_ref168) {
10237
+ var e = _ref168.childIndexPath,
10238
+ n = _ref168.className,
10239
+ r = _ref168.messages,
10240
+ i = _ref168.rootQuestionNumber,
10241
+ _ref168$showAnswer = _ref168.showAnswer,
10242
+ a = _ref168$showAnswer === void 0 ? !1 : _ref168$showAnswer,
10243
+ _ref168$showExtraAttr = _ref168.showExtraAttributes,
10244
+ o = _ref168$showExtraAttr === void 0 ? !1 : _ref168$showExtraAttr,
10245
+ s = _ref168.questionTypeTemplates,
10246
+ c = _ref168.value;
10194
10247
  var l = Zi(s, c);
10195
10248
  if (!l) return (0, t.jsx)("div", {
10196
10249
  className: H(X.root, n),
@@ -10205,7 +10258,7 @@ function su(_ref164) {
10205
10258
  var i = Yt(c, n, e);
10206
10259
  return (0, t.jsx)("section", {
10207
10260
  className: X.element,
10208
- children: (0, t.jsx)(nu, {
10261
+ children: (0, t.jsx)(ou, {
10209
10262
  element: e,
10210
10263
  item: i,
10211
10264
  messages: r,
@@ -10222,9 +10275,9 @@ function su(_ref164) {
10222
10275
  className: X.extra,
10223
10276
  children: [(0, t.jsx)(kc, {
10224
10277
  children: e.name
10225
- }), (0, t.jsx)(nu, {
10226
- element: lu(e),
10227
- item: uu(i),
10278
+ }), (0, t.jsx)(ou, {
10279
+ element: pu(e),
10280
+ item: mu(i),
10228
10281
  messages: r,
10229
10282
  showAnswer: !1
10230
10283
  })]
@@ -10232,11 +10285,11 @@ function su(_ref164) {
10232
10285
  })
10233
10286
  }) : null,
10234
10287
  f = (0, t.jsxs)(t.Fragment, {
10235
- children: [u, c.children.length === 0 ? null : (0, t.jsx)(iu, {
10288
+ children: [u, c.children.length === 0 ? null : (0, t.jsx)(cu, {
10236
10289
  childIndexPath: e,
10237
10290
  messages: r,
10238
10291
  renderChild: function renderChild(e, n) {
10239
- return (0, t.jsx)(su, {
10292
+ return (0, t.jsx)(du, {
10240
10293
  childIndexPath: n,
10241
10294
  messages: r,
10242
10295
  rootQuestionNumber: i,
@@ -10252,29 +10305,29 @@ function su(_ref164) {
10252
10305
  });
10253
10306
  return (0, t.jsx)("div", {
10254
10307
  className: H(X.root, n),
10255
- children: cu(l, c) ? (0, t.jsx)("div", {
10308
+ children: fu(l, c) ? (0, t.jsx)("div", {
10256
10309
  className: X.empty,
10257
10310
  children: r.previewEmpty
10258
10311
  }) : f
10259
10312
  });
10260
10313
  }
10261
- function cu(e, t) {
10314
+ function fu(e, t) {
10262
10315
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
10263
10316
  }
10264
- function lu(e) {
10317
+ function pu(e) {
10265
10318
  return {
10266
10319
  config: {},
10267
10320
  name: e.name,
10268
10321
  type: "richText"
10269
10322
  };
10270
10323
  }
10271
- function uu(e) {
10324
+ function mu(e) {
10272
10325
  return {
10273
10326
  content: e.content,
10274
10327
  type: "richText"
10275
10328
  };
10276
10329
  }
10277
- var du = {
10330
+ var hu = {
10278
10331
  root: "_root_17bqr_1",
10279
10332
  toolbar: "_toolbar_17bqr_26",
10280
10333
  "toolbar-title": "_toolbar-title_17bqr_36",
@@ -10329,7 +10382,7 @@ var du = {
10329
10382
  "palette-section-title": "_palette-section-title_vhj2r_62",
10330
10383
  "palette-button": "_palette-button_vhj2r_70"
10331
10384
  },
10332
- fu = {
10385
+ gu = {
10333
10386
  "en-US": {
10334
10387
  addElement: "Add element",
10335
10388
  addExtra: "Add extra attribute",
@@ -10463,26 +10516,26 @@ var du = {
10463
10516
  wordBuilderLabel: "\u7EC4\u8BCD\u62FC\u5199"
10464
10517
  }
10465
10518
  };
10466
- function pu(e, t) {
10519
+ function _u(e, t) {
10467
10520
  var n;
10468
10521
  return (n = e.extraDescriptions.get(t)) == null ? t : n;
10469
10522
  }
10470
- function mu(e, t) {
10523
+ function vu(e, t) {
10471
10524
  var n;
10472
10525
  return (n = e.extraLabels.get(t)) == null ? t : n;
10473
10526
  }
10474
- function hu(e) {
10527
+ function yu(e) {
10475
10528
  switch (e) {
10476
10529
  case "en-US":
10477
- return fu["en-US"];
10530
+ return gu["en-US"];
10478
10531
  case "zh-CN":
10479
- return fu["zh-CN"];
10532
+ return gu["zh-CN"];
10480
10533
  }
10481
10534
  }
10482
- function gu(e, t) {
10483
- return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : yu(e, t);
10535
+ function bu(e, t) {
10536
+ return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : Cu(e, t);
10484
10537
  }
10485
- var _u = {
10538
+ var xu = {
10486
10539
  choice: function choice(e) {
10487
10540
  return e.optionGroupDescription;
10488
10541
  },
@@ -10514,7 +10567,7 @@ var _u = {
10514
10567
  return e.wordBuilderDescription;
10515
10568
  }
10516
10569
  },
10517
- vu = {
10570
+ Su = {
10518
10571
  choice: function choice(e) {
10519
10572
  return e.optionGroupLabel;
10520
10573
  },
@@ -10546,40 +10599,40 @@ var _u = {
10546
10599
  return e.wordBuilderLabel;
10547
10600
  }
10548
10601
  };
10549
- function yu(e, t) {
10550
- return _u[t](e);
10602
+ function Cu(e, t) {
10603
+ return xu[t](e);
10551
10604
  }
10552
- function bu(e, t) {
10553
- return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : xu(e, t);
10605
+ function wu(e, t) {
10606
+ return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Tu(e, t);
10554
10607
  }
10555
- function xu(e, t) {
10556
- return vu[t](e);
10608
+ function Tu(e, t) {
10609
+ return Su[t](e);
10557
10610
  }
10558
- function Su(e, t) {
10611
+ function Eu(e, t) {
10559
10612
  var n;
10560
10613
  return (n = e.optionValueLabels.get(t)) == null ? t : n;
10561
10614
  }
10562
- function Cu(e, t) {
10615
+ function Du(e, t) {
10563
10616
  var n;
10564
10617
  return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
10565
10618
  }
10566
- function wu(e, t) {
10619
+ function Ou(e, t) {
10567
10620
  var n;
10568
10621
  return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
10569
10622
  }
10570
- function Tu(_ref165) {
10571
- var e = _ref165.elements,
10572
- r = _ref165.extras,
10573
- i = _ref165.labels,
10574
- a = _ref165.onDeleteElement,
10575
- o = _ref165.onDeleteExtra,
10576
- s = _ref165.onMoveElement,
10577
- c = _ref165.onSelectElement,
10578
- l = _ref165.selectedElementClientId;
10579
- var _ref166 = (0, n.useState)(null),
10580
- _ref167 = _slicedToArray(_ref166, 2),
10581
- u = _ref167[0],
10582
- d = _ref167[1];
10623
+ function ku(_ref169) {
10624
+ var e = _ref169.elements,
10625
+ r = _ref169.extras,
10626
+ i = _ref169.labels,
10627
+ a = _ref169.onDeleteElement,
10628
+ o = _ref169.onDeleteExtra,
10629
+ s = _ref169.onMoveElement,
10630
+ c = _ref169.onSelectElement,
10631
+ l = _ref169.selectedElementClientId;
10632
+ var _ref170 = (0, n.useState)(null),
10633
+ _ref171 = _slicedToArray(_ref170, 2),
10634
+ u = _ref171[0],
10635
+ d = _ref171[1];
10583
10636
  return (0, t.jsxs)("section", {
10584
10637
  className: Q.panel,
10585
10638
  children: [(0, t.jsxs)("div", {
@@ -10598,7 +10651,7 @@ function Tu(_ref165) {
10598
10651
  className: Z["element-list"],
10599
10652
  children: [e.map(function (n, r) {
10600
10653
  var o = n.clientId === l,
10601
- f = bu(i, n.type);
10654
+ f = wu(i, n.type);
10602
10655
  return (0, t.jsxs)("div", {
10603
10656
  className: "".concat(Z["element-card"], " ").concat(o ? Z.active : ""),
10604
10657
  onClick: function onClick() {
@@ -10667,7 +10720,7 @@ function Tu(_ref165) {
10667
10720
  children: i.extraTitle
10668
10721
  }) : null, r.map(function (n, r) {
10669
10722
  var a = n.clientId === l,
10670
- s = mu(i, n.type);
10723
+ s = vu(i, n.type);
10671
10724
  return (0, t.jsxs)("div", {
10672
10725
  className: "".concat(Z["element-card"], " ").concat(a ? Z.active : ""),
10673
10726
  onClick: function onClick() {
@@ -10719,11 +10772,11 @@ function Tu(_ref165) {
10719
10772
  })]
10720
10773
  });
10721
10774
  }
10722
- function Eu(_ref168) {
10723
- var e = _ref168.addedExtraTypes,
10724
- n = _ref168.labels,
10725
- r = _ref168.onAddElement,
10726
- i = _ref168.onAddExtra;
10775
+ function Au(_ref172) {
10776
+ var e = _ref172.addedExtraTypes,
10777
+ n = _ref172.labels,
10778
+ r = _ref172.onAddElement,
10779
+ i = _ref172.onAddExtra;
10727
10780
  var a = new Set(e);
10728
10781
  return (0, t.jsxs)("aside", {
10729
10782
  className: Q.panel,
@@ -10737,16 +10790,16 @@ function Eu(_ref168) {
10737
10790
  className: Q.palette,
10738
10791
  children: ee.map(function (e) {
10739
10792
  return (0, t.jsxs)("button", {
10740
- "aria-label": "".concat(n.addElement, ": ").concat(bu(n, e)),
10793
+ "aria-label": "".concat(n.addElement, ": ").concat(wu(n, e)),
10741
10794
  className: Q["palette-button"],
10742
10795
  onClick: function onClick() {
10743
10796
  return r(e);
10744
10797
  },
10745
10798
  type: "button",
10746
10799
  children: [(0, t.jsx)("strong", {
10747
- children: bu(n, e)
10800
+ children: wu(n, e)
10748
10801
  }), (0, t.jsx)("small", {
10749
- children: gu(n, e)
10802
+ children: bu(n, e)
10750
10803
  })]
10751
10804
  }, e);
10752
10805
  })
@@ -10757,10 +10810,10 @@ function Eu(_ref168) {
10757
10810
  children: n.extraTitle
10758
10811
  }), (0, t.jsx)("div", {
10759
10812
  className: Q.palette,
10760
- children: te.map(function (e) {
10813
+ children: w.map(function (e) {
10761
10814
  var r = a.has(e);
10762
10815
  return (0, t.jsxs)("button", {
10763
- "aria-label": "".concat(n.addExtra, ": ").concat(mu(n, e)),
10816
+ "aria-label": "".concat(n.addExtra, ": ").concat(vu(n, e)),
10764
10817
  className: Q["palette-button"],
10765
10818
  disabled: r,
10766
10819
  onClick: function onClick() {
@@ -10768,9 +10821,9 @@ function Eu(_ref168) {
10768
10821
  },
10769
10822
  type: "button",
10770
10823
  children: [(0, t.jsx)("strong", {
10771
- children: mu(n, e)
10824
+ children: vu(n, e)
10772
10825
  }), (0, t.jsx)("small", {
10773
- children: pu(n, e)
10826
+ children: _u(n, e)
10774
10827
  })]
10775
10828
  }, e);
10776
10829
  })
@@ -10788,26 +10841,26 @@ var $ = {
10788
10841
  textarea: "_textarea_tgswd_28",
10789
10842
  empty: "_empty_tgswd_61"
10790
10843
  },
10791
- Du = ["none", "sharedPool", "perBlankOptions"],
10792
- Ou = ["upperAlpha", "lowerAlpha", "number"],
10793
- ku = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"],
10794
- Au = [2, 3, 4, 5],
10795
- ju = ["standard", "table"],
10796
- Mu = ["single", "multiple"],
10797
- Nu = ["spelling", "sentence"],
10798
- Pu = ["correctWrong", "yesNo", "validInvalid", "tf", "rightWrong", "checkCross"];
10799
- function Fu(_ref169) {
10800
- var e = _ref169.description,
10801
- n = _ref169.globalConfig,
10802
- r = _ref169.isSubjective,
10803
- i = _ref169.labels,
10804
- a = _ref169.onElementChange,
10805
- o = _ref169.onExtraChange,
10806
- s = _ref169.onGlobalConfigChange,
10807
- c = _ref169.onMetadataChange,
10808
- l = _ref169.selectedExtra,
10809
- u = _ref169.selectedElement;
10810
- var d = Iu({
10844
+ ju = ["none", "sharedPool", "perBlankOptions"],
10845
+ Mu = ["upperAlpha", "lowerAlpha", "number"],
10846
+ Nu = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"],
10847
+ Pu = [2, 3, 4, 5],
10848
+ Fu = ["standard", "table"],
10849
+ Iu = ["single", "multiple"],
10850
+ Lu = ["spelling", "sentence"],
10851
+ Ru = ["correctWrong", "yesNo", "validInvalid", "tf", "rightWrong", "checkCross"];
10852
+ function zu(_ref173) {
10853
+ var e = _ref173.description,
10854
+ n = _ref173.globalConfig,
10855
+ r = _ref173.isSubjective,
10856
+ i = _ref173.labels,
10857
+ a = _ref173.onElementChange,
10858
+ o = _ref173.onExtraChange,
10859
+ s = _ref173.onGlobalConfigChange,
10860
+ c = _ref173.onMetadataChange,
10861
+ l = _ref173.selectedExtra,
10862
+ u = _ref173.selectedElement;
10863
+ var d = Bu({
10811
10864
  labels: i,
10812
10865
  onElementChange: a,
10813
10866
  onExtraChange: o,
@@ -10918,12 +10971,12 @@ function Fu(_ref169) {
10918
10971
  })]
10919
10972
  });
10920
10973
  }
10921
- function Iu(_ref170) {
10922
- var e = _ref170.labels,
10923
- n = _ref170.onElementChange,
10924
- r = _ref170.onExtraChange,
10925
- i = _ref170.selectedElement,
10926
- a = _ref170.selectedExtra;
10974
+ function Bu(_ref174) {
10975
+ var e = _ref174.labels,
10976
+ n = _ref174.onElementChange,
10977
+ r = _ref174.onExtraChange,
10978
+ i = _ref174.selectedElement,
10979
+ a = _ref174.selectedExtra;
10927
10980
  return i ? (0, t.jsxs)("div", {
10928
10981
  className: $["form-stack"],
10929
10982
  children: [(0, t.jsxs)("label", {
@@ -10952,7 +11005,7 @@ function Iu(_ref170) {
10952
11005
  },
10953
11006
  value: i.enName
10954
11007
  })]
10955
- }), Lu(i, e, n)]
11008
+ }), Vu(i, e, n)]
10956
11009
  }) : a ? (0, t.jsxs)("div", {
10957
11010
  className: $["form-stack"],
10958
11011
  children: [(0, t.jsxs)("label", {
@@ -10987,10 +11040,10 @@ function Iu(_ref170) {
10987
11040
  children: e.noElement
10988
11041
  });
10989
11042
  }
10990
- function Lu(e, t, n) {
10991
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Ru(e, t, n);
11043
+ function Vu(e, t, n) {
11044
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Hu(e, t, n);
10992
11045
  }
10993
- function Ru(e, n, r) {
11046
+ function Hu(e, n, r) {
10994
11047
  switch (e.type) {
10995
11048
  case "inlineFill":
10996
11049
  return (0, t.jsxs)(t.Fragment, {
@@ -11008,10 +11061,10 @@ function Ru(e, n, r) {
11008
11061
  }));
11009
11062
  },
11010
11063
  value: e.config.candidateMode,
11011
- children: Du.map(function (e) {
11064
+ children: ju.map(function (e) {
11012
11065
  return (0, t.jsx)("option", {
11013
11066
  value: e,
11014
- children: Cu(n, e)
11067
+ children: Du(n, e)
11015
11068
  }, e);
11016
11069
  })
11017
11070
  })]
@@ -11047,10 +11100,10 @@ function Ru(e, n, r) {
11047
11100
  }));
11048
11101
  },
11049
11102
  value: e.config.builderMode,
11050
- children: Nu.map(function (e) {
11103
+ children: Lu.map(function (e) {
11051
11104
  return (0, t.jsx)("option", {
11052
11105
  value: e,
11053
- children: Su(n, e)
11106
+ children: Eu(n, e)
11054
11107
  }, e);
11055
11108
  })
11056
11109
  })]
@@ -11070,23 +11123,23 @@ function Ru(e, n, r) {
11070
11123
  }));
11071
11124
  },
11072
11125
  value: e.config.judgeAnswerMode,
11073
- children: Pu.map(function (e) {
11126
+ children: Ru.map(function (e) {
11074
11127
  return (0, t.jsx)("option", {
11075
11128
  value: e,
11076
- children: Su(n, e)
11129
+ children: Eu(n, e)
11077
11130
  }, e);
11078
11131
  })
11079
11132
  })]
11080
11133
  });
11081
11134
  case "choice":
11082
- return zu(e, n, r);
11135
+ return Uu(e, n, r);
11083
11136
  case "lineConnect":
11084
- return Bu(e, n, r);
11137
+ return Wu(e, n, r);
11085
11138
  case "matching":
11086
- return Vu(e, n, r);
11139
+ return Gu(e, n, r);
11087
11140
  }
11088
11141
  }
11089
- function zu(e, n, r) {
11142
+ function Uu(e, n, r) {
11090
11143
  return (0, t.jsxs)(t.Fragment, {
11091
11144
  children: [(0, t.jsxs)("label", {
11092
11145
  className: $["form-row"],
@@ -11102,10 +11155,10 @@ function zu(e, n, r) {
11102
11155
  }));
11103
11156
  },
11104
11157
  value: e.config.selectionType,
11105
- children: Mu.map(function (e) {
11158
+ children: Iu.map(function (e) {
11106
11159
  return (0, t.jsx)("option", {
11107
11160
  value: e,
11108
- children: Su(n, e)
11161
+ children: Eu(n, e)
11109
11162
  }, e);
11110
11163
  })
11111
11164
  })]
@@ -11123,10 +11176,10 @@ function zu(e, n, r) {
11123
11176
  }));
11124
11177
  },
11125
11178
  value: e.config.optionLabelStyle,
11126
- children: Ou.map(function (e) {
11179
+ children: Mu.map(function (e) {
11127
11180
  return (0, t.jsx)("option", {
11128
11181
  value: e,
11129
- children: Su(n, e)
11182
+ children: Eu(n, e)
11130
11183
  }, e);
11131
11184
  })
11132
11185
  })]
@@ -11144,18 +11197,18 @@ function zu(e, n, r) {
11144
11197
  }));
11145
11198
  },
11146
11199
  value: e.config.renderer,
11147
- children: ju.map(function (e) {
11200
+ children: Fu.map(function (e) {
11148
11201
  return (0, t.jsx)("option", {
11149
11202
  value: e,
11150
- children: Su(n, e)
11203
+ children: Eu(n, e)
11151
11204
  }, e);
11152
11205
  })
11153
11206
  })]
11154
11207
  })]
11155
11208
  });
11156
11209
  }
11157
- function Bu(e, n, r) {
11158
- var i = Hu(e.config.columns);
11210
+ function Wu(e, n, r) {
11211
+ var i = Ku(e.config.columns);
11159
11212
  return (0, t.jsxs)(t.Fragment, {
11160
11213
  children: [(0, t.jsxs)("label", {
11161
11214
  className: $["form-row"],
@@ -11166,12 +11219,12 @@ function Bu(e, n, r) {
11166
11219
  onChange: function onChange(t) {
11167
11220
  return r(C(C({}, e), {}, {
11168
11221
  config: {
11169
- columns: Wu(i, Number(t.target.value))
11222
+ columns: Ju(i, Number(t.target.value))
11170
11223
  }
11171
11224
  }));
11172
11225
  },
11173
11226
  value: i.length,
11174
- children: Au.map(function (e) {
11227
+ children: Pu.map(function (e) {
11175
11228
  return (0, t.jsx)("option", {
11176
11229
  value: e,
11177
11230
  children: e
@@ -11197,10 +11250,10 @@ function Bu(e, n, r) {
11197
11250
  }));
11198
11251
  },
11199
11252
  value: a.labelStyle,
11200
- children: ku.map(function (e) {
11253
+ children: Nu.map(function (e) {
11201
11254
  return (0, t.jsx)("option", {
11202
11255
  value: e,
11203
- children: wu(n, e)
11256
+ children: Ou(n, e)
11204
11257
  }, e);
11205
11258
  })
11206
11259
  })]
@@ -11208,8 +11261,8 @@ function Bu(e, n, r) {
11208
11261
  })]
11209
11262
  });
11210
11263
  }
11211
- function Vu(e, n, r) {
11212
- var i = Uu(e.config.columns);
11264
+ function Gu(e, n, r) {
11265
+ var i = qu(e.config.columns);
11213
11266
  return (0, t.jsx)(t.Fragment, {
11214
11267
  children: i.map(function (a, o) {
11215
11268
  return (0, t.jsxs)("label", {
@@ -11230,10 +11283,10 @@ function Vu(e, n, r) {
11230
11283
  }));
11231
11284
  },
11232
11285
  value: a.labelStyle,
11233
- children: ku.map(function (e) {
11286
+ children: Nu.map(function (e) {
11234
11287
  return (0, t.jsx)("option", {
11235
11288
  value: e,
11236
- children: wu(n, e)
11289
+ children: Ou(n, e)
11237
11290
  }, e);
11238
11291
  })
11239
11292
  })]
@@ -11241,48 +11294,48 @@ function Vu(e, n, r) {
11241
11294
  })
11242
11295
  });
11243
11296
  }
11244
- function Hu(e) {
11297
+ function Ku(e) {
11245
11298
  var t = e.slice(0, 5);
11246
- return t.length >= 2 ? t : [].concat(_toConsumableArray(t), _toConsumableArray(ku.slice(t.length, 2).map(function (e) {
11299
+ return t.length >= 2 ? t : [].concat(_toConsumableArray(t), _toConsumableArray(Nu.slice(t.length, 2).map(function (e) {
11247
11300
  return {
11248
11301
  labelStyle: e
11249
11302
  };
11250
11303
  })));
11251
11304
  }
11252
- function Uu(e) {
11305
+ function qu(e) {
11253
11306
  var t = e.slice(0, 2);
11254
- return t.length >= 2 ? t : [].concat(_toConsumableArray(t), _toConsumableArray(ku.slice(t.length, 2).map(function (e) {
11307
+ return t.length >= 2 ? t : [].concat(_toConsumableArray(t), _toConsumableArray(Nu.slice(t.length, 2).map(function (e) {
11255
11308
  return {
11256
11309
  labelStyle: e
11257
11310
  };
11258
11311
  })));
11259
11312
  }
11260
- function Wu(e, t) {
11313
+ function Ju(e, t) {
11261
11314
  return Array.from({
11262
11315
  length: Math.min(5, Math.max(2, t))
11263
11316
  }, function (t, n) {
11264
11317
  var r, i;
11265
11318
  return (r = e.slice(n, n + 1)[0]) == null ? {
11266
- labelStyle: (i = ku[n]) == null ? "number" : i
11319
+ labelStyle: (i = Nu[n]) == null ? "number" : i
11267
11320
  } : r;
11268
11321
  });
11269
11322
  }
11270
- function Gu(_ref171) {
11271
- var _ref171$locale = _ref171.locale,
11272
- e = _ref171$locale === void 0 ? "zh-CN" : _ref171$locale,
11273
- r = _ref171.onChange,
11274
- i = _ref171.value;
11323
+ function Yu(_ref175) {
11324
+ var _ref175$locale = _ref175.locale,
11325
+ e = _ref175$locale === void 0 ? "zh-CN" : _ref175$locale,
11326
+ r = _ref175.onChange,
11327
+ i = _ref175.value;
11275
11328
  var a, o, s, c;
11276
- var l = hu(e),
11277
- _ref172 = (0, n.useState)((a = (o = i.elements[0]) == null ? void 0 : o.clientId) == null ? null : a),
11278
- _ref173 = _slicedToArray(_ref172, 2),
11279
- u = _ref173[0],
11280
- d = _ref173[1],
11281
- _Ku = Ku(i, u),
11282
- f = _Ku.selectedElement,
11283
- p = _Ku.selectedExtra;
11329
+ var l = yu(e),
11330
+ _ref176 = (0, n.useState)((a = (o = i.elements[0]) == null ? void 0 : o.clientId) == null ? null : a),
11331
+ _ref177 = _slicedToArray(_ref176, 2),
11332
+ u = _ref177[0],
11333
+ d = _ref177[1],
11334
+ _Xu = Xu(i, u),
11335
+ f = _Xu.selectedElement,
11336
+ p = _Xu.selectedExtra;
11284
11337
  function m(e) {
11285
- var t = se(e, i.elements);
11338
+ var t = oe(e, i.elements);
11286
11339
  r(C(C({}, i), {}, {
11287
11340
  elements: [].concat(_toConsumableArray(i.elements), [t])
11288
11341
  })), d(t.clientId);
@@ -11291,56 +11344,56 @@ function Gu(_ref171) {
11291
11344
  if (i.extras.some(function (t) {
11292
11345
  return t.type === e;
11293
11346
  })) return;
11294
- var t = oe(e, i.extras);
11347
+ var t = ae(e, i.extras);
11295
11348
  r(C(C({}, i), {}, {
11296
11349
  extras: [].concat(_toConsumableArray(i.extras), [t])
11297
11350
  })), d(t.clientId);
11298
11351
  }
11299
11352
  function g(e) {
11300
- var t = de(i, e);
11301
- r(t), d(qu(t));
11353
+ var t = ue(i, e);
11354
+ r(t), d(Zu(t));
11302
11355
  }
11303
11356
  function _(e) {
11304
- var t = ue(i, e);
11305
- r(t), d(qu(t));
11357
+ var t = le(i, e);
11358
+ r(t), d(Zu(t));
11306
11359
  }
11307
11360
  function v(e) {
11308
- r(me(i, e.clientId, e));
11361
+ r(pe(i, e.clientId, e));
11309
11362
  }
11310
11363
  function y(e) {
11311
- r(pe(i, e.clientId, e));
11364
+ r(fe(i, e.clientId, e));
11312
11365
  }
11313
11366
  function b(e) {
11314
- r(he(i, e));
11367
+ r(me(i, e));
11315
11368
  }
11316
11369
  function x(e) {
11317
- r(ge(i, e));
11370
+ r(he(i, e));
11318
11371
  }
11319
11372
  return (0, t.jsx)("section", {
11320
- className: du.root,
11373
+ className: hu.root,
11321
11374
  children: (0, t.jsx)("div", {
11322
11375
  className: Q.shell,
11323
11376
  children: (0, t.jsxs)("div", {
11324
11377
  className: Q.grid,
11325
- children: [(0, t.jsx)(Eu, {
11378
+ children: [(0, t.jsx)(Au, {
11326
11379
  addedExtraTypes: i.extras.map(function (e) {
11327
11380
  return e.type;
11328
11381
  }),
11329
11382
  labels: l,
11330
11383
  onAddElement: m,
11331
11384
  onAddExtra: h
11332
- }), (0, t.jsx)(Tu, {
11385
+ }), (0, t.jsx)(ku, {
11333
11386
  elements: i.elements,
11334
11387
  extras: i.extras,
11335
11388
  labels: l,
11336
11389
  onDeleteElement: g,
11337
11390
  onDeleteExtra: _,
11338
11391
  onMoveElement: function onMoveElement(e, t) {
11339
- return r(fe(i, e, t));
11392
+ return r(de(i, e, t));
11340
11393
  },
11341
11394
  onSelectElement: d,
11342
11395
  selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
11343
- }), (0, t.jsx)(Fu, {
11396
+ }), (0, t.jsx)(zu, {
11344
11397
  description: i.description,
11345
11398
  globalConfig: i.globalConfig,
11346
11399
  isSubjective: i.isSubjective,
@@ -11356,7 +11409,7 @@ function Gu(_ref171) {
11356
11409
  })
11357
11410
  });
11358
11411
  }
11359
- function Ku(e, t) {
11412
+ function Xu(e, t) {
11360
11413
  var n, r, i, a;
11361
11414
  var o = (n = e.elements.find(function (e) {
11362
11415
  return e.clientId === t;
@@ -11372,8 +11425,8 @@ function Ku(e, t) {
11372
11425
  selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
11373
11426
  };
11374
11427
  }
11375
- function qu(e) {
11428
+ function Zu(e) {
11376
11429
  var t, n, r, i;
11377
11430
  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;
11378
11431
  }
11379
- exports.QuestionContentEditor = qo, exports.QuestionPlayer = Pl, exports.QuestionPreview = ou, exports.QuestionRichContentView = G, exports.QuestionStructureEditor = Gu, exports.addBlankToGroup = Fn, exports.alignQuestionContentDraftWithStructure = ln, exports.assignBlankToAnswerGroup = Rn, exports.cn = Ba, exports.createBlankAnswerGroupWithBlank = zn, exports.createEmptyQuestionContentDraft = zt, exports.createEmptyQuestionPlayerResponse = Ps, exports.createEmptyQuestionStructureDraft = ae, exports.createQuestionContentDraftFromSerialized = cn, exports.createQuestionContentId = g, exports.createQuestionContentStructureFromDraft = Xo, exports.createQuestionPreviewDraft = Zo, exports.createQuestionStructureElement = se, exports.createQuestionStructureExtra = oe, exports.createRichContentValue = O, exports.createRichContentValueFromDocument = Wt, exports.createRichTextContent = Ee, exports.deleteBlankFromGroup = In, exports.deleteQuestionStructureElement = de, exports.deleteQuestionStructureExtra = ue, exports.detachBlankFromAnswerGroup = Bn, exports.findQuestionContentQuestionTypeStructure = Yi, exports.findQuestionContentQuestionTypeTemplate = $i, exports.getQuestionContentJudgementOptions = en, exports.getQuestionContentOptionMarker = Zt, exports.getQuestionContentTextMarkerAnswerText = qt, exports.getQuestionStructureDraftChangeKind = $o, exports.getQuestionStructureElementDefaultEnName = E, exports.getQuestionStructureElementDefaultName = T, exports.getQuestionStructureExtraDefaultEnName = ve, exports.getQuestionStructureExtraDefaultName = _e, exports.getRichContentDocument = Jt, exports.getSharedBlankAnswerGroups = Ln, exports.isCompositeQuestionContentStructure = Rt, exports.isQuestionContentDraftEmpty = on, exports.moveQuestionStructureElement = fe, exports.normalizeFillTextCandidateState = vn, exports.normalizeRichTextContent = De, exports.questionStructureElementTypes = ee, exports.questionStructureExtraTypes = te, exports.reconcileQuestionContentDraftWithTemplates = ea, exports.serializeQuestionContentDraft = sn, exports.serializeQuestionStructureDraft = Qo, exports.updateQuestionStructureElement = me, exports.updateQuestionStructureExtra = pe, exports.updateQuestionStructureGlobalConfig = he, exports.updateQuestionStructureMetadata = ge;
11432
+ exports.QuestionContentEditor = qo, exports.QuestionPlayer = Rl, exports.QuestionPreview = uu, exports.QuestionRichContentView = G, exports.QuestionStructureEditor = Yu, exports.addBlankToGroup = Fn, exports.alignQuestionContentDraftWithStructure = ln, exports.assignBlankToAnswerGroup = Rn, exports.cn = Ba, exports.createBlankAnswerGroupWithBlank = zn, exports.createEmptyQuestionContentDraft = zt, exports.createEmptyQuestionPlayerResponse = Ps, exports.createEmptyQuestionStructureDraft = ie, exports.createQuestionContentDraftFromSerialized = cn, exports.createQuestionContentId = g, exports.createQuestionContentStructureFromDraft = Xo, exports.createQuestionPreviewDraft = Zo, exports.createQuestionStructureElement = oe, exports.createQuestionStructureExtra = ae, exports.createRichContentValue = O, exports.createRichContentValueFromDocument = Wt, exports.createRichTextContent = Te, exports.deleteBlankFromGroup = In, exports.deleteQuestionStructureElement = ue, exports.deleteQuestionStructureExtra = le, exports.detachBlankFromAnswerGroup = Bn, exports.findQuestionContentQuestionTypeStructure = Yi, exports.findQuestionContentQuestionTypeTemplate = $i, exports.getQuestionContentJudgementOptions = en, exports.getQuestionContentOptionMarker = Zt, exports.getQuestionContentTextMarkerAnswerText = qt, exports.getQuestionStructureDraftChangeKind = $o, exports.getQuestionStructureElementDefaultEnName = D, exports.getQuestionStructureElementDefaultName = E, exports.getQuestionStructureExtraDefaultEnName = _e, exports.getQuestionStructureExtraDefaultName = ge, exports.getRichContentDocument = Jt, exports.getSharedBlankAnswerGroups = Ln, exports.isCompositeQuestionContentStructure = Rt, exports.isQuestionContentDraftEmpty = on, exports.moveQuestionStructureElement = de, exports.normalizeFillTextCandidateState = vn, exports.normalizeRichTextContent = Ee, exports.questionStructureElementTypes = ee, exports.questionStructureExtraTypes = w, exports.reconcileQuestionContentDraftWithTemplates = ea, exports.serializeQuestionContentDraft = sn, exports.serializeQuestionStructureDraft = Qo, exports.updateQuestionStructureElement = pe, exports.updateQuestionStructureExtra = fe, exports.updateQuestionStructureGlobalConfig = me, exports.updateQuestionStructureMetadata = he;