@pie-element/explicit-constructed-response 11.1.1 → 11.1.2-next.1

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 (108) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -0
  4. package/dist/author/alternateResponses.d.ts +34 -0
  5. package/dist/author/alternateResponses.js +113 -0
  6. package/dist/author/alternateSection.d.ts +58 -0
  7. package/dist/author/alternateSection.js +213 -0
  8. package/dist/author/defaults.d.ts +186 -0
  9. package/dist/author/defaults.js +128 -0
  10. package/dist/author/ecr-toolbar.d.ts +41 -0
  11. package/dist/author/ecr-toolbar.js +100 -0
  12. package/dist/author/index.d.ts +42 -0
  13. package/dist/author/index.js +96 -0
  14. package/dist/author/main.d.ts +38 -0
  15. package/dist/author/main.js +291 -0
  16. package/dist/author/markupUtils.d.ts +14 -0
  17. package/dist/author/markupUtils.js +13 -0
  18. package/dist/author/utils.d.ts +9 -0
  19. package/dist/author/utils.js +7 -0
  20. package/dist/browser/author/index.js +3378 -0
  21. package/dist/browser/author/index.js.map +1 -0
  22. package/dist/browser/browser-BC3WygxE.js +360 -0
  23. package/dist/browser/browser-BC3WygxE.js.map +1 -0
  24. package/dist/browser/controller/index.js +4152 -0
  25. package/dist/browser/controller/index.js.map +1 -0
  26. package/dist/browser/delivery/index.js +96 -0
  27. package/dist/browser/delivery/index.js.map +1 -0
  28. package/dist/browser/dist-D5D48-XD.js +45656 -0
  29. package/dist/browser/dist-D5D48-XD.js.map +1 -0
  30. package/dist/browser/dist-D9ARZhQk.js +1426 -0
  31. package/dist/browser/dist-D9ARZhQk.js.map +1 -0
  32. package/dist/browser/explicit-constructed-response.css +2 -0
  33. package/dist/browser/main-B4lD1zyg.js +959 -0
  34. package/dist/browser/main-B4lD1zyg.js.map +1 -0
  35. package/dist/browser/print/index.js +40 -0
  36. package/dist/browser/print/index.js.map +1 -0
  37. package/dist/controller/defaults.d.ts +25 -0
  38. package/dist/controller/defaults.js +19 -0
  39. package/dist/controller/index.d.ts +64 -0
  40. package/dist/controller/index.js +139 -0
  41. package/dist/delivery/index.d.ts +20 -0
  42. package/dist/delivery/index.js +66 -0
  43. package/dist/delivery/main.d.ts +48 -0
  44. package/dist/delivery/main.js +115 -0
  45. package/dist/explicit-constructed-response.css +2 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.iife.d.ts +8 -0
  48. package/dist/index.iife.js +393 -0
  49. package/dist/index.js +2 -0
  50. package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -0
  51. package/dist/print/index.d.ts +15 -0
  52. package/dist/print/index.js +40 -0
  53. package/dist/runtime-support.d.ts +12 -0
  54. package/dist/runtime-support.js +12 -0
  55. package/package.json +94 -26
  56. package/CHANGELOG.json +0 -1102
  57. package/CHANGELOG.md +0 -2187
  58. package/LICENSE.md +0 -5
  59. package/README.md +0 -1
  60. package/configure/CHANGELOG.json +0 -652
  61. package/configure/CHANGELOG.md +0 -1928
  62. package/configure/lib/alternateResponses.js +0 -199
  63. package/configure/lib/alternateResponses.js.map +0 -1
  64. package/configure/lib/alternateSection.js +0 -329
  65. package/configure/lib/alternateSection.js.map +0 -1
  66. package/configure/lib/defaults.js +0 -184
  67. package/configure/lib/defaults.js.map +0 -1
  68. package/configure/lib/ecr-toolbar.js +0 -181
  69. package/configure/lib/ecr-toolbar.js.map +0 -1
  70. package/configure/lib/index.js +0 -161
  71. package/configure/lib/index.js.map +0 -1
  72. package/configure/lib/main.js +0 -514
  73. package/configure/lib/main.js.map +0 -1
  74. package/configure/lib/markupUtils.js +0 -70
  75. package/configure/lib/markupUtils.js.map +0 -1
  76. package/configure/lib/utils.js +0 -15
  77. package/configure/lib/utils.js.map +0 -1
  78. package/configure/package.json +0 -22
  79. package/controller/CHANGELOG.json +0 -517
  80. package/controller/CHANGELOG.md +0 -1344
  81. package/controller/lib/defaults.js +0 -23
  82. package/controller/lib/defaults.js.map +0 -1
  83. package/controller/lib/index.js +0 -368
  84. package/controller/lib/index.js.map +0 -1
  85. package/controller/package.json +0 -18
  86. package/docs/config-schema.json +0 -2629
  87. package/docs/config-schema.json.md +0 -1941
  88. package/docs/demo/config.js +0 -8
  89. package/docs/demo/generate.js +0 -20
  90. package/docs/demo/index.html +0 -1
  91. package/docs/demo/session.js +0 -10
  92. package/docs/pie-schema.json +0 -1130
  93. package/docs/pie-schema.json.md +0 -814
  94. package/lib/index.js +0 -91
  95. package/lib/index.js.map +0 -1
  96. package/lib/main.js +0 -205
  97. package/lib/main.js.map +0 -1
  98. package/lib/print.js +0 -71
  99. package/lib/print.js.map +0 -1
  100. package/module/configure.js +0 -1
  101. package/module/controller.js +0 -6534
  102. package/module/demo.js +0 -45
  103. package/module/element.js +0 -1
  104. package/module/index.html +0 -21
  105. package/module/manifest.json +0 -18
  106. package/module/print-demo.js +0 -83
  107. package/module/print.html +0 -18
  108. package/module/print.js +0 -1
@@ -0,0 +1,3378 @@
1
+ import { E as e, S as t, a as n, b as r, c as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g } from "../browser-BC3WygxE.js";
2
+ import { $ as _, A as v, B as y, D as b, E as x, F as S, H as C, I as w, J as T, K as E, L as D, M as O, N as k, P as A, Q as j, R as M, S as N, T as P, U as F, V as ee, W as I, X as te, Y as ne, Z as re, a as ie, b as L, c as ae, d as oe, et as R, f as se, i as z, it as ce, j as le, k as ue, l as B, n as de, nt as fe, o as pe, p as me, q as V, r as he, rt as ge, s as _e, t as H, tt as U, u as ve, v as ye, w as be, x as xe, y as Se, z as Ce } from "../dist-D5D48-XD.js";
3
+ import * as W from "react";
4
+ import G, { Component as we, createElement as Te } from "react";
5
+ import { createRoot as Ee } from "react-dom/client";
6
+ import { jsx as K, jsxs as q } from "react/jsx-runtime";
7
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js
8
+ var De = S, Oe = /* @__PURE__ */ e(m(), 1), ke = class e extends CustomEvent {
9
+ static {
10
+ this.TYPE = "model.updated";
11
+ }
12
+ constructor(t, n = !1) {
13
+ super(e.TYPE, {
14
+ bubbles: !0,
15
+ detail: {
16
+ update: t,
17
+ reset: n
18
+ }
19
+ }), this.update = t, this.reset = n;
20
+ }
21
+ }, Ae = class e extends CustomEvent {
22
+ static {
23
+ this.TYPE = "delete.image";
24
+ }
25
+ constructor(t, n) {
26
+ super(e.TYPE, {
27
+ bubbles: !0,
28
+ detail: {
29
+ src: t,
30
+ done: n
31
+ }
32
+ }), this.src = t, this.done = n;
33
+ }
34
+ }, je = class e extends CustomEvent {
35
+ static {
36
+ this.TYPE = "insert.image";
37
+ }
38
+ constructor(t) {
39
+ super(e.TYPE, {
40
+ bubbles: !0,
41
+ detail: t
42
+ }), this.handler = t;
43
+ }
44
+ }, Me = class e extends CustomEvent {
45
+ static {
46
+ this.TYPE = "delete.sound";
47
+ }
48
+ constructor(t, n) {
49
+ super(e.TYPE, {
50
+ bubbles: !0,
51
+ detail: {
52
+ src: t,
53
+ done: n
54
+ }
55
+ }), this.src = t, this.done = n;
56
+ }
57
+ }, Ne = class e extends CustomEvent {
58
+ static {
59
+ this.TYPE = "insert.sound";
60
+ }
61
+ constructor(t) {
62
+ super(e.TYPE, {
63
+ bubbles: !0,
64
+ detail: t
65
+ }), this.handler = t;
66
+ }
67
+ };
68
+ //#endregion
69
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/switchBaseClasses.js
70
+ function Pe(e) {
71
+ return U("PrivateSwitchBase", e);
72
+ }
73
+ R("PrivateSwitchBase", [
74
+ "root",
75
+ "checked",
76
+ "disabled",
77
+ "input",
78
+ "edgeStart",
79
+ "edgeEnd"
80
+ ]);
81
+ //#endregion
82
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/SwitchBase.js
83
+ var J = (e) => {
84
+ let { classes: t, checked: n, disabled: r, edge: i } = e;
85
+ return j({
86
+ root: [
87
+ "root",
88
+ n && "checked",
89
+ r && "disabled",
90
+ i && `edge${A(i)}`
91
+ ],
92
+ input: ["input"]
93
+ }, Pe, t);
94
+ }, Fe = V(x, { name: "MuiSwitchBase" })({
95
+ padding: 9,
96
+ borderRadius: "50%",
97
+ variants: [
98
+ {
99
+ props: {
100
+ edge: "start",
101
+ size: "small"
102
+ },
103
+ style: { marginLeft: -3 }
104
+ },
105
+ {
106
+ props: ({ edge: e, ownerState: t }) => e === "start" && t.size !== "small",
107
+ style: { marginLeft: -12 }
108
+ },
109
+ {
110
+ props: {
111
+ edge: "end",
112
+ size: "small"
113
+ },
114
+ style: { marginRight: -3 }
115
+ },
116
+ {
117
+ props: ({ edge: e, ownerState: t }) => e === "end" && t.size !== "small",
118
+ style: { marginRight: -12 }
119
+ }
120
+ ]
121
+ }), Y = V("input", {
122
+ name: "MuiSwitchBase",
123
+ shouldForwardProp: T
124
+ })({
125
+ cursor: "inherit",
126
+ position: "absolute",
127
+ opacity: 0,
128
+ width: "100%",
129
+ height: "100%",
130
+ top: 0,
131
+ left: 0,
132
+ margin: 0,
133
+ padding: 0,
134
+ zIndex: 1
135
+ }), Ie = /*#__PURE__*/ W.forwardRef(function(e, t) {
136
+ let { autoFocus: n, checked: r, checkedIcon: i, defaultChecked: a, disabled: o, disableFocusRipple: s = !1, edge: c = !1, icon: l, id: u, inputProps: d, inputRef: f, name: p, onBlur: m, onChange: h, onFocus: g, readOnly: _, required: v = !1, tabIndex: y, type: b, value: x, slots: S = {}, slotProps: C = {}, ...T } = e, [E, D] = le({
137
+ controlled: r,
138
+ default: !!a,
139
+ name: "SwitchBase",
140
+ state: "checked"
141
+ }), O = L(), k = (e) => {
142
+ g && g(e), O && O.onFocus && O.onFocus(e);
143
+ }, A = (e) => {
144
+ m && m(e), O && O.onBlur && O.onBlur(e);
145
+ }, j = (e) => {
146
+ if (e.nativeEvent.defaultPrevented || _) return;
147
+ let t = e.target.checked;
148
+ D(t), h && h(e, t);
149
+ }, M = o;
150
+ O && M === void 0 && (M = O.disabled);
151
+ let N = b === "checkbox" || b === "radio", P = {
152
+ ...e,
153
+ checked: E,
154
+ disabled: M,
155
+ disableFocusRipple: s,
156
+ edge: c
157
+ }, F = J(P), ee = {
158
+ slots: S,
159
+ slotProps: {
160
+ input: d,
161
+ ...C
162
+ }
163
+ }, [I, te] = w("root", {
164
+ ref: t,
165
+ elementType: Fe,
166
+ className: F.root,
167
+ shouldForwardComponentProp: !0,
168
+ externalForwardedProps: {
169
+ ...ee,
170
+ component: "span",
171
+ ...T
172
+ },
173
+ getSlotProps: (e) => ({
174
+ ...e,
175
+ onFocus: (t) => {
176
+ e.onFocus?.(t), k(t);
177
+ },
178
+ onBlur: (t) => {
179
+ e.onBlur?.(t), A(t);
180
+ }
181
+ }),
182
+ ownerState: P,
183
+ additionalProps: {
184
+ centerRipple: !0,
185
+ focusRipple: !s,
186
+ role: void 0,
187
+ tabIndex: null
188
+ }
189
+ }), [ne, re] = w("input", {
190
+ ref: f,
191
+ elementType: Y,
192
+ className: F.input,
193
+ externalForwardedProps: ee,
194
+ getSlotProps: (e) => ({
195
+ ...e,
196
+ onChange: (t) => {
197
+ e.onChange?.(t), j(t);
198
+ }
199
+ }),
200
+ ownerState: P,
201
+ additionalProps: {
202
+ autoFocus: n,
203
+ checked: r,
204
+ defaultChecked: a,
205
+ disabled: M,
206
+ id: N ? u : void 0,
207
+ name: p,
208
+ readOnly: _,
209
+ required: v,
210
+ tabIndex: y,
211
+ type: b,
212
+ ...b === "checkbox" && x === void 0 ? {} : { value: x }
213
+ }
214
+ });
215
+ return /*#__PURE__*/ q(I, {
216
+ ...te,
217
+ children: [/*#__PURE__*/ K(ne, { ...re }), E ? i : l]
218
+ });
219
+ }), Le = k(/*#__PURE__*/ K("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }), "CheckBoxOutlineBlank"), Re = k(/*#__PURE__*/ K("path", { d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }), "CheckBox"), ze = k(/*#__PURE__*/ K("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }), "IndeterminateCheckBox");
220
+ //#endregion
221
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/checkboxClasses.js
222
+ function Be(e) {
223
+ return U("MuiCheckbox", e);
224
+ }
225
+ var Ve = R("MuiCheckbox", [
226
+ "root",
227
+ "checked",
228
+ "disabled",
229
+ "indeterminate",
230
+ "colorPrimary",
231
+ "colorSecondary",
232
+ "sizeSmall",
233
+ "sizeMedium"
234
+ ]), He = (e) => {
235
+ let { classes: t, indeterminate: n, color: r, size: i } = e, a = j({ root: [
236
+ "root",
237
+ n && "indeterminate",
238
+ `color${A(r)}`,
239
+ `size${A(i)}`
240
+ ] }, Be, t);
241
+ return {
242
+ ...t,
243
+ ...a
244
+ };
245
+ }, Ue = V(Ie, {
246
+ shouldForwardProp: (e) => T(e) || e === "classes",
247
+ name: "MuiCheckbox",
248
+ slot: "Root",
249
+ overridesResolver: (e, t) => {
250
+ let { ownerState: n } = e;
251
+ return [
252
+ t.root,
253
+ n.indeterminate && t.indeterminate,
254
+ t[`size${A(n.size)}`],
255
+ n.color !== "default" && t[`color${A(n.color)}`]
256
+ ];
257
+ }
258
+ })(D(({ theme: e }) => ({
259
+ color: (e.vars || e).palette.text.secondary,
260
+ variants: [
261
+ {
262
+ props: {
263
+ color: "default",
264
+ disableRipple: !1
265
+ },
266
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
267
+ },
268
+ ...Object.entries(e.palette).filter(P()).map(([t]) => ({
269
+ props: {
270
+ color: t,
271
+ disableRipple: !1
272
+ },
273
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
274
+ })),
275
+ ...Object.entries(e.palette).filter(P()).map(([t]) => ({
276
+ props: { color: t },
277
+ style: {
278
+ [`&.${Ve.checked}, &.${Ve.indeterminate}`]: { color: (e.vars || e).palette[t].main },
279
+ [`&.${Ve.disabled}`]: { color: (e.vars || e).palette.action.disabled }
280
+ }
281
+ })),
282
+ {
283
+ props: { disableRipple: !1 },
284
+ style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
285
+ }
286
+ ]
287
+ }))), We = /*#__PURE__*/ K(Re, {}), Ge = /*#__PURE__*/ K(Le, {}), Ke = /*#__PURE__*/ K(ze, {}), qe = /*#__PURE__*/ W.forwardRef(function(e, t) {
288
+ let n = F({
289
+ props: e,
290
+ name: "MuiCheckbox"
291
+ }), { checkedIcon: r = We, color: i = "primary", icon: a = Ge, indeterminate: o = !1, indeterminateIcon: s = Ke, inputProps: c, size: l = "medium", disableRipple: u = !1, className: d, slots: f = {}, slotProps: p = {}, ...m } = n, h = o ? s : a, g = o ? s : r, _ = {
292
+ ...n,
293
+ disableRipple: u,
294
+ color: i,
295
+ indeterminate: o,
296
+ size: l
297
+ }, v = He(_), y = p.input ?? c, [b, x] = w("root", {
298
+ ref: t,
299
+ elementType: Ue,
300
+ className: fe(v.root, d),
301
+ shouldForwardComponentProp: !0,
302
+ externalForwardedProps: {
303
+ slots: f,
304
+ slotProps: p,
305
+ ...m
306
+ },
307
+ ownerState: _,
308
+ additionalProps: {
309
+ type: "checkbox",
310
+ icon: /*#__PURE__*/ W.cloneElement(h, { fontSize: h.props.fontSize ?? l }),
311
+ checkedIcon: /*#__PURE__*/ W.cloneElement(g, { fontSize: g.props.fontSize ?? l }),
312
+ disableRipple: u,
313
+ slots: f,
314
+ slotProps: { input: ue(typeof y == "function" ? y(_) : y, {
315
+ "data-indeterminate": o,
316
+ "aria-checked": o ? "mixed" : void 0
317
+ }) }
318
+ }
319
+ });
320
+ return /*#__PURE__*/ K(b, {
321
+ ...x,
322
+ classes: v
323
+ });
324
+ });
325
+ //#endregion
326
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js
327
+ function Je(e) {
328
+ return U("MuiFormControlLabel", e);
329
+ }
330
+ var Ye = R("MuiFormControlLabel", [
331
+ "root",
332
+ "labelPlacementStart",
333
+ "labelPlacementTop",
334
+ "labelPlacementBottom",
335
+ "disabled",
336
+ "label",
337
+ "error",
338
+ "required",
339
+ "asterisk"
340
+ ]), Xe = (e) => {
341
+ let { classes: t, disabled: n, labelPlacement: r, error: i, required: a } = e;
342
+ return j({
343
+ root: [
344
+ "root",
345
+ n && "disabled",
346
+ `labelPlacement${A(r)}`,
347
+ i && "error",
348
+ a && "required"
349
+ ],
350
+ label: ["label", n && "disabled"],
351
+ asterisk: ["asterisk", i && "error"]
352
+ }, Je, t);
353
+ }, Ze = V("label", {
354
+ name: "MuiFormControlLabel",
355
+ slot: "Root",
356
+ overridesResolver: (e, t) => {
357
+ let { ownerState: n } = e;
358
+ return [
359
+ { [`& .${Ye.label}`]: t.label },
360
+ t.root,
361
+ t[`labelPlacement${A(n.labelPlacement)}`]
362
+ ];
363
+ }
364
+ })(D(({ theme: e }) => ({
365
+ display: "inline-flex",
366
+ alignItems: "center",
367
+ cursor: "pointer",
368
+ verticalAlign: "middle",
369
+ WebkitTapHighlightColor: "transparent",
370
+ marginLeft: -11,
371
+ marginRight: 16,
372
+ [`&.${Ye.disabled}`]: { cursor: "default" },
373
+ [`& .${Ye.label}`]: { [`&.${Ye.disabled}`]: { color: (e.vars || e).palette.text.disabled } },
374
+ variants: [
375
+ {
376
+ props: { labelPlacement: "start" },
377
+ style: {
378
+ flexDirection: "row-reverse",
379
+ marginRight: -11
380
+ }
381
+ },
382
+ {
383
+ props: { labelPlacement: "top" },
384
+ style: { flexDirection: "column-reverse" }
385
+ },
386
+ {
387
+ props: { labelPlacement: "bottom" },
388
+ style: { flexDirection: "column" }
389
+ },
390
+ {
391
+ props: ({ labelPlacement: e }) => e === "start" || e === "top" || e === "bottom",
392
+ style: { marginLeft: 16 }
393
+ }
394
+ ]
395
+ }))), Qe = V("span", {
396
+ name: "MuiFormControlLabel",
397
+ slot: "Asterisk"
398
+ })(D(({ theme: e }) => ({ [`&.${Ye.error}`]: { color: (e.vars || e).palette.error.main } }))), $e = /*#__PURE__*/ W.forwardRef(function(e, t) {
399
+ let n = F({
400
+ props: e,
401
+ name: "MuiFormControlLabel"
402
+ }), { checked: r, className: i, componentsProps: a = {}, control: o, disabled: s, disableTypography: c, inputRef: l, label: u, labelPlacement: d = "end", name: f, onChange: p, required: m, slots: h = {}, slotProps: g = {}, value: _, ...v } = n, y = L(), b = s ?? o.props.disabled ?? y?.disabled, x = m ?? o.props.required, S = {
403
+ disabled: b,
404
+ required: x
405
+ };
406
+ [
407
+ "checked",
408
+ "name",
409
+ "onChange",
410
+ "value",
411
+ "inputRef"
412
+ ].forEach((e) => {
413
+ o.props[e] === void 0 && n[e] !== void 0 && (S[e] = n[e]);
414
+ });
415
+ let C = N({
416
+ props: n,
417
+ muiFormControl: y,
418
+ states: ["error"]
419
+ }), T = {
420
+ ...n,
421
+ disabled: b,
422
+ labelPlacement: d,
423
+ required: x,
424
+ error: C.error
425
+ }, E = Xe(T), [D, O] = w("typography", {
426
+ elementType: B,
427
+ externalForwardedProps: {
428
+ slots: h,
429
+ slotProps: {
430
+ ...a,
431
+ ...g
432
+ }
433
+ },
434
+ ownerState: T
435
+ }), k = u;
436
+ return k != null && k.type !== B && !c && (k = /*#__PURE__*/ K(D, {
437
+ component: "span",
438
+ ...O,
439
+ className: fe(E.label, O?.className),
440
+ children: k
441
+ })), /*#__PURE__*/ q(Ze, {
442
+ className: fe(E.root, i),
443
+ ownerState: T,
444
+ ref: t,
445
+ ...v,
446
+ children: [/*#__PURE__*/ W.cloneElement(o, S), x ? /*#__PURE__*/ q("div", { children: [k, /*#__PURE__*/ q(Qe, {
447
+ ownerState: T,
448
+ "aria-hidden": !0,
449
+ className: E.asterisk,
450
+ children: [" ", "*"]
451
+ })] }) : k]
452
+ });
453
+ });
454
+ //#endregion
455
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js
456
+ function et(e) {
457
+ return U("MuiInputAdornment", e);
458
+ }
459
+ var tt = R("MuiInputAdornment", [
460
+ "root",
461
+ "filled",
462
+ "standard",
463
+ "outlined",
464
+ "positionStart",
465
+ "positionEnd",
466
+ "disablePointerEvents",
467
+ "hiddenLabel",
468
+ "sizeSmall"
469
+ ]), nt, rt = (e, t) => {
470
+ let { ownerState: n } = e;
471
+ return [
472
+ t.root,
473
+ t[`position${A(n.position)}`],
474
+ n.disablePointerEvents === !0 && t.disablePointerEvents,
475
+ t[n.variant]
476
+ ];
477
+ }, it = (e) => {
478
+ let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size: a, variant: o } = e;
479
+ return j({ root: [
480
+ "root",
481
+ n && "disablePointerEvents",
482
+ i && `position${A(i)}`,
483
+ o,
484
+ r && "hiddenLabel",
485
+ a && `size${A(a)}`
486
+ ] }, et, t);
487
+ }, at = V("div", {
488
+ name: "MuiInputAdornment",
489
+ slot: "Root",
490
+ overridesResolver: rt
491
+ })(D(({ theme: e }) => ({
492
+ display: "flex",
493
+ maxHeight: "2em",
494
+ alignItems: "center",
495
+ whiteSpace: "nowrap",
496
+ color: (e.vars || e).palette.action.active,
497
+ variants: [
498
+ {
499
+ props: { variant: "filled" },
500
+ style: { [`&.${tt.positionStart}&:not(.${tt.hiddenLabel})`]: { marginTop: 16 } }
501
+ },
502
+ {
503
+ props: { position: "start" },
504
+ style: { marginRight: 8 }
505
+ },
506
+ {
507
+ props: { position: "end" },
508
+ style: { marginLeft: 8 }
509
+ },
510
+ {
511
+ props: { disablePointerEvents: !0 },
512
+ style: { pointerEvents: "none" }
513
+ }
514
+ ]
515
+ }))), ot = /*#__PURE__*/ W.forwardRef(function(e, t) {
516
+ let n = F({
517
+ props: e,
518
+ name: "MuiInputAdornment"
519
+ }), { children: r, className: i, component: a = "div", disablePointerEvents: o = !1, disableTypography: s = !1, position: c, variant: l, ...u } = n, d = L() || {}, f = l;
520
+ l && d.variant, d && !f && (f = d.variant);
521
+ let p = {
522
+ ...n,
523
+ hiddenLabel: d.hiddenLabel,
524
+ size: d.size,
525
+ disablePointerEvents: o,
526
+ position: c,
527
+ variant: f
528
+ }, m = it(p);
529
+ return /*#__PURE__*/ K(xe.Provider, {
530
+ value: null,
531
+ children: /*#__PURE__*/ K(at, {
532
+ as: a,
533
+ ownerState: p,
534
+ className: fe(m.root, i),
535
+ ref: t,
536
+ ...u,
537
+ children: typeof r == "string" && !s ? /*#__PURE__*/ K(B, {
538
+ color: "textSecondary",
539
+ children: r
540
+ }) : /*#__PURE__*/ q(W.Fragment, { children: [c === "start" ? nt ||= /*#__PURE__*/ K("span", {
541
+ className: "notranslate",
542
+ "aria-hidden": !0,
543
+ children: "​"
544
+ }) : null, r] })
545
+ })
546
+ });
547
+ }), st = k(/*#__PURE__*/ K("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), "RadioButtonUnchecked"), ct = k(/*#__PURE__*/ K("path", { d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z" }), "RadioButtonChecked"), lt = V("span", {
548
+ name: "MuiRadioButtonIcon",
549
+ shouldForwardProp: T
550
+ })({
551
+ position: "relative",
552
+ display: "flex"
553
+ }), ut = V(st, { name: "MuiRadioButtonIcon" })({ transform: "scale(1)" }), dt = V(ct, { name: "MuiRadioButtonIcon" })(D(({ theme: e }) => ({
554
+ left: 0,
555
+ position: "absolute",
556
+ transform: "scale(0)",
557
+ transition: e.transitions.create("transform", {
558
+ easing: e.transitions.easing.easeIn,
559
+ duration: e.transitions.duration.shortest
560
+ }),
561
+ variants: [{
562
+ props: { checked: !0 },
563
+ style: {
564
+ transform: "scale(1)",
565
+ transition: e.transitions.create("transform", {
566
+ easing: e.transitions.easing.easeOut,
567
+ duration: e.transitions.duration.shortest
568
+ })
569
+ }
570
+ }]
571
+ })));
572
+ function ft(e) {
573
+ let { checked: t = !1, classes: n = {}, fontSize: r } = e, i = {
574
+ ...e,
575
+ checked: t
576
+ };
577
+ return /*#__PURE__*/ q(lt, {
578
+ className: n.root,
579
+ ownerState: i,
580
+ children: [/*#__PURE__*/ K(ut, {
581
+ fontSize: r,
582
+ className: n.background,
583
+ ownerState: i
584
+ }), /*#__PURE__*/ K(dt, {
585
+ fontSize: r,
586
+ className: n.dot,
587
+ ownerState: i
588
+ })]
589
+ });
590
+ }
591
+ //#endregion
592
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js
593
+ var pt = /*#__PURE__*/ W.createContext(void 0);
594
+ //#endregion
595
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js
596
+ function mt() {
597
+ return W.useContext(pt);
598
+ }
599
+ //#endregion
600
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js
601
+ function ht(e) {
602
+ return U("MuiRadio", e);
603
+ }
604
+ var gt = R("MuiRadio", [
605
+ "root",
606
+ "checked",
607
+ "disabled",
608
+ "colorPrimary",
609
+ "colorSecondary",
610
+ "sizeSmall"
611
+ ]), _t = (e) => {
612
+ let { classes: t, color: n, size: r } = e, i = { root: [
613
+ "root",
614
+ `color${A(n)}`,
615
+ r !== "medium" && `size${A(r)}`
616
+ ] };
617
+ return {
618
+ ...t,
619
+ ...j(i, ht, t)
620
+ };
621
+ }, vt = V(Ie, {
622
+ shouldForwardProp: (e) => T(e) || e === "classes",
623
+ name: "MuiRadio",
624
+ slot: "Root",
625
+ overridesResolver: (e, t) => {
626
+ let { ownerState: n } = e;
627
+ return [
628
+ t.root,
629
+ n.size !== "medium" && t[`size${A(n.size)}`],
630
+ t[`color${A(n.color)}`]
631
+ ];
632
+ }
633
+ })(D(({ theme: e }) => ({
634
+ color: (e.vars || e).palette.text.secondary,
635
+ [`&.${gt.disabled}`]: { color: (e.vars || e).palette.action.disabled },
636
+ variants: [
637
+ {
638
+ props: {
639
+ color: "default",
640
+ disabled: !1,
641
+ disableRipple: !1
642
+ },
643
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
644
+ },
645
+ ...Object.entries(e.palette).filter(P()).map(([t]) => ({
646
+ props: {
647
+ color: t,
648
+ disabled: !1,
649
+ disableRipple: !1
650
+ },
651
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
652
+ })),
653
+ ...Object.entries(e.palette).filter(P()).map(([t]) => ({
654
+ props: {
655
+ color: t,
656
+ disabled: !1
657
+ },
658
+ style: { [`&.${gt.checked}`]: { color: (e.vars || e).palette[t].main } }
659
+ })),
660
+ {
661
+ props: { disableRipple: !1 },
662
+ style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
663
+ }
664
+ ]
665
+ })));
666
+ function yt(e, t) {
667
+ return typeof t == "object" && t ? e === t : String(e) === String(t);
668
+ }
669
+ var bt = /*#__PURE__*/ K(ft, { checked: !0 }), xt = /*#__PURE__*/ K(ft, {}), St = /*#__PURE__*/ W.forwardRef(function(e, t) {
670
+ let n = F({
671
+ props: e,
672
+ name: "MuiRadio"
673
+ }), { checked: r, checkedIcon: i = bt, color: a = "primary", icon: o = xt, name: s, onChange: c, size: l = "medium", className: u, disabled: d, disableRipple: f = !1, slots: p = {}, slotProps: m = {}, inputProps: h, ...g } = n, _ = L(), v = d;
674
+ _ && v === void 0 && (v = _.disabled), v ??= !1;
675
+ let y = {
676
+ ...n,
677
+ disabled: v,
678
+ disableRipple: f,
679
+ color: a,
680
+ size: l
681
+ }, b = _t(y), x = mt(), S = r, C = De(c, x && x.onChange), T = s;
682
+ x && (S === void 0 && (S = yt(x.value, n.value)), T === void 0 && (T = x.name));
683
+ let E = m.input ?? h, [D, O] = w("root", {
684
+ ref: t,
685
+ elementType: vt,
686
+ className: fe(b.root, u),
687
+ shouldForwardComponentProp: !0,
688
+ externalForwardedProps: {
689
+ slots: p,
690
+ slotProps: m,
691
+ ...g
692
+ },
693
+ getSlotProps: (e) => ({
694
+ ...e,
695
+ onChange: (t, ...n) => {
696
+ e.onChange?.(t, ...n), C(t, ...n);
697
+ }
698
+ }),
699
+ ownerState: y,
700
+ additionalProps: {
701
+ type: "radio",
702
+ icon: /*#__PURE__*/ W.cloneElement(o, { fontSize: o.props.fontSize ?? l }),
703
+ checkedIcon: /*#__PURE__*/ W.cloneElement(i, { fontSize: i.props.fontSize ?? l }),
704
+ disabled: v,
705
+ name: T,
706
+ checked: S,
707
+ slots: p,
708
+ slotProps: { input: typeof E == "function" ? E(y) : E }
709
+ }
710
+ });
711
+ return /*#__PURE__*/ K(D, {
712
+ ...O,
713
+ classes: b
714
+ });
715
+ });
716
+ //#endregion
717
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js
718
+ function Ct(e) {
719
+ return U("MuiTooltip", e);
720
+ }
721
+ var X = R("MuiTooltip", [
722
+ "popper",
723
+ "popperInteractive",
724
+ "popperArrow",
725
+ "popperClose",
726
+ "tooltip",
727
+ "tooltipArrow",
728
+ "touch",
729
+ "tooltipPlacementLeft",
730
+ "tooltipPlacementRight",
731
+ "tooltipPlacementTop",
732
+ "tooltipPlacementBottom",
733
+ "arrow"
734
+ ]);
735
+ //#endregion
736
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js
737
+ function wt(e) {
738
+ return Math.round(e * 1e5) / 1e5;
739
+ }
740
+ var Tt = (e) => {
741
+ let { classes: t, disableInteractive: n, arrow: r, touch: i, placement: a } = e;
742
+ return j({
743
+ popper: [
744
+ "popper",
745
+ !n && "popperInteractive",
746
+ r && "popperArrow"
747
+ ],
748
+ tooltip: [
749
+ "tooltip",
750
+ r && "tooltipArrow",
751
+ i && "touch",
752
+ `tooltipPlacement${A(a.split("-")[0])}`
753
+ ],
754
+ arrow: ["arrow"]
755
+ }, Ct, t);
756
+ }, Et = V(de, {
757
+ name: "MuiTooltip",
758
+ slot: "Popper",
759
+ overridesResolver: (e, t) => {
760
+ let { ownerState: n } = e;
761
+ return [
762
+ t.popper,
763
+ !n.disableInteractive && t.popperInteractive,
764
+ n.arrow && t.popperArrow,
765
+ !n.open && t.popperClose
766
+ ];
767
+ }
768
+ })(D(({ theme: e }) => ({
769
+ zIndex: (e.vars || e).zIndex.tooltip,
770
+ pointerEvents: "none",
771
+ variants: [
772
+ {
773
+ props: ({ ownerState: e }) => !e.disableInteractive,
774
+ style: { pointerEvents: "auto" }
775
+ },
776
+ {
777
+ props: ({ open: e }) => !e,
778
+ style: { pointerEvents: "none" }
779
+ },
780
+ {
781
+ props: ({ ownerState: e }) => e.arrow,
782
+ style: {
783
+ [`&[data-popper-placement*="bottom"] .${X.arrow}`]: {
784
+ top: 0,
785
+ marginTop: "-0.71em",
786
+ "&::before": { transformOrigin: "0 100%" }
787
+ },
788
+ [`&[data-popper-placement*="top"] .${X.arrow}`]: {
789
+ bottom: 0,
790
+ marginBottom: "-0.71em",
791
+ "&::before": { transformOrigin: "100% 0" }
792
+ },
793
+ [`&[data-popper-placement*="right"] .${X.arrow}`]: {
794
+ height: "1em",
795
+ width: "0.71em",
796
+ "&::before": { transformOrigin: "100% 100%" }
797
+ },
798
+ [`&[data-popper-placement*="left"] .${X.arrow}`]: {
799
+ height: "1em",
800
+ width: "0.71em",
801
+ "&::before": { transformOrigin: "0 0" }
802
+ }
803
+ }
804
+ },
805
+ {
806
+ props: ({ ownerState: e }) => e.arrow && !e.isRtl,
807
+ style: { [`&[data-popper-placement*="right"] .${X.arrow}`]: {
808
+ left: 0,
809
+ marginLeft: "-0.71em"
810
+ } }
811
+ },
812
+ {
813
+ props: ({ ownerState: e }) => e.arrow && !!e.isRtl,
814
+ style: { [`&[data-popper-placement*="right"] .${X.arrow}`]: {
815
+ right: 0,
816
+ marginRight: "-0.71em"
817
+ } }
818
+ },
819
+ {
820
+ props: ({ ownerState: e }) => e.arrow && !e.isRtl,
821
+ style: { [`&[data-popper-placement*="left"] .${X.arrow}`]: {
822
+ right: 0,
823
+ marginRight: "-0.71em"
824
+ } }
825
+ },
826
+ {
827
+ props: ({ ownerState: e }) => e.arrow && !!e.isRtl,
828
+ style: { [`&[data-popper-placement*="left"] .${X.arrow}`]: {
829
+ left: 0,
830
+ marginLeft: "-0.71em"
831
+ } }
832
+ }
833
+ ]
834
+ }))), Dt = V("div", {
835
+ name: "MuiTooltip",
836
+ slot: "Tooltip",
837
+ overridesResolver: (e, t) => {
838
+ let { ownerState: n } = e;
839
+ return [
840
+ t.tooltip,
841
+ n.touch && t.touch,
842
+ n.arrow && t.tooltipArrow,
843
+ t[`tooltipPlacement${A(n.placement.split("-")[0])}`]
844
+ ];
845
+ }
846
+ })(D(({ theme: e }) => ({
847
+ backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : e.alpha(e.palette.grey[700], .92),
848
+ borderRadius: (e.vars || e).shape.borderRadius,
849
+ color: (e.vars || e).palette.common.white,
850
+ fontFamily: e.typography.fontFamily,
851
+ padding: "4px 8px",
852
+ fontSize: e.typography.pxToRem(11),
853
+ maxWidth: 300,
854
+ margin: 2,
855
+ wordWrap: "break-word",
856
+ fontWeight: e.typography.fontWeightMedium,
857
+ [`.${X.popper}[data-popper-placement*="left"] &`]: { transformOrigin: "right center" },
858
+ [`.${X.popper}[data-popper-placement*="right"] &`]: { transformOrigin: "left center" },
859
+ [`.${X.popper}[data-popper-placement*="top"] &`]: {
860
+ transformOrigin: "center bottom",
861
+ marginBottom: "14px"
862
+ },
863
+ [`.${X.popper}[data-popper-placement*="bottom"] &`]: {
864
+ transformOrigin: "center top",
865
+ marginTop: "14px"
866
+ },
867
+ variants: [
868
+ {
869
+ props: ({ ownerState: e }) => e.arrow,
870
+ style: {
871
+ position: "relative",
872
+ margin: 0
873
+ }
874
+ },
875
+ {
876
+ props: ({ ownerState: e }) => e.touch,
877
+ style: {
878
+ padding: "8px 16px",
879
+ fontSize: e.typography.pxToRem(14),
880
+ lineHeight: `${wt(16 / 14)}em`,
881
+ fontWeight: e.typography.fontWeightRegular
882
+ }
883
+ },
884
+ {
885
+ props: ({ ownerState: e }) => !e.isRtl,
886
+ style: {
887
+ [`.${X.popper}[data-popper-placement*="left"] &`]: { marginRight: "14px" },
888
+ [`.${X.popper}[data-popper-placement*="right"] &`]: { marginLeft: "14px" }
889
+ }
890
+ },
891
+ {
892
+ props: ({ ownerState: e }) => !e.isRtl && e.touch,
893
+ style: {
894
+ [`.${X.popper}[data-popper-placement*="left"] &`]: { marginRight: "24px" },
895
+ [`.${X.popper}[data-popper-placement*="right"] &`]: { marginLeft: "24px" }
896
+ }
897
+ },
898
+ {
899
+ props: ({ ownerState: e }) => !!e.isRtl,
900
+ style: {
901
+ [`.${X.popper}[data-popper-placement*="left"] &`]: { marginLeft: "14px" },
902
+ [`.${X.popper}[data-popper-placement*="right"] &`]: { marginRight: "14px" }
903
+ }
904
+ },
905
+ {
906
+ props: ({ ownerState: e }) => !!e.isRtl && e.touch,
907
+ style: {
908
+ [`.${X.popper}[data-popper-placement*="left"] &`]: { marginLeft: "24px" },
909
+ [`.${X.popper}[data-popper-placement*="right"] &`]: { marginRight: "24px" }
910
+ }
911
+ },
912
+ {
913
+ props: ({ ownerState: e }) => e.touch,
914
+ style: { [`.${X.popper}[data-popper-placement*="top"] &`]: { marginBottom: "24px" } }
915
+ },
916
+ {
917
+ props: ({ ownerState: e }) => e.touch,
918
+ style: { [`.${X.popper}[data-popper-placement*="bottom"] &`]: { marginTop: "24px" } }
919
+ }
920
+ ]
921
+ }))), Ot = V("span", {
922
+ name: "MuiTooltip",
923
+ slot: "Arrow"
924
+ })(D(({ theme: e }) => ({
925
+ overflow: "hidden",
926
+ position: "absolute",
927
+ width: "1em",
928
+ height: "0.71em",
929
+ boxSizing: "border-box",
930
+ color: e.vars ? e.vars.palette.Tooltip.bg : e.alpha(e.palette.grey[700], .9),
931
+ "&::before": {
932
+ content: "\"\"",
933
+ margin: "auto",
934
+ display: "block",
935
+ width: "100%",
936
+ height: "100%",
937
+ backgroundColor: "currentColor",
938
+ transform: "rotate(45deg)"
939
+ }
940
+ }))), kt = !1, At = new ee(), jt = {
941
+ x: 0,
942
+ y: 0
943
+ };
944
+ function Mt(e, t) {
945
+ return (n, ...r) => {
946
+ t && t(n, ...r), e(n, ...r);
947
+ };
948
+ }
949
+ var Nt = /*#__PURE__*/ W.forwardRef(function(e, t) {
950
+ let n = F({
951
+ props: e,
952
+ name: "MuiTooltip"
953
+ }), { arrow: r = !1, children: i, classes: a, components: o = {}, componentsProps: s = {}, describeChild: c = !1, disableFocusListener: l = !1, disableHoverListener: u = !1, disableInteractive: d = !1, disableTouchListener: f = !1, enterDelay: p = 100, enterNextDelay: m = 0, enterTouchDelay: h = 700, followCursor: g = !1, id: x, leaveDelay: S = 0, leaveTouchDelay: T = 1500, onClose: E, onOpen: D, open: k, placement: A = "bottom", PopperComponent: j, PopperProps: N = {}, slotProps: P = {}, slots: ee = {}, title: I, TransitionComponent: te, TransitionProps: re, ...ie } = n, L = /*#__PURE__*/ W.isValidElement(i) ? i : /*#__PURE__*/ K("span", { children: i }), ae = ne(), oe = _(), [R, se] = W.useState(), [z, ce] = W.useState(null), ue = W.useRef(!1), B = d || g, pe = C(), me = C(), V = C(), he = C(), [ge, _e] = le({
954
+ controlled: k,
955
+ default: !1,
956
+ name: "Tooltip",
957
+ state: "open"
958
+ }), H = ge, U = O(x), ve = W.useRef(), ye = v(() => {
959
+ ve.current !== void 0 && (document.body.style.WebkitUserSelect = ve.current, ve.current = void 0), he.clear();
960
+ });
961
+ W.useEffect(() => ye, [ye]);
962
+ let be = (e) => {
963
+ At.clear(), kt = !0, _e(!0), D && !H && D(e);
964
+ }, xe = v((e) => {
965
+ At.start(800 + S, () => {
966
+ kt = !1;
967
+ }), _e(!1), E && H && E(e), pe.start(ae.transitions.duration.shortest, () => {
968
+ ue.current = !1;
969
+ });
970
+ }), Se = (e) => {
971
+ ue.current && e.type !== "touchstart" || (R && R.removeAttribute("title"), me.clear(), V.clear(), p || kt && m ? me.start(kt ? m : p, () => {
972
+ be(e);
973
+ }) : be(e));
974
+ }, G = (e) => {
975
+ me.clear(), V.start(S, () => {
976
+ xe(e);
977
+ });
978
+ }, [, we] = W.useState(!1), Te = (e) => {
979
+ let t = e?.target ?? R;
980
+ if (!t || !b(t)) {
981
+ we(!1);
982
+ let n = e ?? new Event("blur");
983
+ !e && t && (Object.defineProperty(n, "target", { value: t }), Object.defineProperty(n, "currentTarget", { value: t })), G(n);
984
+ }
985
+ }, Ee = (e) => {
986
+ R || se(e.currentTarget), b(e.target) && (we(!0), Se(e));
987
+ }, De = (e) => {
988
+ ue.current = !0;
989
+ let t = L.props;
990
+ t.onTouchStart && t.onTouchStart(e);
991
+ }, Oe = (e) => {
992
+ De(e), V.clear(), pe.clear(), ye(), ve.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", he.start(h, () => {
993
+ document.body.style.WebkitUserSelect = ve.current, Se(e);
994
+ });
995
+ }, ke = (e) => {
996
+ L.props.onTouchEnd && L.props.onTouchEnd(e), ye(), V.start(T, () => {
997
+ xe(e);
998
+ });
999
+ };
1000
+ W.useEffect(() => {
1001
+ if (!H) return;
1002
+ function e(e) {
1003
+ e.key === "Escape" && xe(e);
1004
+ }
1005
+ return document.addEventListener("keydown", e), () => {
1006
+ document.removeEventListener("keydown", e);
1007
+ };
1008
+ }, [xe, H]);
1009
+ let Ae = Ce(y(L), se, t);
1010
+ !I && I !== 0 && (H = !1);
1011
+ let je = W.useRef(), Me = (e) => {
1012
+ let t = L.props;
1013
+ t.onMouseMove && t.onMouseMove(e), jt = {
1014
+ x: e.clientX,
1015
+ y: e.clientY
1016
+ }, je.current && je.current.update();
1017
+ }, Ne = {}, Pe = typeof I == "string";
1018
+ c ? (Ne.title = !H && Pe && !u ? I : null, Ne["aria-describedby"] = H ? U : null) : (Ne["aria-label"] = Pe ? I : null, Ne["aria-labelledby"] = H && !Pe ? U : null);
1019
+ let J = {
1020
+ ...Ne,
1021
+ ...ie,
1022
+ ...L.props,
1023
+ className: fe(ie.className, L.props.className),
1024
+ onTouchStart: De,
1025
+ ref: Ae,
1026
+ ...g ? { onMouseMove: Me } : {}
1027
+ }, Fe = {};
1028
+ f || (J.onTouchStart = Oe, J.onTouchEnd = ke), u || (J.onMouseOver = Mt(Se, J.onMouseOver), J.onMouseLeave = Mt(G, J.onMouseLeave), B || (Fe.onMouseOver = Se, Fe.onMouseLeave = G)), l || (J.onFocus = Mt(Ee, J.onFocus), J.onBlur = Mt(Te, J.onBlur), B || (Fe.onFocus = Ee, Fe.onBlur = Te));
1029
+ let Y = {
1030
+ ...n,
1031
+ isRtl: oe,
1032
+ arrow: r,
1033
+ disableInteractive: B,
1034
+ placement: A,
1035
+ PopperComponentProp: j,
1036
+ touch: ue.current
1037
+ }, Ie = typeof P.popper == "function" ? P.popper(Y) : P.popper, Le = W.useMemo(() => {
1038
+ let e = [{
1039
+ name: "arrow",
1040
+ enabled: !!z,
1041
+ options: {
1042
+ element: z,
1043
+ padding: 4
1044
+ }
1045
+ }];
1046
+ return N.popperOptions?.modifiers && (e = e.concat(N.popperOptions.modifiers)), Ie?.popperOptions?.modifiers && (e = e.concat(Ie.popperOptions.modifiers)), {
1047
+ ...N.popperOptions,
1048
+ ...Ie?.popperOptions,
1049
+ modifiers: e
1050
+ };
1051
+ }, [
1052
+ z,
1053
+ N.popperOptions,
1054
+ Ie?.popperOptions
1055
+ ]), Re = Tt(Y), ze = typeof P.transition == "function" ? P.transition(Y) : P.transition, Be = {
1056
+ slots: {
1057
+ popper: o.Popper,
1058
+ transition: o.Transition ?? te,
1059
+ tooltip: o.Tooltip,
1060
+ arrow: o.Arrow,
1061
+ ...ee
1062
+ },
1063
+ slotProps: {
1064
+ arrow: P.arrow ?? s.arrow,
1065
+ popper: {
1066
+ ...N,
1067
+ ...Ie ?? s.popper
1068
+ },
1069
+ tooltip: P.tooltip ?? s.tooltip,
1070
+ transition: {
1071
+ ...re,
1072
+ ...ze ?? s.transition
1073
+ }
1074
+ }
1075
+ }, [Ve, He] = w("popper", {
1076
+ elementType: Et,
1077
+ externalForwardedProps: Be,
1078
+ ownerState: Y,
1079
+ className: fe(Re.popper, N?.className)
1080
+ }), [Ue, We] = w("transition", {
1081
+ elementType: M,
1082
+ externalForwardedProps: Be,
1083
+ ownerState: Y
1084
+ }), [Ge, Ke] = w("tooltip", {
1085
+ elementType: Dt,
1086
+ className: Re.tooltip,
1087
+ externalForwardedProps: Be,
1088
+ ownerState: Y
1089
+ }), [qe, Je] = w("arrow", {
1090
+ elementType: Ot,
1091
+ className: Re.arrow,
1092
+ externalForwardedProps: Be,
1093
+ ownerState: Y,
1094
+ ref: ce
1095
+ });
1096
+ return /*#__PURE__*/ q(W.Fragment, { children: [/*#__PURE__*/ W.cloneElement(L, J), /*#__PURE__*/ K(Ve, {
1097
+ as: j ?? de,
1098
+ placement: A,
1099
+ anchorEl: g ? { getBoundingClientRect: () => ({
1100
+ top: jt.y,
1101
+ left: jt.x,
1102
+ right: jt.x,
1103
+ bottom: jt.y,
1104
+ width: 0,
1105
+ height: 0
1106
+ }) } : R,
1107
+ popperRef: je,
1108
+ open: R ? H : !1,
1109
+ id: U,
1110
+ transition: !0,
1111
+ ...Fe,
1112
+ ...He,
1113
+ popperOptions: Le,
1114
+ children: ({ TransitionProps: e }) => /*#__PURE__*/ K(Ue, {
1115
+ timeout: ae.transitions.duration.shorter,
1116
+ ...e,
1117
+ ...We,
1118
+ children: /*#__PURE__*/ q(Ge, {
1119
+ ...Ke,
1120
+ children: [I, r ? /*#__PURE__*/ K(qe, { ...Je }) : null]
1121
+ })
1122
+ })
1123
+ })] });
1124
+ });
1125
+ //#endregion
1126
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js
1127
+ function Pt(e) {
1128
+ return U("MuiSwitch", e);
1129
+ }
1130
+ var Z = R("MuiSwitch", [
1131
+ "root",
1132
+ "edgeStart",
1133
+ "edgeEnd",
1134
+ "switchBase",
1135
+ "colorPrimary",
1136
+ "colorSecondary",
1137
+ "sizeSmall",
1138
+ "sizeMedium",
1139
+ "checked",
1140
+ "disabled",
1141
+ "input",
1142
+ "thumb",
1143
+ "track"
1144
+ ]), Ft = (e) => {
1145
+ let { classes: t, edge: n, size: r, color: i, checked: a, disabled: o } = e, s = j({
1146
+ root: [
1147
+ "root",
1148
+ n && `edge${A(n)}`,
1149
+ `size${A(r)}`
1150
+ ],
1151
+ switchBase: [
1152
+ "switchBase",
1153
+ `color${A(i)}`,
1154
+ a && "checked",
1155
+ o && "disabled"
1156
+ ],
1157
+ thumb: ["thumb"],
1158
+ track: ["track"],
1159
+ input: ["input"]
1160
+ }, Pt, t);
1161
+ return {
1162
+ ...t,
1163
+ ...s
1164
+ };
1165
+ }, It = V("span", {
1166
+ name: "MuiSwitch",
1167
+ slot: "Root",
1168
+ overridesResolver: (e, t) => {
1169
+ let { ownerState: n } = e;
1170
+ return [
1171
+ t.root,
1172
+ n.edge && t[`edge${A(n.edge)}`],
1173
+ t[`size${A(n.size)}`]
1174
+ ];
1175
+ }
1176
+ })({
1177
+ display: "inline-flex",
1178
+ width: 58,
1179
+ height: 38,
1180
+ overflow: "hidden",
1181
+ padding: 12,
1182
+ boxSizing: "border-box",
1183
+ position: "relative",
1184
+ flexShrink: 0,
1185
+ zIndex: 0,
1186
+ verticalAlign: "middle",
1187
+ "@media print": { colorAdjust: "exact" },
1188
+ variants: [
1189
+ {
1190
+ props: { edge: "start" },
1191
+ style: { marginLeft: -8 }
1192
+ },
1193
+ {
1194
+ props: { edge: "end" },
1195
+ style: { marginRight: -8 }
1196
+ },
1197
+ {
1198
+ props: { size: "small" },
1199
+ style: {
1200
+ width: 40,
1201
+ height: 24,
1202
+ padding: 7,
1203
+ [`& .${Z.thumb}`]: {
1204
+ width: 16,
1205
+ height: 16
1206
+ },
1207
+ [`& .${Z.switchBase}`]: {
1208
+ padding: 4,
1209
+ [`&.${Z.checked}`]: { transform: "translateX(16px)" }
1210
+ }
1211
+ }
1212
+ }
1213
+ ]
1214
+ }), Lt = V(Ie, {
1215
+ name: "MuiSwitch",
1216
+ slot: "SwitchBase",
1217
+ overridesResolver: (e, t) => {
1218
+ let { ownerState: n } = e;
1219
+ return [
1220
+ t.switchBase,
1221
+ { [`& .${Z.input}`]: t.input },
1222
+ n.color !== "default" && t[`color${A(n.color)}`]
1223
+ ];
1224
+ }
1225
+ })(D(({ theme: e }) => ({
1226
+ position: "absolute",
1227
+ top: 0,
1228
+ left: 0,
1229
+ zIndex: 1,
1230
+ color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
1231
+ transition: e.transitions.create(["left", "transform"], { duration: e.transitions.duration.shortest }),
1232
+ [`&.${Z.checked}`]: { transform: "translateX(20px)" },
1233
+ [`&.${Z.disabled}`]: { color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}` },
1234
+ [`&.${Z.checked} + .${Z.track}`]: { opacity: .5 },
1235
+ [`&.${Z.disabled} + .${Z.track}`]: { opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? .12 : .2}` },
1236
+ [`& .${Z.input}`]: {
1237
+ left: "-100%",
1238
+ width: "300%"
1239
+ }
1240
+ })), D(({ theme: e }) => ({
1241
+ "&:hover": {
1242
+ backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity),
1243
+ "@media (hover: none)": { backgroundColor: "transparent" }
1244
+ },
1245
+ variants: [...Object.entries(e.palette).filter(P(["light"])).map(([t]) => ({
1246
+ props: { color: t },
1247
+ style: {
1248
+ [`&.${Z.checked}`]: {
1249
+ color: (e.vars || e).palette[t].main,
1250
+ "&:hover": {
1251
+ backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity),
1252
+ "@media (hover: none)": { backgroundColor: "transparent" }
1253
+ },
1254
+ [`&.${Z.disabled}`]: { color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? e.lighten(e.palette[t].main, .62) : e.darken(e.palette[t].main, .55)}` }
1255
+ },
1256
+ [`&.${Z.checked} + .${Z.track}`]: { backgroundColor: (e.vars || e).palette[t].main }
1257
+ }
1258
+ }))]
1259
+ }))), Rt = V("span", {
1260
+ name: "MuiSwitch",
1261
+ slot: "Track"
1262
+ })(D(({ theme: e }) => ({
1263
+ height: "100%",
1264
+ width: "100%",
1265
+ borderRadius: 14 / 2,
1266
+ boxSizing: "border-box",
1267
+ border: "1px solid transparent",
1268
+ zIndex: -1,
1269
+ transition: e.transitions.create(["opacity", "background-color"], { duration: e.transitions.duration.shortest }),
1270
+ backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
1271
+ opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? .38 : .3}`
1272
+ }))), zt = V("span", {
1273
+ name: "MuiSwitch",
1274
+ slot: "Thumb"
1275
+ })(D(({ theme: e }) => ({
1276
+ boxShadow: (e.vars || e).shadows[1],
1277
+ backgroundColor: "currentColor",
1278
+ boxSizing: "border-box",
1279
+ border: "1px solid transparent",
1280
+ width: 20,
1281
+ height: 20,
1282
+ borderRadius: "50%"
1283
+ }))), Bt = /*#__PURE__*/ W.forwardRef(function(e, t) {
1284
+ let n = F({
1285
+ props: e,
1286
+ name: "MuiSwitch"
1287
+ }), { className: r, color: i = "primary", edge: a = !1, size: o = "medium", sx: s, slots: c = {}, slotProps: l = {}, ...u } = n, d = {
1288
+ ...n,
1289
+ color: i,
1290
+ edge: a,
1291
+ size: o
1292
+ }, f = Ft(d), p = l.input, m = {
1293
+ slots: c,
1294
+ slotProps: l
1295
+ }, [h, g] = w("root", {
1296
+ className: fe(f.root, r),
1297
+ elementType: It,
1298
+ externalForwardedProps: m,
1299
+ ownerState: d,
1300
+ additionalProps: { sx: s }
1301
+ }), [_, v] = w("thumb", {
1302
+ className: f.thumb,
1303
+ elementType: zt,
1304
+ externalForwardedProps: m,
1305
+ ownerState: d
1306
+ }), y = /*#__PURE__*/ K(_, { ...v }), [b, x] = w("track", {
1307
+ className: f.track,
1308
+ elementType: Rt,
1309
+ externalForwardedProps: m,
1310
+ ownerState: d
1311
+ });
1312
+ return /*#__PURE__*/ q(h, {
1313
+ ...g,
1314
+ children: [/*#__PURE__*/ K(Lt, {
1315
+ type: "checkbox",
1316
+ icon: y,
1317
+ checkedIcon: y,
1318
+ ref: t,
1319
+ ownerState: d,
1320
+ ...u,
1321
+ classes: {
1322
+ ...f,
1323
+ root: f.switchBase
1324
+ },
1325
+ slots: {
1326
+ ...c.switchBase && { root: c.switchBase },
1327
+ ...c.input && { input: c.input }
1328
+ },
1329
+ slotProps: {
1330
+ ...l.switchBase && { root: typeof l.switchBase == "function" ? l.switchBase(d) : l.switchBase },
1331
+ input: ue(typeof p == "function" ? p(d) : p, { role: "switch" })
1332
+ }
1333
+ }), /*#__PURE__*/ K(b, { ...x })]
1334
+ });
1335
+ }), Q = /* @__PURE__ */ e(ce(), 1), Vt = V($e)(() => ({ "& .MuiFormControlLabel-label": {
1336
+ left: "-5px",
1337
+ position: "relative"
1338
+ } })), Ht = V(St)(() => ({ color: `${I.tertiary()} !important` })), Ut = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ K(Vt, {
1339
+ value: t,
1340
+ control: /* @__PURE__ */ K(Ht, {
1341
+ checked: n,
1342
+ onChange: r
1343
+ }),
1344
+ label: e
1345
+ });
1346
+ Ut.propTypes = {
1347
+ label: Q.default.string,
1348
+ value: Q.default.string,
1349
+ checked: Q.default.bool,
1350
+ onChange: Q.default.func
1351
+ };
1352
+ //#endregion
1353
+ //#region ../../lib-react/config-ui/dist/tabs/index.js
1354
+ var Wt = V(he)(() => ({})), Gt = class extends G.Component {
1355
+ static propTypes = {
1356
+ className: Q.default.string,
1357
+ contentClassName: Q.default.string,
1358
+ contentStyle: Q.default.object,
1359
+ children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]).isRequired
1360
+ };
1361
+ constructor(e) {
1362
+ super(e), this.state = { value: 0 };
1363
+ }
1364
+ handleChange = (e, t) => {
1365
+ this.setState({ value: t });
1366
+ };
1367
+ render() {
1368
+ let { value: e } = this.state, { children: t, className: n, contentClassName: r, contentStyle: i = {} } = this.props;
1369
+ return /* @__PURE__ */ q("div", {
1370
+ className: n,
1371
+ children: [/* @__PURE__ */ K(z, {
1372
+ indicatorColor: "primary",
1373
+ value: e,
1374
+ onChange: this.handleChange,
1375
+ children: G.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ K(Wt, { label: e.props.title }, t) : null)
1376
+ }), /* @__PURE__ */ K("div", {
1377
+ className: r,
1378
+ style: i,
1379
+ children: t[e]
1380
+ })]
1381
+ });
1382
+ }
1383
+ }, Kt = V($e)(({ theme: e, mini: t }) => ({
1384
+ margin: 0,
1385
+ marginLeft: 0,
1386
+ padding: 0,
1387
+ "& .MuiFormControlLabel-label": {
1388
+ fontSize: e.typography.fontSize - 1,
1389
+ transform: "translate(-4%, 2%)",
1390
+ color: "rgba(0,0,0,1.0)",
1391
+ ...t && {
1392
+ marginLeft: e.spacing(1),
1393
+ color: re[700],
1394
+ fontSize: e.typography.fontSize - 3
1395
+ }
1396
+ }
1397
+ })), qt = V(qe)(({ theme: e, mini: t, error: n }) => ({
1398
+ color: `${I.tertiary()} !important`,
1399
+ ...t && {
1400
+ margin: 0,
1401
+ padding: 0,
1402
+ width: e.spacing(3),
1403
+ height: e.spacing(3)
1404
+ },
1405
+ ...n && { color: `${e.palette.error.main} !important` }
1406
+ })), Jt = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ K(Kt, {
1407
+ mini: e,
1408
+ control: /* @__PURE__ */ K(qt, {
1409
+ checked: t,
1410
+ onChange: n,
1411
+ value: r,
1412
+ mini: e,
1413
+ error: a
1414
+ }),
1415
+ label: i
1416
+ });
1417
+ Jt.propTypes = {
1418
+ mini: Q.default.bool,
1419
+ checked: Q.default.bool.isRequired,
1420
+ onChange: Q.default.func.isRequired,
1421
+ value: Q.default.string,
1422
+ label: Q.default.string.isRequired,
1423
+ error: Q.default.bool
1424
+ }, Jt.defaultProps = {
1425
+ value: "",
1426
+ mini: !1,
1427
+ error: !1
1428
+ };
1429
+ //#endregion
1430
+ //#region ../../lib-react/config-ui/dist/number-text-field.js
1431
+ var Yt = (0, Oe.default)("@pie-lib:config-ui:number-text-field"), Xt = V(ie)(({ theme: e }) => ({
1432
+ marginRight: e.spacing(1),
1433
+ "& .MuiInputLabel-root": {
1434
+ width: "auto",
1435
+ minWidth: "max-content",
1436
+ maxWidth: "none",
1437
+ whiteSpace: "nowrap",
1438
+ overflow: "visible",
1439
+ transform: "translate(0, 8px) scale(0.75)",
1440
+ transformOrigin: "top left",
1441
+ position: "relative"
1442
+ },
1443
+ "& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root": {
1444
+ height: "auto",
1445
+ minHeight: "auto",
1446
+ marginTop: 0
1447
+ },
1448
+ "& .MuiInputBase-input": {
1449
+ height: "auto",
1450
+ minHeight: "auto",
1451
+ padding: "6px 0 7px"
1452
+ }
1453
+ })), Zt = (e, t) => {
1454
+ if (!u(e) && !u(t)) return 0;
1455
+ if (!u(e) && u(t)) return t;
1456
+ if (u(e)) return e;
1457
+ }, Qt = class extends G.Component {
1458
+ static propTypes = {
1459
+ disabled: Q.default.bool,
1460
+ className: Q.default.string,
1461
+ inputClassName: Q.default.string,
1462
+ onChange: Q.default.func.isRequired,
1463
+ value: Q.default.number,
1464
+ min: Q.default.number,
1465
+ max: Q.default.number,
1466
+ label: Q.default.string,
1467
+ suffix: Q.default.string,
1468
+ showErrorWhenOutsideRange: Q.default.bool,
1469
+ disableUnderline: Q.default.bool,
1470
+ variant: Q.default.string
1471
+ };
1472
+ static defaultProps = { showErrorWhenOutsideRange: !1 };
1473
+ constructor(e) {
1474
+ super(e);
1475
+ let t = this.clamp(e.value);
1476
+ this.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
1477
+ }
1478
+ UNSAFE_componentWillReceiveProps(e) {
1479
+ let t = this.clamp(e.value, e.min, e.max);
1480
+ this.setState({ value: t });
1481
+ }
1482
+ clamp(e, t = this.props.min, n = this.props.max) {
1483
+ return u(e) ? (u(n) && (e = Math.min(e, n)), u(t) && (e = Math.max(e, t)), e) : Zt(t, n);
1484
+ }
1485
+ onBlur = (e) => {
1486
+ let t = e.target.value, n = parseFloat(t);
1487
+ Yt("rawNumber: ", n);
1488
+ let r = this.clamp(n);
1489
+ Yt("number: ", r), r !== this.state.value && (Yt("trigger update..."), this.setState({ value: r.toString() }, () => {
1490
+ this.props.onChange(e, r);
1491
+ }));
1492
+ };
1493
+ onChange(e) {
1494
+ let t = e.target.value;
1495
+ this.setState({ value: t });
1496
+ }
1497
+ errorMessage = () => {
1498
+ let { min: e, max: t } = this.props;
1499
+ if (e && t) return `The value must be between ${e} and ${t}`;
1500
+ if (e) return `The value must be greater than ${e}`;
1501
+ if (t) return `The value must be less than ${t}`;
1502
+ };
1503
+ getError = () => {
1504
+ let { value: e } = this.state, t = parseFloat(e);
1505
+ if (this.clamp(t) !== t) return this.errorMessage();
1506
+ };
1507
+ render() {
1508
+ let { className: e, label: t, disabled: n, suffix: r, min: i, max: a, inputClassName: o, disableUnderline: s, showErrorWhenOutsideRange: c, variant: l } = this.props, u = c && this.getError();
1509
+ return /* @__PURE__ */ K(Xt, {
1510
+ variant: s ? "filled" : l || "standard",
1511
+ inputRef: (e) => {
1512
+ this.inputRef = e;
1513
+ },
1514
+ disabled: n,
1515
+ label: t,
1516
+ InputLabelProps: { shrink: !0 },
1517
+ value: this.state.value,
1518
+ error: !!u,
1519
+ helperText: u,
1520
+ onChange: this.onChange,
1521
+ onBlur: this.onBlur,
1522
+ onKeyDown: (e) => {
1523
+ e.key === "Enter" && this.inputRef && this.inputRef.blur();
1524
+ },
1525
+ type: "number",
1526
+ className: e,
1527
+ slotProps: { input: {
1528
+ endAdornment: r && /* @__PURE__ */ K(ot, {
1529
+ position: "end",
1530
+ children: r
1531
+ }),
1532
+ className: o,
1533
+ inputProps: {
1534
+ min: i,
1535
+ max: a
1536
+ }
1537
+ } },
1538
+ margin: "normal"
1539
+ });
1540
+ }
1541
+ };
1542
+ //#endregion
1543
+ //#region ../../lib-react/config-ui/dist/two-choice.js
1544
+ function $t(e) {
1545
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
1546
+ }
1547
+ function en(e, t) {
1548
+ return !e || $t(e) ? e : $t(e.default) ? e.default : t && $t(e[t]) ? e[t] : t && $t(e[t]?.default) ? e[t].default : e;
1549
+ }
1550
+ var tn = en(ye, "InputContainer") || en(an.InputContainer, "InputContainer"), nn = me, rn = nn.default, an = rn && typeof rn == "object" ? rn : nn, on = V("div")(({ theme: e, direction: t }) => ({
1551
+ display: "flex",
1552
+ flexWrap: "wrap",
1553
+ paddingLeft: 0,
1554
+ marginTop: e.spacing(1),
1555
+ ...t === "vertical" && { flexDirection: "column" }
1556
+ })), sn = class extends G.Component {
1557
+ static propTypes = {
1558
+ header: Q.default.string.isRequired,
1559
+ className: Q.default.string,
1560
+ customLabel: Q.default.func,
1561
+ opts: Q.default.array.isRequired,
1562
+ value: Q.default.string,
1563
+ onChange: Q.default.func.isRequired,
1564
+ direction: Q.default.oneOf(["horizontal", "vertical"])
1565
+ };
1566
+ handleChange = (e) => {
1567
+ this.props.onChange(e.currentTarget.value);
1568
+ };
1569
+ render() {
1570
+ let { header: e, className: t, customLabel: n, opts: r, value: i, direction: a } = this.props, o = r.map((e) => typeof e == "string" ? {
1571
+ label: e,
1572
+ value: e
1573
+ } : e), s = n || Ut;
1574
+ return /* @__PURE__ */ K(tn, {
1575
+ label: e,
1576
+ className: t,
1577
+ children: /* @__PURE__ */ K(on, {
1578
+ direction: a,
1579
+ children: o.map((e, t) => /* @__PURE__ */ K(s, {
1580
+ value: e.value,
1581
+ checked: e.value === i,
1582
+ onChange: this.handleChange,
1583
+ label: e.label
1584
+ }, t))
1585
+ })
1586
+ });
1587
+ }
1588
+ }, cn = Q.default.shape({
1589
+ label: Q.default.string,
1590
+ value: Q.default.string
1591
+ });
1592
+ (class extends G.Component {
1593
+ static propTypes = {
1594
+ header: Q.default.string.isRequired,
1595
+ value: Q.default.string.isRequired,
1596
+ onChange: Q.default.func.isRequired,
1597
+ one: Q.default.oneOfType([cn, Q.default.string]),
1598
+ two: Q.default.oneOfType([cn, Q.default.string]),
1599
+ className: Q.default.string,
1600
+ customLabel: Q.default.func
1601
+ };
1602
+ render() {
1603
+ let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
1604
+ return /* @__PURE__ */ K(sn, {
1605
+ customLabel: i,
1606
+ header: n,
1607
+ className: r,
1608
+ opts: [e, t],
1609
+ value: a,
1610
+ onChange: o
1611
+ });
1612
+ }
1613
+ });
1614
+ //#endregion
1615
+ //#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
1616
+ var ln = Object.defineProperty, un = (e, t) => {
1617
+ let n = {};
1618
+ for (var r in e) ln(n, r, {
1619
+ get: e[r],
1620
+ enumerable: !0
1621
+ });
1622
+ return t || ln(n, Symbol.toStringTag, { value: "Module" }), n;
1623
+ }, dn = V("div")(() => ({
1624
+ display: "flex",
1625
+ flexDirection: "column",
1626
+ position: "relative"
1627
+ })), fn = V("div")(() => ({
1628
+ display: "flex",
1629
+ justifyContent: "space-between"
1630
+ })), pn = V("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), mn = V("div")(() => ({ flex: "1" })), hn = V("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), gn = class extends G.Component {
1631
+ static propTypes = {
1632
+ mode: Q.default.oneOf(["tabbed", "inline"]),
1633
+ secondary: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]),
1634
+ children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]),
1635
+ dimensions: Q.default.object
1636
+ };
1637
+ getConfiguration = () => {
1638
+ let { secondary: e } = this.props;
1639
+ return e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;
1640
+ };
1641
+ render() {
1642
+ let { mode: e, secondary: t, children: n, dimensions: r } = this.props, { minHeight: i, minWidth: a, maxHeight: o, maxWidth: s } = r || {}, c = this.getConfiguration(), l = Object.entries(c || {}).some(([, e]) => !!e?.settings);
1643
+ if (!l) try {
1644
+ l = JSON.stringify(c)?.match(/settings":true/)?.length;
1645
+ } catch (e) {
1646
+ console.log(e.toString());
1647
+ }
1648
+ return /* @__PURE__ */ q(dn, {
1649
+ style: {
1650
+ minHeight: i,
1651
+ minWidth: a,
1652
+ maxHeight: o,
1653
+ maxWidth: s
1654
+ },
1655
+ children: [
1656
+ e === "inline" && /* @__PURE__ */ q(fn, { children: [/* @__PURE__ */ K(mn, {
1657
+ className: "design-container",
1658
+ children: n
1659
+ }), l && /* @__PURE__ */ K(hn, {
1660
+ className: "settings-container",
1661
+ children: t
1662
+ })] }),
1663
+ e === "tabbed" && l && /* @__PURE__ */ q(Gt, {
1664
+ onChange: this.onTabsChange,
1665
+ contentClassName: "content-container",
1666
+ indicatorColor: "primary",
1667
+ children: [/* @__PURE__ */ K(pn, {
1668
+ title: "Design",
1669
+ className: "design-container",
1670
+ children: n
1671
+ }), /* @__PURE__ */ K(pn, {
1672
+ title: "Settings",
1673
+ className: "settings-container",
1674
+ children: t
1675
+ })]
1676
+ }),
1677
+ e === "tabbed" && !l && /* @__PURE__ */ K(pn, {
1678
+ className: "design-container",
1679
+ children: n
1680
+ })
1681
+ ]
1682
+ });
1683
+ }
1684
+ };
1685
+ //#endregion
1686
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
1687
+ function _n() {
1688
+ return _n = Object.assign ? Object.assign.bind() : function(e) {
1689
+ for (var t = 1; t < arguments.length; t++) {
1690
+ var n = arguments[t];
1691
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
1692
+ }
1693
+ return e;
1694
+ }, _n.apply(null, arguments);
1695
+ }
1696
+ //#endregion
1697
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1698
+ function vn(e, t) {
1699
+ if (e == null) return {};
1700
+ var n = {};
1701
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1702
+ if (t.indexOf(r) !== -1) continue;
1703
+ n[r] = e[r];
1704
+ }
1705
+ return n;
1706
+ }
1707
+ //#endregion
1708
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1709
+ function yn(e, t) {
1710
+ return yn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
1711
+ return e.__proto__ = t, e;
1712
+ }, yn(e, t);
1713
+ }
1714
+ //#endregion
1715
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
1716
+ function bn(e, t) {
1717
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, yn(e, t);
1718
+ }
1719
+ //#endregion
1720
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
1721
+ var xn = (function() {
1722
+ if (typeof Map < "u") return Map;
1723
+ function e(e, t) {
1724
+ var n = -1;
1725
+ return e.some(function(e, r) {
1726
+ return e[0] === t ? (n = r, !0) : !1;
1727
+ }), n;
1728
+ }
1729
+ return function() {
1730
+ function t() {
1731
+ this.__entries__ = [];
1732
+ }
1733
+ return Object.defineProperty(t.prototype, "size", {
1734
+ get: function() {
1735
+ return this.__entries__.length;
1736
+ },
1737
+ enumerable: !0,
1738
+ configurable: !0
1739
+ }), t.prototype.get = function(t) {
1740
+ var n = e(this.__entries__, t), r = this.__entries__[n];
1741
+ return r && r[1];
1742
+ }, t.prototype.set = function(t, n) {
1743
+ var r = e(this.__entries__, t);
1744
+ ~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);
1745
+ }, t.prototype.delete = function(t) {
1746
+ var n = this.__entries__, r = e(n, t);
1747
+ ~r && n.splice(r, 1);
1748
+ }, t.prototype.has = function(t) {
1749
+ return !!~e(this.__entries__, t);
1750
+ }, t.prototype.clear = function() {
1751
+ this.__entries__.splice(0);
1752
+ }, t.prototype.forEach = function(e, t) {
1753
+ t === void 0 && (t = null);
1754
+ for (var n = 0, r = this.__entries__; n < r.length; n++) {
1755
+ var i = r[n];
1756
+ e.call(t, i[1], i[0]);
1757
+ }
1758
+ }, t;
1759
+ }();
1760
+ })(), Sn = typeof window < "u" && typeof document < "u" && window.document === document, Cn = (function() {
1761
+ return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
1762
+ })(), wn = (function() {
1763
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Cn) : function(e) {
1764
+ return setTimeout(function() {
1765
+ return e(Date.now());
1766
+ }, 1e3 / 60);
1767
+ };
1768
+ })(), Tn = 2;
1769
+ function En(e, t) {
1770
+ var n = !1, r = !1, i = 0;
1771
+ function a() {
1772
+ n && (n = !1, e()), r && s();
1773
+ }
1774
+ function o() {
1775
+ wn(a);
1776
+ }
1777
+ function s() {
1778
+ var e = Date.now();
1779
+ if (n) {
1780
+ if (e - i < Tn) return;
1781
+ r = !0;
1782
+ } else n = !0, r = !1, setTimeout(o, t);
1783
+ i = e;
1784
+ }
1785
+ return s;
1786
+ }
1787
+ var Dn = 20, On = [
1788
+ "top",
1789
+ "right",
1790
+ "bottom",
1791
+ "left",
1792
+ "width",
1793
+ "height",
1794
+ "size",
1795
+ "weight"
1796
+ ], kn = typeof MutationObserver < "u", An = function() {
1797
+ function e() {
1798
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = En(this.refresh.bind(this), Dn);
1799
+ }
1800
+ return e.prototype.addObserver = function(e) {
1801
+ ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
1802
+ }, e.prototype.removeObserver = function(e) {
1803
+ var t = this.observers_, n = t.indexOf(e);
1804
+ ~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();
1805
+ }, e.prototype.refresh = function() {
1806
+ this.updateObservers_() && this.refresh();
1807
+ }, e.prototype.updateObservers_ = function() {
1808
+ var e = this.observers_.filter(function(e) {
1809
+ return e.gatherActive(), e.hasActive();
1810
+ });
1811
+ return e.forEach(function(e) {
1812
+ return e.broadcastActive();
1813
+ }), e.length > 0;
1814
+ }, e.prototype.connect_ = function() {
1815
+ !Sn || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), kn ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
1816
+ attributes: !0,
1817
+ childList: !0,
1818
+ characterData: !0,
1819
+ subtree: !0
1820
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
1821
+ }, e.prototype.disconnect_ = function() {
1822
+ !Sn || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
1823
+ }, e.prototype.onTransitionEnd_ = function(e) {
1824
+ var t = e.propertyName, n = t === void 0 ? "" : t;
1825
+ On.some(function(e) {
1826
+ return !!~n.indexOf(e);
1827
+ }) && this.refresh();
1828
+ }, e.getInstance = function() {
1829
+ return this.instance_ ||= new e(), this.instance_;
1830
+ }, e.instance_ = null, e;
1831
+ }(), jn = (function(e, t) {
1832
+ for (var n = 0, r = Object.keys(t); n < r.length; n++) {
1833
+ var i = r[n];
1834
+ Object.defineProperty(e, i, {
1835
+ value: t[i],
1836
+ enumerable: !1,
1837
+ writable: !1,
1838
+ configurable: !0
1839
+ });
1840
+ }
1841
+ return e;
1842
+ }), Mn = (function(e) {
1843
+ return e && e.ownerDocument && e.ownerDocument.defaultView || Cn;
1844
+ }), Nn = Un(0, 0, 0, 0);
1845
+ function Pn(e) {
1846
+ return parseFloat(e) || 0;
1847
+ }
1848
+ function Fn(e) {
1849
+ return [...arguments].slice(1).reduce(function(t, n) {
1850
+ var r = e["border-" + n + "-width"];
1851
+ return t + Pn(r);
1852
+ }, 0);
1853
+ }
1854
+ function In(e) {
1855
+ for (var t = [
1856
+ "top",
1857
+ "right",
1858
+ "bottom",
1859
+ "left"
1860
+ ], n = {}, r = 0, i = t; r < i.length; r++) {
1861
+ var a = i[r], o = e["padding-" + a];
1862
+ n[a] = Pn(o);
1863
+ }
1864
+ return n;
1865
+ }
1866
+ function Ln(e) {
1867
+ var t = e.getBBox();
1868
+ return Un(0, 0, t.width, t.height);
1869
+ }
1870
+ function Rn(e) {
1871
+ var t = e.clientWidth, n = e.clientHeight;
1872
+ if (!t && !n) return Nn;
1873
+ var r = Mn(e).getComputedStyle(e), i = In(r), a = i.left + i.right, o = i.top + i.bottom, s = Pn(r.width), c = Pn(r.height);
1874
+ if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= Fn(r, "left", "right") + a), Math.round(c + o) !== n && (c -= Fn(r, "top", "bottom") + o)), !Bn(e)) {
1875
+ var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
1876
+ Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
1877
+ }
1878
+ return Un(i.left, i.top, s, c);
1879
+ }
1880
+ var zn = (function() {
1881
+ return typeof SVGGraphicsElement < "u" ? function(e) {
1882
+ return e instanceof Mn(e).SVGGraphicsElement;
1883
+ } : function(e) {
1884
+ return e instanceof Mn(e).SVGElement && typeof e.getBBox == "function";
1885
+ };
1886
+ })();
1887
+ function Bn(e) {
1888
+ return e === Mn(e).document.documentElement;
1889
+ }
1890
+ function Vn(e) {
1891
+ return Sn ? zn(e) ? Ln(e) : Rn(e) : Nn;
1892
+ }
1893
+ function Hn(e) {
1894
+ var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
1895
+ return jn(a, {
1896
+ x: t,
1897
+ y: n,
1898
+ width: r,
1899
+ height: i,
1900
+ top: n,
1901
+ right: t + r,
1902
+ bottom: i + n,
1903
+ left: t
1904
+ }), a;
1905
+ }
1906
+ function Un(e, t, n, r) {
1907
+ return {
1908
+ x: e,
1909
+ y: t,
1910
+ width: n,
1911
+ height: r
1912
+ };
1913
+ }
1914
+ var Wn = function() {
1915
+ function e(e) {
1916
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Un(0, 0, 0, 0), this.target = e;
1917
+ }
1918
+ return e.prototype.isActive = function() {
1919
+ var e = Vn(this.target);
1920
+ return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
1921
+ }, e.prototype.broadcastRect = function() {
1922
+ var e = this.contentRect_;
1923
+ return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
1924
+ }, e;
1925
+ }(), Gn = function() {
1926
+ function e(e, t) {
1927
+ var n = Hn(t);
1928
+ jn(this, {
1929
+ target: e,
1930
+ contentRect: n
1931
+ });
1932
+ }
1933
+ return e;
1934
+ }(), Kn = function() {
1935
+ function e(e, t, n) {
1936
+ if (this.activeObservations_ = [], this.observations_ = new xn(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
1937
+ this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
1938
+ }
1939
+ return e.prototype.observe = function(e) {
1940
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1941
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1942
+ if (!(e instanceof Mn(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
1943
+ var t = this.observations_;
1944
+ t.has(e) || (t.set(e, new Wn(e)), this.controller_.addObserver(this), this.controller_.refresh());
1945
+ }
1946
+ }, e.prototype.unobserve = function(e) {
1947
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1948
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1949
+ if (!(e instanceof Mn(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
1950
+ var t = this.observations_;
1951
+ t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
1952
+ }
1953
+ }, e.prototype.disconnect = function() {
1954
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
1955
+ }, e.prototype.gatherActive = function() {
1956
+ var e = this;
1957
+ this.clearActive(), this.observations_.forEach(function(t) {
1958
+ t.isActive() && e.activeObservations_.push(t);
1959
+ });
1960
+ }, e.prototype.broadcastActive = function() {
1961
+ if (this.hasActive()) {
1962
+ var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
1963
+ return new Gn(e.target, e.broadcastRect());
1964
+ });
1965
+ this.callback_.call(e, t, e), this.clearActive();
1966
+ }
1967
+ }, e.prototype.clearActive = function() {
1968
+ this.activeObservations_.splice(0);
1969
+ }, e.prototype.hasActive = function() {
1970
+ return this.activeObservations_.length > 0;
1971
+ }, e;
1972
+ }(), qn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new xn(), Jn = function() {
1973
+ function e(t) {
1974
+ if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
1975
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1976
+ var n = new Kn(t, An.getInstance(), this);
1977
+ qn.set(this, n);
1978
+ }
1979
+ return e;
1980
+ }();
1981
+ [
1982
+ "observe",
1983
+ "unobserve",
1984
+ "disconnect"
1985
+ ].forEach(function(e) {
1986
+ Jn.prototype[e] = function() {
1987
+ var t;
1988
+ return (t = qn.get(this))[e].apply(t, arguments);
1989
+ };
1990
+ });
1991
+ var Yn = (function() {
1992
+ return Cn.ResizeObserver === void 0 ? Jn : Cn.ResizeObserver;
1993
+ })(), Xn = [
1994
+ "client",
1995
+ "offset",
1996
+ "scroll",
1997
+ "bounds",
1998
+ "margin"
1999
+ ];
2000
+ function Zn(e) {
2001
+ var t = [];
2002
+ return Xn.forEach(function(n) {
2003
+ e[n] && t.push(n);
2004
+ }), t;
2005
+ }
2006
+ function Qn(e, t) {
2007
+ var n = {};
2008
+ if (t.indexOf("client") > -1 && (n.client = {
2009
+ top: e.clientTop,
2010
+ left: e.clientLeft,
2011
+ width: e.clientWidth,
2012
+ height: e.clientHeight
2013
+ }), t.indexOf("offset") > -1 && (n.offset = {
2014
+ top: e.offsetTop,
2015
+ left: e.offsetLeft,
2016
+ width: e.offsetWidth,
2017
+ height: e.offsetHeight
2018
+ }), t.indexOf("scroll") > -1 && (n.scroll = {
2019
+ top: e.scrollTop,
2020
+ left: e.scrollLeft,
2021
+ width: e.scrollWidth,
2022
+ height: e.scrollHeight
2023
+ }), t.indexOf("bounds") > -1) {
2024
+ var r = e.getBoundingClientRect();
2025
+ n.bounds = {
2026
+ top: r.top,
2027
+ right: r.right,
2028
+ bottom: r.bottom,
2029
+ left: r.left,
2030
+ width: r.width,
2031
+ height: r.height
2032
+ };
2033
+ }
2034
+ if (t.indexOf("margin") > -1) {
2035
+ var i = getComputedStyle(e);
2036
+ n.margin = {
2037
+ top: i ? parseInt(i.marginTop) : 0,
2038
+ right: i ? parseInt(i.marginRight) : 0,
2039
+ bottom: i ? parseInt(i.marginBottom) : 0,
2040
+ left: i ? parseInt(i.marginLeft) : 0
2041
+ };
2042
+ }
2043
+ return n;
2044
+ }
2045
+ function $n(e) {
2046
+ return e && e.ownerDocument && e.ownerDocument.defaultView || window;
2047
+ }
2048
+ function er(e) {
2049
+ return function(t) {
2050
+ var n, r;
2051
+ return r = n = /*#__PURE__*/ function(n) {
2052
+ bn(r, n);
2053
+ function r() {
2054
+ var t, r = [...arguments];
2055
+ return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
2056
+ entry: {},
2057
+ client: {},
2058
+ offset: {},
2059
+ scroll: {},
2060
+ bounds: {},
2061
+ margin: {}
2062
+ } }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
2063
+ var r = Qn(t._node, e || Zn(t.props));
2064
+ n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
2065
+ t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
2066
+ });
2067
+ }, t._handleRef = function(e) {
2068
+ t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = $n(t._node);
2069
+ var n = t.props.innerRef;
2070
+ n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
2071
+ }, t;
2072
+ }
2073
+ var i = r.prototype;
2074
+ return i.componentDidMount = function() {
2075
+ this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new Yn(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(Qn(this._node, e || Zn(this.props))));
2076
+ }, i.componentWillUnmount = function() {
2077
+ this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
2078
+ }, i.render = function() {
2079
+ var e = this.props;
2080
+ return e.innerRef, e.onResize, Te(t, _n({}, vn(e, ["innerRef", "onResize"]), {
2081
+ measureRef: this._handleRef,
2082
+ measure: this.measure,
2083
+ contentRect: this.state.contentRect
2084
+ }));
2085
+ }, r;
2086
+ }(we), n.propTypes = {
2087
+ client: Q.default.bool,
2088
+ offset: Q.default.bool,
2089
+ scroll: Q.default.bool,
2090
+ bounds: Q.default.bool,
2091
+ margin: Q.default.bool,
2092
+ innerRef: Q.default.oneOfType([Q.default.object, Q.default.func]),
2093
+ onResize: Q.default.func
2094
+ }, r;
2095
+ };
2096
+ }
2097
+ var tr = er()(function(e) {
2098
+ var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
2099
+ return i({
2100
+ measure: t,
2101
+ measureRef: n,
2102
+ contentRect: r
2103
+ });
2104
+ });
2105
+ tr.displayName = "Measure", tr.propTypes.children = Q.default.func;
2106
+ //#endregion
2107
+ //#region ../../lib-react/config-ui/dist/layout/settings-box.js
2108
+ var nr = V("div")(({ theme: e }) => ({
2109
+ backgroundColor: e.palette.background.paper,
2110
+ border: `2px solid ${e.palette.grey[200]}`,
2111
+ display: "flex",
2112
+ flexDirection: "column",
2113
+ justifyContent: "flex-start",
2114
+ minWidth: "275px",
2115
+ maxWidth: "300px",
2116
+ padding: "20px 4px 4px 20px",
2117
+ zIndex: 99
2118
+ })), rr = class extends G.Component {
2119
+ static propTypes = {
2120
+ className: Q.default.string,
2121
+ children: Q.default.oneOfType([Q.default.arrayOf(Q.default.node), Q.default.node]).isRequired
2122
+ };
2123
+ static defaultProps = {};
2124
+ render() {
2125
+ let { className: e, children: t } = this.props;
2126
+ return /* @__PURE__ */ K(nr, {
2127
+ className: e,
2128
+ children: t
2129
+ });
2130
+ }
2131
+ }, ir = te({
2132
+ typography: { fontFamily: "inherit" },
2133
+ components: { MuiButton: { styleOverrides: { contained: {
2134
+ backgroundColor: "#e0e0e0",
2135
+ color: "#000000",
2136
+ "&:hover": { backgroundColor: "#bdbdbd" }
2137
+ } } } }
2138
+ }), ar = class extends G.Component {
2139
+ static propTypes = {
2140
+ children: Q.default.oneOfType([
2141
+ Q.default.string,
2142
+ Q.default.arrayOf(Q.default.element),
2143
+ Q.default.element
2144
+ ]),
2145
+ className: Q.default.string,
2146
+ dimensions: Q.default.object,
2147
+ settings: Q.default.element,
2148
+ sidePanelMinWidth: Q.default.number,
2149
+ hideSettings: Q.default.bool,
2150
+ extraCSSRules: Q.default.shape({
2151
+ names: Q.default.arrayOf(Q.default.string),
2152
+ rules: Q.default.string
2153
+ })
2154
+ };
2155
+ static defaultProps = {
2156
+ sidePanelMinWidth: 1135,
2157
+ hideSettings: !1,
2158
+ dimensions: {}
2159
+ };
2160
+ constructor(...e) {
2161
+ super(...e), this.state = { layoutMode: void 0 };
2162
+ }
2163
+ onResize = (e) => {
2164
+ let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
2165
+ a !== this.state.layoutMode && this.setState({ layoutMode: a });
2166
+ };
2167
+ render() {
2168
+ return /* @__PURE__ */ K(ge, {
2169
+ injectFirst: !0,
2170
+ children: /* @__PURE__ */ K(E, {
2171
+ theme: ir,
2172
+ children: /* @__PURE__ */ K(tr, {
2173
+ bounds: !0,
2174
+ onResize: this.onResize,
2175
+ children: ({ measureRef: e }) => {
2176
+ let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ K(rr, {
2177
+ className: "settings-box",
2178
+ children: n
2179
+ }) : n;
2180
+ return /* @__PURE__ */ q("div", {
2181
+ ref: e,
2182
+ className: "main-container extraCSSRules",
2183
+ children: [a?.rules ? /* @__PURE__ */ K("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ K(gn, {
2184
+ mode: o,
2185
+ secondary: s,
2186
+ dimensions: i,
2187
+ children: t
2188
+ })]
2189
+ });
2190
+ }
2191
+ })
2192
+ })
2193
+ });
2194
+ }
2195
+ }, or = er("bounds")(ar), sr = /* @__PURE__ */ un({
2196
+ ConfigLayout: () => or,
2197
+ LayoutContents: () => gn
2198
+ }), cr = V("div")(() => ({
2199
+ display: "flex",
2200
+ width: "100%",
2201
+ justifyContent: "space-between"
2202
+ })), lr = V(Se)(({ theme: e }) => ({
2203
+ color: "rgba(0, 0, 0, 0.89)",
2204
+ fontSize: e.typography.fontSize,
2205
+ paddingTop: e.spacing(2)
2206
+ })), ur = V(Bt)(({ checked: e }) => ({
2207
+ "&.Mui-checked .MuiSwitch-thumb": { color: `${I.tertiary()} !important` },
2208
+ "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${I.tertiaryLight()} !important` },
2209
+ "& .MuiSwitch-track": { backgroundColor: e ? `${I.tertiaryLight()} !important` : void 0 }
2210
+ })), dr = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ q(cr, { children: [/* @__PURE__ */ K(lr, { children: n }), /* @__PURE__ */ K(ur, {
2211
+ checked: e,
2212
+ disabled: t,
2213
+ onChange: (e) => r(e.target.checked)
2214
+ })] });
2215
+ dr.propTypes = {
2216
+ checked: Q.default.bool,
2217
+ disabled: Q.default.bool,
2218
+ label: Q.default.string.isRequired,
2219
+ toggle: Q.default.func.isRequired
2220
+ };
2221
+ //#endregion
2222
+ //#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
2223
+ var fr = V($e)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
2224
+ color: "rgba(0, 0, 0, 0.89)",
2225
+ fontSize: e.typography.fontSize - 2,
2226
+ left: "-5px",
2227
+ position: "relative"
2228
+ } })), pr = V(St)(() => ({ color: `${I.tertiary()} !important` })), mr = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ K(fr, {
2229
+ value: t,
2230
+ control: /* @__PURE__ */ K(pr, {
2231
+ checked: n,
2232
+ onChange: r
2233
+ }),
2234
+ label: e
2235
+ });
2236
+ mr.propTypes = {
2237
+ label: Q.default.string,
2238
+ value: Q.default.string,
2239
+ checked: Q.default.bool,
2240
+ onChange: Q.default.func
2241
+ };
2242
+ //#endregion
2243
+ //#region ../../lib-react/config-ui/dist/settings/panel.js
2244
+ var hr = (0, Oe.default)("pie-lib:config-ui:settings:panel"), gr = {
2245
+ label: Q.default.string,
2246
+ value: Q.default.string
2247
+ }, _r = {
2248
+ label: Q.default.string,
2249
+ value: Q.default.string,
2250
+ onChange: Q.default.func
2251
+ }, vr = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ K(Jt, {
2252
+ checked: t,
2253
+ label: e,
2254
+ onChange: (e) => {
2255
+ n(e.target.checked);
2256
+ }
2257
+ });
2258
+ vr.propTypes = {
2259
+ label: Q.default.string,
2260
+ value: Q.default.bool,
2261
+ onChange: Q.default.func
2262
+ };
2263
+ var yr = V(sn)(({ theme: e }) => ({
2264
+ marginTop: e.spacing(.5),
2265
+ paddingBottom: e.spacing(.5),
2266
+ width: "100%",
2267
+ "& > label": {
2268
+ color: "rgba(0, 0, 0, 0.89)",
2269
+ transform: "translate(0, 10px) scale(1)",
2270
+ fontSize: "18px",
2271
+ marginTop: e.spacing(2.5)
2272
+ },
2273
+ "& > div": { marginTop: e.spacing(2.5) }
2274
+ })), br = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ K(yr, {
2275
+ direction: "horizontal",
2276
+ customLabel: mr,
2277
+ value: t,
2278
+ header: e,
2279
+ opts: r,
2280
+ onChange: n
2281
+ });
2282
+ br.propTypes = {
2283
+ ..._r,
2284
+ choices: Q.default.arrayOf(Q.default.shape(gr))
2285
+ };
2286
+ var xr = br, Sr = V("p")(({ theme: e }) => ({
2287
+ margin: 0,
2288
+ fontSize: e.typography.fontSize
2289
+ })), Cr = V(_e)(({ theme: e }) => ({
2290
+ marginTop: e.spacing(.5),
2291
+ border: "2px solid lightgrey",
2292
+ padding: `0 ${e.spacing(1)}`,
2293
+ borderRadius: "4px"
2294
+ })), wr = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
2295
+ let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
2296
+ return /* @__PURE__ */ q("div", { children: [e && /* @__PURE__ */ K(Sr, { children: e }), /* @__PURE__ */ K(Cr, {
2297
+ value: t || r && r[0],
2298
+ onChange: ({ target: e }) => n(e.value),
2299
+ input: /* @__PURE__ */ K(ae, { id: `dropdown-${e}` }),
2300
+ disableUnderline: !0,
2301
+ MenuProps: { transitionDuration: {
2302
+ enter: 225,
2303
+ exit: 195
2304
+ } },
2305
+ children: r.map((e, t) => /* @__PURE__ */ K(pe, {
2306
+ value: a(e),
2307
+ children: i(e)
2308
+ }, t))
2309
+ })] });
2310
+ };
2311
+ wr.propTypes = {
2312
+ ..._r,
2313
+ choices: Q.default.arrayOf(Q.default.string)
2314
+ };
2315
+ var Tr = V(B)(({ theme: e }) => ({
2316
+ marginRight: e.spacing(3),
2317
+ marginTop: e.spacing(1)
2318
+ })), Er = ({ label: e }) => /* @__PURE__ */ K(Tr, { children: e }), Dr = V(Qt)(({ theme: e }) => ({
2319
+ width: "35%",
2320
+ marginRight: e.spacing(3),
2321
+ marginTop: e.spacing(1),
2322
+ "& .MuiInputBase-root": {
2323
+ marginTop: e.spacing(.5),
2324
+ border: "2px solid lightgrey",
2325
+ borderRadius: "4px",
2326
+ padding: `0 ${e.spacing(1)}`,
2327
+ backgroundColor: "transparent"
2328
+ }
2329
+ })), Or = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ K(Dr, {
2330
+ variant: "standard",
2331
+ label: e || "Label",
2332
+ value: t,
2333
+ max: a,
2334
+ min: i,
2335
+ onChange: (e, t) => n(t),
2336
+ suffix: r,
2337
+ showErrorWhenOutsideRange: !0,
2338
+ disableUnderline: !0
2339
+ });
2340
+ Or.propTypes = {
2341
+ ..._r,
2342
+ suffix: Q.default.string,
2343
+ min: Q.default.number,
2344
+ max: Q.default.number,
2345
+ value: Q.default.number
2346
+ }, Er.propTypes = { ..._r };
2347
+ var kr = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ K(dr, {
2348
+ label: t,
2349
+ checked: !!n,
2350
+ disabled: !!e,
2351
+ toggle: r
2352
+ });
2353
+ kr.propTypes = {
2354
+ ..._r,
2355
+ value: Q.default.bool
2356
+ };
2357
+ var Ar = {
2358
+ toggle: kr,
2359
+ radio: xr,
2360
+ dropdown: wr,
2361
+ numberField: Or,
2362
+ checkbox: vr,
2363
+ textField: Er
2364
+ }, jr = V("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), Mr = V("div")(({ theme: e }) => ({
2365
+ color: "#495B8F",
2366
+ fontSize: e.typography.fontSize + 2,
2367
+ fontWeight: 600,
2368
+ marginBottom: e.spacing(1)
2369
+ })), Nr = V("p")(({ theme: e }) => ({
2370
+ fontSize: e.typography.fontSize,
2371
+ marginBottom: 0
2372
+ })), Pr = (e) => {
2373
+ let { model: t, label: n, group: i, configuration: a, onChange: o } = e, s = (e, n, i) => {
2374
+ let { isConfigProperty: s, ...c } = r(e, i || n), l = r(s ? a : t, n), u = {
2375
+ ...c,
2376
+ key: n,
2377
+ value: l
2378
+ }, d = Ar[u.type];
2379
+ return /* @__PURE__ */ K(d, {
2380
+ ...u,
2381
+ onChange: (e) => o(n, e, s)
2382
+ }, n);
2383
+ }, c = (e, t) => {
2384
+ let n = e[t];
2385
+ if (!n) return null;
2386
+ let { type: r, label: i, fields: a, choices: o } = n;
2387
+ return r === "numberFields" ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(Nr, { children: i }), Object.keys(a).map((n) => s(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", { children: i }), Object.keys(o).map((n) => s(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : s(e, t);
2388
+ };
2389
+ return /* @__PURE__ */ q(jr, { children: [/* @__PURE__ */ K(Mr, { children: n }), Object.keys(i).map((e) => c(i, e))] });
2390
+ };
2391
+ Pr.propTypes = {
2392
+ model: Q.default.object,
2393
+ label: Q.default.string,
2394
+ group: Q.default.object,
2395
+ configuration: Q.default.object,
2396
+ onChange: Q.default.func
2397
+ };
2398
+ var Fr = class extends G.Component {
2399
+ static propTypes = {
2400
+ model: Q.default.object,
2401
+ configuration: Q.default.object,
2402
+ groups: Q.default.object,
2403
+ onChangeModel: Q.default.func,
2404
+ onChangeConfiguration: Q.default.func,
2405
+ modal: Q.default.object
2406
+ };
2407
+ static defaultProps = {
2408
+ onChangeModel: () => {},
2409
+ onChangeConfiguration: () => {}
2410
+ };
2411
+ change = (e, t, n = !1) => {
2412
+ hr("[changeModel]", e, t);
2413
+ let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, s = { ...this.props.configuration };
2414
+ n ? (o(s, e, t), i(s, e)) : (o(a, e, t), r(a, e));
2415
+ };
2416
+ render() {
2417
+ let { groups: e, model: t, configuration: n, modal: r } = this.props;
2418
+ return hr("render:", t), /* @__PURE__ */ q("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ K(Pr, {
2419
+ label: r,
2420
+ model: t,
2421
+ configuration: n,
2422
+ group: e[r],
2423
+ onChange: this.change
2424
+ }, r) : null), r] });
2425
+ }
2426
+ }, Ir = /* @__PURE__ */ un({
2427
+ Panel: () => Fr,
2428
+ checkbox: () => Wr,
2429
+ checkboxes: () => Gr,
2430
+ dropdown: () => Vr,
2431
+ numberField: () => Hr,
2432
+ numberFields: () => Ur,
2433
+ radio: () => Br,
2434
+ textField: () => Lr,
2435
+ toggle: () => Rr
2436
+ }), Lr = (e, t = !0) => ({
2437
+ label: e,
2438
+ type: "textField",
2439
+ isConfigProperty: t
2440
+ }), Rr = (e, t = !1, n = !1) => ({
2441
+ type: "toggle",
2442
+ label: e,
2443
+ isConfigProperty: t,
2444
+ disabled: n
2445
+ }), zr = (e) => typeof e == "string" ? {
2446
+ label: e,
2447
+ value: e
2448
+ } : e, Br = function() {
2449
+ let [e, t, n = !1] = Array.prototype.slice.call(arguments);
2450
+ return {
2451
+ type: "radio",
2452
+ label: e,
2453
+ choices: t && t.map((e) => zr(e)),
2454
+ isConfigProperty: n
2455
+ };
2456
+ }, Vr = (e, t, n = !1) => ({
2457
+ type: "dropdown",
2458
+ label: e,
2459
+ choices: t,
2460
+ isConfigProperty: n
2461
+ }), Hr = (e, t, n = !1) => ({
2462
+ ...t,
2463
+ label: e,
2464
+ type: "numberField",
2465
+ isConfigProperty: n
2466
+ }), Ur = (e, t, n = !1) => (Object.keys(t).map((e) => {
2467
+ t[e] = Hr(t[e].label, t[e], n);
2468
+ }), {
2469
+ type: "numberFields",
2470
+ label: e,
2471
+ fields: t
2472
+ }), Wr = (e, t, n = !1) => ({
2473
+ ...t,
2474
+ label: e,
2475
+ type: "checkbox",
2476
+ isConfigProperty: n
2477
+ }), Gr = (e, t, n = !1) => (Object.keys(t).map((e) => {
2478
+ t[e] = Wr(t[e].label, t[e], n);
2479
+ }), {
2480
+ type: "checkboxes",
2481
+ label: e,
2482
+ choices: t
2483
+ });
2484
+ //#endregion
2485
+ //#region ../../lib-react/config-ui/dist/index.js
2486
+ function Kr(e) {
2487
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
2488
+ }
2489
+ function qr(e, t) {
2490
+ return !e || Kr(e) ? e : Kr(e.default) ? e.default : t && Kr(e[t]) ? e[t] : t && Kr(e[t]?.default) ? e[t].default : e;
2491
+ }
2492
+ var Jr = qr(ye, "InputContainer") || qr(Zr.InputContainer, "InputContainer"), Yr = me, Xr = Yr.default, Zr = Xr && typeof Xr == "object" ? Xr : Yr, Qr = k(/*#__PURE__*/ K("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "Info"), $r = "imes|riangle|an|heta|herefore", ei = "throot|parallel|cong|approx|eq|e|sim", ti = RegExp(`(\\t(?!${$r}))|(\\n(?!${ei}))|(\\\\t(?!${$r}))|(\\\\n(?!${ei}))`, "g"), ni = (e) => e.replace(ti, "").replace(/\\"/g, "\"").replace(/\\\//g, "/"), ri = (e = "") => {
2493
+ let t = document.createElement("div");
2494
+ return t.innerHTML = e.trim(), t;
2495
+ }, ii = (e) => {
2496
+ let t = ri(ni(e || "") || ""), n = 0;
2497
+ return t.querySelectorAll("[data-type=\"explicit_constructed_response\"]").forEach((e) => {
2498
+ e.replaceWith(`{{${n++}}}`);
2499
+ }), t.innerHTML;
2500
+ }, ai = /\{\{(\d+)\}\}/g, oi = (e, t) => e ? ni(e).replace(ai, (e, n) => `<span data-type="explicit_constructed_response" data-index="${n}" data-value="${d(t[n][0].label || "")}"></span>`) : "", si = (e) => e <= 2 ? e + 2 : e <= 4 ? e + 3 : e <= 6 ? e + 4 : e + 5, ci = (e) => typeof e == "string" ? e.replace(/<\/?[^>]+(>|$)/g, "") : "", li = (e) => new DOMParser().parseFromString(e, "text/html").body.textContent || "", ui = V(H)(({ theme: e }) => ({
2501
+ backgroundColor: e.palette.common.white,
2502
+ outline: "none",
2503
+ lineHeight: "15px"
2504
+ })), di = class extends G.Component {
2505
+ static propTypes = {
2506
+ correctChoice: Q.default.object,
2507
+ node: Q.default.object,
2508
+ pos: Q.default.number,
2509
+ onDone: Q.default.func,
2510
+ onChangeResponse: Q.default.func.isRequired,
2511
+ onToolbarDone: Q.default.func.isRequired,
2512
+ value: Q.default.shape({
2513
+ change: Q.default.func.isRequired,
2514
+ document: Q.default.shape({ getNextText: Q.default.func.isRequired })
2515
+ }),
2516
+ editor: Q.default.object,
2517
+ maxLengthPerChoiceEnabled: Q.default.bool,
2518
+ pluginProps: Q.default.object,
2519
+ spellCheck: Q.default.bool
2520
+ };
2521
+ state = {
2522
+ markup: "",
2523
+ toolbarStyle: {}
2524
+ };
2525
+ componentDidMount() {
2526
+ let { correctChoice: e, node: t, editor: n } = this.props, r = e || {}, i = n.view.nodeDOM(n.state.selection.from);
2527
+ if (i?.nodeType === 1) {
2528
+ let e = i.getBoundingClientRect(), t = i.closest(".tiptap").getBoundingClientRect();
2529
+ e.top - t.top, e.left - t.left, this.setState({
2530
+ markup: r.label,
2531
+ toolbarStyle: {
2532
+ position: "absolute",
2533
+ top: 0,
2534
+ left: 0,
2535
+ width: `${e.width - 4}px`
2536
+ }
2537
+ });
2538
+ }
2539
+ }
2540
+ onDone = (e) => {
2541
+ let { editor: t, node: n, onToolbarDone: r, onChangeResponse: i, pos: a } = this.props, o = ci(e);
2542
+ this.setState({ markup: o });
2543
+ let { tr: s } = t.state, c = s.doc.nodeAt(a);
2544
+ if (!c || c.isText || !c.isAtom || !c.isInline) return !1;
2545
+ s.setNodeMarkup(a, void 0, {
2546
+ ...n.attrs,
2547
+ value: o
2548
+ }), t.view.dispatch(s), r(!0), i(o);
2549
+ };
2550
+ onRespAreaChange = (e) => {
2551
+ this.setState({ respAreaMarkup: e });
2552
+ };
2553
+ onKeyDown = (e) => e.key === "Enter";
2554
+ onBlur = () => {
2555
+ this.clickedInside &&= !1;
2556
+ };
2557
+ render() {
2558
+ let { maxLengthPerChoiceEnabled: e, pluginProps: t, spellCheck: n } = this.props, { markup: r, toolbarStyle: i } = this.state, a = e ? {} : { maxLength: 25 };
2559
+ return /* @__PURE__ */ K("div", {
2560
+ style: i,
2561
+ children: /* @__PURE__ */ K(ui, {
2562
+ autoFocus: !0,
2563
+ disableUnderline: !0,
2564
+ onChange: (e) => {
2565
+ this.preventDone || this.onRespAreaChange(e);
2566
+ },
2567
+ onDone: (e) => {
2568
+ this.preventDone || this.onDone(e);
2569
+ },
2570
+ onBlur: (e) => {
2571
+ this.preventDone = e.relatedTarget && e.relatedTarget.closest(".insert-character-dialog"), this.onBlur(e);
2572
+ },
2573
+ onKeyDown: this.onKeyDown,
2574
+ markup: r || "",
2575
+ activePlugins: ["languageCharacters"],
2576
+ pluginProps: t,
2577
+ languageCharactersProps: [{ language: "spanish" }],
2578
+ minHeight: "15px",
2579
+ maxHeight: "15px",
2580
+ spellCheck: n,
2581
+ autoWidthToolbar: !0,
2582
+ toolbarOpts: {
2583
+ minWidth: "auto",
2584
+ isHidden: !!t?.characters?.disabled
2585
+ },
2586
+ ...a
2587
+ })
2588
+ });
2589
+ }
2590
+ }, fi = V("div")(({ theme: e }) => ({ marginBottom: e.spacing(.5) })), pi = V("div")(({ theme: e }) => ({
2591
+ alignItems: "flex-start",
2592
+ flexDirection: "column",
2593
+ display: "flex",
2594
+ paddingTop: e.spacing(2.5),
2595
+ "& > *": {
2596
+ marginBottom: e.spacing(2.5),
2597
+ width: "100%"
2598
+ }
2599
+ })), mi = V(H)(({ theme: e, hasError: t }) => ({
2600
+ flex: "1",
2601
+ marginRight: e.spacing(2.5),
2602
+ ...t && {
2603
+ border: `2px solid ${e.palette.error.main}`,
2604
+ borderRadius: "6px"
2605
+ }
2606
+ })), hi = V(oe)(({ theme: e }) => ({ "& svg": { fill: e.palette.grey[600] } })), gi = V("div")({
2607
+ alignItems: "flex-end",
2608
+ display: "flex",
2609
+ justifyContent: "space-between",
2610
+ width: "100%"
2611
+ }), _i = V("div")({
2612
+ alignItems: "center",
2613
+ display: "flex"
2614
+ }), vi = V(ie)(({ theme: e }) => ({
2615
+ width: "230px",
2616
+ marginRight: e.spacing(2.5),
2617
+ "& .MuiInput-underline:before": { borderBottomColor: e.palette.divider },
2618
+ "& .MuiInput-underline:hover:not(.Mui-disabled):before": { borderBottomColor: e.palette.text.primary },
2619
+ "& .MuiInput-underline:after": { borderBottomColor: e.palette.primary.main }
2620
+ })), yi = V("div")(({ theme: e }) => ({
2621
+ fontSize: e.typography.fontSize - 2,
2622
+ color: e.palette.error.main,
2623
+ paddingTop: e.spacing(.5)
2624
+ })), bi = V("div")({
2625
+ alignItems: "center",
2626
+ display: "flex",
2627
+ justifyContent: "space-between"
2628
+ }), xi = class extends G.Component {
2629
+ static propTypes = {
2630
+ error: Q.default.string,
2631
+ markup: Q.default.string,
2632
+ onChange: Q.default.func.isRequired,
2633
+ onDelete: Q.default.func.isRequired,
2634
+ value: Q.default.string,
2635
+ spellCheck: Q.default.bool,
2636
+ showMaxLength: Q.default.bool,
2637
+ pluginProps: Q.default.object
2638
+ };
2639
+ state = { value: this.props.markup };
2640
+ updateText = c(this.props.onChange, 300);
2641
+ UNSAFE_componentWillReceiveProps(e) {
2642
+ e.markup && this.setState({ value: e.markup });
2643
+ }
2644
+ onChange = (e) => {
2645
+ let t = ci(e);
2646
+ this.setState({ value: t }), this.updateText(t);
2647
+ };
2648
+ onKeyDown = (e) => {
2649
+ if (e.key === "Enter") return !0;
2650
+ };
2651
+ render() {
2652
+ let { value: e } = this.state, { onDelete: t, spellCheck: n, error: r, showMaxLength: i, pluginProps: a } = this.props, o = i ? {} : { maxLength: 25 };
2653
+ return /* @__PURE__ */ q(G.Fragment, { children: [/* @__PURE__ */ q(bi, { children: [/* @__PURE__ */ K(mi, {
2654
+ hasError: !!r,
2655
+ disableUnderline: !0,
2656
+ onChange: this.onChange,
2657
+ onKeyDown: this.onKeyDown,
2658
+ markup: e || "",
2659
+ activePlugins: ["languageCharacters"],
2660
+ pluginProps: a,
2661
+ languageCharactersProps: [{ language: "spanish" }],
2662
+ spellCheck: n,
2663
+ autoWidthToolbar: !0,
2664
+ toolbarOpts: {
2665
+ minWidth: "auto",
2666
+ isHidden: !!a?.characters?.disabled
2667
+ },
2668
+ ...o
2669
+ }), /* @__PURE__ */ K(hi, {
2670
+ "aria-label": "delete",
2671
+ onClick: t,
2672
+ size: "large",
2673
+ children: /* @__PURE__ */ K(ve, {})
2674
+ })] }), r && /* @__PURE__ */ K(yi, { children: r })] });
2675
+ }
2676
+ }, Si = class extends G.Component {
2677
+ static propTypes = {
2678
+ choices: Q.default.array,
2679
+ selectChoices: Q.default.array.isRequired,
2680
+ errors: Q.default.object,
2681
+ onSelect: Q.default.func.isRequired,
2682
+ choiceChanged: Q.default.func.isRequired,
2683
+ lengthChanged: Q.default.func,
2684
+ choiceRemoved: Q.default.func.isRequired,
2685
+ value: Q.default.string,
2686
+ maxLength: Q.default.number,
2687
+ showMaxLength: Q.default.bool,
2688
+ spellCheck: Q.default.bool,
2689
+ pluginProps: Q.default.object
2690
+ };
2691
+ state = {};
2692
+ UNSAFE_componentWillReceiveProps(e) {
2693
+ this.updateChoicesIfNeeded(e);
2694
+ }
2695
+ componentDidMount() {
2696
+ this.updateChoicesIfNeeded(this.props);
2697
+ }
2698
+ updateChoicesIfNeeded = (e) => {
2699
+ (!this.state.choices || !l(e.choices, this.state.choices) || !l(e.choices, this.props.choices)) && this.setState({ choices: e.choices });
2700
+ };
2701
+ handleSelect = (e) => {
2702
+ let { onSelect: t, selectChoices: n } = this.props, { value: r } = e.target;
2703
+ t(n.find((e) => e.value === r));
2704
+ };
2705
+ onAddChoice = () => {
2706
+ let { choices: e } = this.state;
2707
+ if (e.length && e[e.length - 1].label !== "") {
2708
+ let n = t(e.map((e) => parseInt(e.value)).filter((e) => !isNaN(e))) || 0;
2709
+ this.setState({ choices: [...e, {
2710
+ value: `${n + 1}`,
2711
+ label: ""
2712
+ }] });
2713
+ }
2714
+ };
2715
+ onChoiceChanged = (e, t, n) => {
2716
+ let { choiceChanged: r, lengthChanged: i, maxLength: a, choices: o } = this.props, s = o.map((e) => li(e.label || "").length);
2717
+ s[n] = li(t).length;
2718
+ let c = Math.max(...s);
2719
+ r({
2720
+ ...e,
2721
+ label: t
2722
+ }), (c > a || c + 10 <= a) && i(si(c));
2723
+ };
2724
+ onRemoveChoice = (e) => {
2725
+ let { choiceRemoved: t } = this.props;
2726
+ t(e.value);
2727
+ };
2728
+ getChoicesMaxLength = () => {
2729
+ let { choices: e } = this.state;
2730
+ if (!e) return 1;
2731
+ let t = e.map((e) => li(e.label || "").length);
2732
+ return Math.max(...t);
2733
+ };
2734
+ changeLength = (e) => {
2735
+ let { lengthChanged: t } = this.props, n = parseInt(e.target.value, 10), r = this.getChoicesMaxLength();
2736
+ n && n >= r && n <= r + 10 && t(n);
2737
+ };
2738
+ render() {
2739
+ let { selectChoices: e, maxLength: t, showMaxLength: n, value: r, spellCheck: i, errors: a, pluginProps: o } = this.props, { choices: s } = this.state, c = this.getChoicesMaxLength();
2740
+ return /* @__PURE__ */ q(fi, { children: [
2741
+ /* @__PURE__ */ q(gi, { children: [/* @__PURE__ */ q(_e, {
2742
+ variant: "standard",
2743
+ displayEmpty: !0,
2744
+ onChange: this.handleSelect,
2745
+ value: r || "",
2746
+ readOnly: n,
2747
+ MenuProps: { transitionDuration: {
2748
+ enter: 225,
2749
+ exit: 195
2750
+ } },
2751
+ children: [/* @__PURE__ */ K(pe, {
2752
+ value: "",
2753
+ children: /* @__PURE__ */ K("em", { children: r ? "Remove selection" : "Select a response" })
2754
+ }), e.map((e, t) => /* @__PURE__ */ K(pe, {
2755
+ value: e?.value,
2756
+ children: li(e?.label)
2757
+ }, t))]
2758
+ }), s && s.length > 0 && /* @__PURE__ */ q(_i, { children: [t && n && /* @__PURE__ */ K(vi, {
2759
+ variant: "standard",
2760
+ label: "Maximum length (characters)",
2761
+ type: "number",
2762
+ inputProps: {
2763
+ min: c,
2764
+ max: c + 10
2765
+ },
2766
+ value: t,
2767
+ onChange: this.changeLength
2768
+ }), /* @__PURE__ */ K(be, {
2769
+ variant: "contained",
2770
+ color: "primary",
2771
+ onClick: this.onAddChoice,
2772
+ children: "Add"
2773
+ })] })] }),
2774
+ a && a[0] && /* @__PURE__ */ K(yi, { children: a[0] }),
2775
+ /* @__PURE__ */ K(pi, { children: s && s.map((e, t) => t > 0 && /* @__PURE__ */ K(xi, {
2776
+ markup: e.label,
2777
+ onChange: (n) => this.onChoiceChanged(e, n, t),
2778
+ onDelete: () => this.onRemoveChoice(e),
2779
+ spellCheck: i,
2780
+ error: a && a[t],
2781
+ showMaxLength: n,
2782
+ pluginProps: o
2783
+ }, t)) })
2784
+ ] });
2785
+ }
2786
+ }, Ci = class extends G.Component {
2787
+ static propTypes = {
2788
+ choicesErrors: Q.default.object,
2789
+ model: Q.default.object.isRequired,
2790
+ onChange: Q.default.func.isRequired,
2791
+ onLengthChange: Q.default.func.isRequired,
2792
+ maxLengthPerChoiceEnabled: Q.default.bool.isRequired,
2793
+ spellCheck: Q.default.bool,
2794
+ pluginProps: Q.default.object
2795
+ };
2796
+ state = { maxLengthPerChoice: a(this.props.model.maxLengthPerChoice) };
2797
+ UNSAFE_componentWillReceiveProps(e) {
2798
+ this.updateChoicesIfNeeded(e);
2799
+ }
2800
+ componentDidMount() {
2801
+ this.updateChoicesIfNeeded(this.props);
2802
+ }
2803
+ updateChoicesIfNeeded = (e) => {
2804
+ if (!this.state.choices || !l(this.state.choices, e.model.choices) || !l(e.model.choices, this.props.model.choices) || this.state.values && Object.keys(this.state.values).length !== Object.keys(this.props.model.choices).length || e.maxLengthPerChoiceEnabled !== this.props.maxLengthPerChoiceEnabled) {
2805
+ let { choices: t, maxLengthPerChoice: r } = e.model, i = n(t, (t, n, r) => (n && (e.maxLengthPerChoiceEnabled || n.length > 1) && (t[r] = n[0]), t), {});
2806
+ this.setState({
2807
+ choices: e.model.choices,
2808
+ values: i,
2809
+ maxLengthPerChoice: a(r)
2810
+ });
2811
+ }
2812
+ };
2813
+ getRemainingChoices = (e) => {
2814
+ let { choices: t } = this.state;
2815
+ return n(t, (t, n, r) => (n && n.length === 1 && !e && t.push({
2816
+ label: n[0].label,
2817
+ value: r
2818
+ }), t), []);
2819
+ };
2820
+ onChoiceChanged = (e, t) => {
2821
+ let { onChange: n } = this.props, { choices: r } = this.state, i = r[t] || [], a = !i.find((t) => t.value === e.value), o = i.reduce((t, n) => {
2822
+ let r = n.value === e.value ? e : n;
2823
+ return t.push(r), t;
2824
+ }, []);
2825
+ a && o.push(e), n({
2826
+ ...r,
2827
+ [t]: o
2828
+ });
2829
+ };
2830
+ onChoiceRemoved = (e, t) => {
2831
+ let { onChange: n } = this.props, { choices: r } = this.state, i = (r[t] || []).reduce((t, n) => (n.value === e || t.push(n), t), []);
2832
+ n({
2833
+ ...r,
2834
+ [t]: i
2835
+ });
2836
+ };
2837
+ onSectionSelect = (e, t) => {
2838
+ let { onChange: n } = this.props, { choices: r, values: i } = this.state;
2839
+ r[t] && r[t].length > 1 ? e || n({
2840
+ ...r,
2841
+ [t]: [r[t][0]]
2842
+ }) : this.setState({
2843
+ choices: {
2844
+ ...r,
2845
+ [t]: [...r[t], {
2846
+ label: "",
2847
+ value: "1"
2848
+ }]
2849
+ },
2850
+ values: {
2851
+ ...i,
2852
+ [t]: r[t][0]
2853
+ }
2854
+ });
2855
+ };
2856
+ onLengthChanged = (e, t) => {
2857
+ let { model: n, onLengthChange: r } = this.props, { maxLengthPerChoice: i } = n;
2858
+ i[t] = e, r(i);
2859
+ };
2860
+ render() {
2861
+ let { choices: e } = this.state, { model: { maxLengthPerChoice: t, maxLengthPerChoiceEnabled: n }, spellCheck: r, choicesErrors: i, pluginProps: a } = this.props;
2862
+ return /* @__PURE__ */ q("div", { children: [s(e, (e, o) => {
2863
+ if (e && (n || e.length > 1)) {
2864
+ let s = this.state.values[o];
2865
+ return /* @__PURE__ */ K(Si, {
2866
+ value: s && s.value,
2867
+ errors: i && i[o],
2868
+ onSelect: (e) => this.onSectionSelect(e, o),
2869
+ choiceChanged: (e) => this.onChoiceChanged(e, o),
2870
+ choiceRemoved: (e) => this.onChoiceRemoved(e, o),
2871
+ lengthChanged: (e) => this.onLengthChanged(e, o),
2872
+ selectChoices: [s],
2873
+ choices: e,
2874
+ maxLength: t[o],
2875
+ showMaxLength: n,
2876
+ spellCheck: r,
2877
+ pluginProps: a
2878
+ }, o);
2879
+ }
2880
+ }), e && Object.keys(this.state.values).length !== Object.keys(e).length && /* @__PURE__ */ K(Si, {
2881
+ value: "",
2882
+ onSelect: (e) => this.onSectionSelect(e, e.value),
2883
+ choiceChanged: (e) => this.onChoiceChanged(e),
2884
+ choiceRemoved: (e) => this.onChoiceRemoved(e),
2885
+ selectChoices: this.getRemainingChoices(),
2886
+ spellCheck: r,
2887
+ pluginProps: a
2888
+ })] });
2889
+ }
2890
+ }, wi = (e) => {
2891
+ let { maxResponseAreas: t } = e;
2892
+ return "Validation requirements:" + ("\nCorrect answers should not be blank.\nEach answer defined for a response area should be unique.\nThere should be at least 1 " + (t ? `and at most ${t} ` : "") + "response area" + (t ? "s" : "") + " defined.");
2893
+ }, { toggle: $, Panel: Ti, dropdown: Ei } = Ir, Di = V(Jr)(({ theme: e }) => ({
2894
+ width: "100%",
2895
+ paddingTop: e.spacing(1),
2896
+ marginTop: e.spacing(2),
2897
+ marginBottom: e.spacing(2)
2898
+ })), Oi = V(H)(({ theme: e }) => ({
2899
+ minHeight: "100px",
2900
+ paddingTop: e.spacing(1),
2901
+ width: "100%",
2902
+ "& [data-slate-editor=\"true\"]": { minHeight: "100px" }
2903
+ })), ki = V(B)(({ theme: e }) => ({ fontSize: e.typography.fontSize + 2 })), Ai = V(Nt)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
2904
+ fontSize: e.typography.fontSize - 2,
2905
+ whiteSpace: "pre",
2906
+ maxWidth: "500px"
2907
+ } })), ji = V("div")(({ theme: e }) => ({
2908
+ fontSize: e.typography.fontSize - 2,
2909
+ color: e.palette.error.main,
2910
+ paddingTop: e.spacing(1)
2911
+ })), Mi = V("div")({
2912
+ display: "flex",
2913
+ alignItems: "center"
2914
+ }), Ni = V(B)(({ theme: e }) => ({
2915
+ fontSize: e.typography.fontSize + 2,
2916
+ marginTop: e.spacing(3),
2917
+ marginBottom: e.spacing(1)
2918
+ })), Pi = (e) => {
2919
+ let t = document.createElement("div");
2920
+ return t.innerHTML = e.trim(), t;
2921
+ }, Fi = class extends G.Component {
2922
+ static propTypes = {
2923
+ configuration: Q.default.object.isRequired,
2924
+ model: Q.default.object.isRequired,
2925
+ disableSidePanel: Q.default.bool,
2926
+ onModelChanged: Q.default.func.isRequired,
2927
+ onConfigurationChanged: Q.default.func.isRequired,
2928
+ imageSupport: Q.default.shape({
2929
+ add: Q.default.func.isRequired,
2930
+ delete: Q.default.func.isRequired
2931
+ }),
2932
+ uploadSoundSupport: Q.default.object
2933
+ };
2934
+ state = {};
2935
+ componentDidMount() {
2936
+ let { model: { slateMarkup: e, choices: t, maxLengthPerChoice: n = [] }, onModelChanged: r } = this.props, i = !n.length;
2937
+ this.setState({ markup: e }), Object.values(t).forEach((e, t) => {
2938
+ let r = e.map((e) => li(e.label || "").length), a = Math.max(...r);
2939
+ (i || !n[t] || n[t] < a || n[t] > a + 10) && (n[t] = si(a));
2940
+ }), r({ maxLengthPerChoice: n });
2941
+ }
2942
+ onModelChange = (e) => {
2943
+ this.props.onModelChanged({ ...e });
2944
+ };
2945
+ onPromptChanged = (e) => {
2946
+ this.props.onModelChanged({ prompt: e });
2947
+ };
2948
+ onRationaleChanged = (e) => {
2949
+ this.props.onModelChanged({ rationale: e });
2950
+ };
2951
+ onTeacherInstructionsChanged = (e) => {
2952
+ let { onModelChanged: t } = this.props;
2953
+ t({ teacherInstructions: e });
2954
+ };
2955
+ onMarkupChanged = (e) => {
2956
+ this.props.onModelChanged({ slateMarkup: e });
2957
+ };
2958
+ onResponsesChanged = (e) => {
2959
+ this.props.onModelChanged({ choices: e });
2960
+ };
2961
+ onLengthChanged = (e) => {
2962
+ let { onModelChanged: t } = this.props;
2963
+ t({ maxLengthPerChoice: e });
2964
+ };
2965
+ onChangeResponse = (e, t) => {
2966
+ let { model: n, onModelChanged: r } = this.props, { choices: i } = n, { maxLengthPerChoice: a } = n, o = li(t || "").length;
2967
+ if (!i[e] || !i[e].length) {
2968
+ i[e] = [{
2969
+ label: t || "",
2970
+ value: "0"
2971
+ }];
2972
+ let n = e > a.length ? e - a.length : 0;
2973
+ a = [...a, ...Array(n).fill(1)], a.splice(e, 0, si(o));
2974
+ } else i[e][0].label = t || "", a && (a[e] < o || a[e] > o + 10) && (a[e] = si(o));
2975
+ r({
2976
+ choices: i,
2977
+ maxLengthPerChoice: a
2978
+ });
2979
+ };
2980
+ onChange = (e) => {
2981
+ let { model: { choices: t, maxLengthPerChoice: n }, onModelChanged: r } = this.props, i = Pi(e), o = i.querySelectorAll("[data-type=\"explicit_constructed_response\"]"), s = {}, c = [];
2982
+ o.forEach((e, r) => {
2983
+ let i = a(t[e.dataset.index]);
2984
+ i && (i[0] = {
2985
+ label: e.dataset.value || "",
2986
+ value: "0"
2987
+ }, c[r] = n[e.dataset.index]), s[r] = i, e.dataset.index = r;
2988
+ }), this.setState({ cachedChoices: void 0 }, () => r({
2989
+ choices: s,
2990
+ slateMarkup: i.innerHTML,
2991
+ maxLengthPerChoice: c
2992
+ }));
2993
+ };
2994
+ onHandleAreaChange = i((e) => {
2995
+ let { model: { choices: t }, onModelChanged: n } = this.props, { cachedChoices: r } = this.state;
2996
+ if (!e) return;
2997
+ let i = t ? a(t) : {}, o = r ? a(r) : {};
2998
+ e.forEach((e) => {
2999
+ let t = e.index;
3000
+ !i[t] && o[t] ? (Object.assign(i, h(o, t)), Object.prototype.hasOwnProperty.call(o, t) && delete o[t]) : (Object.assign(o, h(i, t)), Object.prototype.hasOwnProperty.call(i, t) && delete i[t]);
3001
+ }), this.setState({ cachedChoices: o }, () => n({ choices: i }));
3002
+ }, 500, {
3003
+ trailing: !1,
3004
+ leading: !0
3005
+ });
3006
+ render() {
3007
+ let { model: e, configuration: t, onConfigurationChanged: n, imageSupport: r, uploadSoundSupport: i } = this.props, { baseInputConfiguration: a = {}, contentDimensions: o = {}, maxImageWidth: s = {}, maxImageHeight: c = {}, maxLengthPerChoice: l = {}, maxResponseAreas: u, partialScoring: d = {}, playerSpellCheck: f = {}, prompt: m = {}, rationale: h = {}, template: g = {}, settingsPanelDisabled: _, spellCheck: v = {}, editSource: y = {}, teacherInstructions: b = {}, withRubric: x = {}, mathMlOptions: S = {}, language: C = {}, languageChoices: w = {}, spanishButton: T = {}, responseAreaInputConfiguration: E = {} } = t || {}, { errors: D, extraCSSRules: O, maxLengthPerChoiceEnabled: k, promptEnabled: A, rationaleEnabled: j, spellCheckEnabled: M, teacherInstructionsEnabled: N, toolbarEditorPosition: P } = e || {}, { choices: F = {}, prompt: ee, rationale: I, responseAreas: te, teacherInstructions: ne } = D || {}, re = wi(t), ie = s && s.prompt, L = c && c.prompt, ae = { position: P === "top" ? "top" : "bottom" }, oe = {
3008
+ partialScoring: d.settings && $(d.label),
3009
+ maxLengthPerChoiceEnabled: l.settings && $(l.label),
3010
+ "language.enabled": C.settings && $(C.label, !0),
3011
+ language: C.settings && C.enabled && Ei(w.label, w.options),
3012
+ "responseAreaInputConfiguration.inputConfiguration.characters.disabled": T.settings && $(T.label, !0)
3013
+ }, R = {
3014
+ teacherInstructionsEnabled: b.settings && $(b.label),
3015
+ rationaleEnabled: h.settings && $(h.label),
3016
+ promptEnabled: m.settings && $(m.label),
3017
+ spellCheckEnabled: v.settings && $(v.label),
3018
+ playerSpellCheckEnabled: f.settings && $(f.label),
3019
+ rubricEnabled: x?.settings && $(x?.label),
3020
+ "editSource.enabled": y?.settings && $(y.label, !0)
3021
+ }, z = (e = {}) => ({
3022
+ ...a,
3023
+ ...e
3024
+ });
3025
+ return /* @__PURE__ */ q(sr.ConfigLayout, {
3026
+ extraCSSRules: O,
3027
+ dimensions: o,
3028
+ hideSettings: _,
3029
+ settings: /* @__PURE__ */ K(Ti, {
3030
+ model: e,
3031
+ configuration: t,
3032
+ onChangeModel: (e) => this.onModelChange(e),
3033
+ onChangeConfiguration: (e) => n(e, !0),
3034
+ groups: {
3035
+ Settings: oe,
3036
+ Properties: R
3037
+ }
3038
+ }),
3039
+ children: [
3040
+ N && /* @__PURE__ */ q(Di, {
3041
+ label: b.label,
3042
+ children: [/* @__PURE__ */ K(H, {
3043
+ className: "prompt",
3044
+ markup: e.teacherInstructions || "",
3045
+ onChange: this.onTeacherInstructionsChanged,
3046
+ imageSupport: r,
3047
+ nonEmpty: !1,
3048
+ error: ne,
3049
+ toolbarOpts: ae,
3050
+ pluginProps: z(b?.inputConfiguration),
3051
+ spellCheck: M,
3052
+ maxImageWidth: s && s.teacherInstructions || ie,
3053
+ maxImageHeight: c && c.teacherInstructions || L,
3054
+ uploadSoundSupport: i,
3055
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
3056
+ mathMlOptions: S,
3057
+ autoWidthToolbar: !0
3058
+ }), ne && /* @__PURE__ */ K(ji, { children: ne })]
3059
+ }),
3060
+ A && /* @__PURE__ */ q(Di, {
3061
+ label: m.label,
3062
+ children: [/* @__PURE__ */ K(H, {
3063
+ className: "prompt",
3064
+ markup: e.prompt,
3065
+ onChange: this.onPromptChanged,
3066
+ imageSupport: r,
3067
+ nonEmpty: !1,
3068
+ disableUnderline: !0,
3069
+ error: ee,
3070
+ toolbarOpts: ae,
3071
+ pluginProps: z(m?.inputConfiguration),
3072
+ spellCheck: M,
3073
+ maxImageWidth: ie,
3074
+ maxImageHeight: L,
3075
+ uploadSoundSupport: i,
3076
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
3077
+ mathMlOptions: S,
3078
+ autoWidthToolbar: !0
3079
+ }), ee && /* @__PURE__ */ K(ji, { children: ee })]
3080
+ }),
3081
+ /* @__PURE__ */ q(Mi, { children: [/* @__PURE__ */ K(ki, {
3082
+ component: "div",
3083
+ children: "Define Template, Choices, and Correct Responses"
3084
+ }), /* @__PURE__ */ K(Ai, {
3085
+ disableFocusListener: !0,
3086
+ disableTouchListener: !0,
3087
+ placement: "right",
3088
+ title: re,
3089
+ children: /* @__PURE__ */ K(Qr, {
3090
+ fontSize: "small",
3091
+ color: "primary",
3092
+ style: { marginLeft: "8px" }
3093
+ })
3094
+ })] }),
3095
+ /* @__PURE__ */ K(Oi, {
3096
+ activePlugins: se,
3097
+ toolbarOpts: { position: "top" },
3098
+ spellCheck: M,
3099
+ pluginProps: z(g?.inputConfiguration),
3100
+ responseAreaProps: {
3101
+ type: "explicit-constructed-response",
3102
+ options: { duplicates: !0 },
3103
+ maxResponseAreas: u,
3104
+ respAreaToolbar: (e, t, n) => {
3105
+ let [r, i] = e, { model: a } = this.props, o = (a.choices[r.attrs.index] || [])[0];
3106
+ return () => /* @__PURE__ */ K(di, {
3107
+ onChangeResponse: (e) => this.onChangeResponse(r.attrs.index, e),
3108
+ node: r,
3109
+ pos: i,
3110
+ editor: t,
3111
+ onToolbarDone: n,
3112
+ correctChoice: o,
3113
+ maxLengthPerChoiceEnabled: k,
3114
+ pluginProps: z(E?.inputConfiguration)
3115
+ });
3116
+ },
3117
+ error: () => F,
3118
+ onHandleAreaChange: this.onHandleAreaChange
3119
+ },
3120
+ markup: e.slateMarkup,
3121
+ onChange: this.onChange,
3122
+ imageSupport: r,
3123
+ disableImageAlignmentButtons: !0,
3124
+ onBlur: this.onBlur,
3125
+ disabled: !1,
3126
+ highlightShape: !1,
3127
+ error: te,
3128
+ uploadSoundSupport: i,
3129
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
3130
+ mathMlOptions: S,
3131
+ autoWidthToolbar: !0
3132
+ }),
3133
+ te && /* @__PURE__ */ K(ji, { children: te }),
3134
+ !p(e.choices) && /* @__PURE__ */ K(Ni, { children: `Define Alternates ${k ? "and Character Limits" : ""}` }),
3135
+ /* @__PURE__ */ K(Ci, {
3136
+ model: e,
3137
+ onChange: this.onResponsesChanged,
3138
+ onLengthChange: this.onLengthChanged,
3139
+ maxLengthPerChoiceEnabled: k,
3140
+ spellCheck: M,
3141
+ choicesErrors: F,
3142
+ pluginProps: z(E?.inputConfiguration)
3143
+ }),
3144
+ j && /* @__PURE__ */ q(Di, {
3145
+ label: h.label,
3146
+ children: [/* @__PURE__ */ K(H, {
3147
+ className: "prompt",
3148
+ markup: e.rationale || "",
3149
+ onChange: this.onRationaleChanged,
3150
+ imageSupport: r,
3151
+ error: I,
3152
+ toolbarOpts: ae,
3153
+ pluginProps: z(h?.inputConfiguration),
3154
+ spellCheck: M,
3155
+ maxImageWidth: s && s.rationale || ie,
3156
+ maxImageHeight: c && c.rationale || L,
3157
+ uploadSoundSupport: i,
3158
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
3159
+ mathMlOptions: S,
3160
+ autoWidthToolbar: !0
3161
+ }), I && /* @__PURE__ */ K(ji, { children: I })]
3162
+ })
3163
+ ]
3164
+ });
3165
+ }
3166
+ }, Ii = {
3167
+ model: {
3168
+ choices: {},
3169
+ displayType: "block",
3170
+ markup: "",
3171
+ maxLengthPerChoiceEnabled: !0,
3172
+ playerSpellCheckEnabled: !0,
3173
+ prompt: "",
3174
+ promptEnabled: !0,
3175
+ rationale: "",
3176
+ rationaleEnabled: !0,
3177
+ spellCheckEnabled: !0,
3178
+ studentInstructionsEnabled: !0,
3179
+ teacherInstructions: "",
3180
+ teacherInstructionsEnabled: !0,
3181
+ toolbarEditorPosition: "bottom",
3182
+ responseAreaInputConfiguration: {}
3183
+ },
3184
+ configuration: {
3185
+ baseInputConfiguration: {
3186
+ h3: { disabled: !0 },
3187
+ html: { disabled: !0 },
3188
+ audio: { disabled: !1 },
3189
+ video: { disabled: !1 },
3190
+ image: { disabled: !1 },
3191
+ textAlign: { disabled: !0 },
3192
+ showParagraphs: { disabled: !1 },
3193
+ separateParagraphs: { disabled: !0 }
3194
+ },
3195
+ prompt: {
3196
+ settings: !0,
3197
+ label: "Prompt",
3198
+ inputConfiguration: {
3199
+ audio: { disabled: !1 },
3200
+ video: { disabled: !1 },
3201
+ image: { disabled: !1 }
3202
+ },
3203
+ required: !1
3204
+ },
3205
+ partialScoring: {
3206
+ settings: !1,
3207
+ label: "Allow Partial Scoring"
3208
+ },
3209
+ rationale: {
3210
+ settings: !0,
3211
+ label: "Rationale",
3212
+ inputConfiguration: {
3213
+ audio: { disabled: !1 },
3214
+ video: { disabled: !1 },
3215
+ image: { disabled: !1 }
3216
+ },
3217
+ required: !1
3218
+ },
3219
+ settingsPanelDisabled: !1,
3220
+ spellCheck: {
3221
+ label: "Spellcheck",
3222
+ settings: !1,
3223
+ enabled: !0
3224
+ },
3225
+ editSource: {
3226
+ label: "Edit Source",
3227
+ settings: !1,
3228
+ enabled: !1
3229
+ },
3230
+ playerSpellCheck: {
3231
+ label: "Student Spellcheck",
3232
+ settings: !0,
3233
+ enabled: !0
3234
+ },
3235
+ teacherInstructions: {
3236
+ settings: !0,
3237
+ label: "Teacher Instructions",
3238
+ inputConfiguration: {
3239
+ audio: { disabled: !1 },
3240
+ video: { disabled: !1 },
3241
+ image: { disabled: !1 }
3242
+ },
3243
+ required: !1
3244
+ },
3245
+ template: { inputConfiguration: {
3246
+ audio: { disabled: !1 },
3247
+ video: { disabled: !1 },
3248
+ image: { disabled: !1 },
3249
+ h3: { disabled: !0 },
3250
+ blockquote: { disabled: !0 }
3251
+ } },
3252
+ maxLengthPerChoice: {
3253
+ settings: !0,
3254
+ label: "Maximum Length Per Choice"
3255
+ },
3256
+ maxResponseAreas: 10,
3257
+ maxImageWidth: {
3258
+ teacherInstructions: 300,
3259
+ prompt: 300,
3260
+ rationale: 300
3261
+ },
3262
+ maxImageHeight: {
3263
+ teacherInstructions: 300,
3264
+ prompt: 300,
3265
+ rationale: 300
3266
+ },
3267
+ withRubric: {
3268
+ settings: !1,
3269
+ label: "Add Rubric"
3270
+ },
3271
+ mathMlOptions: {
3272
+ mmlOutput: !1,
3273
+ mmlEditing: !1
3274
+ },
3275
+ language: {
3276
+ settings: !1,
3277
+ label: "Specify Language",
3278
+ enabled: !1
3279
+ },
3280
+ languageChoices: {
3281
+ label: "Language Choices",
3282
+ options: []
3283
+ },
3284
+ responseAreaInputConfiguration: { inputConfiguration: { characters: { disabled: !0 } } },
3285
+ spanishButton: {
3286
+ settings: !0,
3287
+ label: "Disable Spanish Characters"
3288
+ }
3289
+ }
3290
+ }, Li = (0, Oe.default)("explicit-constructed-response:configure"), Ri = class e extends HTMLElement {
3291
+ static prepareModel = (e = {}) => {
3292
+ let t = {
3293
+ ...Ii.model,
3294
+ ...e
3295
+ }, n = t.slateMarkup || oi(t.markup, t.choices), r = ii(n);
3296
+ return t.choices && Object.keys(t.choices).forEach((e) => {
3297
+ f(t.choices[e]) && (t.choices[e] = (t.choices[e] || []).map((e, t) => e.value ? e : (Li("Choice does not contain \"value\" property, which is required.", e), {
3298
+ value: `${t}`,
3299
+ ...e
3300
+ })));
3301
+ }), {
3302
+ ...t,
3303
+ slateMarkup: n,
3304
+ markup: r
3305
+ };
3306
+ };
3307
+ constructor() {
3308
+ super(), this._root = null, this._model = e.prepareModel(), this._configuration = Ii.configuration;
3309
+ }
3310
+ set model(t) {
3311
+ this._model = e.prepareModel(t), this._model.responseAreaInputConfiguration && (this._model.responseAreaInputConfiguration = this._configuration.responseAreaInputConfiguration?.inputConfiguration), this._render();
3312
+ }
3313
+ set configuration(e) {
3314
+ this._configuration = g(e, Ii.configuration), e.language?.enabled ? e.languageChoices?.options?.length && (this._model.language = e.languageChoices.options[0].value) : e.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
3315
+ value: this._model.language,
3316
+ label: this._model.language
3317
+ })) : delete this._model.language, this._render();
3318
+ }
3319
+ set disableSidePanel(e) {
3320
+ this._disableSidePanel = e, this._render();
3321
+ }
3322
+ dispatchModelUpdated(e) {
3323
+ let t = !!e;
3324
+ this.dispatchEvent(new ke(this._model, t));
3325
+ }
3326
+ onModelChanged = (t, n) => {
3327
+ this._model = e.prepareModel({
3328
+ ...this._model,
3329
+ ...t
3330
+ }), this._render(), this.dispatchModelUpdated(n);
3331
+ };
3332
+ onConfigurationChanged = (e) => {
3333
+ this._configuration = e;
3334
+ let t = this._configuration?.responseAreaInputConfiguration?.inputConfiguration;
3335
+ this._model = {
3336
+ ...this._model,
3337
+ responseAreaInputConfiguration: t
3338
+ }, this.onModelChanged(this._model);
3339
+ };
3340
+ insertImage(e) {
3341
+ this.dispatchEvent(new je(e));
3342
+ }
3343
+ onDeleteImage(e, t) {
3344
+ this.dispatchEvent(new Ae(e, t));
3345
+ }
3346
+ insertSound(e) {
3347
+ this.dispatchEvent(new Ne(e));
3348
+ }
3349
+ onDeleteSound(e, t) {
3350
+ this.dispatchEvent(new Me(e, t));
3351
+ }
3352
+ _render() {
3353
+ Li("_render");
3354
+ let e = G.createElement(Fi, {
3355
+ model: this._model,
3356
+ configuration: this._configuration,
3357
+ onModelChanged: this.onModelChanged,
3358
+ onConfigurationChanged: this.onConfigurationChanged,
3359
+ disableSidePanel: this._disableSidePanel,
3360
+ imageSupport: {
3361
+ add: this.insertImage.bind(this),
3362
+ delete: this.onDeleteImage.bind(this)
3363
+ },
3364
+ uploadSoundSupport: {
3365
+ add: this.insertSound.bind(this),
3366
+ delete: this.onDeleteSound.bind(this)
3367
+ }
3368
+ });
3369
+ this._root ||= Ee(this), this._root.render(e);
3370
+ }
3371
+ disconnectedCallback() {
3372
+ this._root && this._root.unmount();
3373
+ }
3374
+ };
3375
+ //#endregion
3376
+ export { Ri as default };
3377
+
3378
+ //# sourceMappingURL=index.js.map