@pie-element/charting 13.0.6-next.20261015154938 → 13.0.6-next.20261016234357

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/browser/author/index.js +273 -273
  2. package/dist/browser/author/index.js.map +1 -1
  3. package/dist/browser/{chart-DnQe4gOt.js → chart-CywE0EOS.js} +15899 -15569
  4. package/dist/browser/chart-CywE0EOS.js.map +1 -0
  5. package/dist/browser/controller/index.js +1 -1
  6. package/dist/browser/delivery/index.js +160 -156
  7. package/dist/browser/delivery/index.js.map +1 -1
  8. package/dist/browser/editor-runtime/author/index.js +273 -273
  9. package/dist/browser/editor-runtime/author/index.js.map +1 -1
  10. package/dist/browser/editor-runtime/{chart-DpwRbEkf.js → chart-Q3PCbwUS.js} +12739 -12409
  11. package/dist/browser/editor-runtime/chart-Q3PCbwUS.js.map +1 -0
  12. package/dist/browser/editor-runtime/controller/index.js +1 -1
  13. package/dist/browser/editor-runtime/delivery/index.js +160 -156
  14. package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
  15. package/dist/browser/editor-runtime/es-BkpdVdfR.js +10 -0
  16. package/dist/browser/editor-runtime/es-BkpdVdfR.js.map +1 -0
  17. package/dist/browser/editor-runtime/es-IvhhD5u_.js +9 -0
  18. package/dist/browser/editor-runtime/es-IvhhD5u_.js.map +1 -0
  19. package/dist/browser/es-BkpdVdfR.js +10 -0
  20. package/dist/browser/es-BkpdVdfR.js.map +1 -0
  21. package/dist/browser/es-IvhhD5u_.js +9 -0
  22. package/dist/browser/es-IvhhD5u_.js.map +1 -0
  23. package/dist/index.iife.js +102 -102
  24. package/dist/schemas/configuration.schema.json +1 -1
  25. package/dist/schemas/model.schema.json +1 -1
  26. package/dist/schemas/session.schema.json +1 -1
  27. package/package.json +6 -6
  28. package/dist/browser/chart-DnQe4gOt.js.map +0 -1
  29. package/dist/browser/editor-runtime/chart-DpwRbEkf.js.map +0 -1
@@ -190,7 +190,7 @@ var b = (e, t) => new Promise((n) => {
190
190
  }), c.length < 1 || c.length > 20 ? u.categoriesError = "The correct answer should include between 1 and 20 categories." : t(o.map((e) => n(e, "value", "label")), s.map((e) => n(e, "value", "label"))) && (u.identicalError = "Correct answer should not be identical to the chart’s initial state"), r(d) || (l.categoryErrors = d), r(u) || (l.correctAnswerErrors = u), l;
191
191
  }, w = Object.freeze({
192
192
  name: "@pie-element/charting",
193
- version: "13.0.6-next.20261015154938"
193
+ version: "13.0.6-next.20261016234357"
194
194
  });
195
195
  //#endregion
196
196
  export { f as checkLabelsEquality, b as createCorrectResponseSession, _ as filterCategories, g as getLogTrace, h as getScore, v as model, m as normalize, y as outcome, w as piePackage, p as setCorrectness, C as validate };
@@ -1,11 +1,11 @@
1
1
  import { i as e } from "../rolldown-runtime-CWhphoD1.js";
2
- import { A as t, G as n, H as r, M as i, O as a, U as o, _ as s, a as c, b as l, et as u, h as d, j as f, o as p, t as m, v as h, x as g, y as _ } from "../chart-DnQe4gOt.js";
3
- import { g as v } from "../dist-kMt4MdSv.js";
4
- import y, { useRef as b } from "react";
5
- import { createRoot as x } from "react-dom/client";
6
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
2
+ import { K as t, M as n, N as r, S as i, U as a, W as o, a as s, b as c, g as l, h as u, j as d, k as f, o as p, t as m, tt as h, v as g, x as _, y as v } from "../chart-CywE0EOS.js";
3
+ import { g as y } from "../dist-kMt4MdSv.js";
4
+ import b, { useRef as x } from "react";
5
+ import { createRoot as S } from "react-dom/client";
6
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
7
7
  //#region ../../lib-react/icons/dist/correct-response-icon.js
8
- var w = /* @__PURE__ */ e(u(), 1), T = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ C("svg", {
8
+ var T = /* @__PURE__ */ e(h(), 1), E = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ w("svg", {
9
9
  "aria-hidden": "true",
10
10
  focusable: "false",
11
11
  preserveAspectRatio: "xMinYMin meet",
@@ -13,27 +13,27 @@ var w = /* @__PURE__ */ e(u(), 1), T = ({ bgFill: e, fgFill: t }) => /* @__PURE_
13
13
  viewBox: "-283 359 34 35",
14
14
  style: { enableBackground: "new -283 359 34 35" },
15
15
  children: [
16
- /* @__PURE__ */ S("circle", {
16
+ /* @__PURE__ */ C("circle", {
17
17
  cx: "-266",
18
18
  cy: "375.9",
19
19
  r: "14",
20
20
  fill: e
21
21
  }),
22
- /* @__PURE__ */ S("path", {
22
+ /* @__PURE__ */ C("path", {
23
23
  d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
24
24
  fill: e
25
25
  }),
26
- /* @__PURE__ */ S("polygon", {
26
+ /* @__PURE__ */ C("polygon", {
27
27
  points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
28
28
  fill: t
29
29
  })
30
30
  ]
31
31
  });
32
- T.propTypes = {
33
- bgFill: w.default.string.isRequired,
34
- fgFill: w.default.string.isRequired
32
+ E.propTypes = {
33
+ bgFill: T.default.string.isRequired,
34
+ fgFill: T.default.string.isRequired
35
35
  };
36
- var E = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ C("svg", {
36
+ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
37
37
  "aria-hidden": "true",
38
38
  focusable: "false",
39
39
  preserveAspectRatio: "xMinYMin meet",
@@ -41,7 +41,7 @@ var E = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ C("svg", {
41
41
  viewBox: "-129.5 127 34 35",
42
42
  style: { enableBackground: "new -129.5 127 34 35" },
43
43
  children: [
44
- /* @__PURE__ */ S("path", {
44
+ /* @__PURE__ */ C("path", {
45
45
  style: {
46
46
  fill: "#D0CAC5",
47
47
  stroke: "#E6E3E0",
@@ -50,7 +50,7 @@ var E = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ C("svg", {
50
50
  },
51
51
  d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
52
52
  }),
53
- /* @__PURE__ */ S("path", {
53
+ /* @__PURE__ */ C("path", {
54
54
  style: {
55
55
  fill: "#B3ABA4",
56
56
  stroke: "#CDC7C2",
@@ -59,48 +59,48 @@ var E = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ C("svg", {
59
59
  },
60
60
  d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
61
61
  }),
62
- /* @__PURE__ */ S("circle", {
62
+ /* @__PURE__ */ C("circle", {
63
63
  cx: "-114.2",
64
64
  cy: "143.5",
65
65
  r: "14",
66
66
  fill: e
67
67
  }),
68
- /* @__PURE__ */ S("path", {
68
+ /* @__PURE__ */ C("path", {
69
69
  d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
70
70
  fill: n
71
71
  }),
72
- /* @__PURE__ */ S("polygon", {
72
+ /* @__PURE__ */ C("polygon", {
73
73
  points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
74
74
  fill: t
75
75
  })
76
76
  ]
77
77
  });
78
- E.propTypes = {
79
- bgFill: w.default.string.isRequired,
80
- fgFill: w.default.string.isRequired,
81
- borderFill: w.default.string.isRequired
78
+ D.propTypes = {
79
+ bgFill: T.default.string.isRequired,
80
+ fgFill: T.default.string.isRequired,
81
+ borderFill: T.default.string.isRequired
82
82
  };
83
- var D = n("div")(({ size: e }) => ({
83
+ var ee = t("div")(({ size: e }) => ({
84
84
  width: e || "25px",
85
85
  height: e || "25px"
86
- })), O = ({ open: e, size: t }) => /* @__PURE__ */ S(D, {
86
+ })), O = ({ open: e, size: t }) => /* @__PURE__ */ C(ee, {
87
87
  size: t,
88
- children: e ? /* @__PURE__ */ S(T, {
88
+ children: e ? /* @__PURE__ */ C(E, {
89
89
  bgFill: "#bce2ff",
90
90
  fgFill: "#1a9cff"
91
- }) : /* @__PURE__ */ S(E, {
91
+ }) : /* @__PURE__ */ C(D, {
92
92
  bgFill: "white",
93
93
  fgFill: "#1a9cff",
94
94
  borderFill: "#bce2ff"
95
95
  })
96
96
  });
97
97
  O.propTypes = {
98
- open: w.default.bool,
99
- size: w.default.string
98
+ open: T.default.bool,
99
+ size: T.default.string
100
100
  }, O.defaultProps = { open: !1 };
101
101
  //#endregion
102
102
  //#region ../../lib-react/charting/dist/key-legend.js
103
- var ee = n("div")(({ theme: e }) => ({
103
+ var te = t("div")(({ theme: e }) => ({
104
104
  backgroundColor: o.v("pie")("background", o.defaults.WHITE),
105
105
  color: o.text(),
106
106
  padding: e.spacing(2),
@@ -109,36 +109,36 @@ var ee = n("div")(({ theme: e }) => ({
109
109
  display: "flex",
110
110
  flexDirection: "column",
111
111
  gap: "16px"
112
- })), k = n("div")(() => ({
112
+ })), k = t("div")(() => ({
113
113
  display: "flex",
114
114
  alignItems: "center",
115
115
  gap: "12px"
116
- })), te = n("div")(({ theme: e }) => ({
116
+ })), ne = t("div")(({ theme: e }) => ({
117
117
  fontSize: e.typography.h6.fontSize,
118
118
  fontWeight: "700"
119
- })), ne = n("div")(() => ({ marginLeft: "2px" })), A = n(d)(({ theme: e }) => ({
119
+ })), A = t("div")(() => ({ marginLeft: "2px" })), j = t(l)(({ theme: e }) => ({
120
120
  backgroundColor: o.correct(),
121
121
  borderRadius: e.spacing(2),
122
122
  color: o.defaults.WHITE
123
- })), j = n(p)(({ theme: e }) => ({
123
+ })), re = t(p)(({ theme: e }) => ({
124
124
  backgroundColor: o.incorrectWithIcon(),
125
125
  borderRadius: e.spacing(2),
126
126
  color: o.defaults.WHITE
127
- })), re = n("div")(() => ({
127
+ })), ie = t("div")(() => ({
128
128
  marginLeft: "3px",
129
129
  display: "flex",
130
130
  alignItems: "center",
131
131
  gap: "12px"
132
- })), { translator: M } = f, N = ({ language: e }) => /* @__PURE__ */ C(ee, { children: [
133
- /* @__PURE__ */ S(te, { children: M.t("selectText.key", { lng: e }) }),
134
- /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(j, {}), /* @__PURE__ */ S("div", { children: M.t("charting.keyLegend.incorrectAnswer", { lng: e }) })] }),
135
- /* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, {}), /* @__PURE__ */ S("div", { children: M.t("charting.keyLegend.correctAnswer", { lng: e }) })] }),
136
- /* @__PURE__ */ C(re, { children: [/* @__PURE__ */ S(A, { fontSize: "small" }), /* @__PURE__ */ S(ne, { children: M.t("charting.keyLegend.correctKeyAnswer", { lng: e }) })] })
132
+ })), { translator: M } = u, N = ({ language: e }) => /* @__PURE__ */ w(te, { children: [
133
+ /* @__PURE__ */ C(ne, { children: M.t("selectText.key", { lng: e }) }),
134
+ /* @__PURE__ */ w(k, { children: [/* @__PURE__ */ C(re, {}), /* @__PURE__ */ C("div", { children: M.t("charting.keyLegend.incorrectAnswer", { lng: e }) })] }),
135
+ /* @__PURE__ */ w(k, { children: [/* @__PURE__ */ C(j, {}), /* @__PURE__ */ C("div", { children: M.t("charting.keyLegend.correctAnswer", { lng: e }) })] }),
136
+ /* @__PURE__ */ w(ie, { children: [/* @__PURE__ */ C(j, { fontSize: "small" }), /* @__PURE__ */ C(A, { children: M.t("charting.keyLegend.correctKeyAnswer", { lng: e }) })] })
137
137
  ] });
138
- N.propTypes = { language: w.default.string };
138
+ N.propTypes = { language: T.default.string };
139
139
  //#endregion
140
140
  //#region ../../lib-react/correct-answer-toggle/dist/expander.js
141
- var P = "height ease-in 300ms, opacity ease-in 300ms", ie = n("div")(() => ({
141
+ var P = "height ease-in 300ms, opacity ease-in 300ms", ae = t("div")(() => ({
142
142
  position: "relative",
143
143
  height: 0,
144
144
  overflow: "hidden",
@@ -173,9 +173,9 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ie = n("div")(() => ({
173
173
  width: 0
174
174
  }
175
175
  })), F = (e) => {
176
- let { show: t, children: n, className: i } = e, a = b(null);
177
- return /* @__PURE__ */ S(r, {
178
- nodeRef: a,
176
+ let { show: t, children: n, className: r } = e, i = x(null);
177
+ return /* @__PURE__ */ C(a, {
178
+ nodeRef: i,
179
179
  in: t,
180
180
  appear: !0,
181
181
  mountOnEnter: !1,
@@ -186,19 +186,32 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ie = n("div")(() => ({
186
186
  exit: "exit",
187
187
  exitDone: "exit-done"
188
188
  },
189
- children: /* @__PURE__ */ S(ie, {
190
- ref: a,
191
- className: i,
189
+ children: /* @__PURE__ */ C(ae, {
190
+ ref: i,
191
+ className: r,
192
192
  children: n
193
193
  })
194
194
  });
195
195
  };
196
196
  F.propTypes = {
197
- show: w.default.bool.isRequired,
198
- className: w.default.string,
199
- children: w.default.oneOfType([w.default.arrayOf(w.default.node), w.default.node]).isRequired
197
+ show: T.default.bool.isRequired,
198
+ className: T.default.string,
199
+ children: T.default.oneOfType([T.default.arrayOf(T.default.node), T.default.node]).isRequired
200
200
  };
201
201
  //#endregion
202
+ //#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
203
+ var oe = r({
204
+ packageName: "@pie-lib/correct-answer-toggle",
205
+ source: {
206
+ showCorrectAnswer: "Show correct answer",
207
+ hideCorrectAnswer: "Hide correct answer"
208
+ },
209
+ loaders: { es: () => import(
210
+ /* webpackMode: "eager" */
211
+ "../es-IvhhD5u_.js"
212
+ ) }
213
+ });
214
+ //#endregion
202
215
  //#region ../../lib-react/correct-answer-toggle/dist/index.js
203
216
  function I(e) {
204
217
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
@@ -206,17 +219,17 @@ function I(e) {
206
219
  function L(e, t) {
207
220
  return !e || I(e) ? e : I(e.default) ? e.default : t && I(e[t]) ? e[t] : t && I(e[t]?.default) ? e[t].default : e;
208
221
  }
209
- var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Readable") || L(ae.Readable, "Readable"), { translator: B } = f, se = {
222
+ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Readable") || L(se.Readable, "Readable"), le = {
210
223
  WebkitTouchCallout: "none",
211
224
  WebkitUserSelect: "none",
212
225
  KhtmlUserSelect: "none",
213
226
  MozUserSelect: "none",
214
227
  msUserSelect: "none",
215
228
  userSelect: "none"
216
- }, ce = n("div")(() => ({
229
+ }, ue = t("div")(() => ({
217
230
  width: "100%",
218
231
  cursor: "pointer"
219
- })), le = n("button")(() => ({
232
+ })), de = t("button")(() => ({
220
233
  margin: "0 auto",
221
234
  textAlign: "center",
222
235
  display: "flex",
@@ -232,15 +245,15 @@ var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Rea
232
245
  outline: `2px solid ${o.buttonFocusOutline()}`,
233
246
  outlineOffset: "-2px"
234
247
  }
235
- })), ue = n("div")(() => ({
248
+ })), B = t("div")(() => ({
236
249
  width: "fit-content",
237
250
  minWidth: "140px",
238
251
  alignSelf: "center",
239
252
  verticalAlign: "middle",
240
253
  color: `var(--correct-answer-toggle-label-color, ${o.text()})`,
241
254
  fontWeight: "normal",
242
- ...se
243
- })), V = n("div")(() => ({
255
+ ...le
256
+ })), V = t("div")(() => ({
244
257
  position: "absolute",
245
258
  width: "25px",
246
259
  "&.enter": { opacity: "0" },
@@ -253,59 +266,50 @@ var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Rea
253
266
  opacity: "0",
254
267
  transition: "opacity 0.3s ease-in"
255
268
  }
256
- })), H = n("div")(() => ({
269
+ })), fe = t("div")(() => ({
257
270
  width: "25px",
258
271
  marginRight: "5px",
259
272
  display: "flex",
260
273
  alignItems: "center"
261
- })), de = class e extends y.Component {
274
+ })), pe = class extends b.Component {
262
275
  static propTypes = {
263
- onToggle: w.default.func,
264
- toggled: w.default.bool,
265
- show: w.default.bool,
266
- hideMessage: w.default.string,
267
- showMessage: w.default.string,
268
- className: w.default.string,
269
- language: w.default.string
276
+ onToggle: T.default.func,
277
+ toggled: T.default.bool,
278
+ show: T.default.bool,
279
+ hideMessage: T.default.string,
280
+ showMessage: T.default.string,
281
+ className: T.default.string,
282
+ language: T.default.string
270
283
  };
271
284
  static defaultProps = {
272
- showMessage: "Show correct answer",
273
- hideMessage: "Hide correct answer",
274
285
  show: !1,
275
286
  toggled: !1
276
287
  };
277
- constructor(t) {
278
- super(t), this.state = { show: t.show }, this.openIconRef = y.createRef(), this.closedIconRef = y.createRef(), e.defaultProps = {
279
- ...e.defaultProps,
280
- showMessage: B.t("common:showCorrectAnswer", { lng: t.language }),
281
- hideMessage: B.t("common:hideCorrectAnswer", { lng: t.language })
282
- };
288
+ constructor(e) {
289
+ super(e), this.state = { show: e.show }, this.openIconRef = b.createRef(), this.closedIconRef = b.createRef();
283
290
  }
291
+ relabel = () => this.forceUpdate();
284
292
  onClick() {
285
293
  this.props.onToggle(!this.props.toggled);
286
294
  }
287
295
  onTouch(e) {
288
296
  e.preventDefault(), this.props.onToggle(!this.props.toggled);
289
297
  }
290
- UNSAFE_componentWillReceiveProps(t) {
291
- this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
292
- ...e.defaultProps,
293
- showMessage: B.t("common:showCorrectAnswer", { lng: t.language }),
294
- hideMessage: B.t("common:hideCorrectAnswer", { lng: t.language })
295
- });
298
+ UNSAFE_componentWillReceiveProps(e) {
299
+ this.setState({ show: e.show });
296
300
  }
297
301
  render() {
298
- let { className: e, toggled: t, hideMessage: n, showMessage: i } = this.props;
299
- return /* @__PURE__ */ S(ce, {
302
+ let { className: e, toggled: t, language: n } = this.props, r = oe.forLocale(n, this.relabel), i = this.props.hideMessage ?? r.t("hideCorrectAnswer"), o = this.props.showMessage ?? r.t("showCorrectAnswer");
303
+ return /* @__PURE__ */ C(ue, {
300
304
  className: e,
301
- children: /* @__PURE__ */ S(F, {
305
+ children: /* @__PURE__ */ C(F, {
302
306
  show: this.state.show,
303
- children: /* @__PURE__ */ C(le, {
307
+ children: /* @__PURE__ */ w(de, {
304
308
  type: "button",
305
309
  "aria-pressed": !!t,
306
310
  onClick: this.onClick.bind(this),
307
311
  onTouchEnd: this.onTouch.bind(this),
308
- children: [/* @__PURE__ */ C(H, { children: [/* @__PURE__ */ S(r, {
312
+ children: [/* @__PURE__ */ w(fe, { children: [/* @__PURE__ */ C(a, {
309
313
  nodeRef: this.openIconRef,
310
314
  timeout: 400,
311
315
  in: t,
@@ -316,11 +320,11 @@ var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Rea
316
320
  exit: "exit",
317
321
  exitActive: "exit-active"
318
322
  },
319
- children: /* @__PURE__ */ S(V, {
323
+ children: /* @__PURE__ */ C(V, {
320
324
  ref: this.openIconRef,
321
- children: /* @__PURE__ */ S(O, { open: t }, "correct-open")
325
+ children: /* @__PURE__ */ C(O, { open: t }, "correct-open")
322
326
  })
323
- }), /* @__PURE__ */ S(r, {
327
+ }), /* @__PURE__ */ C(a, {
324
328
  nodeRef: this.closedIconRef,
325
329
  timeout: 5e3,
326
330
  in: !t,
@@ -331,15 +335,15 @@ var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Rea
331
335
  exit: "exit",
332
336
  exitActive: "exit-active"
333
337
  },
334
- children: /* @__PURE__ */ S(V, {
338
+ children: /* @__PURE__ */ C(V, {
335
339
  ref: this.closedIconRef,
336
- children: /* @__PURE__ */ S(O, { open: t }, "correct-closed")
340
+ children: /* @__PURE__ */ C(O, { open: t }, "correct-closed")
337
341
  })
338
- })] }), /* @__PURE__ */ S(oe, {
342
+ })] }), /* @__PURE__ */ C(ce, {
339
343
  false: !0,
340
- children: /* @__PURE__ */ S(ue, {
344
+ children: /* @__PURE__ */ C(B, {
341
345
  "aria-hidden": !this.state.show,
342
- children: t ? n : i
346
+ children: t ? i : o
343
347
  })
344
348
  })]
345
349
  })
@@ -349,25 +353,25 @@ var R = s, z = R.default, ae = z && typeof z == "object" ? z : R, oe = L(l, "Rea
349
353
  };
350
354
  //#endregion
351
355
  //#region src/delivery/main.tsx
352
- function U(e) {
356
+ function H(e) {
353
357
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
354
358
  }
355
- function W(e, t) {
356
- return !e || U(e) ? e : U(e.default) ? e.default : t && U(e[t]) ? e[t] : t && U(e[t]?.default) ? e[t].default : e;
359
+ function U(e, t) {
360
+ return !e || H(e) ? e : H(e.default) ? e.default : t && H(e[t]) ? e[t] : t && H(e[t]?.default) ? e[t].default : e;
357
361
  }
358
- var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLayout") || W(q.UiLayout, "UiLayout"), J = W(g, "PreviewPrompt") || W(q.PreviewPrompt, "PreviewPrompt"), Y = W(t, "Collapsible") || W(q.Collapsible, "Collapsible"), { translator: X } = f, pe = n(fe)({
362
+ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLayout") || U(K.UiLayout, "UiLayout"), q = U(i, "PreviewPrompt") || U(K.PreviewPrompt, "PreviewPrompt"), J = U(d, "Collapsible") || U(K.Collapsible, "Collapsible"), { translator: Y } = u, he = t(me)({
359
363
  color: o.text(),
360
364
  backgroundColor: o.background(),
361
365
  overflowX: "scroll",
362
366
  overflowY: "hidden"
363
- }), Z = n(m)(({ theme: e }) => ({
367
+ }), X = t(m)(({ theme: e }) => ({
364
368
  marginTop: e.spacing(2),
365
369
  marginBottom: e.spacing(2)
366
- })), me = n(Y)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Q = class extends y.Component {
370
+ })), ge = t(J)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Z = class extends b.Component {
367
371
  static propTypes = {
368
- model: w.default.object.isRequired,
369
- onAnswersChange: w.default.func,
370
- categories: w.default.array
372
+ model: T.default.object.isRequired,
373
+ onAnswersChange: T.default.func,
374
+ categories: T.default.array
371
375
  };
372
376
  constructor(e) {
373
377
  super(e), this.state = {
@@ -376,12 +380,12 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
376
380
  };
377
381
  }
378
382
  componentDidUpdate(e) {
379
- v(e.categories, this.props.categories) ? v(e.model.data, this.props.model.data) || this.setState({ categories: this.props.model.data }) : this.setState({ categories: this.props.categories });
383
+ y(e.categories, this.props.categories) ? y(e.model.data, this.props.model.data) || this.setState({ categories: this.props.model.data }) : this.setState({ categories: this.props.categories });
380
384
  }
381
385
  changeData = (e) => this.setState({ categories: e }, () => this.props.onAnswersChange(e));
382
386
  toggleCorrect = (e) => this.setState({ showingCorrect: e });
383
387
  render() {
384
- let { categories: e, showingCorrect: t } = this.state, { model: n } = this.props, { teacherInstructions: r, prompt: i, chartType: a, size: o, domain: s, range: l, title: u, addCategoryEnabled: d, studentNewCategoryDefaultLabel: f, showToggle: p, rationale: m, correctAnswer: g, language: v, env: y, showKeyLegend: b } = n, { correctedAnswer: x, extraCSSRules: w } = n, T = (g?.data || []).map((e) => ({
388
+ let { categories: e, showingCorrect: t } = this.state, { model: n } = this.props, { teacherInstructions: r, prompt: i, chartType: a, size: o, domain: l, range: u, title: d, addCategoryEnabled: f, studentNewCategoryDefaultLabel: p, showToggle: m, rationale: h, correctAnswer: g, language: _, env: y, showKeyLegend: b } = n, { correctedAnswer: x, extraCSSRules: S } = n, T = (g?.data || []).map((e) => ({
385
389
  ...e,
386
390
  interactive: !1,
387
391
  editable: !1
@@ -390,83 +394,83 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
390
394
  ...e,
391
395
  editable: !1
392
396
  })));
393
- let D = n.rationale && (_(n.rationale) || h(n.rationale));
394
- return /* @__PURE__ */ C(pe, {
395
- extraCSSRules: w,
397
+ let D = n.rationale && (c(n.rationale) || v(n.rationale));
398
+ return /* @__PURE__ */ w(he, {
399
+ extraCSSRules: S,
396
400
  children: [
397
- n.teacherInstructions && (_(n.teacherInstructions) || h(n.teacherInstructions)) && /* @__PURE__ */ S(me, {
401
+ n.teacherInstructions && (c(n.teacherInstructions) || v(n.teacherInstructions)) && /* @__PURE__ */ C(ge, {
398
402
  labels: {
399
- hidden: X.t("common:showTeacherInstructions", { lng: v }),
400
- visible: X.t("common:hideTeacherInstructions", { lng: v })
403
+ hidden: Y.t("common:showTeacherInstructions", { lng: _ }),
404
+ visible: Y.t("common:hideTeacherInstructions", { lng: _ })
401
405
  },
402
- children: /* @__PURE__ */ S(J, { prompt: r })
406
+ children: /* @__PURE__ */ C(q, { prompt: r })
403
407
  }),
404
- i && /* @__PURE__ */ S(J, {
408
+ i && /* @__PURE__ */ C(q, {
405
409
  className: "prompt",
406
410
  prompt: i
407
411
  }),
408
- /* @__PURE__ */ S(de, {
409
- show: p,
412
+ /* @__PURE__ */ C(pe, {
413
+ show: m,
410
414
  toggled: t,
411
415
  onToggle: this.toggleCorrect,
412
- language: v
416
+ language: _
413
417
  }),
414
- t && p ? /* @__PURE__ */ S(Z, {
418
+ t && m ? /* @__PURE__ */ C(X, {
415
419
  chartType: a,
416
420
  size: o,
417
- domain: s,
418
- range: l,
421
+ domain: l,
422
+ range: u,
419
423
  charts: [
420
- c.Bar(),
421
- c.Histogram(),
422
- c.LineDot(),
423
- c.LineCross(),
424
- c.DotPlot(),
425
- c.LinePlot()
424
+ s.Bar(),
425
+ s.Histogram(),
426
+ s.LineDot(),
427
+ s.LineCross(),
428
+ s.DotPlot(),
429
+ s.LinePlot()
426
430
  ],
427
431
  data: T || e,
428
- title: u,
432
+ title: d,
429
433
  onDataChange: this.changeData,
430
434
  addCategoryEnabled: !1,
431
- categoryDefaultLabel: f,
432
- language: v,
435
+ categoryDefaultLabel: p,
436
+ language: _,
433
437
  disabled: n.disabled,
434
438
  labelsPlaceholders: {}
435
- }) : /* @__PURE__ */ S(Z, {
439
+ }) : /* @__PURE__ */ C(X, {
436
440
  chartType: a,
437
441
  size: o,
438
- domain: s,
439
- range: l,
442
+ domain: l,
443
+ range: u,
440
444
  charts: [
441
- c.Bar(),
442
- c.Histogram(),
443
- c.LineDot(),
444
- c.LineCross(),
445
- c.DotPlot(),
446
- c.LinePlot()
445
+ s.Bar(),
446
+ s.Histogram(),
447
+ s.LineDot(),
448
+ s.LineCross(),
449
+ s.DotPlot(),
450
+ s.LinePlot()
447
451
  ],
448
452
  data: x || e,
449
- title: u,
453
+ title: d,
450
454
  onDataChange: this.changeData,
451
- addCategoryEnabled: d,
452
- categoryDefaultLabel: f,
453
- language: v,
455
+ addCategoryEnabled: f,
456
+ categoryDefaultLabel: p,
457
+ language: _,
454
458
  disabled: n.disabled,
455
459
  labelsPlaceholders: {},
456
- correctData: p ? T : void 0
460
+ correctData: m ? T : void 0
457
461
  }),
458
- !t && b && /* @__PURE__ */ S(N, { language: v }),
459
- D && /* @__PURE__ */ S(Y, {
462
+ !t && b && /* @__PURE__ */ C(N, { language: _ }),
463
+ D && /* @__PURE__ */ C(J, {
460
464
  labels: {
461
- hidden: X.t("common:showRationale", { lng: v }),
462
- visible: X.t("common:hideRationale", { lng: v })
465
+ hidden: Y.t("common:showRationale", { lng: _ }),
466
+ visible: Y.t("common:hideRationale", { lng: _ })
463
467
  },
464
- children: /* @__PURE__ */ S(J, { prompt: m })
468
+ children: /* @__PURE__ */ C(q, { prompt: h })
465
469
  })
466
470
  ]
467
471
  });
468
472
  }
469
- }, $ = class e extends CustomEvent {
473
+ }, Q = class e extends CustomEvent {
470
474
  static {
471
475
  this.TYPE = "model-set";
472
476
  }
@@ -481,7 +485,7 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
481
485
  }
482
486
  }), this.component = t, this.complete = n;
483
487
  }
484
- }, he = class e extends CustomEvent {
488
+ }, $ = class e extends CustomEvent {
485
489
  static {
486
490
  this.TYPE = "session-changed";
487
491
  }
@@ -495,13 +499,13 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
495
499
  }
496
500
  }), this.component = t, this.complete = n;
497
501
  }
498
- }, ge = class extends HTMLElement {
502
+ }, _e = class extends HTMLElement {
499
503
  constructor() {
500
504
  super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
501
505
  }
502
506
  _scheduleMathRender = () => {
503
507
  this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
504
- this._mathObserver && this._mathObserver.disconnect(), i(this), this._mathRenderPending = !1, setTimeout(() => {
508
+ this._mathObserver && this._mathObserver.disconnect(), n(this), this._mathRenderPending = !1, setTimeout(() => {
505
509
  this._mathObserver && this._mathObserver.observe(this, {
506
510
  childList: !0,
507
511
  subtree: !0
@@ -519,7 +523,7 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
519
523
  this._mathObserver &&= (this._mathObserver.disconnect(), null);
520
524
  }
521
525
  set model(e) {
522
- this._model = e, this._session && this.isComplete(this._session.answer) ? this.dispatchEvent(new $(this.tagName.toLowerCase(), !0, !!this._model)) : this.dispatchEvent(new $(this.tagName.toLowerCase(), !1, !!this._model)), this._render();
526
+ this._model = e, this._session && this.isComplete(this._session.answer) ? this.dispatchEvent(new Q(this.tagName.toLowerCase(), !0, !!this._model)) : this.dispatchEvent(new Q(this.tagName.toLowerCase(), !1, !!this._model)), this._render();
523
527
  }
524
528
  set session(e) {
525
529
  this._session = e, this._render();
@@ -532,7 +536,7 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
532
536
  }
533
537
  isComplete = (e) => Array.isArray(e) && e.length > 0;
534
538
  changeAnswers = (e) => {
535
- this._session.answer = e, this.dispatchEvent(new he(this.tagName.toLowerCase(), this.isComplete(this._session.answer))), this._render();
539
+ this._session.answer = e, this.dispatchEvent(new $(this.tagName.toLowerCase(), this.isComplete(this._session.answer))), this._render();
536
540
  };
537
541
  _render() {
538
542
  if (!this._model || !this._session) return;
@@ -540,21 +544,21 @@ var G = s, K = G.default, q = K && typeof K == "object" ? K : G, fe = W(a, "UiLa
540
544
  let e = {
541
545
  ...this._model,
542
546
  data: this._model.data ? [...this._model.data] : this._model.data
543
- }, t = y.createElement(Q, {
547
+ }, t = b.createElement(Z, {
544
548
  model: e,
545
549
  categories: this._session.answer,
546
550
  onAnswersChange: this.changeAnswers
547
551
  });
548
- this._root ||= x(this), this._root.render(t);
552
+ this._root ||= S(this), this._root.render(t);
549
553
  }
550
554
  disconnectedCallback() {
551
555
  this._disconnectMathObserver(), this._root &&= (this._root.unmount(), null);
552
556
  }
553
- }, _e = Object.freeze({
557
+ }, ve = Object.freeze({
554
558
  name: "@pie-element/charting",
555
- version: "13.0.6-next.20261015154938"
559
+ version: "13.0.6-next.20261016234357"
556
560
  });
557
561
  //#endregion
558
- export { Q as Component, ge as default, _e as piePackage };
562
+ export { Z as Component, _e as default, ve as piePackage };
559
563
 
560
564
  //# sourceMappingURL=index.js.map