@yungu-fed/question-editor 0.2.4 → 0.3.0

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.mjs CHANGED
@@ -4763,13 +4763,17 @@ function Fo({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r
4763
4763
  }
4764
4764
  //#endregion
4765
4765
  //#region src/question/shared/subquestion-numbering.ts
4766
- function Io(e) {
4767
- return e.map((e) => String(e + 1)).join(".");
4766
+ function Io(e, t) {
4767
+ let n = e.map((e) => e + 1);
4768
+ return (t === void 0 ? n : [t, ...n]).join(".");
4768
4769
  }
4769
4770
  function Lo(e, t) {
4770
4771
  return e.length > 1 || t > 1;
4771
4772
  }
4772
- var Ro = {
4773
+ function Ro(e, t, n) {
4774
+ return Lo(e, t) ? Io(e, n) : null;
4775
+ }
4776
+ var zo = {
4773
4777
  root: "_root_1phv3_1",
4774
4778
  indented: "_indented_1phv3_9",
4775
4779
  number: "_number_1phv3_14",
@@ -4777,23 +4781,23 @@ var Ro = {
4777
4781
  };
4778
4782
  //#endregion
4779
4783
  //#region src/question/shared/SubquestionNumberedContent.tsx
4780
- function zo({ children: e, indented: t = !1, number: n }) {
4784
+ function Bo({ children: e, indented: t = !1, number: n }) {
4781
4785
  return n === null ? /* @__PURE__ */ a(i, { children: e }) : /* @__PURE__ */ o("div", {
4782
- className: t ? `${Ro.root} ${Ro.indented}` : Ro.root,
4786
+ className: t ? `${zo.root} ${zo.indented}` : zo.root,
4783
4787
  "data-subquestion-numbered-content": !0,
4784
4788
  children: [/* @__PURE__ */ a("span", {
4785
- className: Ro.number,
4789
+ className: zo.number,
4786
4790
  "data-subquestion-number": !0,
4787
4791
  children: n
4788
4792
  }), /* @__PURE__ */ a("div", {
4789
- className: Ro.content,
4793
+ className: zo.content,
4790
4794
  children: e
4791
4795
  })]
4792
4796
  });
4793
4797
  }
4794
4798
  //#endregion
4795
4799
  //#region src/question/content-editor/QuestionContentSubquestionChildElements.tsx
4796
- function Bo({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
4800
+ function Vo({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
4797
4801
  let { t: c } = s;
4798
4802
  function l(t, r) {
4799
4803
  n(k(k({}, e), vn(e, t, r)));
@@ -4821,9 +4825,9 @@ function Bo({ child: e, disabled: t, onChange: n, richTextControls: r, structure
4821
4825
  className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
4822
4826
  children: /* @__PURE__ */ a(Oo, {
4823
4827
  disabled: t,
4824
- element: Vo(n),
4828
+ element: Ho(n),
4825
4829
  hasAnswer: i.hasAnswer,
4826
- item: Ho(c),
4830
+ item: Uo(c),
4827
4831
  onChange: (e) => u(o, {
4828
4832
  content: e.content,
4829
4833
  type: n.type
@@ -4836,14 +4840,14 @@ function Bo({ child: e, disabled: t, onChange: n, richTextControls: r, structure
4836
4840
  })]
4837
4841
  });
4838
4842
  }
4839
- function Vo(e) {
4843
+ function Ho(e) {
4840
4844
  return {
4841
4845
  config: {},
4842
4846
  name: e.name,
4843
4847
  type: "richText"
4844
4848
  };
4845
4849
  }
4846
- function Ho(e) {
4850
+ function Uo(e) {
4847
4851
  return {
4848
4852
  content: e.content,
4849
4853
  type: "richText"
@@ -4851,37 +4855,37 @@ function Ho(e) {
4851
4855
  }
4852
4856
  //#endregion
4853
4857
  //#region src/question/content-editor/subquestion-editable-children.ts
4854
- var Uo = /* @__PURE__ */ new WeakMap(), Wo = 0;
4855
- function Go(e) {
4858
+ var Wo = /* @__PURE__ */ new WeakMap(), Go = 0;
4859
+ function Ko(e) {
4856
4860
  return e.map((e) => ({
4857
4861
  draft: e,
4858
- runtimeId: Jo(e)
4862
+ runtimeId: Yo(e)
4859
4863
  }));
4860
4864
  }
4861
- function Ko(e, t) {
4862
- Uo.set(t, Jo(e));
4863
- }
4864
4865
  function qo(e, t) {
4866
+ Wo.set(t, Yo(e));
4867
+ }
4868
+ function Jo(e, t) {
4865
4869
  if (e.length !== t.length) throw Error(`\u9898\u76ee\u5b50\u9898\u8fd0\u884c\u65f6\u8eab\u4efd\u4f20\u9012\u5931\u8d25\uff0cexpected=${e.length}\uff0cactual=${t.length}`);
4866
4870
  let n = t[Symbol.iterator]();
4867
4871
  e.forEach((e) => {
4868
4872
  let t = n.next();
4869
4873
  if (t.done) throw Error("\u9898\u76ee\u5b50\u9898\u8fd0\u884c\u65f6\u8eab\u4efd\u4f20\u9012\u5931\u8d25\uff0cnextChildren \u63d0\u524d\u7ed3\u675f");
4870
4874
  let r = t.value;
4871
- Ko(e, r), qo(e.children, r.children);
4875
+ qo(e, r), Jo(e.children, r.children);
4872
4876
  });
4873
4877
  }
4874
- function Jo(e) {
4875
- let t = Uo.get(e);
4878
+ function Yo(e) {
4879
+ let t = Wo.get(e);
4876
4880
  if (t) return t;
4877
- Wo += 1;
4878
- let n = `question-content-child-${Wo}`;
4879
- return Uo.set(e, n), n;
4881
+ Go += 1;
4882
+ let n = `question-content-child-${Go}`;
4883
+ return Wo.set(e, n), n;
4880
4884
  }
4881
4885
  //#endregion
4882
4886
  //#region src/question/content-editor/QuestionContentSubquestionChildEditor.tsx
4883
- function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
4884
- let { t: m } = p, h = i == null ? [t] : i, g = Io(h), _ = Xo(e, f), v = _ ? ia(_.structure, r) : void 0, y = v ? _n(v, e) : e, b = Go(v ? y.children : []);
4887
+ function Xo({ child: e, childIndex: t, childIndexPath: n, disabled: r, hasAnswer: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
4888
+ let { t: m } = p, h = n == null ? [t] : n, g = Io(h), _ = Zo(e, f), v = _ ? ia(_.structure, i) : void 0, y = v ? _n(v, e) : e, b = Ko(v ? y.children : []);
4885
4889
  if (!v) return /* @__PURE__ */ o("section", {
4886
4890
  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",
4887
4891
  children: [w(null), te(/* @__PURE__ */ a(Oa, { description: m("questionContentEditor.subquestion.missingTemplate") }))]
@@ -4890,30 +4894,30 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4890
4894
  s(k(k({}, y), {}, { children: [...y.children, e] }));
4891
4895
  }
4892
4896
  function S(e, t) {
4893
- let n = $o(b, e);
4894
- n < 0 || (Ko(y.children[n], t), s(k(k({}, y), {}, { children: y.children.map((e, r) => r === n ? t : e) })));
4897
+ let n = es(b, e);
4898
+ n < 0 || (qo(y.children[n], t), s(k(k({}, y), {}, { children: y.children.map((e, r) => r === n ? t : e) })));
4895
4899
  }
4896
4900
  function ee(e) {
4897
- let t = $o(b, e);
4901
+ let t = es(b, e);
4898
4902
  t < 0 || s(k(k({}, y), {}, { children: y.children.filter((e, n) => n !== t) }));
4899
4903
  }
4900
4904
  function C(e, t) {
4901
- let n = $o(b, e);
4905
+ let n = es(b, e);
4902
4906
  n < 0 || s(k(k({}, y), {}, { children: Po(y.children, n, t) }));
4903
4907
  }
4904
4908
  return /* @__PURE__ */ o("section", {
4905
4909
  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",
4906
4910
  children: [
4907
4911
  w(x),
4908
- te(Qo(n, y, s, u, v, p)),
4912
+ te($o(r, y, s, u, v, p)),
4909
4913
  y.children.length === 0 ? null : /* @__PURE__ */ a("div", {
4910
4914
  className: "ml-3 flex min-w-0 flex-col pl-3 sm:ml-4 sm:pl-4",
4911
- children: b.map((e, t) => /* @__PURE__ */ a(Yo, {
4915
+ children: b.map((e, t) => /* @__PURE__ */ a(Xo, {
4912
4916
  child: e.draft,
4913
4917
  childIndex: t,
4914
- disabled: n,
4915
- hasAnswer: r,
4916
- numberPath: [...h, t],
4918
+ childIndexPath: [...h, t],
4919
+ disabled: r,
4920
+ hasAnswer: i,
4917
4921
  onChange: (t) => S(e.runtimeId, t),
4918
4922
  onDelete: () => ee(e.runtimeId),
4919
4923
  onMove: (t) => C(e.runtimeId, t),
@@ -4925,7 +4929,7 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4925
4929
  })
4926
4930
  ]
4927
4931
  });
4928
- function w(i) {
4932
+ function w(n) {
4929
4933
  return /* @__PURE__ */ o("div", {
4930
4934
  className: "flex min-w-0 flex-wrap items-start justify-between gap-3",
4931
4935
  children: [/* @__PURE__ */ a("span", {
@@ -4936,30 +4940,30 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4936
4940
  m("questionContentEditor.subquestion.questionKind"),
4937
4941
  " \u00b7",
4938
4942
  " ",
4939
- Zo(_, e)
4943
+ Qo(_, e)
4940
4944
  ]
4941
4945
  })
4942
4946
  }), /* @__PURE__ */ o(ka, {
4943
4947
  size: 4,
4944
4948
  wrap: !0,
4945
4949
  children: [
4946
- i ? /* @__PURE__ */ a(Fo, {
4947
- disabled: n,
4948
- hasAnswer: r,
4949
- onAddChild: i,
4950
+ n ? /* @__PURE__ */ a(Fo, {
4951
+ disabled: r,
4952
+ hasAnswer: i,
4953
+ onAddChild: n,
4950
4954
  questionTypeTemplates: f,
4951
4955
  translator: p
4952
4956
  }) : null,
4953
4957
  /* @__PURE__ */ a(I, {
4954
4958
  "aria-label": m("questionContentEditor.subquestion.moveChildUp", { index: g }),
4955
- disabled: n || t === 0,
4959
+ disabled: r || t === 0,
4956
4960
  icon: "\u2191",
4957
4961
  onClick: () => l(-1),
4958
4962
  size: "small"
4959
4963
  }),
4960
4964
  /* @__PURE__ */ a(I, {
4961
4965
  "aria-label": m("questionContentEditor.subquestion.moveChildDown", { index: g }),
4962
- disabled: n || t === d - 1,
4966
+ disabled: r || t === d - 1,
4963
4967
  icon: "\u2193",
4964
4968
  onClick: () => l(1),
4965
4969
  size: "small"
@@ -4967,7 +4971,7 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4967
4971
  /* @__PURE__ */ a(I, {
4968
4972
  "aria-label": m("questionContentEditor.subquestion.deleteChild", { index: g }),
4969
4973
  danger: !0,
4970
- disabled: n,
4974
+ disabled: r,
4971
4975
  icon: "\u00d7",
4972
4976
  onClick: c,
4973
4977
  size: "small"
@@ -4977,20 +4981,20 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
4977
4981
  });
4978
4982
  }
4979
4983
  function te(e) {
4980
- return /* @__PURE__ */ a(zo, {
4984
+ return /* @__PURE__ */ a(Bo, {
4981
4985
  number: Lo(h, d) ? g : null,
4982
4986
  children: e
4983
4987
  });
4984
4988
  }
4985
4989
  }
4986
- function Xo(e, t) {
4990
+ function Zo(e, t) {
4987
4991
  return sa(t, e.questionTypeKey);
4988
4992
  }
4989
- function Zo(e, t) {
4993
+ function Qo(e, t) {
4990
4994
  return e ? e.label : t.questionTypeKey;
4991
4995
  }
4992
- function Qo(e, t, n, r, i, o) {
4993
- return i.elements.length === 0 && i.extras.length === 0 ? null : /* @__PURE__ */ a(Bo, {
4996
+ function $o(e, t, n, r, i, o) {
4997
+ return i.elements.length === 0 && i.extras.length === 0 ? null : /* @__PURE__ */ a(Vo, {
4994
4998
  child: t,
4995
4999
  disabled: e,
4996
5000
  onChange: n,
@@ -4999,13 +5003,13 @@ function Qo(e, t, n, r, i, o) {
4999
5003
  translator: o
5000
5004
  });
5001
5005
  }
5002
- function $o(e, t) {
5006
+ function es(e, t) {
5003
5007
  return e.findIndex((e) => e.runtimeId === t);
5004
5008
  }
5005
5009
  //#endregion
5006
5010
  //#region src/question/content-editor/QuestionContentSubquestionGroupEditor.tsx
5007
- function es({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
5008
- let { t: l } = c, u = Go(n.children), d = n.children.length;
5011
+ function ts({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
5012
+ let { t: l } = c, u = Ko(n.children), d = n.children.length;
5009
5013
  function f(e) {
5010
5014
  r(k(k({}, n), {}, { children: e }));
5011
5015
  }
@@ -5013,19 +5017,19 @@ function es({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5013
5017
  f([...n.children, e]);
5014
5018
  }
5015
5019
  function m(e, t) {
5016
- let r = ts(u, e);
5017
- r < 0 || (Ko(n.children[r], t), f(n.children.map((e, n) => n === r ? t : e)));
5020
+ let r = ns(u, e);
5021
+ r < 0 || (qo(n.children[r], t), f(n.children.map((e, n) => n === r ? t : e)));
5018
5022
  }
5019
5023
  function h(e) {
5020
- let t = ts(u, e);
5024
+ let t = ns(u, e);
5021
5025
  t < 0 || f(n.children.filter((e, n) => n !== t));
5022
5026
  }
5023
5027
  function g(e, t) {
5024
- let r = ts(u, e);
5028
+ let r = ns(u, e);
5025
5029
  r < 0 || f(Po(n.children, r, t));
5026
5030
  }
5027
5031
  function _(r, o) {
5028
- return /* @__PURE__ */ a(Yo, {
5032
+ return /* @__PURE__ */ a(Xo, {
5029
5033
  child: r.draft,
5030
5034
  childIndex: o,
5031
5035
  disabled: e,
@@ -5070,14 +5074,14 @@ function es({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5070
5074
  })]
5071
5075
  });
5072
5076
  }
5073
- function ts(e, t) {
5077
+ function ns(e, t) {
5074
5078
  return e.findIndex((e) => e.runtimeId === t);
5075
5079
  }
5076
5080
  //#endregion
5077
5081
  //#region src/question/content-editor/QuestionContentEditor.tsx
5078
- function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
5082
+ function rs({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
5079
5083
  let l = ca(c, i);
5080
- qo(c.children, l.children);
5084
+ Jo(c.children, l.children);
5081
5085
  let u = ga(n), { t: d } = u, p = aa(i, l), m = f(() => ({
5082
5086
  plugins: [Ft, da],
5083
5087
  uploadImage: s
@@ -5104,9 +5108,9 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5104
5108
  let i = an(l, n, e);
5105
5109
  return /* @__PURE__ */ a(Oo, {
5106
5110
  disabled: t,
5107
- element: rs(e),
5111
+ element: is(e),
5108
5112
  hasAnswer: r,
5109
- item: is(i),
5113
+ item: as(i),
5110
5114
  onChange: (t) => g(n, {
5111
5115
  content: t.content,
5112
5116
  type: e.type
@@ -5123,7 +5127,7 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5123
5127
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white p-4",
5124
5128
  children: _(e, t, p.hasAnswer)
5125
5129
  }, `${e.type}-${t}`)),
5126
- Kt(p) || l.children.length > 0 ? /* @__PURE__ */ a(es, {
5130
+ Kt(p) || l.children.length > 0 ? /* @__PURE__ */ a(ts, {
5127
5131
  disabled: t,
5128
5132
  hasAnswer: p.hasAnswer,
5129
5133
  item: l,
@@ -5155,14 +5159,14 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
5155
5159
  })]
5156
5160
  });
5157
5161
  }
5158
- function rs(e) {
5162
+ function is(e) {
5159
5163
  return {
5160
5164
  config: {},
5161
5165
  name: e.name,
5162
5166
  type: "richText"
5163
5167
  };
5164
5168
  }
5165
- function is(e) {
5169
+ function as(e) {
5166
5170
  return {
5167
5171
  content: e.content,
5168
5172
  type: "richText"
@@ -5170,40 +5174,40 @@ function is(e) {
5170
5174
  }
5171
5175
  //#endregion
5172
5176
  //#region src/question/content-editor/structure.ts
5173
- function as(e, t) {
5177
+ function os(e, t) {
5174
5178
  return {
5175
- elements: e.elements.map((e) => gs(e, t)),
5179
+ elements: e.elements.map((e) => _s(e, t)),
5176
5180
  extras: e.extras.map((e) => ({
5177
- name: vs(e, we(e.type), Te(e.type), t),
5181
+ name: ys(e, we(e.type), Te(e.type), t),
5178
5182
  type: e.type
5179
5183
  })),
5180
5184
  hasAnswer: e.globalConfig.hasAnswer,
5181
5185
  isComposite: !1
5182
5186
  };
5183
5187
  }
5184
- function os(e, t) {
5188
+ function ss(e, t) {
5185
5189
  if (!e) return null;
5186
5190
  let n = ra(t, e.questionTypeKey);
5187
- return n ? k(k({}, gn(n, ls(e))), {}, { children: e.children.map((e) => {
5188
- let n = os(e, t);
5191
+ return n ? k(k({}, gn(n, us(e))), {}, { children: e.children.map((e) => {
5192
+ let n = ss(e, t);
5189
5193
  if (!n) throw Error("\u5b50\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a");
5190
5194
  return n;
5191
5195
  }) }) : null;
5192
5196
  }
5193
- function ss(e) {
5197
+ function cs(e) {
5194
5198
  return {
5195
5199
  description: e.description,
5196
- elements: e.elements.map(fs),
5197
- extras: e.extras.map(hs),
5200
+ elements: e.elements.map(ps),
5201
+ extras: e.extras.map(gs),
5198
5202
  globalConfig: k({}, e.globalConfig),
5199
5203
  isSubjective: e.isSubjective,
5200
5204
  version: e.version
5201
5205
  };
5202
5206
  }
5203
- function cs(e, t) {
5204
- return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || us(e.elements, t.elements) || ds(e.extras, t.extras) ? "shape" : "metadata";
5207
+ function ls(e, t) {
5208
+ return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || ds(e.elements, t.elements) || fs(e.extras, t.extras) ? "shape" : "metadata";
5205
5209
  }
5206
- function ls(e) {
5210
+ function us(e) {
5207
5211
  return {
5208
5212
  questionTypeKey: e.questionTypeKey,
5209
5213
  children: [],
@@ -5213,22 +5217,22 @@ function ls(e) {
5213
5217
  version: e.version
5214
5218
  };
5215
5219
  }
5216
- function us(e, t) {
5220
+ function ds(e, t) {
5217
5221
  return e.some((e, n) => {
5218
5222
  let r = t.slice(n, n + 1)[0];
5219
5223
  return !r || e.clientId !== r.clientId || e.type !== r.type || JSON.stringify(e.config) !== JSON.stringify(r.config);
5220
5224
  });
5221
5225
  }
5222
- function ds(e, t) {
5226
+ function fs(e, t) {
5223
5227
  return e.some((e, n) => {
5224
5228
  let r = t.slice(n, n + 1)[0];
5225
5229
  return !r || e.clientId !== r.clientId || e.type !== r.type;
5226
5230
  });
5227
5231
  }
5228
- function fs(e) {
5229
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? ms(e) : ps(e);
5230
- }
5231
5232
  function ps(e) {
5233
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? hs(e) : ms(e);
5234
+ }
5235
+ function ms(e) {
5232
5236
  switch (e.type) {
5233
5237
  case "inlineFill": return {
5234
5238
  config: k({}, e.config),
@@ -5268,7 +5272,7 @@ function ps(e) {
5268
5272
  };
5269
5273
  }
5270
5274
  }
5271
- function ms(e) {
5275
+ function hs(e) {
5272
5276
  return {
5273
5277
  config: {},
5274
5278
  enName: e.enName,
@@ -5276,38 +5280,38 @@ function ms(e) {
5276
5280
  type: e.type
5277
5281
  };
5278
5282
  }
5279
- function hs(e) {
5283
+ function gs(e) {
5280
5284
  return {
5281
5285
  enName: e.enName,
5282
5286
  name: e.name,
5283
5287
  type: e.type
5284
5288
  };
5285
5289
  }
5286
- function gs(e, t) {
5290
+ function _s(e, t) {
5287
5291
  return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? {
5288
5292
  config: {},
5289
- name: vs(e, A(e.type), j(e.type), t),
5293
+ name: ys(e, A(e.type), j(e.type), t),
5290
5294
  type: e.type
5291
- } : _s(e, t);
5295
+ } : vs(e, t);
5292
5296
  }
5293
- function _s(e, t) {
5297
+ function vs(e, t) {
5294
5298
  switch (e.type) {
5295
5299
  case "inlineFill": return {
5296
5300
  config: {
5297
5301
  allowCandidateReuse: !!e.config.allowCandidateReuse,
5298
5302
  candidateMode: e.config.candidateMode
5299
5303
  },
5300
- name: vs(e, A("inlineFill"), j("inlineFill"), t),
5304
+ name: ys(e, A("inlineFill"), j("inlineFill"), t),
5301
5305
  type: "inlineFill"
5302
5306
  };
5303
5307
  case "wordBuilder": return {
5304
5308
  config: { builderMode: e.config.builderMode },
5305
- name: vs(e, A("wordBuilder"), j("wordBuilder"), t),
5309
+ name: ys(e, A("wordBuilder"), j("wordBuilder"), t),
5306
5310
  type: "wordBuilder"
5307
5311
  };
5308
5312
  case "judgement": return {
5309
5313
  config: { judgeAnswerMode: e.config.judgeAnswerMode },
5310
- name: vs(e, A("judgement"), j("judgement"), t),
5314
+ name: ys(e, A("judgement"), j("judgement"), t),
5311
5315
  type: "judgement"
5312
5316
  };
5313
5317
  case "choice": return {
@@ -5316,22 +5320,22 @@ function _s(e, t) {
5316
5320
  renderer: e.config.renderer,
5317
5321
  selectionType: e.config.selectionType
5318
5322
  },
5319
- name: vs(e, A("choice"), j("choice"), t),
5323
+ name: ys(e, A("choice"), j("choice"), t),
5320
5324
  type: "choice"
5321
5325
  };
5322
5326
  case "lineConnect": return {
5323
5327
  config: { columns: e.config.columns.map((e) => k({}, e)) },
5324
- name: vs(e, A("lineConnect"), j("lineConnect"), t),
5328
+ name: ys(e, A("lineConnect"), j("lineConnect"), t),
5325
5329
  type: "lineConnect"
5326
5330
  };
5327
5331
  case "matching": return {
5328
5332
  config: { columns: e.config.columns.map((e) => k({}, e)) },
5329
- name: vs(e, A("matching"), j("matching"), t),
5333
+ name: ys(e, A("matching"), j("matching"), t),
5330
5334
  type: "matching"
5331
5335
  };
5332
5336
  }
5333
5337
  }
5334
- function vs(e, t, n, r) {
5338
+ function ys(e, t, n, r) {
5335
5339
  var i;
5336
5340
  if (r === "en-US") {
5337
5341
  var a;
@@ -5341,65 +5345,65 @@ function vs(e, t, n, r) {
5341
5345
  }
5342
5346
  //#endregion
5343
5347
  //#region src/question/presentation-contract.ts
5344
- function ys(e, t) {
5345
- return ca(bs(e), t);
5348
+ function bs(e, t) {
5349
+ return ca(xs(e), t);
5346
5350
  }
5347
- function bs(e) {
5351
+ function xs(e) {
5348
5352
  return {
5349
5353
  questionTypeKey: e.questionTypeKey,
5350
- children: e.children.map(bs),
5351
- elements: e.elements.map(xs),
5354
+ children: e.children.map(xs),
5355
+ elements: e.elements.map(Ss),
5352
5356
  extras: [...e.extras],
5353
5357
  id: e.id,
5354
5358
  version: e.version
5355
5359
  };
5356
5360
  }
5357
- function xs(e) {
5361
+ function Ss(e) {
5358
5362
  return e.type === "choice" ? k(k({}, e), {}, { answers: e.answers === void 0 ? { optionIds: [] } : e.answers }) : e;
5359
5363
  }
5360
5364
  //#endregion
5361
5365
  //#region src/question/player/response-contract.ts
5362
- var Ss = {
5366
+ var Cs = {
5363
5367
  html: "",
5364
5368
  json: [],
5365
5369
  text: ""
5366
5370
  };
5367
- function Cs(e, t) {
5368
- zs(e, t);
5371
+ function ws(e, t) {
5372
+ Bs(e, t);
5369
5373
  let n = t.elements.filter((e) => e.type !== "richText");
5370
- return Hs("elementAnswers", e.items.length, n.length), Hs("children", e.children.length, t.children.length), {
5371
- children: e.children.map((e, n) => Cs(e, t.children[n])),
5372
- elementAnswers: e.items.map((e, t) => Ts(e, n[t])),
5374
+ return Us("elementAnswers", e.items.length, n.length), Us("children", e.children.length, t.children.length), {
5375
+ children: e.children.map((e, n) => ws(e, t.children[n])),
5376
+ elementAnswers: e.items.map((e, t) => Es(e, n[t])),
5373
5377
  id: t.id,
5374
5378
  questionTypeKey: t.questionTypeKey,
5375
5379
  version: t.version
5376
5380
  };
5377
5381
  }
5378
- function ws(e, t) {
5379
- zs(e, t);
5382
+ function Ts(e, t) {
5383
+ Bs(e, t);
5380
5384
  let n = t.elements.filter((e) => e.type !== "richText");
5381
- return Hs("elementAnswers", e.elementAnswers.length, n.length), Hs("children", e.children.length, t.children.length), {
5382
- children: e.children.map((e, n) => ws(e, t.children[n])),
5385
+ return Us("elementAnswers", e.elementAnswers.length, n.length), Us("children", e.children.length, t.children.length), {
5386
+ children: e.children.map((e, n) => Ts(e, t.children[n])),
5383
5387
  id: t.id,
5384
- items: e.elementAnswers.map((e, t) => Os(e, n[t])),
5388
+ items: e.elementAnswers.map((e, t) => ks(e, n[t])),
5385
5389
  questionTypeKey: t.questionTypeKey,
5386
5390
  version: t.version
5387
5391
  };
5388
5392
  }
5389
- function Ts(e, t) {
5390
- switch (Bs(e.type, t.type), e.type) {
5391
- case "fill": return Vs(t, "fill"), {
5392
- answers: js(t, e.answers),
5393
+ function Es(e, t) {
5394
+ switch (Vs(e.type, t.type), e.type) {
5395
+ case "fill": return Hs(t, "fill"), {
5396
+ answers: Ms(t, e.answers),
5393
5397
  type: e.type
5394
5398
  };
5395
- case "inlineFill": return Vs(t, "inlineFill"), {
5396
- answers: Ms(t, e.answers),
5399
+ case "inlineFill": return Hs(t, "inlineFill"), {
5400
+ answers: Ns(t, e.answers),
5397
5401
  type: e.type
5398
5402
  };
5399
- default: return Es(e);
5403
+ default: return Ds(e);
5400
5404
  }
5401
5405
  }
5402
- function Es(e) {
5406
+ function Ds(e) {
5403
5407
  switch (e.type) {
5404
5408
  case "choice": return {
5405
5409
  answers: { optionIds: e.selectedOptionIds },
@@ -5422,10 +5426,10 @@ function Es(e) {
5422
5426
  answers: e.connections,
5423
5427
  type: e.type
5424
5428
  };
5425
- default: return Ds(e);
5429
+ default: return Os(e);
5426
5430
  }
5427
5431
  }
5428
- function Ds(e) {
5432
+ function Os(e) {
5429
5433
  switch (e.type) {
5430
5434
  case "ordering": return {
5431
5435
  answers: e.orderedOptionIds,
@@ -5441,20 +5445,20 @@ function Ds(e) {
5441
5445
  };
5442
5446
  }
5443
5447
  }
5444
- function Os(e, t) {
5445
- switch (Bs(e.type, t.type), e.type) {
5448
+ function ks(e, t) {
5449
+ switch (Vs(e.type, t.type), e.type) {
5446
5450
  case "fill": return {
5447
- answers: Fs(e.answers),
5451
+ answers: Is(e.answers),
5448
5452
  type: e.type
5449
5453
  };
5450
- case "inlineFill": return Vs(t, "inlineFill"), {
5451
- answers: Is(t, e.answers),
5454
+ case "inlineFill": return Hs(t, "inlineFill"), {
5455
+ answers: Ls(t, e.answers),
5452
5456
  type: e.type
5453
5457
  };
5454
- default: return ks(e);
5458
+ default: return As(e);
5455
5459
  }
5456
5460
  }
5457
- function ks(e) {
5461
+ function As(e) {
5458
5462
  switch (e.type) {
5459
5463
  case "choice": return {
5460
5464
  selectedOptionIds: [...e.answers.optionIds],
@@ -5474,13 +5478,13 @@ function ks(e) {
5474
5478
  };
5475
5479
  case "lineConnect":
5476
5480
  case "matching": return {
5477
- connections: Ls(e.answers),
5481
+ connections: Rs(e.answers),
5478
5482
  type: e.type
5479
5483
  };
5480
- default: return As(e);
5484
+ default: return js(e);
5481
5485
  }
5482
5486
  }
5483
- function As(e) {
5487
+ function js(e) {
5484
5488
  switch (e.type) {
5485
5489
  case "ordering": return {
5486
5490
  orderedOptionIds: [...e.answers],
@@ -5496,11 +5500,11 @@ function As(e) {
5496
5500
  };
5497
5501
  }
5498
5502
  }
5499
- function js(e, t) {
5503
+ function Ms(e, t) {
5500
5504
  return N(e.answers, e.blanks).map((e) => {
5501
5505
  var n;
5502
5506
  return {
5503
- answerPools: [Rs((n = e.blankIds.map((e) => {
5507
+ answerPools: [zs((n = e.blankIds.map((e) => {
5504
5508
  var n;
5505
5509
  return (n = t[e]) == null ? "" : n;
5506
5510
  }).find(Boolean)) == null ? "" : n)],
@@ -5508,32 +5512,32 @@ function js(e, t) {
5508
5512
  };
5509
5513
  });
5510
5514
  }
5511
- function Ms(e, t) {
5515
+ function Ns(e, t) {
5512
5516
  return e.blanks.map((n) => ({
5513
- answerPools: [Rs(Ns(e, n, t[n]))],
5517
+ answerPools: [zs(Ps(e, n, t[n]))],
5514
5518
  blankIds: [n]
5515
5519
  }));
5516
5520
  }
5517
- function Ns(e, t, n) {
5521
+ function Ps(e, t, n) {
5518
5522
  var r;
5519
5523
  if (!n) return "";
5520
5524
  if (n.kind === "text") return n.value;
5521
- let i = Ps(e, t).find((e) => n.optionIds.includes(e.optionId));
5525
+ let i = Fs(e, t).find((e) => n.optionIds.includes(e.optionId));
5522
5526
  return (r = i == null ? void 0 : i.content.text) == null ? "" : r;
5523
5527
  }
5524
- function Ps(e, t) {
5528
+ function Fs(e, t) {
5525
5529
  var n, r;
5526
5530
  let i = (n = e.blankOptionGroups) == null || (n = n.find((e) => e.blankId === t)) == null ? void 0 : n.options;
5527
5531
  return [...i == null ? [] : i, ...(r = e.candidateOptions) == null ? [] : r];
5528
5532
  }
5529
- function Fs(e) {
5533
+ function Is(e) {
5530
5534
  return e.reduce((e, t) => t.blankIds.reduce((e, n) => {
5531
5535
  var r, i;
5532
5536
  return k(k({}, e), {}, { [n]: (r = (i = t.answerPools[0]) == null ? void 0 : i.text) == null ? "" : r });
5533
5537
  }, e), {});
5534
5538
  }
5535
- function Is(e, t) {
5536
- return Object.entries(Fs(t)).reduce((t, [n, r]) => {
5539
+ function Ls(e, t) {
5540
+ return Object.entries(Is(t)).reduce((t, [n, r]) => {
5537
5541
  var i, a, o;
5538
5542
  let s = [...(i = (a = e.blankOptionGroups) == null || (a = a.find((e) => e.blankId === n)) == null ? void 0 : a.options) == null ? [] : i, ...(o = e.candidateOptions) == null ? [] : o].find((e) => e.content.text === r), c = s ? {
5539
5543
  kind: "option",
@@ -5545,238 +5549,238 @@ function Is(e, t) {
5545
5549
  return k(k({}, t), {}, { [n]: c });
5546
5550
  }, {});
5547
5551
  }
5548
- function Ls(e) {
5552
+ function Rs(e) {
5549
5553
  return Object.keys(e).reduce((t, n) => k(k({}, t), {}, { [n]: [...e[n]] }), {});
5550
5554
  }
5551
- function Rs(e) {
5552
- return e.length === 0 ? Ss : {
5555
+ function zs(e) {
5556
+ return e.length === 0 ? Cs : {
5553
5557
  html: e,
5554
5558
  json: [],
5555
5559
  text: e
5556
5560
  };
5557
5561
  }
5558
- function zs(e, t) {
5562
+ function Bs(e, t) {
5559
5563
  if (e.id !== t.id || e.questionTypeKey !== t.questionTypeKey || e.version !== t.version) throw Error(`QuestionPlayer response identity mismatch: questionId=${String(t.id)}, responseId=${String(e.id)}, questionTypeKey=${String(t.questionTypeKey)}, responseQuestionTypeKey=${String(e.questionTypeKey)}, questionVersion=${t.version}, responseVersion=${e.version}`);
5560
5564
  }
5561
- function Bs(e, t) {
5565
+ function Vs(e, t) {
5562
5566
  if (e !== t) throw Error(`QuestionPlayer response element mismatch: expected=${t}, actual=${e}`);
5563
5567
  }
5564
- function Vs(e, t) {
5568
+ function Hs(e, t) {
5565
5569
  if (e.type !== t) throw Error(`QuestionPlayer content element mismatch: expected=${t}, actual=${e.type}`);
5566
5570
  }
5567
- function Hs(e, t, n) {
5571
+ function Us(e, t, n) {
5568
5572
  if (t !== n) throw Error(`QuestionPlayer response ${e} length mismatch: expected=${n}, actual=${t}`);
5569
5573
  }
5570
5574
  //#endregion
5571
5575
  //#region src/question/player/helpers.ts
5572
- function Us(e, t) {
5573
- let n = ys(e, t);
5574
- return Cs(Ws(n, t), n);
5575
- }
5576
5576
  function Ws(e, t) {
5577
+ let n = bs(e, t);
5578
+ return ws(Gs(n, t), n);
5579
+ }
5580
+ function Gs(e, t) {
5577
5581
  let n = ra(t, e.questionTypeKey), r = n ? Kt(n) : !1;
5578
5582
  return {
5579
5583
  questionTypeKey: e.questionTypeKey,
5580
- children: e.children.map((e) => Ws(e, t)),
5584
+ children: e.children.map((e) => Gs(e, t)),
5581
5585
  id: e.id,
5582
5586
  items: !n || r ? [] : n.elements.reduce((t, n, r) => {
5583
- let i = dc(n, rn(e, r, n));
5587
+ let i = fc(n, rn(e, r, n));
5584
5588
  return i ? [...t, i] : t;
5585
5589
  }, []),
5586
5590
  version: e.version
5587
5591
  };
5588
5592
  }
5589
- function Gs(e, t) {
5593
+ function Ks(e, t) {
5590
5594
  var n;
5591
- return (n = Ec(e, t, "choice")) == null ? {
5595
+ return (n = Dc(e, t, "choice")) == null ? {
5592
5596
  selectedOptionIds: [],
5593
5597
  type: "choice"
5594
5598
  } : n;
5595
5599
  }
5596
- function Ks(e, t, n) {
5600
+ function qs(e, t, n) {
5597
5601
  var r;
5598
- return (r = Ec(e, t, "fill")) == null ? {
5599
- answers: wc(n),
5602
+ return (r = Dc(e, t, "fill")) == null ? {
5603
+ answers: Tc(n),
5600
5604
  type: "fill"
5601
5605
  } : r;
5602
5606
  }
5603
- function qs(e, t, n, r) {
5607
+ function Js(e, t, n, r) {
5604
5608
  var i;
5605
- return (i = Ec(e, t, "inlineFill")) == null ? {
5606
- answers: Tc(n, r),
5609
+ return (i = Dc(e, t, "inlineFill")) == null ? {
5610
+ answers: Ec(n, r),
5607
5611
  type: "inlineFill"
5608
5612
  } : i;
5609
5613
  }
5610
- function Js(e, t, n) {
5614
+ function Ys(e, t, n) {
5611
5615
  var r;
5612
- return (r = Ec(e, t, "wordBuilder")) == null ? {
5613
- answers: wc(n),
5616
+ return (r = Dc(e, t, "wordBuilder")) == null ? {
5617
+ answers: Tc(n),
5614
5618
  type: "wordBuilder"
5615
5619
  } : r;
5616
5620
  }
5617
- function Ys(e, t) {
5621
+ function Xs(e, t) {
5618
5622
  var n;
5619
- return (n = Ec(e, t, "judgement")) == null ? {
5623
+ return (n = Dc(e, t, "judgement")) == null ? {
5620
5624
  selectedValues: [],
5621
5625
  type: "judgement"
5622
5626
  } : n;
5623
5627
  }
5624
- function Xs(e, t) {
5628
+ function Zs(e, t) {
5625
5629
  var n;
5626
- return (n = Ec(e, t, "classification")) == null ? {
5630
+ return (n = Dc(e, t, "classification")) == null ? {
5627
5631
  placements: {},
5628
5632
  type: "classification"
5629
5633
  } : n;
5630
5634
  }
5631
- function Zs(e, t) {
5635
+ function Qs(e, t) {
5632
5636
  var n;
5633
- return (n = Ec(e, t, "lineConnect")) == null ? {
5637
+ return (n = Dc(e, t, "lineConnect")) == null ? {
5634
5638
  connections: {},
5635
5639
  type: "lineConnect"
5636
5640
  } : n;
5637
5641
  }
5638
- function Qs(e, t) {
5642
+ function $s(e, t) {
5639
5643
  var n;
5640
- return (n = Ec(e, t, "matching")) == null ? {
5644
+ return (n = Dc(e, t, "matching")) == null ? {
5641
5645
  connections: {},
5642
5646
  type: "matching"
5643
5647
  } : n;
5644
5648
  }
5645
- function $s(e, t, n) {
5649
+ function ec(e, t, n) {
5646
5650
  var r;
5647
- return (r = Ec(e, t, "ordering")) == null ? {
5651
+ return (r = Dc(e, t, "ordering")) == null ? {
5648
5652
  orderedOptionIds: n.sortOptions.map((e) => e.id),
5649
5653
  type: "ordering"
5650
5654
  } : r;
5651
5655
  }
5652
- function ec(e, t) {
5656
+ function tc(e, t) {
5653
5657
  var n;
5654
- return (n = Ec(e, t, "textMarker")) == null ? {
5658
+ return (n = Dc(e, t, "textMarker")) == null ? {
5655
5659
  selectedMarkers: [],
5656
5660
  type: "textMarker"
5657
5661
  } : n;
5658
5662
  }
5659
- function tc(e, t) {
5663
+ function nc(e, t) {
5660
5664
  var n;
5661
- return (n = Ec(e, t, "textResponse")) == null ? {
5665
+ return (n = Dc(e, t, "textResponse")) == null ? {
5662
5666
  content: M(),
5663
5667
  type: "textResponse"
5664
5668
  } : n;
5665
5669
  }
5666
- function nc(e, t, n) {
5670
+ function rc(e, t, n) {
5667
5671
  return k(k({}, e), {}, { items: e.items.map((e, r) => r === t ? n : e) });
5668
5672
  }
5669
- function rc(e, t, n) {
5673
+ function ic(e, t, n) {
5670
5674
  return k(k({}, e), {}, { children: e.children.map((e, r) => r === t ? n : e) });
5671
5675
  }
5672
- function ic(e, t, n) {
5676
+ function ac(e, t, n) {
5673
5677
  return Ue(e, t, n);
5674
5678
  }
5675
- function ac(e, t, n = "single") {
5679
+ function oc(e, t, n = "single") {
5676
5680
  return {
5677
5681
  kind: "option",
5678
5682
  optionIds: Ue((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
5679
5683
  };
5680
5684
  }
5681
- function oc(e, t, n) {
5685
+ function sc(e, t, n) {
5682
5686
  return ut(e, t, n);
5683
5687
  }
5684
- function sc(e, t, n) {
5688
+ function cc(e, t, n) {
5685
5689
  return yt(e, t, n);
5686
5690
  }
5687
- function cc(e, t, n) {
5691
+ function lc(e, t, n) {
5688
5692
  return et(e, t, n);
5689
5693
  }
5690
- function lc(e, t, n, r) {
5694
+ function uc(e, t, n, r) {
5691
5695
  return Br(e, t.sortOptions, n, r);
5692
5696
  }
5693
- function uc(e, t) {
5697
+ function dc(e, t) {
5694
5698
  return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
5695
5699
  }
5696
- function dc(e, t) {
5700
+ function fc(e, t) {
5697
5701
  return e.type === "richText" ? null : e.type === "textResponse" ? {
5698
5702
  content: M(),
5699
5703
  type: "textResponse"
5700
- } : e.type === "ordering" ? Sc(t) : e.type === "classification" ? pc(t) : e.type === "fill" ? gc(t) : fc(e, t);
5704
+ } : e.type === "ordering" ? Cc(t) : e.type === "classification" ? mc(t) : e.type === "fill" ? _c(t) : pc(e, t);
5701
5705
  }
5702
- function fc(e, t) {
5706
+ function pc(e, t) {
5703
5707
  switch (e.type) {
5704
- case "choice": return hc();
5705
- case "inlineFill": return _c(e, t);
5706
- case "wordBuilder": return mc(t);
5707
- case "judgement": return vc();
5708
- case "lineConnect": return yc();
5709
- case "matching": return bc();
5710
- case "textMarker": return Cc();
5708
+ case "choice": return gc();
5709
+ case "inlineFill": return vc(e, t);
5710
+ case "wordBuilder": return hc(t);
5711
+ case "judgement": return yc();
5712
+ case "lineConnect": return bc();
5713
+ case "matching": return xc();
5714
+ case "textMarker": return wc();
5711
5715
  }
5712
5716
  }
5713
- function pc(e) {
5717
+ function mc(e) {
5714
5718
  return e.type === "classification" ? {
5715
- placements: xc({}, e),
5719
+ placements: Sc({}, e),
5716
5720
  type: "classification"
5717
5721
  } : null;
5718
5722
  }
5719
- function mc(e) {
5723
+ function hc(e) {
5720
5724
  return e.type === "wordBuilder" ? {
5721
- answers: wc(e.blanks),
5725
+ answers: Tc(e.blanks),
5722
5726
  type: "wordBuilder"
5723
5727
  } : null;
5724
5728
  }
5725
- function hc() {
5729
+ function gc() {
5726
5730
  return {
5727
5731
  selectedOptionIds: [],
5728
5732
  type: "choice"
5729
5733
  };
5730
5734
  }
5731
- function gc(e) {
5735
+ function _c(e) {
5732
5736
  return e.type === "fill" ? {
5733
- answers: wc(e.blanks),
5737
+ answers: Tc(e.blanks),
5734
5738
  type: "fill"
5735
5739
  } : null;
5736
5740
  }
5737
- function _c(e, t) {
5741
+ function vc(e, t) {
5738
5742
  return t.type === "inlineFill" ? {
5739
- answers: Tc(e, t.blanks),
5743
+ answers: Ec(e, t.blanks),
5740
5744
  type: "inlineFill"
5741
5745
  } : null;
5742
5746
  }
5743
- function vc() {
5747
+ function yc() {
5744
5748
  return {
5745
5749
  selectedValues: [],
5746
5750
  type: "judgement"
5747
5751
  };
5748
5752
  }
5749
- function yc() {
5753
+ function bc() {
5750
5754
  return {
5751
5755
  connections: {},
5752
5756
  type: "lineConnect"
5753
5757
  };
5754
5758
  }
5755
- function bc() {
5759
+ function xc() {
5756
5760
  return {
5757
5761
  connections: {},
5758
5762
  type: "matching"
5759
5763
  };
5760
5764
  }
5761
- function xc(e, t) {
5765
+ function Sc(e, t) {
5762
5766
  return $e(e, t.categories, t.items);
5763
5767
  }
5764
- function Sc(e) {
5768
+ function Cc(e) {
5765
5769
  return e.type === "ordering" ? {
5766
5770
  orderedOptionIds: e.sortOptions.map((e) => e.id),
5767
5771
  type: "ordering"
5768
5772
  } : null;
5769
5773
  }
5770
- function Cc() {
5774
+ function wc() {
5771
5775
  return {
5772
5776
  selectedMarkers: [],
5773
5777
  type: "textMarker"
5774
5778
  };
5775
5779
  }
5776
- function wc(e) {
5780
+ function Tc(e) {
5777
5781
  return e.reduce((e, t) => k(k({}, e), {}, { [t]: "" }), {});
5778
5782
  }
5779
- function Tc(e, t) {
5783
+ function Ec(e, t) {
5780
5784
  return t.reduce((t, n) => k(k({}, t), {}, { [n]: e.config.candidateMode === "none" ? {
5781
5785
  kind: "text",
5782
5786
  value: ""
@@ -5785,16 +5789,16 @@ function Tc(e, t) {
5785
5789
  optionIds: []
5786
5790
  } }), {});
5787
5791
  }
5788
- function Ec(e, t, n) {
5792
+ function Dc(e, t, n) {
5789
5793
  let r = e.items[t];
5790
- return r && Dc(r, n) ? r : void 0;
5794
+ return r && Oc(r, n) ? r : void 0;
5791
5795
  }
5792
- function Dc(e, t) {
5796
+ function Oc(e, t) {
5793
5797
  return e.type === t;
5794
5798
  }
5795
5799
  //#endregion
5796
5800
  //#region src/question/i18n/messages.ts
5797
- var Oc = {
5801
+ var kc = {
5798
5802
  "en-US": {
5799
5803
  addBlank: "Add blank",
5800
5804
  addCard: "Add card",
@@ -5924,10 +5928,10 @@ var Oc = {
5924
5928
  previewEmpty: "\u6682\u65e0\u9898\u76ee\u5185\u5bb9\u3002"
5925
5929
  }
5926
5930
  };
5927
- function kc(e = "zh-CN") {
5931
+ function Ac(e = "zh-CN") {
5928
5932
  switch (e) {
5929
- case "en-US": return Oc["en-US"];
5930
- case "zh-CN": return Oc["zh-CN"];
5933
+ case "en-US": return kc["en-US"];
5934
+ case "zh-CN": return kc["zh-CN"];
5931
5935
  }
5932
5936
  }
5933
5937
  //#endregion
@@ -5935,42 +5939,42 @@ function kc(e = "zh-CN") {
5935
5939
  function U(...e) {
5936
5940
  return e.filter(Boolean).join(" ");
5937
5941
  }
5938
- function Ac(e, t, n) {
5942
+ function jc(e, t, n) {
5939
5943
  return e.map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => `${n}${e}`).join(" ");
5940
5944
  }
5941
- function jc(e) {
5945
+ function Mc(e) {
5942
5946
  return "answerPools" in e;
5943
5947
  }
5944
- function Mc(e) {
5948
+ function Nc(e) {
5945
5949
  return "answerOptionId" in e;
5946
5950
  }
5947
- function Nc(e) {
5951
+ function Pc(e) {
5948
5952
  return "answerOptionIds" in e;
5949
5953
  }
5950
- function Pc(e, t) {
5954
+ function Fc(e, t) {
5951
5955
  var n, r;
5952
5956
  return (n = e == null || (r = e.find((e) => e.optionId === t)) == null ? void 0 : r.content) == null ? null : n;
5953
5957
  }
5954
- function Fc(e, t, n) {
5958
+ function Ic(e, t, n) {
5955
5959
  var r, i;
5956
5960
  return (r = e == null || (i = e.find((e) => e.blankId === t)) == null || (i = i.options.find((e) => e.optionId === n)) == null ? void 0 : i.content) == null ? null : r;
5957
5961
  }
5958
- function Ic(e) {
5962
+ function Lc(e) {
5959
5963
  return e.answers.reduce((t, n) => {
5960
- if (jc(n)) return Lc(t, {
5964
+ if (Mc(n)) return Rc(t, {
5961
5965
  blankIds: n.blankIds,
5962
5966
  contents: n.answerPools
5963
5967
  });
5964
- if (Mc(n)) {
5965
- let r = Fc(e.blankOptionGroups, n.blankId, n.answerOptionId);
5966
- return Lc(t, {
5968
+ if (Nc(n)) {
5969
+ let r = Ic(e.blankOptionGroups, n.blankId, n.answerOptionId);
5970
+ return Rc(t, {
5967
5971
  blankIds: [n.blankId],
5968
5972
  contents: r ? [r] : []
5969
5973
  });
5970
5974
  }
5971
- if (Nc(n)) {
5972
- let r = n.answerOptionIds.map((t) => Pc(e.candidateOptions, t)).filter((e) => !!e);
5973
- return Lc(t, {
5975
+ if (Pc(n)) {
5976
+ let r = n.answerOptionIds.map((t) => Fc(e.candidateOptions, t)).filter((e) => !!e);
5977
+ return Rc(t, {
5974
5978
  blankIds: n.blankIds,
5975
5979
  contents: r
5976
5980
  });
@@ -5978,19 +5982,19 @@ function Ic(e) {
5978
5982
  return t;
5979
5983
  }, []);
5980
5984
  }
5981
- function Lc(e, t) {
5985
+ function Rc(e, t) {
5982
5986
  let n = t.contents.filter((e) => e.text.trim() !== "");
5983
5987
  return n.length > 0 ? [...e, {
5984
5988
  blankIds: t.blankIds,
5985
5989
  contents: n
5986
5990
  }] : e;
5987
5991
  }
5988
- var Rc = { title: "_title_hrc5o_1" };
5992
+ var zc = { title: "_title_hrc5o_1" };
5989
5993
  //#endregion
5990
5994
  //#region src/question/renderers/QuestionSectionTitle.tsx
5991
- function zc({ children: e }) {
5995
+ function Bc({ children: e }) {
5992
5996
  return /* @__PURE__ */ a("h3", {
5993
- className: Rc.title,
5997
+ className: zc.title,
5994
5998
  children: e
5995
5999
  });
5996
6000
  }
@@ -6010,25 +6014,25 @@ var W = {
6010
6014
  };
6011
6015
  //#endregion
6012
6016
  //#region src/question/player/QuestionPlayerComposite.tsx
6013
- function Bc({ messages: e, numberPath: t = [], onChildResponseChange: n, renderChild: r, response: i, value: o }) {
6014
- return o.children.length === 0 ? /* @__PURE__ */ a("div", {
6017
+ function Vc({ childIndexPath: e = [], messages: t, onChildResponseChange: n, renderChild: r, response: i, rootQuestionNumber: o, value: s }) {
6018
+ return s.children.length === 0 ? /* @__PURE__ */ a("div", {
6015
6019
  className: W.empty,
6016
- children: e.previewEmpty
6020
+ children: t.previewEmpty
6017
6021
  }) : /* @__PURE__ */ a("div", {
6018
6022
  className: W.children,
6019
- children: o.children.map((s, c) => {
6020
- let l = [...t, c], u = i.children.slice(c, c + 1)[0], d = Lo(l, o.children.length) ? Io(l) : null;
6023
+ children: s.children.map((c, l) => {
6024
+ let u = [...e, l], d = i.children.slice(l, l + 1)[0], f = Ro(u, s.children.length, o);
6021
6025
  return /* @__PURE__ */ a("section", {
6022
6026
  className: W.child,
6023
- children: /* @__PURE__ */ a(zo, {
6027
+ children: /* @__PURE__ */ a(Bo, {
6024
6028
  indented: !0,
6025
- number: d,
6026
- children: u ? r(s, u, (e) => n(c, e), l) : /* @__PURE__ */ a("div", {
6029
+ number: f,
6030
+ children: d ? r(c, d, (e) => n(l, e), u) : /* @__PURE__ */ a("div", {
6027
6031
  className: W.empty,
6028
- children: e.missingQuestionTypeTemplate
6032
+ children: t.missingQuestionTypeTemplate
6029
6033
  })
6030
6034
  })
6031
- }, s.id || c);
6035
+ }, c.id || l);
6032
6036
  })
6033
6037
  });
6034
6038
  }
@@ -6058,7 +6062,7 @@ function K({ className: e, content: t }) {
6058
6062
  }
6059
6063
  //#endregion
6060
6064
  //#region src/question/renderers/QuestionStandardAnswerPanel.module.css
6061
- var Vc = {
6065
+ var Hc = {
6062
6066
  "answer-panel": "_answer-panel_1bkkd_1",
6063
6067
  "answer-list": "_answer-list_1bkkd_8",
6064
6068
  "answer-row": "_answer-row_1bkkd_16",
@@ -6073,18 +6077,18 @@ function q({ groups: e, title: t }) {
6073
6077
  let n = e.filter((e) => e.kind === "markerOnly" || e.contents.length > 0);
6074
6078
  return n.length === 0 ? null : /* @__PURE__ */ o("section", {
6075
6079
  "aria-label": t,
6076
- className: Vc["answer-panel"],
6077
- children: [/* @__PURE__ */ a(zc, { children: t }), /* @__PURE__ */ a("ol", {
6078
- className: Vc["answer-list"],
6080
+ className: Hc["answer-panel"],
6081
+ children: [/* @__PURE__ */ a(Bc, { children: t }), /* @__PURE__ */ a("ol", {
6082
+ className: Hc["answer-list"],
6079
6083
  children: n.map((e, t) => /* @__PURE__ */ o("li", {
6080
- className: Vc["answer-row"],
6084
+ className: Hc["answer-row"],
6081
6085
  children: [e.marker ? /* @__PURE__ */ a("span", {
6082
- className: e.kind === "markerOnly" ? `${Vc["answer-marker"]} ${Vc["answer-marker-only"]}` : Vc["answer-marker"],
6086
+ className: e.kind === "markerOnly" ? `${Hc["answer-marker"]} ${Hc["answer-marker-only"]}` : Hc["answer-marker"],
6083
6087
  children: e.marker
6084
6088
  }) : null, e.kind === "detailed" ? /* @__PURE__ */ a("div", {
6085
- className: Vc["answer-content-list"],
6089
+ className: Hc["answer-content-list"],
6086
6090
  children: e.contents.map((e, t) => /* @__PURE__ */ a("div", {
6087
- className: Vc["answer-value"],
6091
+ className: Hc["answer-value"],
6088
6092
  children: e
6089
6093
  }, `answer-${t}`))
6090
6094
  }) : null]
@@ -6094,11 +6098,11 @@ function q({ groups: e, title: t }) {
6094
6098
  }
6095
6099
  //#endregion
6096
6100
  //#region src/question/player/QuestionBlankGroupPlayer.tsx
6097
- function Hc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6098
- let l = Ks(i, s, t.blanks), u = N(t.answers, t.blanks).map((e, r) => ({
6101
+ function Uc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6102
+ let l = qs(i, s, t.blanks), u = N(t.answers, t.blanks).map((e, r) => ({
6099
6103
  kind: "detailed",
6100
6104
  contents: e.answerPools.map((e, t) => /* @__PURE__ */ a(K, { content: e }, `group-${r}-answer-${t}`)),
6101
- marker: Ac(e.blankIds, t.blanks, n.blankLabel)
6105
+ marker: jc(e.blankIds, t.blanks, n.blankLabel)
6102
6106
  }));
6103
6107
  function d(e, t) {
6104
6108
  r(k(k({}, l), {}, { answers: k(k({}, l.answers), {}, { [e]: t }) }));
@@ -6118,24 +6122,24 @@ function Hc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6118
6122
  className: W.input,
6119
6123
  disabled: e,
6120
6124
  onChange: (e) => d(t, e.target.value),
6121
- value: Wc(l.answers, t)
6125
+ value: Gc(l.answers, t)
6122
6126
  })]
6123
- }, Uc(t, r))), c ? /* @__PURE__ */ a(q, {
6127
+ }, Wc(t, r))), c ? /* @__PURE__ */ a(q, {
6124
6128
  groups: u,
6125
6129
  title: n.standardAnswer
6126
6130
  }) : null]
6127
6131
  });
6128
6132
  }
6129
- function Uc(e, t) {
6133
+ function Wc(e, t) {
6130
6134
  return e || `blank-${t + 1}`;
6131
6135
  }
6132
- function Wc(e, t) {
6136
+ function Gc(e, t) {
6133
6137
  var n, r;
6134
6138
  return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? "" : n;
6135
6139
  }
6136
6140
  //#endregion
6137
6141
  //#region src/question/renderers/classificationAnswers.tsx
6138
- function Gc(e) {
6142
+ function Kc(e) {
6139
6143
  return e.categories.map((t) => ({
6140
6144
  kind: "detailed",
6141
6145
  contents: e.items.filter((n) => e.answers[n.id] === t.id).map((e) => /* @__PURE__ */ a(K, { content: e.content }, `${t.id}-${e.id}`)),
@@ -6157,10 +6161,10 @@ var J = {
6157
6161
  };
6158
6162
  //#endregion
6159
6163
  //#region src/question/player/QuestionClassificationPlayer.tsx
6160
- function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6161
- let [l, u] = m(""), d = Xs(i, s), f = Jc(d.placements, t), p = t.items.find((e) => e.id === l);
6164
+ function qc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6165
+ let [l, u] = m(""), d = Zs(i, s), f = Yc(d.placements, t), p = t.items.find((e) => e.id === l);
6162
6166
  function h(e, n) {
6163
- r(k(k({}, d), {}, { placements: Jc(cc(f, e, n), t) })), u("");
6167
+ r(k(k({}, d), {}, { placements: Yc(lc(f, e, n), t) })), u("");
6164
6168
  }
6165
6169
  function g(t, n) {
6166
6170
  t.preventDefault();
@@ -6168,7 +6172,7 @@ function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6168
6172
  !e && r && h(r, n);
6169
6173
  }
6170
6174
  function _(n) {
6171
- let r = l === n.id, i = qc(n.id, f, t, c);
6175
+ let r = l === n.id, i = Jc(n.id, f, t, c);
6172
6176
  return /* @__PURE__ */ a("button", {
6173
6177
  "aria-pressed": r,
6174
6178
  className: U(J.item, r && J.selected, i === "correct" && J.correct, i === "incorrect" && J.incorrect, i === "unanswered" && J.unanswered),
@@ -6218,62 +6222,62 @@ function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6218
6222
  children: t.items.filter((e) => !f[e.id]).map((e) => _(e))
6219
6223
  })]
6220
6224
  }), c ? /* @__PURE__ */ a(q, {
6221
- groups: Gc(t),
6225
+ groups: Kc(t),
6222
6226
  title: n.standardAnswer
6223
6227
  }) : null]
6224
6228
  });
6225
6229
  }
6226
- function qc(e, t, n, r) {
6230
+ function Jc(e, t, n, r) {
6227
6231
  var i, a;
6228
6232
  let o = (i = t[e]) == null ? "" : i, s = (a = n.answers[e]) == null ? "" : a;
6229
6233
  if (!(!r || !s)) return o ? s === o ? "correct" : "incorrect" : "unanswered";
6230
6234
  }
6231
- function Jc(e, t) {
6235
+ function Yc(e, t) {
6232
6236
  return $e(e, t.categories, t.items);
6233
6237
  }
6234
6238
  //#endregion
6235
6239
  //#region src/question/renderers/QuestionRichContentWithBlankView.tsx
6236
- function Yc({ className: e, content: t, renderBlank: n }) {
6240
+ function Xc({ className: e, content: t, renderBlank: n }) {
6237
6241
  let r = /* @__PURE__ */ new Map();
6238
6242
  return /* @__PURE__ */ a("div", {
6239
6243
  className: [G["rich-content"], e == null ? "" : e].filter(Boolean).join(" "),
6240
- children: t.json.map((e, t) => Xc(e, {
6244
+ children: t.json.map((e, t) => Zc(e, {
6241
6245
  blankIndexes: r,
6242
6246
  key: `node-${t}`,
6243
6247
  renderBlank: n
6244
6248
  }))
6245
6249
  });
6246
6250
  }
6247
- function Xc(e, t) {
6251
+ function Zc(e, t) {
6248
6252
  if (typeof e.text == "string") return /* @__PURE__ */ a(s, { children: e.text }, t.key);
6249
- if (e.type === "blank") return /* @__PURE__ */ a(s, { children: Zc(e, t) }, t.key);
6250
- let n = $c(e.children, t);
6253
+ if (e.type === "blank") return /* @__PURE__ */ a(s, { children: Qc(e, t) }, t.key);
6254
+ let n = el(e.children, t);
6251
6255
  switch (e.type) {
6252
- case "heading": return el(e, n, t.key);
6256
+ case "heading": return tl(e, n, t.key);
6253
6257
  case "table": return /* @__PURE__ */ a("table", { children: n }, t.key);
6254
6258
  case "table-row": return /* @__PURE__ */ a("tr", { children: n }, t.key);
6255
6259
  case "table-cell": return /* @__PURE__ */ a("td", { children: n }, t.key);
6256
6260
  default: return /* @__PURE__ */ a("p", { children: n }, t.key);
6257
6261
  }
6258
6262
  }
6259
- function Zc(e, t) {
6260
- let n = tl(e.blankId), r = Qc(t.blankIndexes, n);
6263
+ function Qc(e, t) {
6264
+ let n = nl(e.blankId), r = $c(t.blankIndexes, n);
6261
6265
  return t.renderBlank({
6262
6266
  blankId: n,
6263
6267
  index: r,
6264
- label: tl(e.label)
6268
+ label: nl(e.label)
6265
6269
  });
6266
6270
  }
6267
- function Qc(e, t) {
6271
+ function $c(e, t) {
6268
6272
  let n = e.get(t);
6269
6273
  if (n !== void 0) return n;
6270
6274
  let r = e.size;
6271
6275
  return e.set(t, r), r;
6272
6276
  }
6273
- function $c(e, t) {
6274
- return (e == null ? [] : e).map((e, n) => Xc(e, k(k({}, t), {}, { key: `${t.key}-${n}` })));
6277
+ function el(e, t) {
6278
+ return (e == null ? [] : e).map((e, n) => Zc(e, k(k({}, t), {}, { key: `${t.key}-${n}` })));
6275
6279
  }
6276
- function el(e, t, n) {
6280
+ function tl(e, t, n) {
6277
6281
  switch (e.level) {
6278
6282
  case 1: return /* @__PURE__ */ a("h1", { children: t }, n);
6279
6283
  case 2: return /* @__PURE__ */ a("h2", { children: t }, n);
@@ -6281,7 +6285,7 @@ function el(e, t, n) {
6281
6285
  default: return /* @__PURE__ */ a("p", { children: t }, n);
6282
6286
  }
6283
6287
  }
6284
- function tl(e) {
6288
+ function nl(e) {
6285
6289
  return typeof e == "string" ? e : "";
6286
6290
  }
6287
6291
  var Y = {
@@ -6302,10 +6306,10 @@ var Y = {
6302
6306
  };
6303
6307
  //#endregion
6304
6308
  //#region src/question/player/QuestionFillTextContentPlayer.tsx
6305
- function nl({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
6306
- return /* @__PURE__ */ a(Yc, {
6309
+ function rl({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
6310
+ return /* @__PURE__ */ a(Xc, {
6307
6311
  content: n.content,
6308
- renderBlank: (a) => rl(a, {
6312
+ renderBlank: (a) => il(a, {
6309
6313
  answers: e,
6310
6314
  blankLabel: r.blankLabel,
6311
6315
  disabled: t,
@@ -6315,10 +6319,10 @@ function nl({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i,
6315
6319
  })
6316
6320
  });
6317
6321
  }
6318
- function rl(e, t) {
6319
- let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = ll(e.label, t.blankLabel, r);
6322
+ function il(e, t) {
6323
+ let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = ul(e.label, t.blankLabel, r);
6320
6324
  if (t.structure.config.candidateMode === "none") {
6321
- let e = al(t.answers, n);
6325
+ let e = ol(t.answers, n);
6322
6326
  return /* @__PURE__ */ a("input", {
6323
6327
  "aria-label": i,
6324
6328
  className: Y["inline-input"],
@@ -6330,8 +6334,8 @@ function rl(e, t) {
6330
6334
  value: (e == null ? void 0 : e.kind) === "text" ? e.value : ""
6331
6335
  });
6332
6336
  }
6333
- if (t.structure.config.candidateMode === "sharedPool") return il(n, i, t);
6334
- let o = al(t.answers, n), s = sl(t.item, n, t.structure.config.candidateMode, o);
6337
+ if (t.structure.config.candidateMode === "sharedPool") return al(n, i, t);
6338
+ let o = ol(t.answers, n), s = cl(t.item, n, t.structure.config.candidateMode, o);
6335
6339
  return /* @__PURE__ */ a("span", {
6336
6340
  "aria-label": i,
6337
6341
  className: Y["inline-blank-underline"],
@@ -6341,9 +6345,9 @@ function rl(e, t) {
6341
6345
  }) : i
6342
6346
  });
6343
6347
  }
6344
- function il(e, t, n) {
6348
+ function al(e, t, n) {
6345
6349
  var r, i;
6346
- let s = al(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = cl(n.answers, e);
6350
+ let s = ol(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = ll(n.answers, e);
6347
6351
  return /* @__PURE__ */ o("select", {
6348
6352
  "aria-label": t,
6349
6353
  className: Y["inline-select"],
@@ -6363,11 +6367,11 @@ function il(e, t, n) {
6363
6367
  }, e.optionId))]
6364
6368
  });
6365
6369
  }
6366
- function al(e, t) {
6370
+ function ol(e, t) {
6367
6371
  var n;
6368
6372
  return (n = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : n[1];
6369
6373
  }
6370
- function ol(e, t, n) {
6374
+ function sl(e, t, n) {
6371
6375
  var r, i;
6372
6376
  if (n === "sharedPool") {
6373
6377
  var a;
@@ -6375,25 +6379,25 @@ function ol(e, t, n) {
6375
6379
  }
6376
6380
  return (r = (i = e.blankOptionGroups) == null || (i = i.find((e) => e.blankId === t)) == null ? void 0 : i.options) == null ? [] : r;
6377
6381
  }
6378
- function sl(e, t, n, r) {
6382
+ function cl(e, t, n, r) {
6379
6383
  let i = (r == null ? void 0 : r.kind) === "option" ? r.optionIds[0] : void 0;
6380
- if (i) return ol(e, t, n).find((e) => e.optionId === i);
6384
+ if (i) return sl(e, t, n).find((e) => e.optionId === i);
6381
6385
  }
6382
- function cl(e, t) {
6386
+ function ll(e, t) {
6383
6387
  let n = /* @__PURE__ */ new Set(), r = Object.entries(e);
6384
6388
  for (let [e, i] of r) if (e !== t && i.kind === "option") for (let e of i.optionIds) n.add(e);
6385
6389
  return n;
6386
6390
  }
6387
- function ll(e, t, n) {
6391
+ function ul(e, t, n) {
6388
6392
  return e || `${t} ${n + 1}`;
6389
6393
  }
6390
6394
  //#endregion
6391
6395
  //#region src/question/player/QuestionFillTextPlayer.tsx
6392
- function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6393
- let u = En(n, t, !0), d = Ic(u), f = qs(s, c, t, u.blanks), p = d.map((e, t) => ({
6396
+ function dl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6397
+ let u = En(n, t, !0), d = Lc(u), f = Js(s, c, t, u.blanks), p = d.map((e, t) => ({
6394
6398
  kind: "detailed",
6395
6399
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(K, { content: e }, `group-${t}-answer-${n}`)),
6396
- marker: Ac(e.blankIds, u.blanks, r.blankLabel)
6400
+ marker: jc(e.blankIds, u.blanks, r.blankLabel)
6397
6401
  }));
6398
6402
  function m(e, t) {
6399
6403
  i(k(k({}, f), {}, { answers: k(k({}, f.answers), {}, { [e]: t }) }));
@@ -6401,7 +6405,7 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6401
6405
  return /* @__PURE__ */ o("div", {
6402
6406
  className: W["fill-text"],
6403
6407
  children: [
6404
- /* @__PURE__ */ a(nl, {
6408
+ /* @__PURE__ */ a(rl, {
6405
6409
  answers: f.answers,
6406
6410
  disabled: e,
6407
6411
  item: u,
@@ -6409,8 +6413,8 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6409
6413
  onAnswerChange: m,
6410
6414
  structure: t
6411
6415
  }),
6412
- dl(u, t.config.candidateMode, r.candidateOptions),
6413
- fl({
6416
+ fl(u, t.config.candidateMode, r.candidateOptions),
6417
+ pl({
6414
6418
  disabled: e,
6415
6419
  item: u,
6416
6420
  onAnswerChange: m,
@@ -6423,7 +6427,7 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6423
6427
  ]
6424
6428
  });
6425
6429
  }
6426
- function dl(e, t, n) {
6430
+ function fl(e, t, n) {
6427
6431
  var r;
6428
6432
  let i = (r = e.candidateOptions) == null ? [] : r;
6429
6433
  return t !== "sharedPool" || i.length === 0 ? null : /* @__PURE__ */ o("div", {
@@ -6443,7 +6447,7 @@ function dl(e, t, n) {
6443
6447
  })]
6444
6448
  });
6445
6449
  }
6446
- function fl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6450
+ function pl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6447
6451
  let i = t.blanks.reduce((e, n, r) => {
6448
6452
  var i;
6449
6453
  let a = (i = t.blankOptionGroups) == null ? void 0 : i.find((e) => e.blankId === n);
@@ -6454,7 +6458,7 @@ function fl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6454
6458
  }, []);
6455
6459
  return i.length === 0 ? null : /* @__PURE__ */ a("div", {
6456
6460
  className: Y["per-blank-candidate-options"],
6457
- children: i.map(({ group: t, marker: i }) => pl({
6461
+ children: i.map(({ group: t, marker: i }) => ml({
6458
6462
  disabled: e,
6459
6463
  group: t,
6460
6464
  marker: i,
@@ -6463,7 +6467,7 @@ function fl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6463
6467
  }))
6464
6468
  });
6465
6469
  }
6466
- function pl({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6470
+ function ml({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6467
6471
  let s = i.answers[t.blankId];
6468
6472
  return /* @__PURE__ */ o("section", {
6469
6473
  "aria-label": n,
@@ -6473,7 +6477,7 @@ function pl({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
6473
6477
  children: n
6474
6478
  }), /* @__PURE__ */ a("div", {
6475
6479
  className: Y["per-blank-candidate-list"],
6476
- children: t.options.map((n) => ml({
6480
+ children: t.options.map((n) => hl({
6477
6481
  activeAnswer: s,
6478
6482
  blankId: t.blankId,
6479
6483
  disabled: e,
@@ -6483,14 +6487,14 @@ function pl({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
6483
6487
  })]
6484
6488
  }, t.blankId);
6485
6489
  }
6486
- function ml({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i }) {
6490
+ function hl({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i }) {
6487
6491
  let o = (e == null ? void 0 : e.kind) === "option" && e.optionIds.includes(i.optionId);
6488
6492
  return /* @__PURE__ */ a("button", {
6489
6493
  "aria-pressed": o,
6490
6494
  className: o ? Y.selected : void 0,
6491
6495
  "data-selected": o ? "true" : void 0,
6492
6496
  disabled: n,
6493
- onClick: () => r(t, ac(e, i.optionId, "single")),
6497
+ onClick: () => r(t, oc(e, i.optionId, "single")),
6494
6498
  type: "button",
6495
6499
  children: /* @__PURE__ */ a(K, { content: i.content })
6496
6500
  }, i.optionId);
@@ -6510,8 +6514,8 @@ var X = {
6510
6514
  };
6511
6515
  //#endregion
6512
6516
  //#region src/question/player/QuestionJudgementGroupPlayer.tsx
6513
- function hl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6514
- let u = Ys(s, c), d = un(t.config.judgeAnswerMode), f = [{
6517
+ function gl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6518
+ let u = Xs(s, c), d = un(t.config.judgeAnswerMode), f = [{
6515
6519
  kind: "detailed",
6516
6520
  contents: dn(t.config.judgeAnswerMode, n.answers),
6517
6521
  marker: ""
@@ -6546,8 +6550,8 @@ function hl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6546
6550
  }
6547
6551
  //#endregion
6548
6552
  //#region src/question/renderers/lineConnectAnswers.tsx
6549
- function gl(e) {
6550
- let t = _l(e);
6553
+ function _l(e) {
6554
+ let t = vl(e);
6551
6555
  return e.columns.reduce((n, r, i) => {
6552
6556
  let o = r.items.map((n, o) => {
6553
6557
  var s;
@@ -6563,7 +6567,7 @@ function gl(e) {
6563
6567
  return [...n, ...o];
6564
6568
  }, []);
6565
6569
  }
6566
- function _l(e) {
6570
+ function vl(e) {
6567
6571
  return e.columns.reduce((e, t, n) => (t.items.forEach((t) => e.set(t.itemId, {
6568
6572
  columnIndex: n,
6569
6573
  item: t
@@ -6571,8 +6575,8 @@ function _l(e) {
6571
6575
  }
6572
6576
  //#endregion
6573
6577
  //#region src/question/player/QuestionLineConnectPlayer.tsx
6574
- function vl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6575
- let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b = Zs(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = f(() => Za(t, b.connections), [t, b.connections]), ee = f(() => JSON.stringify({
6578
+ function yl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6579
+ let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b = Qs(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = f(() => Za(t, b.connections), [t, b.connections]), ee = f(() => JSON.stringify({
6576
6580
  columns: t.columns.map((e) => e.items.map((e) => e.itemId)),
6577
6581
  connections: b.connections
6578
6582
  }), [t.columns, b.connections]), C = l(() => {
@@ -6623,7 +6627,7 @@ function vl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6623
6627
  itemId: n
6624
6628
  }) : null;
6625
6629
  if (i) {
6626
- r(k(k({}, b), {}, { connections: oc(b.connections, i.fromItemId, i.toItemId) })), h(null);
6630
+ r(k(k({}, b), {}, { connections: sc(b.connections, i.fromItemId, i.toItemId) })), h(null);
6627
6631
  return;
6628
6632
  }
6629
6633
  h({
@@ -6688,14 +6692,14 @@ function vl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6688
6692
  }, t.columnId))
6689
6693
  })]
6690
6694
  }), c ? /* @__PURE__ */ a(q, {
6691
- groups: gl(t),
6695
+ groups: _l(t),
6692
6696
  title: n.standardAnswer
6693
6697
  }) : null]
6694
6698
  });
6695
6699
  }
6696
6700
  //#endregion
6697
6701
  //#region src/question/renderers/matchingAnswers.tsx
6698
- function yl(e) {
6702
+ function bl(e) {
6699
6703
  var t, n;
6700
6704
  let r = e.columns[0], i = e.columns[1], o = new Map((t = i == null ? void 0 : i.items.map((e) => [e.itemId, e])) == null ? [] : t);
6701
6705
  return ((n = r == null ? void 0 : r.items) == null ? [] : n).map((t, n) => {
@@ -6710,7 +6714,7 @@ function yl(e) {
6710
6714
  };
6711
6715
  });
6712
6716
  }
6713
- var bl = {
6717
+ var xl = {
6714
6718
  board: "_board_1q6ar_1",
6715
6719
  "matched-rows": "_matched-rows_1q6ar_6",
6716
6720
  "matched-row": "_matched-row_1q6ar_6",
@@ -6723,8 +6727,8 @@ var bl = {
6723
6727
  };
6724
6728
  //#endregion
6725
6729
  //#region src/question/player/QuestionMatchingPlayer.tsx
6726
- function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6727
- let [l, u] = m(null), d = Qs(i, s), f = Sl(t, d.connections);
6730
+ function Sl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6731
+ let [l, u] = m(null), d = $s(i, s), f = Cl(t, d.connections);
6728
6732
  function p(t, n) {
6729
6733
  if (e) return;
6730
6734
  let i = l ? gt(l, {
@@ -6732,7 +6736,7 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6732
6736
  itemId: n
6733
6737
  }) : null;
6734
6738
  if (i) {
6735
- r(k(k({}, d), {}, { connections: sc(d.connections, i.fromItemId, i.toItemId) })), u(null);
6739
+ r(k(k({}, d), {}, { connections: cc(d.connections, i.fromItemId, i.toItemId) })), u(null);
6736
6740
  return;
6737
6741
  }
6738
6742
  u((l == null ? void 0 : l.itemId) === n ? null : {
@@ -6744,13 +6748,13 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6744
6748
  let r = (l == null ? void 0 : l.itemId) === t.item.itemId;
6745
6749
  return /* @__PURE__ */ o("button", {
6746
6750
  "aria-pressed": r,
6747
- className: U(bl.item, r && bl.selected, n && bl.matched),
6751
+ className: U(xl.item, r && xl.selected, n && xl.matched),
6748
6752
  "data-testid": `matching-player-item-${t.item.itemId}`,
6749
6753
  disabled: e,
6750
6754
  onClick: () => p(t.columnIndex, t.item.itemId),
6751
6755
  type: "button",
6752
6756
  children: [t.marker ? /* @__PURE__ */ a("span", {
6753
- className: bl.marker,
6757
+ className: xl.marker,
6754
6758
  children: t.marker
6755
6759
  }) : null, /* @__PURE__ */ a(K, { content: t.item.content })]
6756
6760
  }, t.item.itemId);
@@ -6758,31 +6762,31 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6758
6762
  return /* @__PURE__ */ o("div", {
6759
6763
  className: G.element,
6760
6764
  children: [/* @__PURE__ */ o("div", {
6761
- className: bl.board,
6765
+ className: xl.board,
6762
6766
  children: [f.rows.length > 0 ? /* @__PURE__ */ a("div", {
6763
- className: bl["matched-rows"],
6767
+ className: xl["matched-rows"],
6764
6768
  children: f.rows.map((e) => /* @__PURE__ */ o("div", {
6765
- className: bl["matched-row"],
6769
+ className: xl["matched-row"],
6766
6770
  "data-testid": `matching-player-row-${e.from.item.itemId}-${e.to.item.itemId}`,
6767
6771
  children: [h(e.from, !0), h(e.to, !0)]
6768
6772
  }, `${e.from.item.itemId}-${e.to.item.itemId}`))
6769
6773
  }) : null, f.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
6770
- className: bl.columns,
6774
+ className: xl.columns,
6771
6775
  children: f.unmatchedColumns.map((e, n) => {
6772
6776
  var r, i;
6773
6777
  return /* @__PURE__ */ a("section", {
6774
- className: bl.column,
6778
+ className: xl.column,
6775
6779
  children: e.map((e) => h(e, !1))
6776
6780
  }, (r = (i = t.columns[n]) == null ? void 0 : i.columnId) == null ? n : r);
6777
6781
  })
6778
6782
  }) : null]
6779
6783
  }), c ? /* @__PURE__ */ a(q, {
6780
- groups: yl(t),
6784
+ groups: bl(t),
6781
6785
  title: n.standardAnswer
6782
6786
  }) : null]
6783
6787
  });
6784
6788
  }
6785
- function Sl(e, t) {
6789
+ function Cl(e, t) {
6786
6790
  var n;
6787
6791
  let r = e.columns.map((e, t) => e.items.map((n, r) => ({
6788
6792
  columnIndex: t,
@@ -6803,13 +6807,13 @@ function Sl(e, t) {
6803
6807
  }
6804
6808
  //#endregion
6805
6809
  //#region src/question/renderers/optionGroupAnswers.tsx
6806
- function Cl(e, t) {
6810
+ function wl(e, t) {
6807
6811
  return pn(t, e.config.optionLabelStyle).map((e) => ({
6808
6812
  kind: "markerOnly",
6809
6813
  marker: e.marker
6810
6814
  }));
6811
6815
  }
6812
- var wl = {
6816
+ var Tl = {
6813
6817
  "table-wrap": "_table-wrap_n67ah_1",
6814
6818
  table: "_table_n67ah_1",
6815
6819
  "table-option-column": "_table-option-column_n67ah_17",
@@ -6817,21 +6821,21 @@ var wl = {
6817
6821
  };
6818
6822
  //#endregion
6819
6823
  //#region src/question/player/QuestionOptionGroupPlayer.tsx
6820
- function Tl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6821
- let u = Gs(s, c), d = fn(n, t.config.optionLabelStyle);
6824
+ function El({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6825
+ let u = Ks(s, c), d = fn(n, t.config.optionLabelStyle);
6822
6826
  function f(e) {
6823
- i(k(k({}, u), {}, { selectedOptionIds: ic(u.selectedOptionIds, e, t.config.selectionType) }));
6827
+ i(k(k({}, u), {}, { selectedOptionIds: ac(u.selectedOptionIds, e, t.config.selectionType) }));
6824
6828
  }
6825
6829
  if (t.config.renderer === "table") {
6826
- let i = Cl(t, n);
6830
+ let i = wl(t, n);
6827
6831
  return /* @__PURE__ */ o("div", {
6828
6832
  className: G.element,
6829
6833
  children: [/* @__PURE__ */ a("div", {
6830
- className: wl["table-wrap"],
6834
+ className: Tl["table-wrap"],
6831
6835
  children: /* @__PURE__ */ o("table", {
6832
- className: wl.table,
6836
+ className: Tl.table,
6833
6837
  children: [
6834
- /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: wl["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
6838
+ /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Tl["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
6835
6839
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: r.option }), n.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(K, { content: e.content }) }, e.id))] }) }),
6836
6840
  /* @__PURE__ */ a("tbody", { children: d.map((t) => {
6837
6841
  let n = u.selectedOptionIds.includes(t.optionId);
@@ -6867,7 +6871,7 @@ function Tl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6867
6871
  }) : null]
6868
6872
  });
6869
6873
  }
6870
- let p = Cl(t, n);
6874
+ let p = wl(t, n);
6871
6875
  return /* @__PURE__ */ o("div", {
6872
6876
  className: G.element,
6873
6877
  children: [/* @__PURE__ */ a("ol", {
@@ -6899,7 +6903,7 @@ function Tl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
6899
6903
  }
6900
6904
  //#endregion
6901
6905
  //#region src/question/renderers/orderingAnswerGroups.tsx
6902
- function El(e) {
6906
+ function Dl(e) {
6903
6907
  let t = new Map(e.sortOptions.map((e) => [e.id, e]));
6904
6908
  return e.answers.map((e, n) => {
6905
6909
  let r = t.get(e);
@@ -6912,10 +6916,10 @@ function El(e) {
6912
6916
  }
6913
6917
  //#endregion
6914
6918
  //#region src/question/player/QuestionOrderingPlayer.tsx
6915
- function Dl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6916
- let l = $s(i, s, t), u = new Map(t.sortOptions.map((e) => [e.id, e])), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
6919
+ function Ol({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6920
+ let l = ec(i, s, t), u = new Map(t.sortOptions.map((e) => [e.id, e])), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
6917
6921
  function f(e, n) {
6918
- r(k(k({}, l), {}, { orderedOptionIds: lc(l.orderedOptionIds, t, e, n) }));
6922
+ r(k(k({}, l), {}, { orderedOptionIds: uc(l.orderedOptionIds, t, e, n) }));
6919
6923
  }
6920
6924
  return /* @__PURE__ */ o("div", {
6921
6925
  className: G.element,
@@ -6950,12 +6954,12 @@ function Dl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6950
6954
  ]
6951
6955
  }, t.id))
6952
6956
  }), c ? /* @__PURE__ */ a(q, {
6953
- groups: El(t),
6957
+ groups: Dl(t),
6954
6958
  title: n.standardAnswer
6955
6959
  }) : null]
6956
6960
  });
6957
6961
  }
6958
- var Ol = {
6962
+ var kl = {
6959
6963
  content: "_content_63948_1",
6960
6964
  paragraph: "_paragraph_63948_10",
6961
6965
  marker: "_marker_63948_14",
@@ -6965,21 +6969,21 @@ var Ol = {
6965
6969
  };
6966
6970
  //#endregion
6967
6971
  //#region src/question/renderers/QuestionTextMarkerContent.tsx
6968
- function kl({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
6972
+ function Al({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
6969
6973
  let c = t.json.length ? t.json : [{
6970
6974
  children: [{ text: t.text }],
6971
6975
  type: "paragraph"
6972
6976
  }];
6973
6977
  return /* @__PURE__ */ a("div", {
6974
- className: Ol.content,
6978
+ className: kl.content,
6975
6979
  children: c.map((e, t) => l(e, `node-${t}`))
6976
6980
  });
6977
6981
  function l(e, t) {
6978
- if (jl(e)) return u(e, t);
6979
- if (!Al(e)) return null;
6982
+ if (Ml(e)) return u(e, t);
6983
+ if (!jl(e)) return null;
6980
6984
  let n = e.children.map((e, n) => l(e, `${t}-${n}`));
6981
6985
  return e.type === "paragraph" ? /* @__PURE__ */ a("p", {
6982
- className: Ol.paragraph,
6986
+ className: kl.paragraph,
6983
6987
  children: n
6984
6988
  }, t) : /* @__PURE__ */ a("span", { children: n }, t);
6985
6989
  }
@@ -6993,7 +6997,7 @@ function kl({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
6993
6997
  let n = i.includes(t), a = o && e.includes(t);
6994
6998
  return {
6995
6999
  answer: a,
6996
- className: Ja(Ol.marker, r ? Ol["marker-button"] : "", n ? Ol["marker-selected"] : "", a ? Ol["marker-answer"] : ""),
7000
+ className: Ja(kl.marker, r ? kl["marker-button"] : "", n ? kl["marker-selected"] : "", a ? kl["marker-answer"] : ""),
6997
7001
  selected: n
6998
7002
  };
6999
7003
  }
@@ -7019,17 +7023,17 @@ function kl({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
7019
7023
  }, n);
7020
7024
  }
7021
7025
  }
7022
- function Al(e) {
7026
+ function jl(e) {
7023
7027
  return !!(e && typeof e == "object" && "children" in e && Array.isArray(e.children));
7024
7028
  }
7025
- function jl(e) {
7029
+ function Ml(e) {
7026
7030
  return !!(e && typeof e == "object" && "text" in e && typeof e.text == "string");
7027
7031
  }
7028
7032
  //#endregion
7029
7033
  //#region src/question/renderers/QuestionTextMarkerView.tsx
7030
- function Ml({ item: e, messages: t, showAnswer: n }) {
7034
+ function Nl({ item: e, messages: t, showAnswer: n }) {
7031
7035
  let r = Dt(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
7032
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(kl, {
7036
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Al, {
7033
7037
  answerMarkers: e.answers,
7034
7038
  content: e.content,
7035
7039
  showAnswer: n
@@ -7044,35 +7048,35 @@ function Ml({ item: e, messages: t, showAnswer: n }) {
7044
7048
  }
7045
7049
  //#endregion
7046
7050
  //#region src/question/player/QuestionTextMarkerPlayer.tsx
7047
- function Nl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
7048
- let c = ec(i, o);
7049
- return s ? /* @__PURE__ */ a(Ml, {
7051
+ function Pl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
7052
+ let c = tc(i, o);
7053
+ return s ? /* @__PURE__ */ a(Nl, {
7050
7054
  item: t,
7051
7055
  messages: n,
7052
7056
  showAnswer: s
7053
- }) : /* @__PURE__ */ a(kl, {
7057
+ }) : /* @__PURE__ */ a(Al, {
7054
7058
  answerMarkers: t.answers,
7055
7059
  content: t.content,
7056
7060
  disabled: e,
7057
- onMarkerClick: (e) => r(k(k({}, c), {}, { selectedMarkers: uc(c.selectedMarkers, e) })),
7061
+ onMarkerClick: (e) => r(k(k({}, c), {}, { selectedMarkers: dc(c.selectedMarkers, e) })),
7058
7062
  selectedMarkers: c.selectedMarkers
7059
7063
  });
7060
7064
  }
7061
- var Pl = { placeholder: "_placeholder_xde95_1" };
7065
+ var Fl = { placeholder: "_placeholder_xde95_1" };
7062
7066
  //#endregion
7063
7067
  //#region src/question/shared/QuestionTextResponsePlaceholder.tsx
7064
- function Fl({ label: e }) {
7068
+ function Il({ label: e }) {
7065
7069
  return /* @__PURE__ */ a("div", {
7066
7070
  "aria-label": e,
7067
- className: Pl.placeholder,
7071
+ className: Fl.placeholder,
7068
7072
  children: e
7069
7073
  });
7070
7074
  }
7071
7075
  //#endregion
7072
7076
  //#region src/question/player/QuestionTextResponsePlayer.tsx
7073
- function Il({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7074
- let l = tc(o, s);
7075
- return e ? P(l.content) ? /* @__PURE__ */ a(Fl, { label: r.textResponsePlaceholder }) : /* @__PURE__ */ a(K, { content: l.content }) : /* @__PURE__ */ a(Fa, {
7077
+ function Ll({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7078
+ let l = nc(o, s);
7079
+ return e ? P(l.content) ? /* @__PURE__ */ a(Il, { label: r.textResponsePlaceholder }) : /* @__PURE__ */ a(K, { content: l.content }) : /* @__PURE__ */ a(Fa, {
7076
7080
  ariaLabel: n,
7077
7081
  locale: t,
7078
7082
  onChange: (e) => i({
@@ -7087,27 +7091,27 @@ function Il({ disabled: e, locale: t, label: n, messages: r, onChange: i, respon
7087
7091
  }
7088
7092
  //#endregion
7089
7093
  //#region src/question/renderers/wordBuilderAnswers.tsx
7090
- function Ll(e, t) {
7094
+ function Rl(e, t) {
7091
7095
  return e.blanks.reduce((n, r) => {
7092
7096
  var i;
7093
7097
  let o = (i = e.answers[r]) == null ? void 0 : i.trim();
7094
7098
  return o ? [...n, {
7095
7099
  kind: "detailed",
7096
7100
  contents: [/* @__PURE__ */ a(K, { content: M(o) }, `${r}-answer`)],
7097
- marker: Ac([r], e.blanks, t)
7101
+ marker: jc([r], e.blanks, t)
7098
7102
  }] : n;
7099
7103
  }, []);
7100
7104
  }
7101
7105
  //#endregion
7102
7106
  //#region src/question/player/QuestionPlayerWordBuilder.module.css
7103
- var Rl = {
7107
+ var zl = {
7104
7108
  "word-builder-blank": "_word-builder-blank_ftw6q_1",
7105
7109
  "word-builder-candidate-list": "_word-builder-candidate-list_ftw6q_30"
7106
7110
  };
7107
7111
  //#endregion
7108
7112
  //#region src/question/player/QuestionWordBuilderPlayer.tsx
7109
- function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7110
- let u = Tn(n, !0, t), d = Js(s, c, u.blanks), f = Ll(u, r.blankLabel);
7113
+ function Bl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7114
+ let u = Tn(n, !0, t), d = Ys(s, c, u.blanks), f = Rl(u, r.blankLabel);
7111
7115
  function p(e, t) {
7112
7116
  i(k(k({}, d), {}, { answers: k(k({}, d.answers), {}, { [e]: t }) }));
7113
7117
  }
@@ -7135,11 +7139,11 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7135
7139
  return /* @__PURE__ */ o("div", {
7136
7140
  className: W["fill-text"],
7137
7141
  children: [
7138
- /* @__PURE__ */ a(Yc, {
7142
+ /* @__PURE__ */ a(Xc, {
7139
7143
  content: u.content,
7140
7144
  renderBlank: ({ blankId: t, index: n, label: i }) => {
7141
7145
  var o, s;
7142
- let c = (o = d.answers[t]) == null ? "" : o, l = Bl({
7146
+ let c = (o = d.answers[t]) == null ? "" : o, l = Vl({
7143
7147
  answers: c,
7144
7148
  blankLabel: r.blankLabel,
7145
7149
  canClear: !e && !!c.trim(),
@@ -7148,7 +7152,7 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7148
7152
  });
7149
7153
  return /* @__PURE__ */ a("button", {
7150
7154
  "aria-label": l,
7151
- className: Rl["word-builder-blank"],
7155
+ className: zl["word-builder-blank"],
7152
7156
  disabled: e,
7153
7157
  onClick: () => m(t),
7154
7158
  onDragOver: (e) => e.preventDefault(),
@@ -7160,7 +7164,7 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7160
7164
  }
7161
7165
  }),
7162
7166
  /* @__PURE__ */ a("div", {
7163
- className: Rl["word-builder-candidate-list"],
7167
+ className: zl["word-builder-candidate-list"],
7164
7168
  children: u.candidateOptions.map((t, n) => /* @__PURE__ */ a("button", {
7165
7169
  disabled: e,
7166
7170
  draggable: !e,
@@ -7179,15 +7183,15 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7179
7183
  ]
7180
7184
  });
7181
7185
  }
7182
- function Bl({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7186
+ function Vl({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7183
7187
  let a = i || `${t}${r + 1}`;
7184
7188
  return !n || !e.trim() ? a : t === "\u7a7a" ? `${a}\uff0c\u70b9\u51fb\u6e05\u7a7a` : `${a}, click to clear`;
7185
7189
  }
7186
7190
  //#endregion
7187
7191
  //#region src/question/player/QuestionPlayerElement.tsx
7188
- function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l, uploadImage: u }) {
7192
+ function Hl({ disabled: e, element: t, item: n, locale: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l, uploadImage: u }) {
7189
7193
  if (t.type !== n.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${t.type}\uff0cactual=${n.type}`);
7190
- return t.type === "richText" ? /* @__PURE__ */ a(K, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a(Il, {
7194
+ return t.type === "richText" ? /* @__PURE__ */ a(K, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a(Ll, {
7191
7195
  disabled: e,
7192
7196
  label: t.name,
7193
7197
  locale: r,
@@ -7196,7 +7200,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
7196
7200
  response: s,
7197
7201
  responseIndex: c,
7198
7202
  uploadImage: u
7199
- }) : t.type === "ordering" ? /* @__PURE__ */ a(Dl, {
7203
+ }) : t.type === "ordering" ? /* @__PURE__ */ a(Ol, {
7200
7204
  disabled: e,
7201
7205
  item: n,
7202
7206
  messages: i,
@@ -7204,7 +7208,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
7204
7208
  response: s,
7205
7209
  responseIndex: c,
7206
7210
  showAnswer: l
7207
- }) : t.type === "classification" ? /* @__PURE__ */ a(Kc, {
7211
+ }) : t.type === "classification" ? /* @__PURE__ */ a(qc, {
7208
7212
  disabled: e,
7209
7213
  item: n,
7210
7214
  messages: i,
@@ -7212,7 +7216,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
7212
7216
  response: s,
7213
7217
  responseIndex: c,
7214
7218
  showAnswer: l
7215
- }) : t.type === "textMarker" ? /* @__PURE__ */ a(Nl, {
7219
+ }) : t.type === "textMarker" ? /* @__PURE__ */ a(Pl, {
7216
7220
  disabled: e,
7217
7221
  item: n,
7218
7222
  messages: i,
@@ -7220,7 +7224,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
7220
7224
  response: s,
7221
7225
  responseIndex: c,
7222
7226
  showAnswer: l
7223
- }) : Hl({
7227
+ }) : Ul({
7224
7228
  disabled: e,
7225
7229
  element: t,
7226
7230
  item: n,
@@ -7233,9 +7237,9 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
7233
7237
  uploadImage: u
7234
7238
  });
7235
7239
  }
7236
- function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
7240
+ function Ul({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
7237
7241
  switch (t.type) {
7238
- case "choice": return /* @__PURE__ */ a(Tl, {
7242
+ case "choice": return /* @__PURE__ */ a(El, {
7239
7243
  disabled: e,
7240
7244
  element: t,
7241
7245
  item: n,
@@ -7245,7 +7249,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7245
7249
  responseIndex: s,
7246
7250
  showAnswer: c
7247
7251
  });
7248
- case "fill": return /* @__PURE__ */ a(Hc, {
7252
+ case "fill": return /* @__PURE__ */ a(Uc, {
7249
7253
  disabled: e,
7250
7254
  item: n,
7251
7255
  messages: r,
@@ -7254,7 +7258,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7254
7258
  responseIndex: s,
7255
7259
  showAnswer: c
7256
7260
  });
7257
- case "inlineFill": return /* @__PURE__ */ a(ul, {
7261
+ case "inlineFill": return /* @__PURE__ */ a(dl, {
7258
7262
  disabled: e,
7259
7263
  element: t,
7260
7264
  item: n,
@@ -7264,7 +7268,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7264
7268
  responseIndex: s,
7265
7269
  showAnswer: c
7266
7270
  });
7267
- case "wordBuilder": return /* @__PURE__ */ a(zl, {
7271
+ case "wordBuilder": return /* @__PURE__ */ a(Bl, {
7268
7272
  disabled: e,
7269
7273
  element: t,
7270
7274
  item: n,
@@ -7274,7 +7278,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7274
7278
  responseIndex: s,
7275
7279
  showAnswer: c
7276
7280
  });
7277
- case "judgement": return /* @__PURE__ */ a(hl, {
7281
+ case "judgement": return /* @__PURE__ */ a(gl, {
7278
7282
  disabled: e,
7279
7283
  element: t,
7280
7284
  item: n,
@@ -7284,7 +7288,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7284
7288
  responseIndex: s,
7285
7289
  showAnswer: c
7286
7290
  });
7287
- case "lineConnect": return /* @__PURE__ */ a(vl, {
7291
+ case "lineConnect": return /* @__PURE__ */ a(yl, {
7288
7292
  disabled: e,
7289
7293
  item: n,
7290
7294
  messages: r,
@@ -7293,7 +7297,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7293
7297
  responseIndex: s,
7294
7298
  showAnswer: c
7295
7299
  });
7296
- case "matching": return /* @__PURE__ */ a(xl, {
7300
+ case "matching": return /* @__PURE__ */ a(Sl, {
7297
7301
  disabled: e,
7298
7302
  item: n,
7299
7303
  messages: r,
@@ -7306,70 +7310,71 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7306
7310
  }
7307
7311
  //#endregion
7308
7312
  //#region src/question/player/QuestionPlayer.tsx
7309
- var Ul = ["locale"];
7310
- function Wl(e) {
7311
- let { locale: t = "zh-CN" } = e, n = Sa(e, Ul), r = ys(n.value, n.questionTypeTemplates), i = ws(n.response, r);
7312
- return /* @__PURE__ */ a(Gl, k(k({}, n), {}, {
7313
+ var Wl = ["locale"];
7314
+ function Gl(e) {
7315
+ let { locale: t = "zh-CN" } = e, n = Sa(e, Wl), r = bs(n.value, n.questionTypeTemplates), i = Ts(n.response, r);
7316
+ return /* @__PURE__ */ a(Kl, k(k({}, n), {}, {
7317
+ childIndexPath: [],
7313
7318
  locale: t,
7314
- messages: kc(t),
7315
- numberPath: [],
7316
- onResponseChange: (e) => n.onResponseChange(Cs(e, r)),
7319
+ messages: Ac(t),
7320
+ onResponseChange: (e) => n.onResponseChange(ws(e, r)),
7317
7321
  response: i,
7318
7322
  value: r
7319
7323
  }));
7320
7324
  }
7321
- function Gl({ className: e, disabled: t = !1, locale: n = "zh-CN", messages: r, numberPath: i, onResponseChange: o, response: s, showAnswer: c = !1, showExtraAttributes: l = !1, questionTypeTemplates: u, uploadImage: d, value: f }) {
7322
- let p = aa(u, f);
7323
- if (!p) return /* @__PURE__ */ a("div", {
7324
- className: U(W.root, e),
7325
+ function Kl({ childIndexPath: e, className: t, disabled: n = !1, locale: r = "zh-CN", messages: i, onResponseChange: o, response: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, uploadImage: f, value: p }) {
7326
+ let m = aa(d, p);
7327
+ if (!m) return /* @__PURE__ */ a("div", {
7328
+ className: U(W.root, t),
7325
7329
  children: /* @__PURE__ */ a("div", {
7326
7330
  className: W.empty,
7327
- children: r.missingQuestionTypeTemplate
7331
+ children: i.missingQuestionTypeTemplate
7328
7332
  })
7329
7333
  });
7330
- let m = Kl({
7331
- disabled: t,
7332
- locale: n,
7333
- messages: r,
7334
- numberPath: i,
7334
+ let h = ql({
7335
+ childIndexPath: e,
7336
+ disabled: n,
7337
+ locale: r,
7338
+ messages: i,
7335
7339
  onResponseChange: o,
7336
7340
  response: s,
7337
- showAnswer: c,
7338
- showExtraAttributes: l,
7339
- structure: p,
7340
- uploadImage: d,
7341
- questionTypeTemplates: u,
7342
- value: f
7341
+ rootQuestionNumber: c,
7342
+ showAnswer: l,
7343
+ showExtraAttributes: u,
7344
+ structure: m,
7345
+ uploadImage: f,
7346
+ questionTypeTemplates: d,
7347
+ value: p
7343
7348
  });
7344
7349
  return /* @__PURE__ */ a("div", {
7345
- className: U(W.root, e),
7346
- children: Xl(p, f) ? /* @__PURE__ */ a("div", {
7350
+ className: U(W.root, t),
7351
+ children: Zl(m, p) ? /* @__PURE__ */ a("div", {
7347
7352
  className: W.empty,
7348
- children: r.previewEmpty
7349
- }) : m
7353
+ children: i.previewEmpty
7354
+ }) : h
7350
7355
  });
7351
7356
  }
7352
- function Kl(e) {
7357
+ function ql(e) {
7353
7358
  return /* @__PURE__ */ o(i, { children: [
7354
- ql(e),
7355
- Yl(e),
7356
- Jl(e)
7359
+ Jl(e),
7360
+ Xl(e),
7361
+ Yl(e)
7357
7362
  ] });
7358
7363
  }
7359
- function ql({ disabled: e, locale: t, messages: n, onResponseChange: r, response: i, showAnswer: o, structure: s, uploadImage: c, value: l }) {
7364
+ function Jl({ disabled: e, locale: t, messages: n, onResponseChange: r, response: i, showAnswer: o, structure: s, uploadImage: c, value: l }) {
7360
7365
  return s.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7361
7366
  className: W["element-list"],
7362
7367
  children: s.elements.map((u, d) => {
7363
7368
  let f = rn(l, d, u), p = s.elements.slice(0, d).filter((e) => e.type !== "richText").length;
7364
7369
  return /* @__PURE__ */ a("section", {
7365
7370
  className: W.element,
7366
- children: /* @__PURE__ */ a(Vl, {
7371
+ children: /* @__PURE__ */ a(Hl, {
7367
7372
  disabled: e,
7368
7373
  element: u,
7369
7374
  item: f,
7370
7375
  locale: t,
7371
7376
  messages: n,
7372
- onResponseItemChange: (e) => r(nc(i, p, e)),
7377
+ onResponseItemChange: (e) => r(rc(i, p, e)),
7373
7378
  response: i,
7374
7379
  responseIndex: p,
7375
7380
  showAnswer: o && s.hasAnswer,
@@ -7379,17 +7384,17 @@ function ql({ disabled: e, locale: t, messages: n, onResponseChange: r, response
7379
7384
  })
7380
7385
  });
7381
7386
  }
7382
- function Jl({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
7387
+ function Yl({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
7383
7388
  return i ? /* @__PURE__ */ a("div", {
7384
7389
  className: W["element-list"],
7385
7390
  children: s.extras.map((i, s) => {
7386
7391
  let u = an(l, s, i);
7387
7392
  return P(u.content) ? null : /* @__PURE__ */ o("section", {
7388
7393
  className: W.extra,
7389
- children: [/* @__PURE__ */ a(zc, { children: i.name }), /* @__PURE__ */ a(Vl, {
7394
+ children: [/* @__PURE__ */ a(Bc, { children: i.name }), /* @__PURE__ */ a(Hl, {
7390
7395
  disabled: e,
7391
- element: Zl(i),
7392
- item: Ql(u),
7396
+ element: Ql(i),
7397
+ item: $l(u),
7393
7398
  locale: t,
7394
7399
  messages: n,
7395
7400
  onResponseItemChange: () => void 0,
@@ -7402,40 +7407,42 @@ function Jl({ disabled: e, locale: t, messages: n, response: r, showExtraAttribu
7402
7407
  })
7403
7408
  }) : null;
7404
7409
  }
7405
- function Yl({ disabled: e, locale: t, messages: n, numberPath: r, onResponseChange: i, response: o, showAnswer: s, showExtraAttributes: c, questionTypeTemplates: l, uploadImage: u, value: d }) {
7406
- return d.children.length === 0 ? null : /* @__PURE__ */ a(Bc, {
7407
- disabled: e,
7408
- messages: n,
7409
- numberPath: r,
7410
- onChildResponseChange: (e, t) => i(rc(o, e, t)),
7410
+ function Xl({ childIndexPath: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, rootQuestionNumber: s, showAnswer: c, showExtraAttributes: l, questionTypeTemplates: u, uploadImage: d, value: f }) {
7411
+ return f.children.length === 0 ? null : /* @__PURE__ */ a(Vc, {
7412
+ childIndexPath: e,
7413
+ disabled: t,
7414
+ messages: r,
7415
+ onChildResponseChange: (e, t) => i(ic(o, e, t)),
7411
7416
  response: o,
7412
- renderChild: (r, i, o, d) => /* @__PURE__ */ a(Gl, {
7413
- disabled: e,
7414
- locale: t,
7415
- messages: n,
7416
- numberPath: d,
7417
+ renderChild: (e, i, o, f) => /* @__PURE__ */ a(Kl, {
7418
+ childIndexPath: f,
7419
+ disabled: t,
7420
+ locale: n,
7421
+ messages: r,
7417
7422
  onResponseChange: o,
7418
7423
  response: i,
7419
- showAnswer: s,
7420
- showExtraAttributes: c,
7421
- questionTypeTemplates: l,
7422
- uploadImage: u,
7423
- value: r
7424
+ rootQuestionNumber: s,
7425
+ showAnswer: c,
7426
+ showExtraAttributes: l,
7427
+ questionTypeTemplates: u,
7428
+ uploadImage: d,
7429
+ value: e
7424
7430
  }),
7425
- value: d
7431
+ rootQuestionNumber: s,
7432
+ value: f
7426
7433
  });
7427
7434
  }
7428
- function Xl(e, t) {
7435
+ function Zl(e, t) {
7429
7436
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
7430
7437
  }
7431
- function Zl(e) {
7438
+ function Ql(e) {
7432
7439
  return {
7433
7440
  config: {},
7434
7441
  name: e.name,
7435
7442
  type: "richText"
7436
7443
  };
7437
7444
  }
7438
- function Ql(e) {
7445
+ function $l(e) {
7439
7446
  return {
7440
7447
  content: e.content,
7441
7448
  type: "richText"
@@ -7443,46 +7450,46 @@ function Ql(e) {
7443
7450
  }
7444
7451
  //#endregion
7445
7452
  //#region src/question/renderers/QuestionBlankGroupView.module.css
7446
- var $l = {
7453
+ var eu = {
7447
7454
  "blank-list": "_blank-list_12ccp_1",
7448
7455
  "blank-item": "_blank-item_12ccp_11",
7449
7456
  "blank-field": "_blank-field_12ccp_17"
7450
7457
  };
7451
7458
  //#endregion
7452
7459
  //#region src/question/renderers/QuestionBlankGroupView.tsx
7453
- function eu({ item: e, messages: t, showAnswer: n }) {
7460
+ function tu({ item: e, messages: t, showAnswer: n }) {
7454
7461
  let r = N(e.answers, e.blanks).map((n, r) => ({
7455
7462
  kind: "detailed",
7456
7463
  contents: n.answerPools.map((e, t) => /* @__PURE__ */ a(K, { content: e }, `group-${r}-answer-${t}`)),
7457
- marker: Ac(n.blankIds, e.blanks, t.blankLabel)
7464
+ marker: jc(n.blankIds, e.blanks, t.blankLabel)
7458
7465
  }));
7459
7466
  return /* @__PURE__ */ o("div", {
7460
7467
  className: G.element,
7461
7468
  children: [/* @__PURE__ */ a("ol", {
7462
- className: $l["blank-list"],
7469
+ className: eu["blank-list"],
7463
7470
  children: e.blanks.map((e, n) => /* @__PURE__ */ a("li", {
7464
- className: $l["blank-item"],
7471
+ className: eu["blank-item"],
7465
7472
  children: /* @__PURE__ */ o("span", {
7466
- className: $l["blank-field"],
7473
+ className: eu["blank-field"],
7467
7474
  children: [
7468
7475
  t.blankLabel,
7469
7476
  " ",
7470
7477
  n + 1
7471
7478
  ]
7472
7479
  })
7473
- }, tu(e, n)))
7480
+ }, nu(e, n)))
7474
7481
  }), n ? /* @__PURE__ */ a(q, {
7475
7482
  groups: r,
7476
7483
  title: t.standardAnswer
7477
7484
  }) : null]
7478
7485
  });
7479
7486
  }
7480
- function tu(e, t) {
7487
+ function nu(e, t) {
7481
7488
  return e || `blank-${t + 1}`;
7482
7489
  }
7483
7490
  //#endregion
7484
7491
  //#region src/question/renderers/QuestionClassificationView.tsx
7485
- function nu({ item: e, messages: t, showAnswer: n }) {
7492
+ function ru({ item: e, messages: t, showAnswer: n }) {
7486
7493
  return /* @__PURE__ */ o("div", {
7487
7494
  className: G.element,
7488
7495
  children: [/* @__PURE__ */ o("div", {
@@ -7507,24 +7514,24 @@ function nu({ item: e, messages: t, showAnswer: n }) {
7507
7514
  }, e.id))
7508
7515
  })]
7509
7516
  }), n ? /* @__PURE__ */ a(q, {
7510
- groups: Gc(e),
7517
+ groups: Kc(e),
7511
7518
  title: t.standardAnswer
7512
7519
  }) : null]
7513
7520
  });
7514
7521
  }
7515
7522
  //#endregion
7516
7523
  //#region src/question/renderers/QuestionFillTextView.tsx
7517
- function ru({ element: e, item: t, messages: n, showAnswer: r }) {
7518
- let i = En(t, e, !0), s = Ic(i).map((e, t) => ({
7524
+ function iu({ element: e, item: t, messages: n, showAnswer: r }) {
7525
+ let i = En(t, e, !0), s = Lc(i).map((e, t) => ({
7519
7526
  kind: "detailed",
7520
7527
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(K, { content: e }, `group-${t}-answer-${n}`)),
7521
- marker: Ac(e.blankIds, i.blanks, n.blankLabel)
7528
+ marker: jc(e.blankIds, i.blanks, n.blankLabel)
7522
7529
  }));
7523
7530
  return /* @__PURE__ */ o("div", {
7524
7531
  className: G.element,
7525
7532
  children: [
7526
7533
  /* @__PURE__ */ a(K, { content: i.content }),
7527
- iu(i, n.candidateOptions),
7534
+ au(i, n.candidateOptions),
7528
7535
  r ? /* @__PURE__ */ a(q, {
7529
7536
  groups: s,
7530
7537
  title: n.standardAnswer
@@ -7532,7 +7539,7 @@ function ru({ element: e, item: t, messages: n, showAnswer: r }) {
7532
7539
  ]
7533
7540
  });
7534
7541
  }
7535
- function iu(e, t) {
7542
+ function au(e, t) {
7536
7543
  var n, r;
7537
7544
  let i = (n = e.candidateOptions) == null ? [] : n, s = (r = e.blankOptionGroups) == null ? [] : r;
7538
7545
  return !i.length && !s.length ? null : /* @__PURE__ */ o("div", {
@@ -7554,7 +7561,7 @@ function iu(e, t) {
7554
7561
  }
7555
7562
  //#endregion
7556
7563
  //#region src/question/renderers/QuestionJudgementGroupView.tsx
7557
- function au({ element: e, item: t, messages: n, showAnswer: r }) {
7564
+ function ou({ element: e, item: t, messages: n, showAnswer: r }) {
7558
7565
  let i = un(e.config.judgeAnswerMode), s = [{
7559
7566
  kind: "detailed",
7560
7567
  contents: dn(e.config.judgeAnswerMode, t.answers),
@@ -7576,7 +7583,7 @@ function au({ element: e, item: t, messages: n, showAnswer: r }) {
7576
7583
  }
7577
7584
  //#endregion
7578
7585
  //#region src/question/renderers/QuestionLineConnectView.tsx
7579
- function ou({ item: e, messages: t, showAnswer: n }) {
7586
+ function su({ item: e, messages: t, showAnswer: n }) {
7580
7587
  let r = { gridTemplateColumns: `repeat(${e.columns.length}, minmax(12rem, 1fr))` };
7581
7588
  return /* @__PURE__ */ o("div", {
7582
7589
  className: G.element,
@@ -7607,12 +7614,12 @@ function ou({ item: e, messages: t, showAnswer: n }) {
7607
7614
  }, e.columnId))
7608
7615
  })
7609
7616
  }), n ? /* @__PURE__ */ a(q, {
7610
- groups: gl(e),
7617
+ groups: _l(e),
7611
7618
  title: t.standardAnswer
7612
7619
  }) : null]
7613
7620
  });
7614
7621
  }
7615
- var su = {
7622
+ var cu = {
7616
7623
  board: "_board_5xarh_1",
7617
7624
  columns: "_columns_5xarh_6",
7618
7625
  column: "_column_5xarh_6",
@@ -7621,21 +7628,21 @@ var su = {
7621
7628
  };
7622
7629
  //#endregion
7623
7630
  //#region src/question/renderers/QuestionMatchingView.tsx
7624
- function cu({ item: e, messages: t, showAnswer: n }) {
7631
+ function lu({ item: e, messages: t, showAnswer: n }) {
7625
7632
  return /* @__PURE__ */ o("div", {
7626
7633
  className: G.element,
7627
7634
  children: [/* @__PURE__ */ a("div", {
7628
- className: su.board,
7635
+ className: cu.board,
7629
7636
  children: /* @__PURE__ */ a("div", {
7630
- className: su.columns,
7637
+ className: cu.columns,
7631
7638
  children: e.columns.map((e) => /* @__PURE__ */ a("section", {
7632
- className: su.column,
7639
+ className: cu.column,
7633
7640
  children: e.items.map((t, n) => {
7634
7641
  let r = cn(e.labelStyle, n);
7635
7642
  return /* @__PURE__ */ o("div", {
7636
- className: su.item,
7643
+ className: cu.item,
7637
7644
  children: [r ? /* @__PURE__ */ a("span", {
7638
- className: su.marker,
7645
+ className: cu.marker,
7639
7646
  children: r
7640
7647
  }) : null, /* @__PURE__ */ a(K, { content: t.content })]
7641
7648
  }, t.itemId);
@@ -7643,28 +7650,28 @@ function cu({ item: e, messages: t, showAnswer: n }) {
7643
7650
  }, e.columnId))
7644
7651
  })
7645
7652
  }), n ? /* @__PURE__ */ a(q, {
7646
- groups: yl(e),
7653
+ groups: bl(e),
7647
7654
  title: t.standardAnswer
7648
7655
  }) : null]
7649
7656
  });
7650
7657
  }
7651
7658
  //#endregion
7652
7659
  //#region src/question/renderers/QuestionOptionGroupView.tsx
7653
- function lu({ element: e, item: t, messages: n, showAnswer: r }) {
7660
+ function uu({ element: e, item: t, messages: n, showAnswer: r }) {
7654
7661
  let i = fn(t, e.config.optionLabelStyle);
7655
7662
  if (e.config.renderer === "table") {
7656
- let s = Cl(e, t);
7663
+ let s = wl(e, t);
7657
7664
  return /* @__PURE__ */ o("div", {
7658
7665
  className: G.element,
7659
7666
  children: [/* @__PURE__ */ a("div", {
7660
- className: wl["table-wrap"],
7667
+ className: Tl["table-wrap"],
7661
7668
  children: /* @__PURE__ */ o("table", {
7662
- className: wl.table,
7669
+ className: Tl.table,
7663
7670
  children: [
7664
- /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: wl["table-option-column"] }), t.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7671
+ /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Tl["table-option-column"] }), t.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7665
7672
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: n.option }), t.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(K, { content: e.content }) }, e.id))] }) }),
7666
7673
  /* @__PURE__ */ a("tbody", { children: i.map((e) => /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("span", {
7667
- className: wl["table-option-marker"],
7674
+ className: Tl["table-option-marker"],
7668
7675
  children: e.marker
7669
7676
  }) }), e.cells.map((t, n) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(K, { content: t }) }, `${e.optionId}-cell-${n}`))] }, e.optionId)) })
7670
7677
  ]
@@ -7675,7 +7682,7 @@ function lu({ element: e, item: t, messages: n, showAnswer: r }) {
7675
7682
  }) : null]
7676
7683
  });
7677
7684
  }
7678
- let s = Cl(e, t);
7685
+ let s = wl(e, t);
7679
7686
  return /* @__PURE__ */ o("div", {
7680
7687
  className: G.element,
7681
7688
  children: [/* @__PURE__ */ a("ol", {
@@ -7695,7 +7702,7 @@ function lu({ element: e, item: t, messages: n, showAnswer: r }) {
7695
7702
  }
7696
7703
  //#endregion
7697
7704
  //#region src/question/renderers/QuestionOrderingView.tsx
7698
- function uu({ item: e, messages: t, showAnswer: n }) {
7705
+ function du({ item: e, messages: t, showAnswer: n }) {
7699
7706
  return /* @__PURE__ */ o("div", {
7700
7707
  className: G.element,
7701
7708
  children: [/* @__PURE__ */ a("ol", {
@@ -7708,19 +7715,19 @@ function uu({ item: e, messages: t, showAnswer: n }) {
7708
7715
  }), /* @__PURE__ */ a(K, { content: e.content })]
7709
7716
  }, e.id))
7710
7717
  }), n ? /* @__PURE__ */ a(q, {
7711
- groups: El(e),
7718
+ groups: Dl(e),
7712
7719
  title: t.standardAnswer
7713
7720
  }) : null]
7714
7721
  });
7715
7722
  }
7716
7723
  //#endregion
7717
7724
  //#region src/question/renderers/QuestionWordBuilderView.tsx
7718
- function du({ element: e, item: t, messages: n, showAnswer: r }) {
7719
- let i = Tn(t, !0, e), s = Ll(i, n.blankLabel);
7725
+ function fu({ element: e, item: t, messages: n, showAnswer: r }) {
7726
+ let i = Tn(t, !0, e), s = Rl(i, n.blankLabel);
7720
7727
  return /* @__PURE__ */ o("div", {
7721
7728
  className: G.element,
7722
7729
  children: [
7723
- /* @__PURE__ */ a(Yc, {
7730
+ /* @__PURE__ */ a(Xc, {
7724
7731
  content: i.content,
7725
7732
  renderBlank: ({ blankId: e, index: t, label: r }) => /* @__PURE__ */ a("span", {
7726
7733
  "aria-label": r || `${n.blankLabel}${t + 1}`,
@@ -7750,71 +7757,71 @@ function du({ element: e, item: t, messages: n, showAnswer: r }) {
7750
7757
  }
7751
7758
  //#endregion
7752
7759
  //#region src/question/renderers/QuestionContentElementView.tsx
7753
- function fu({ element: e, item: t, messages: n, showAnswer: r }) {
7760
+ function pu({ element: e, item: t, messages: n, showAnswer: r }) {
7754
7761
  if (e.type !== t.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${e.type}\uff0cactual=${t.type}`);
7755
- return e.type === "richText" ? /* @__PURE__ */ a(K, { content: t.content }) : e.type === "textResponse" ? null : e.type === "ordering" ? /* @__PURE__ */ a(uu, {
7762
+ return e.type === "richText" ? /* @__PURE__ */ a(K, { content: t.content }) : e.type === "textResponse" ? null : e.type === "ordering" ? /* @__PURE__ */ a(du, {
7756
7763
  item: t,
7757
7764
  messages: n,
7758
7765
  showAnswer: r
7759
- }) : e.type === "classification" ? /* @__PURE__ */ a(nu, {
7766
+ }) : e.type === "classification" ? /* @__PURE__ */ a(ru, {
7760
7767
  item: t,
7761
7768
  messages: n,
7762
7769
  showAnswer: r
7763
- }) : e.type === "textMarker" ? /* @__PURE__ */ a(Ml, {
7770
+ }) : e.type === "textMarker" ? /* @__PURE__ */ a(Nl, {
7764
7771
  item: t,
7765
7772
  messages: n,
7766
7773
  showAnswer: r
7767
- }) : pu({
7774
+ }) : mu({
7768
7775
  element: e,
7769
7776
  item: t,
7770
7777
  messages: n,
7771
7778
  showAnswer: r
7772
7779
  });
7773
7780
  }
7774
- function pu({ element: e, item: t, messages: n, showAnswer: r }) {
7781
+ function mu({ element: e, item: t, messages: n, showAnswer: r }) {
7775
7782
  switch (e.type) {
7776
- case "choice": return /* @__PURE__ */ a(lu, {
7783
+ case "choice": return /* @__PURE__ */ a(uu, {
7777
7784
  element: e,
7778
7785
  item: t,
7779
7786
  messages: n,
7780
7787
  showAnswer: r
7781
7788
  });
7782
- case "fill": return /* @__PURE__ */ a(eu, {
7789
+ case "fill": return /* @__PURE__ */ a(tu, {
7783
7790
  item: t,
7784
7791
  messages: n,
7785
7792
  showAnswer: r
7786
7793
  });
7787
- case "inlineFill": return /* @__PURE__ */ a(ru, {
7794
+ case "inlineFill": return /* @__PURE__ */ a(iu, {
7788
7795
  element: e,
7789
7796
  item: t,
7790
7797
  messages: n,
7791
7798
  showAnswer: r
7792
7799
  });
7793
- case "wordBuilder": return /* @__PURE__ */ a(du, {
7800
+ case "wordBuilder": return /* @__PURE__ */ a(fu, {
7794
7801
  element: e,
7795
7802
  item: t,
7796
7803
  messages: n,
7797
7804
  showAnswer: r
7798
7805
  });
7799
- case "judgement": return /* @__PURE__ */ a(au, {
7806
+ case "judgement": return /* @__PURE__ */ a(ou, {
7800
7807
  element: e,
7801
7808
  item: t,
7802
7809
  messages: n,
7803
7810
  showAnswer: r
7804
7811
  });
7805
- case "lineConnect": return /* @__PURE__ */ a(ou, {
7812
+ case "lineConnect": return /* @__PURE__ */ a(su, {
7806
7813
  item: t,
7807
7814
  messages: n,
7808
7815
  showAnswer: r
7809
7816
  });
7810
- case "matching": return /* @__PURE__ */ a(cu, {
7817
+ case "matching": return /* @__PURE__ */ a(lu, {
7811
7818
  item: t,
7812
7819
  messages: n,
7813
7820
  showAnswer: r
7814
7821
  });
7815
7822
  }
7816
7823
  }
7817
- var mu = {
7824
+ var hu = {
7818
7825
  root: "_root_1jseb_1",
7819
7826
  empty: "_empty_1jseb_18",
7820
7827
  "element-list": "_element-list_1jseb_30",
@@ -7825,115 +7832,117 @@ var mu = {
7825
7832
  };
7826
7833
  //#endregion
7827
7834
  //#region src/question/preview/QuestionCompositePreview.tsx
7828
- function hu({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
7829
- return r.children.length === 0 ? /* @__PURE__ */ a("div", {
7830
- className: mu.empty,
7831
- children: e.previewEmpty
7835
+ function gu({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
7836
+ return i.children.length === 0 ? /* @__PURE__ */ a("div", {
7837
+ className: hu.empty,
7838
+ children: t.previewEmpty
7832
7839
  }) : /* @__PURE__ */ a("div", {
7833
- className: mu.children,
7834
- children: r.children.map((e, i) => {
7835
- let o = [...t, i], s = Lo(o, r.children.length) ? Io(o) : null;
7840
+ className: hu.children,
7841
+ children: i.children.map((t, o) => {
7842
+ let s = [...e, o], c = Ro(s, i.children.length, r);
7836
7843
  return /* @__PURE__ */ a("section", {
7837
- className: mu.child,
7838
- children: /* @__PURE__ */ a(zo, {
7844
+ className: hu.child,
7845
+ children: /* @__PURE__ */ a(Bo, {
7839
7846
  indented: !0,
7840
- number: s,
7841
- children: n(e, o)
7847
+ number: c,
7848
+ children: n(t, s)
7842
7849
  })
7843
- }, e.id || i);
7850
+ }, t.id || o);
7844
7851
  })
7845
7852
  });
7846
7853
  }
7847
7854
  //#endregion
7848
7855
  //#region src/question/preview/QuestionPreview.tsx
7849
- var gu = ["locale"];
7850
- function _u(e) {
7851
- let { locale: t = "zh-CN" } = e, n = Sa(e, gu), r = ys(n.value, n.questionTypeTemplates);
7852
- return /* @__PURE__ */ a(vu, k(k({}, n), {}, {
7853
- messages: kc(t),
7854
- numberPath: [],
7856
+ var _u = ["locale"];
7857
+ function vu(e) {
7858
+ let { locale: t = "zh-CN" } = e, n = Sa(e, _u), r = bs(n.value, n.questionTypeTemplates);
7859
+ return /* @__PURE__ */ a(yu, k(k({}, n), {}, {
7860
+ childIndexPath: [],
7861
+ messages: Ac(t),
7855
7862
  value: r
7856
7863
  }));
7857
7864
  }
7858
- function vu({ className: e, messages: t, numberPath: n, showAnswer: r = !1, showExtraAttributes: s = !1, questionTypeTemplates: c, value: l }) {
7859
- let u = aa(c, l);
7860
- if (!u) return /* @__PURE__ */ a("div", {
7861
- className: U(mu.root, e),
7865
+ function yu({ childIndexPath: e, className: t, messages: n, rootQuestionNumber: r, showAnswer: s = !1, showExtraAttributes: c = !1, questionTypeTemplates: l, value: u }) {
7866
+ let d = aa(l, u);
7867
+ if (!d) return /* @__PURE__ */ a("div", {
7868
+ className: U(hu.root, t),
7862
7869
  children: /* @__PURE__ */ a("div", {
7863
- className: mu.empty,
7864
- children: t.missingQuestionTypeTemplate
7870
+ className: hu.empty,
7871
+ children: n.missingQuestionTypeTemplate
7865
7872
  })
7866
7873
  });
7867
- let d = u.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7868
- className: mu["element-list"],
7869
- children: u.elements.map((e, n) => {
7870
- let i = rn(l, n, e);
7874
+ let f = d.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7875
+ className: hu["element-list"],
7876
+ children: d.elements.map((e, t) => {
7877
+ let r = rn(u, t, e);
7871
7878
  return /* @__PURE__ */ a("section", {
7872
- className: mu.element,
7873
- children: /* @__PURE__ */ a(fu, {
7879
+ className: hu.element,
7880
+ children: /* @__PURE__ */ a(pu, {
7874
7881
  element: e,
7875
- item: i,
7876
- messages: t,
7877
- showAnswer: r && u.hasAnswer
7882
+ item: r,
7883
+ messages: n,
7884
+ showAnswer: s && d.hasAnswer
7878
7885
  })
7879
- }, `${e.type}-${n}`);
7886
+ }, `${e.type}-${t}`);
7880
7887
  })
7881
- }), f = s ? /* @__PURE__ */ a("div", {
7882
- className: mu["element-list"],
7883
- children: u.extras.map((e, n) => {
7884
- let r = an(l, n, e);
7888
+ }), p = c ? /* @__PURE__ */ a("div", {
7889
+ className: hu["element-list"],
7890
+ children: d.extras.map((e, t) => {
7891
+ let r = an(u, t, e);
7885
7892
  return P(r.content) ? null : /* @__PURE__ */ o("section", {
7886
- className: mu.extra,
7887
- children: [/* @__PURE__ */ a(zc, { children: e.name }), /* @__PURE__ */ a(fu, {
7888
- element: bu(e),
7889
- item: xu(r),
7890
- messages: t,
7893
+ className: hu.extra,
7894
+ children: [/* @__PURE__ */ a(Bc, { children: e.name }), /* @__PURE__ */ a(pu, {
7895
+ element: xu(e),
7896
+ item: Su(r),
7897
+ messages: n,
7891
7898
  showAnswer: !1
7892
7899
  })]
7893
- }, `${e.type}-${n}`);
7900
+ }, `${e.type}-${t}`);
7894
7901
  })
7895
- }) : null, p = /* @__PURE__ */ o(i, { children: [
7896
- d,
7897
- l.children.length === 0 ? null : /* @__PURE__ */ a(hu, {
7898
- messages: t,
7899
- numberPath: n,
7900
- renderChild: (e, n) => /* @__PURE__ */ a(vu, {
7901
- numberPath: n,
7902
- messages: t,
7903
- showAnswer: r,
7904
- showExtraAttributes: s,
7905
- questionTypeTemplates: c,
7902
+ }) : null, m = /* @__PURE__ */ o(i, { children: [
7903
+ f,
7904
+ u.children.length === 0 ? null : /* @__PURE__ */ a(gu, {
7905
+ childIndexPath: e,
7906
+ messages: n,
7907
+ renderChild: (e, t) => /* @__PURE__ */ a(yu, {
7908
+ childIndexPath: t,
7909
+ messages: n,
7910
+ rootQuestionNumber: r,
7911
+ showAnswer: s,
7912
+ showExtraAttributes: c,
7913
+ questionTypeTemplates: l,
7906
7914
  value: e
7907
7915
  }),
7908
- value: l
7916
+ rootQuestionNumber: r,
7917
+ value: u
7909
7918
  }),
7910
- f
7919
+ p
7911
7920
  ] });
7912
7921
  return /* @__PURE__ */ a("div", {
7913
- className: U(mu.root, e),
7914
- children: yu(u, l) ? /* @__PURE__ */ a("div", {
7915
- className: mu.empty,
7916
- children: t.previewEmpty
7917
- }) : p
7922
+ className: U(hu.root, t),
7923
+ children: bu(d, u) ? /* @__PURE__ */ a("div", {
7924
+ className: hu.empty,
7925
+ children: n.previewEmpty
7926
+ }) : m
7918
7927
  });
7919
7928
  }
7920
- function yu(e, t) {
7929
+ function bu(e, t) {
7921
7930
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
7922
7931
  }
7923
- function bu(e) {
7932
+ function xu(e) {
7924
7933
  return {
7925
7934
  config: {},
7926
7935
  name: e.name,
7927
7936
  type: "richText"
7928
7937
  };
7929
7938
  }
7930
- function xu(e) {
7939
+ function Su(e) {
7931
7940
  return {
7932
7941
  content: e.content,
7933
7942
  type: "richText"
7934
7943
  };
7935
7944
  }
7936
- var Su = {
7945
+ var Cu = {
7937
7946
  root: "_root_17bqr_1",
7938
7947
  toolbar: "_toolbar_17bqr_26",
7939
7948
  "toolbar-title": "_toolbar-title_17bqr_36",
@@ -7985,7 +7994,7 @@ var Su = {
7985
7994
  "palette-section": "_palette-section_vhj2r_56",
7986
7995
  "palette-section-title": "_palette-section-title_vhj2r_62",
7987
7996
  "palette-button": "_palette-button_vhj2r_70"
7988
- }, Cu = {
7997
+ }, wu = {
7989
7998
  "en-US": {
7990
7999
  addElement: "Add element",
7991
8000
  addExtra: "Add extra attribute",
@@ -8207,24 +8216,24 @@ var Su = {
8207
8216
  wordBuilderLabel: "\u7ec4\u8bcd\u62fc\u5199"
8208
8217
  }
8209
8218
  };
8210
- function wu(e, t) {
8219
+ function Tu(e, t) {
8211
8220
  var n;
8212
8221
  return (n = e.extraDescriptions.get(t)) == null ? t : n;
8213
8222
  }
8214
- function Tu(e, t) {
8223
+ function Eu(e, t) {
8215
8224
  var n;
8216
8225
  return (n = e.extraLabels.get(t)) == null ? t : n;
8217
8226
  }
8218
- function Eu(e) {
8227
+ function Du(e) {
8219
8228
  switch (e) {
8220
- case "en-US": return Cu["en-US"];
8221
- case "zh-CN": return Cu["zh-CN"];
8229
+ case "en-US": return wu["en-US"];
8230
+ case "zh-CN": return wu["zh-CN"];
8222
8231
  }
8223
8232
  }
8224
- function Du(e, t) {
8225
- return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : Au(e, t);
8233
+ function Ou(e, t) {
8234
+ return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : ju(e, t);
8226
8235
  }
8227
- var Ou = {
8236
+ var ku = {
8228
8237
  choice: (e) => e.optionGroupDescription,
8229
8238
  classification: (e) => e.classificationDescription,
8230
8239
  fill: (e) => e.blankGroupDescription,
@@ -8235,7 +8244,7 @@ var Ou = {
8235
8244
  textMarker: (e) => e.textMarkerDescription,
8236
8245
  textResponse: (e) => e.textResponseDescription,
8237
8246
  wordBuilder: (e) => e.wordBuilderDescription
8238
- }, ku = {
8247
+ }, Au = {
8239
8248
  choice: (e) => e.optionGroupLabel,
8240
8249
  classification: (e) => e.classificationLabel,
8241
8250
  fill: (e) => e.blankGroupLabel,
@@ -8247,30 +8256,30 @@ var Ou = {
8247
8256
  textResponse: (e) => e.textResponseLabel,
8248
8257
  wordBuilder: (e) => e.wordBuilderLabel
8249
8258
  };
8250
- function Au(e, t) {
8251
- return Ou[t](e);
8252
- }
8253
8259
  function ju(e, t) {
8254
- return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Mu(e, t);
8260
+ return ku[t](e);
8255
8261
  }
8256
8262
  function Mu(e, t) {
8257
- return ku[t](e);
8263
+ return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Nu(e, t);
8258
8264
  }
8259
8265
  function Nu(e, t) {
8266
+ return Au[t](e);
8267
+ }
8268
+ function Pu(e, t) {
8260
8269
  var n;
8261
8270
  return (n = e.optionValueLabels.get(t)) == null ? t : n;
8262
8271
  }
8263
- function Pu(e, t) {
8272
+ function Fu(e, t) {
8264
8273
  var n;
8265
8274
  return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
8266
8275
  }
8267
- function Fu(e, t) {
8276
+ function Iu(e, t) {
8268
8277
  var n;
8269
8278
  return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
8270
8279
  }
8271
8280
  //#endregion
8272
8281
  //#region src/question/structure-editor/QuestionStructureCanvas.tsx
8273
- function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
8282
+ function Lu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
8274
8283
  let [u, d] = m(null);
8275
8284
  return /* @__PURE__ */ o("section", {
8276
8285
  className: Q.panel,
@@ -8290,7 +8299,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
8290
8299
  className: Z["element-list"],
8291
8300
  children: [
8292
8301
  e.map((t, i) => {
8293
- let f = t.clientId === l, p = ju(n, t.type);
8302
+ let f = t.clientId === l, p = Mu(n, t.type);
8294
8303
  return /* @__PURE__ */ o("div", {
8295
8304
  className: `${Z["element-card"]} ${f ? Z.active : ""}`,
8296
8305
  onClick: () => c(t.clientId),
@@ -8354,7 +8363,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
8354
8363
  children: n.extraTitle
8355
8364
  }) : null,
8356
8365
  t.map((t, r) => {
8357
- let s = t.clientId === l, f = Tu(n, t.type);
8366
+ let s = t.clientId === l, f = Eu(n, t.type);
8358
8367
  return /* @__PURE__ */ o("div", {
8359
8368
  className: `${Z["element-card"]} ${s ? Z.active : ""}`,
8360
8369
  onClick: () => c(t.clientId),
@@ -8403,7 +8412,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
8403
8412
  }
8404
8413
  //#endregion
8405
8414
  //#region src/question/structure-editor/QuestionStructurePalette.tsx
8406
- function Lu({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8415
+ function Ru({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8407
8416
  let i = new Set(e);
8408
8417
  return /* @__PURE__ */ o("aside", {
8409
8418
  className: Q.panel,
@@ -8418,11 +8427,11 @@ function Lu({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8418
8427
  /* @__PURE__ */ a("div", {
8419
8428
  className: Q.palette,
8420
8429
  children: oe.map((e) => /* @__PURE__ */ o("button", {
8421
- "aria-label": `${t.addElement}: ${ju(t, e)}`,
8430
+ "aria-label": `${t.addElement}: ${Mu(t, e)}`,
8422
8431
  className: Q["palette-button"],
8423
8432
  onClick: () => n(e),
8424
8433
  type: "button",
8425
- children: [/* @__PURE__ */ a("strong", { children: ju(t, e) }), /* @__PURE__ */ a("small", { children: Du(t, e) })]
8434
+ children: [/* @__PURE__ */ a("strong", { children: Mu(t, e) }), /* @__PURE__ */ a("small", { children: Ou(t, e) })]
8426
8435
  }, e))
8427
8436
  }),
8428
8437
  /* @__PURE__ */ o("div", {
@@ -8435,12 +8444,12 @@ function Lu({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
8435
8444
  children: se.map((e) => {
8436
8445
  let n = i.has(e);
8437
8446
  return /* @__PURE__ */ o("button", {
8438
- "aria-label": `${t.addExtra}: ${Tu(t, e)}`,
8447
+ "aria-label": `${t.addExtra}: ${Eu(t, e)}`,
8439
8448
  className: Q["palette-button"],
8440
8449
  disabled: n,
8441
8450
  onClick: () => r(e),
8442
8451
  type: "button",
8443
- children: [/* @__PURE__ */ a("strong", { children: Tu(t, e) }), /* @__PURE__ */ a("small", { children: wu(t, e) })]
8452
+ children: [/* @__PURE__ */ a("strong", { children: Eu(t, e) }), /* @__PURE__ */ a("small", { children: Tu(t, e) })]
8444
8453
  }, e);
8445
8454
  })
8446
8455
  })]
@@ -8457,27 +8466,27 @@ var $ = {
8457
8466
  select: "_select_tgswd_27",
8458
8467
  textarea: "_textarea_tgswd_28",
8459
8468
  empty: "_empty_tgswd_61"
8460
- }, Ru = [
8469
+ }, zu = [
8461
8470
  "none",
8462
8471
  "sharedPool",
8463
8472
  "perBlankOptions"
8464
- ], zu = [
8473
+ ], Bu = [
8465
8474
  "upperAlpha",
8466
8475
  "lowerAlpha",
8467
8476
  "number"
8468
- ], Bu = [
8477
+ ], Vu = [
8469
8478
  "number",
8470
8479
  "upperAlpha",
8471
8480
  "lowerAlpha",
8472
8481
  "lowerRoman",
8473
8482
  "chineseNumber",
8474
8483
  "none"
8475
- ], Vu = [
8484
+ ], Hu = [
8476
8485
  2,
8477
8486
  3,
8478
8487
  4,
8479
8488
  5
8480
- ], Hu = ["standard", "table"], Uu = ["single", "multiple"], Wu = ["spelling", "sentence"], Gu = [
8489
+ ], Uu = ["standard", "table"], Wu = ["single", "multiple"], Gu = ["spelling", "sentence"], Ku = [
8481
8490
  "correctWrong",
8482
8491
  "yesNo",
8483
8492
  "validInvalid",
@@ -8485,8 +8494,8 @@ var $ = {
8485
8494
  "rightWrong",
8486
8495
  "checkCross"
8487
8496
  ];
8488
- function Ku({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
8489
- let f = qu({
8497
+ function qu({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
8498
+ let f = Ju({
8490
8499
  labels: r,
8491
8500
  onElementChange: i,
8492
8501
  onExtraChange: s,
@@ -8568,7 +8577,7 @@ function Ku({ description: e, globalConfig: t, isSubjective: n, labels: r, onEle
8568
8577
  })]
8569
8578
  });
8570
8579
  }
8571
- function qu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
8580
+ function Ju({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
8572
8581
  return r ? /* @__PURE__ */ o("div", {
8573
8582
  className: $["form-stack"],
8574
8583
  children: [
@@ -8588,7 +8597,7 @@ function qu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
8588
8597
  value: r.enName
8589
8598
  })]
8590
8599
  }),
8591
- Ju(r, e, t)
8600
+ Yu(r, e, t)
8592
8601
  ]
8593
8602
  }) : i ? /* @__PURE__ */ o("div", {
8594
8603
  className: $["form-stack"],
@@ -8612,10 +8621,10 @@ function qu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
8612
8621
  children: e.noElement
8613
8622
  });
8614
8623
  }
8615
- function Ju(e, t, n) {
8616
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Yu(e, t, n);
8617
- }
8618
8624
  function Yu(e, t, n) {
8625
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Xu(e, t, n);
8626
+ }
8627
+ function Xu(e, t, n) {
8619
8628
  switch (e.type) {
8620
8629
  case "inlineFill": return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
8621
8630
  className: $["form-row"],
@@ -8623,9 +8632,9 @@ function Yu(e, t, n) {
8623
8632
  className: $.select,
8624
8633
  onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { candidateMode: t.target.value }) })),
8625
8634
  value: e.config.candidateMode,
8626
- children: Ru.map((e) => /* @__PURE__ */ a("option", {
8635
+ children: zu.map((e) => /* @__PURE__ */ a("option", {
8627
8636
  value: e,
8628
- children: Pu(t, e)
8637
+ children: Fu(t, e)
8629
8638
  }, e))
8630
8639
  })]
8631
8640
  }), /* @__PURE__ */ o("label", {
@@ -8642,9 +8651,9 @@ function Yu(e, t, n) {
8642
8651
  className: $.select,
8643
8652
  onChange: (t) => n(k(k({}, e), {}, { config: { builderMode: t.target.value } })),
8644
8653
  value: e.config.builderMode,
8645
- children: Wu.map((e) => /* @__PURE__ */ a("option", {
8654
+ children: Gu.map((e) => /* @__PURE__ */ a("option", {
8646
8655
  value: e,
8647
- children: Nu(t, e)
8656
+ children: Pu(t, e)
8648
8657
  }, e))
8649
8658
  })]
8650
8659
  });
@@ -8654,18 +8663,18 @@ function Yu(e, t, n) {
8654
8663
  className: $.select,
8655
8664
  onChange: (t) => n(k(k({}, e), {}, { config: { judgeAnswerMode: t.target.value } })),
8656
8665
  value: e.config.judgeAnswerMode,
8657
- children: Gu.map((e) => /* @__PURE__ */ a("option", {
8666
+ children: Ku.map((e) => /* @__PURE__ */ a("option", {
8658
8667
  value: e,
8659
- children: Nu(t, e)
8668
+ children: Pu(t, e)
8660
8669
  }, e))
8661
8670
  })]
8662
8671
  });
8663
- case "choice": return Xu(e, t, n);
8664
- case "lineConnect": return Zu(e, t, n);
8665
- case "matching": return Qu(e, t, n);
8672
+ case "choice": return Zu(e, t, n);
8673
+ case "lineConnect": return Qu(e, t, n);
8674
+ case "matching": return $u(e, t, n);
8666
8675
  }
8667
8676
  }
8668
- function Xu(e, t, n) {
8677
+ function Zu(e, t, n) {
8669
8678
  return /* @__PURE__ */ o(i, { children: [
8670
8679
  /* @__PURE__ */ o("label", {
8671
8680
  className: $["form-row"],
@@ -8673,9 +8682,9 @@ function Xu(e, t, n) {
8673
8682
  className: $.select,
8674
8683
  onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { selectionType: t.target.value }) })),
8675
8684
  value: e.config.selectionType,
8676
- children: Uu.map((e) => /* @__PURE__ */ a("option", {
8685
+ children: Wu.map((e) => /* @__PURE__ */ a("option", {
8677
8686
  value: e,
8678
- children: Nu(t, e)
8687
+ children: Pu(t, e)
8679
8688
  }, e))
8680
8689
  })]
8681
8690
  }),
@@ -8685,9 +8694,9 @@ function Xu(e, t, n) {
8685
8694
  className: $.select,
8686
8695
  onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { optionLabelStyle: t.target.value }) })),
8687
8696
  value: e.config.optionLabelStyle,
8688
- children: zu.map((e) => /* @__PURE__ */ a("option", {
8697
+ children: Bu.map((e) => /* @__PURE__ */ a("option", {
8689
8698
  value: e,
8690
- children: Nu(t, e)
8699
+ children: Pu(t, e)
8691
8700
  }, e))
8692
8701
  })]
8693
8702
  }),
@@ -8697,23 +8706,23 @@ function Xu(e, t, n) {
8697
8706
  className: $.select,
8698
8707
  onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { renderer: t.target.value }) })),
8699
8708
  value: e.config.renderer,
8700
- children: Hu.map((e) => /* @__PURE__ */ a("option", {
8709
+ children: Uu.map((e) => /* @__PURE__ */ a("option", {
8701
8710
  value: e,
8702
- children: Nu(t, e)
8711
+ children: Pu(t, e)
8703
8712
  }, e))
8704
8713
  })]
8705
8714
  })
8706
8715
  ] });
8707
8716
  }
8708
- function Zu(e, t, n) {
8709
- let r = $u(e.config.columns);
8717
+ function Qu(e, t, n) {
8718
+ let r = ed(e.config.columns);
8710
8719
  return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
8711
8720
  className: $["form-row"],
8712
8721
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnCount }), /* @__PURE__ */ a("select", {
8713
8722
  className: $.select,
8714
- onChange: (t) => n(k(k({}, e), {}, { config: { columns: td(r, Number(t.target.value)) } })),
8723
+ onChange: (t) => n(k(k({}, e), {}, { config: { columns: nd(r, Number(t.target.value)) } })),
8715
8724
  value: r.length,
8716
- children: Vu.map((e) => /* @__PURE__ */ a("option", {
8725
+ children: Hu.map((e) => /* @__PURE__ */ a("option", {
8717
8726
  value: e,
8718
8727
  children: e
8719
8728
  }, e))
@@ -8724,47 +8733,47 @@ function Zu(e, t, n) {
8724
8733
  className: $.select,
8725
8734
  onChange: (t) => n(k(k({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
8726
8735
  value: i.labelStyle,
8727
- children: Bu.map((e) => /* @__PURE__ */ a("option", {
8736
+ children: Vu.map((e) => /* @__PURE__ */ a("option", {
8728
8737
  value: e,
8729
- children: Fu(t, e)
8738
+ children: Iu(t, e)
8730
8739
  }, e))
8731
8740
  })]
8732
8741
  }, `line-column-${s}`))] });
8733
8742
  }
8734
- function Qu(e, t, n) {
8735
- let r = ed(e.config.columns);
8743
+ function $u(e, t, n) {
8744
+ let r = td(e.config.columns);
8736
8745
  return /* @__PURE__ */ a(i, { children: r.map((i, s) => /* @__PURE__ */ o("label", {
8737
8746
  className: $["form-row"],
8738
8747
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnLabel(s + 1) }), /* @__PURE__ */ a("select", {
8739
8748
  className: $.select,
8740
8749
  onChange: (t) => n(k(k({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
8741
8750
  value: i.labelStyle,
8742
- children: Bu.map((e) => /* @__PURE__ */ a("option", {
8751
+ children: Vu.map((e) => /* @__PURE__ */ a("option", {
8743
8752
  value: e,
8744
- children: Fu(t, e)
8753
+ children: Iu(t, e)
8745
8754
  }, e))
8746
8755
  })]
8747
8756
  }, `matching-column-${s}`)) });
8748
8757
  }
8749
- function $u(e) {
8758
+ function ed(e) {
8750
8759
  let t = e.slice(0, 5);
8751
- return t.length >= 2 ? t : [...t, ...Bu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8760
+ return t.length >= 2 ? t : [...t, ...Vu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8752
8761
  }
8753
- function ed(e) {
8762
+ function td(e) {
8754
8763
  let t = e.slice(0, 2);
8755
- return t.length >= 2 ? t : [...t, ...Bu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8764
+ return t.length >= 2 ? t : [...t, ...Vu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
8756
8765
  }
8757
- function td(e, t) {
8766
+ function nd(e, t) {
8758
8767
  return Array.from({ length: Math.min(5, Math.max(2, t)) }, (t, n) => {
8759
8768
  var r, i;
8760
- return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = Bu[n]) == null ? "number" : i } : r;
8769
+ return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = Vu[n]) == null ? "number" : i } : r;
8761
8770
  });
8762
8771
  }
8763
8772
  //#endregion
8764
8773
  //#region src/question/structure-editor/QuestionStructureEditor.tsx
8765
- function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
8774
+ function rd({ locale: e = "zh-CN", onChange: t, value: n }) {
8766
8775
  var r, i, s, c;
8767
- let l = Eu(e), [u, d] = m((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = rd(n, u);
8776
+ let l = Du(e), [u, d] = m((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = id(n, u);
8768
8777
  function h(e) {
8769
8778
  let r = me(e, n.elements);
8770
8779
  t(k(k({}, n), {}, { elements: [...n.elements, r] })), d(r.clientId);
@@ -8776,11 +8785,11 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
8776
8785
  }
8777
8786
  function _(e) {
8778
8787
  let r = ve(n, e);
8779
- t(r), d(id(r));
8788
+ t(r), d(ad(r));
8780
8789
  }
8781
8790
  function v(e) {
8782
8791
  let r = _e(n, e);
8783
- t(r), d(id(r));
8792
+ t(r), d(ad(r));
8784
8793
  }
8785
8794
  function y(e) {
8786
8795
  t(xe(n, e.clientId, e));
@@ -8795,19 +8804,19 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
8795
8804
  t(Ce(n, e));
8796
8805
  }
8797
8806
  return /* @__PURE__ */ a("section", {
8798
- className: Su.root,
8807
+ className: Cu.root,
8799
8808
  children: /* @__PURE__ */ a("div", {
8800
8809
  className: Q.shell,
8801
8810
  children: /* @__PURE__ */ o("div", {
8802
8811
  className: Q.grid,
8803
8812
  children: [
8804
- /* @__PURE__ */ a(Lu, {
8813
+ /* @__PURE__ */ a(Ru, {
8805
8814
  addedExtraTypes: n.extras.map((e) => e.type),
8806
8815
  labels: l,
8807
8816
  onAddElement: h,
8808
8817
  onAddExtra: g
8809
8818
  }),
8810
- /* @__PURE__ */ a(Iu, {
8819
+ /* @__PURE__ */ a(Lu, {
8811
8820
  elements: n.elements,
8812
8821
  extras: n.extras,
8813
8822
  labels: l,
@@ -8817,7 +8826,7 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
8817
8826
  onSelectElement: d,
8818
8827
  selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
8819
8828
  }),
8820
- /* @__PURE__ */ a(Ku, {
8829
+ /* @__PURE__ */ a(qu, {
8821
8830
  description: n.description,
8822
8831
  globalConfig: n.globalConfig,
8823
8832
  isSubjective: n.isSubjective,
@@ -8834,7 +8843,7 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
8834
8843
  })
8835
8844
  });
8836
8845
  }
8837
- function rd(e, t) {
8846
+ function id(e, t) {
8838
8847
  var n, r, i, a;
8839
8848
  let o = (n = e.elements.find((e) => e.clientId === t)) == null ? null : n, s = (r = e.extras.find((e) => e.clientId === t)) == null ? null : r;
8840
8849
  return o || s ? {
@@ -8845,9 +8854,9 @@ function rd(e, t) {
8845
8854
  selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
8846
8855
  };
8847
8856
  }
8848
- function id(e) {
8857
+ function ad(e) {
8849
8858
  var t, n, r, i;
8850
8859
  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;
8851
8860
  }
8852
8861
  //#endregion
8853
- export { ns as QuestionContentEditor, Wl as QuestionPlayer, _u as QuestionPreview, K as QuestionRichContentView, nd as QuestionStructureEditor, Un as addBlankToGroup, _n as alignQuestionContentDraftWithStructure, Kn as assignBlankToAnswerGroup, Ja as cn, qn as createBlankAnswerGroupWithBlank, qt as createEmptyQuestionContentDraft, Us as createEmptyQuestionPlayerResponse, fe as createEmptyQuestionStructureDraft, gn as createQuestionContentDraftFromSerialized, E as createQuestionContentId, as as createQuestionContentStructureFromDraft, os as createQuestionPreviewDraft, me as createQuestionStructureElement, pe as createQuestionStructureExtra, M as createRichContentValue, Qt as createRichContentValueFromDocument, Ne as createRichTextContent, Wn as deleteBlankFromGroup, ve as deleteQuestionStructureElement, _e as deleteQuestionStructureExtra, Jn as detachBlankFromAnswerGroup, ra as findQuestionContentQuestionTypeStructure, sa as findQuestionContentQuestionTypeTemplate, ln as getQuestionContentJudgementOptions, on as getQuestionContentOptionMarker, tn as getQuestionContentTextMarkerAnswerText, cs as getQuestionStructureDraftChangeKind, j as getQuestionStructureElementDefaultEnName, A as getQuestionStructureElementDefaultName, Te as getQuestionStructureExtraDefaultEnName, we as getQuestionStructureExtraDefaultName, nn as getRichContentDocument, Gn as getSharedBlankAnswerGroups, Kt as isCompositeQuestionContentStructure, mn as isQuestionContentDraftEmpty, ye as moveQuestionStructureElement, En as normalizeFillTextCandidateState, Pe as normalizeRichTextContent, oe as questionStructureElementTypes, se as questionStructureExtraTypes, ca as reconcileQuestionContentDraftWithTemplates, hn as serializeQuestionContentDraft, ss as serializeQuestionStructureDraft, xe as updateQuestionStructureElement, be as updateQuestionStructureExtra, Se as updateQuestionStructureGlobalConfig, Ce as updateQuestionStructureMetadata };
8862
+ export { rs as QuestionContentEditor, Gl as QuestionPlayer, vu as QuestionPreview, K as QuestionRichContentView, rd as QuestionStructureEditor, Un as addBlankToGroup, _n as alignQuestionContentDraftWithStructure, Kn as assignBlankToAnswerGroup, Ja as cn, qn as createBlankAnswerGroupWithBlank, qt as createEmptyQuestionContentDraft, Ws as createEmptyQuestionPlayerResponse, fe as createEmptyQuestionStructureDraft, gn as createQuestionContentDraftFromSerialized, E as createQuestionContentId, os as createQuestionContentStructureFromDraft, ss as createQuestionPreviewDraft, me as createQuestionStructureElement, pe as createQuestionStructureExtra, M as createRichContentValue, Qt as createRichContentValueFromDocument, Ne as createRichTextContent, Wn as deleteBlankFromGroup, ve as deleteQuestionStructureElement, _e as deleteQuestionStructureExtra, Jn as detachBlankFromAnswerGroup, ra as findQuestionContentQuestionTypeStructure, sa as findQuestionContentQuestionTypeTemplate, ln as getQuestionContentJudgementOptions, on as getQuestionContentOptionMarker, tn as getQuestionContentTextMarkerAnswerText, ls as getQuestionStructureDraftChangeKind, j as getQuestionStructureElementDefaultEnName, A as getQuestionStructureElementDefaultName, Te as getQuestionStructureExtraDefaultEnName, we as getQuestionStructureExtraDefaultName, nn as getRichContentDocument, Gn as getSharedBlankAnswerGroups, Kt as isCompositeQuestionContentStructure, mn as isQuestionContentDraftEmpty, ye as moveQuestionStructureElement, En as normalizeFillTextCandidateState, Pe as normalizeRichTextContent, oe as questionStructureElementTypes, se as questionStructureExtraTypes, ca as reconcileQuestionContentDraftWithTemplates, hn as serializeQuestionContentDraft, cs as serializeQuestionStructureDraft, xe as updateQuestionStructureElement, be as updateQuestionStructureExtra, Se as updateQuestionStructureGlobalConfig, Ce as updateQuestionStructureMetadata };