@pie-element/placement-ordering 14.1.2-next.7 → 14.1.2-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +723 -615
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +275 -267
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{drag-provider-BdfhGCEU.js → drag-provider-B5wazJHM.js} +745 -743
- package/dist/browser/drag-provider-B5wazJHM.js.map +1 -0
- package/dist/delivery/keyboard-coordinates.d.ts +24 -12
- package/dist/delivery/keyboard-coordinates.js +31 -28
- package/dist/delivery/ordering.js +1 -0
- package/dist/delivery/placement-ordering.js +29 -25
- package/dist/index.iife.js +21 -21
- package/package.json +6 -6
- package/dist/browser/drag-provider-BdfhGCEU.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as e, E as t, O as n, S as r, T as i, _ as a, c as o, d as s, f as c, i as l, k as u, l as d, o as f, p, r as m, t as h, w as g, x as _, y as v } from "../browser-Bd36Xf5z.js";
|
|
2
|
-
import { $ as y, A as b, At as x, B as S, C, Ct as w, D as ee, Dt as T, E as te, Et as E, F as ne, Ft as re, G as ie, H as D, I as ae, It as oe, J as se, K as ce, L as le, Lt as ue, M as O, Mt as de, N as k, Nt as fe, O as pe, Ot as me, P as he, Pt as ge, Q as _e, R as ve, Rt as ye, S as be, St as xe, Tt as A, U as Se, V as j, W as Ce, X as we, Y as Te, Z as Ee, _ as De, _t as Oe, a as ke, b as Ae, bt as je, d as Me, dt as Ne, et as Pe, f as Fe, ft as Ie, g as Le, gt as Re, h as ze, ht as Be, i as Ve, it as He, j as Ue, jt as We, k as Ge, kt as Ke, m as qe, mt as M, n as Je, nt as Ye, o as Xe, p as Ze, pt as Qe, q as $e, r as et, rt as tt, st as N, t as nt, tt as rt, vt as it, w as at, wt as ot, x as st, xt as ct, y as lt, yt as ut, z as dt, zt as ft } from "../drag-provider-
|
|
2
|
+
import { $ as y, A as b, At as x, B as S, C, Ct as w, D as ee, Dt as T, E as te, Et as E, F as ne, Ft as re, G as ie, H as D, I as ae, It as oe, J as se, K as ce, L as le, Lt as ue, M as O, Mt as de, N as k, Nt as fe, O as pe, Ot as me, P as he, Pt as ge, Q as _e, R as ve, Rt as ye, S as be, St as xe, Tt as A, U as Se, V as j, W as Ce, X as we, Y as Te, Z as Ee, _ as De, _t as Oe, a as ke, b as Ae, bt as je, d as Me, dt as Ne, et as Pe, f as Fe, ft as Ie, g as Le, gt as Re, h as ze, ht as Be, i as Ve, it as He, j as Ue, jt as We, k as Ge, kt as Ke, m as qe, mt as M, n as Je, nt as Ye, o as Xe, p as Ze, pt as Qe, q as $e, r as et, rt as tt, st as N, t as nt, tt as rt, vt as it, w as at, wt as ot, x as st, xt as ct, y as lt, yt as ut, z as dt, zt as ft } from "../drag-provider-B5wazJHM.js";
|
|
3
3
|
import * as P from "react";
|
|
4
4
|
import pt, { Component as mt, createContext as ht, createElement as gt, createRef as _t, forwardRef as vt, memo as yt, useCallback as bt, useContext as xt, useDebugValue as St, useEffect as Ct, useLayoutEffect as wt, useMemo as Tt, useRef as Et, useState as Dt, version as Ot } from "react";
|
|
5
5
|
import { createRoot as kt } from "react-dom/client";
|
|
@@ -40544,8 +40544,8 @@ xS.create({
|
|
|
40544
40544
|
})) ?? null };
|
|
40545
40545
|
}
|
|
40546
40546
|
});
|
|
40547
|
-
var lJ = "placeholder", uJ = new kf("tiptap__placeholder")
|
|
40548
|
-
function
|
|
40547
|
+
var lJ = "placeholder", uJ = new kf("tiptap__placeholder");
|
|
40548
|
+
function dJ(e) {
|
|
40549
40549
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
40550
40550
|
return o && u.push(l), wv.node(i, i + a.nodeSize, {
|
|
40551
40551
|
class: u.join(" "),
|
|
@@ -40557,156 +40557,198 @@ function fJ(e) {
|
|
|
40557
40557
|
}) : n
|
|
40558
40558
|
});
|
|
40559
40559
|
}
|
|
40560
|
-
function
|
|
40560
|
+
function fJ(e, t) {
|
|
40561
|
+
return typeof e == "function" ? e(t) : e;
|
|
40562
|
+
}
|
|
40563
|
+
function pJ({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
40564
|
+
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
40565
|
+
return r.nodesBetween(a, o, (r, i) => {
|
|
40566
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && kx(r);
|
|
40567
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(dJ({
|
|
40568
|
+
editor: e,
|
|
40569
|
+
isEmptyDoc: l,
|
|
40570
|
+
dataAttribute: n,
|
|
40571
|
+
hasAnchor: a,
|
|
40572
|
+
placeholder: t.placeholder,
|
|
40573
|
+
classes: {
|
|
40574
|
+
emptyEditor: t.emptyEditorClass,
|
|
40575
|
+
emptyNode: fJ(t.emptyNodeClass, {
|
|
40576
|
+
editor: e,
|
|
40577
|
+
node: r,
|
|
40578
|
+
pos: i,
|
|
40579
|
+
hasAnchor: a
|
|
40580
|
+
})
|
|
40581
|
+
},
|
|
40582
|
+
node: r,
|
|
40583
|
+
pos: i
|
|
40584
|
+
})), t.includeChildren;
|
|
40585
|
+
}), c;
|
|
40586
|
+
}
|
|
40587
|
+
function mJ({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
40561
40588
|
if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
|
|
40562
|
-
let { anchor: a } = i, o = [], s = e.isEmpty
|
|
40563
|
-
emptyEditor: t.emptyEditorClass,
|
|
40564
|
-
emptyNode: t.emptyNodeClass
|
|
40565
|
-
};
|
|
40589
|
+
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
40566
40590
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
40567
|
-
let i = r.resolve(a),
|
|
40568
|
-
if (
|
|
40569
|
-
let r = a >=
|
|
40570
|
-
o.push(
|
|
40591
|
+
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
40592
|
+
if (c && c.type.isTextblock && kx(c)) {
|
|
40593
|
+
let r = a >= l && a <= l + c.nodeSize;
|
|
40594
|
+
o.push(dJ({
|
|
40571
40595
|
editor: e,
|
|
40572
40596
|
isEmptyDoc: s,
|
|
40573
40597
|
dataAttribute: n,
|
|
40574
40598
|
hasAnchor: r,
|
|
40575
40599
|
placeholder: t.placeholder,
|
|
40576
|
-
classes:
|
|
40577
|
-
|
|
40578
|
-
|
|
40600
|
+
classes: {
|
|
40601
|
+
emptyEditor: t.emptyEditorClass,
|
|
40602
|
+
emptyNode: fJ(t.emptyNodeClass, {
|
|
40603
|
+
editor: e,
|
|
40604
|
+
node: c,
|
|
40605
|
+
pos: l,
|
|
40606
|
+
hasAnchor: r
|
|
40607
|
+
})
|
|
40608
|
+
},
|
|
40609
|
+
node: c,
|
|
40610
|
+
pos: l
|
|
40579
40611
|
}));
|
|
40580
40612
|
}
|
|
40581
|
-
} else {
|
|
40582
|
-
|
|
40583
|
-
|
|
40584
|
-
|
|
40585
|
-
|
|
40586
|
-
|
|
40587
|
-
|
|
40588
|
-
|
|
40589
|
-
|
|
40590
|
-
placeholder: t.placeholder,
|
|
40591
|
-
classes: c,
|
|
40592
|
-
node: r,
|
|
40593
|
-
pos: i
|
|
40594
|
-
})), t.includeChildren;
|
|
40595
|
-
});
|
|
40596
|
-
}
|
|
40613
|
+
} else o.push(...pJ({
|
|
40614
|
+
editor: e,
|
|
40615
|
+
options: t,
|
|
40616
|
+
dataAttribute: n,
|
|
40617
|
+
doc: r,
|
|
40618
|
+
selection: i,
|
|
40619
|
+
from: 0,
|
|
40620
|
+
to: r.content.size
|
|
40621
|
+
}));
|
|
40597
40622
|
return Dv.create(r, o);
|
|
40598
40623
|
}
|
|
40599
|
-
function
|
|
40600
|
-
|
|
40624
|
+
function hJ(e, t) {
|
|
40625
|
+
let n = e.resolve(t);
|
|
40626
|
+
if (n.depth === 0) {
|
|
40627
|
+
let e = n.nodeAfter ?? n.nodeBefore;
|
|
40628
|
+
if (!e) return {
|
|
40629
|
+
from: t,
|
|
40630
|
+
to: t
|
|
40631
|
+
};
|
|
40632
|
+
let r = n.nodeAfter ? t : t - e.nodeSize;
|
|
40633
|
+
return {
|
|
40634
|
+
from: r,
|
|
40635
|
+
to: r + e.nodeSize
|
|
40636
|
+
};
|
|
40637
|
+
}
|
|
40638
|
+
let r = n.before(1);
|
|
40639
|
+
return {
|
|
40640
|
+
from: r,
|
|
40641
|
+
to: r + n.node(1).nodeSize
|
|
40642
|
+
};
|
|
40601
40643
|
}
|
|
40602
|
-
function
|
|
40603
|
-
|
|
40604
|
-
|
|
40644
|
+
function gJ(e, t) {
|
|
40645
|
+
return {
|
|
40646
|
+
from: Math.max(0, t.from - 1),
|
|
40647
|
+
to: Math.min(e.content.size, t.to - 1)
|
|
40648
|
+
};
|
|
40605
40649
|
}
|
|
40606
|
-
function
|
|
40607
|
-
let
|
|
40608
|
-
|
|
40609
|
-
|
|
40610
|
-
|
|
40611
|
-
|
|
40612
|
-
|
|
40613
|
-
|
|
40614
|
-
|
|
40615
|
-
|
|
40616
|
-
|
|
40617
|
-
|
|
40618
|
-
|
|
40619
|
-
|
|
40650
|
+
function _J(e, t, n) {
|
|
40651
|
+
let r = [];
|
|
40652
|
+
return e.forEach((e, i) => {
|
|
40653
|
+
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
40654
|
+
s < n && c > t && r.push({
|
|
40655
|
+
from: a,
|
|
40656
|
+
to: o
|
|
40657
|
+
});
|
|
40658
|
+
}), r;
|
|
40659
|
+
}
|
|
40660
|
+
function vJ(e) {
|
|
40661
|
+
if (e.length === 0) return [];
|
|
40662
|
+
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
40663
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
40664
|
+
let r = n[n.length - 1], i = t[e];
|
|
40665
|
+
i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
|
|
40620
40666
|
}
|
|
40621
|
-
return
|
|
40667
|
+
return n;
|
|
40622
40668
|
}
|
|
40623
|
-
function
|
|
40624
|
-
|
|
40625
|
-
|
|
40626
|
-
bottom: window.innerHeight
|
|
40627
|
-
} : e.getBoundingClientRect();
|
|
40669
|
+
function yJ(e, t) {
|
|
40670
|
+
let n = _J(e, t.from, t.to);
|
|
40671
|
+
return n.push(gJ(e, hJ(e, t.from))), t.to > t.from ? n.push(gJ(e, hJ(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(gJ(e, hJ(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
40628
40672
|
}
|
|
40629
|
-
function
|
|
40630
|
-
let r =
|
|
40631
|
-
|
|
40632
|
-
|
|
40633
|
-
|
|
40634
|
-
|
|
40635
|
-
|
|
40636
|
-
bottom: e.content.size
|
|
40637
|
-
};
|
|
40638
|
-
let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
|
|
40639
|
-
left: s,
|
|
40640
|
-
top: a + 2
|
|
40641
|
-
}), l = t.posAtCoords({
|
|
40642
|
-
left: s,
|
|
40643
|
-
top: o - 2
|
|
40644
|
-
});
|
|
40645
|
-
return {
|
|
40646
|
-
top: c ? c.pos : 0,
|
|
40647
|
-
bottom: l ? l.pos : e.content.size
|
|
40648
|
-
};
|
|
40673
|
+
function bJ(e, t, n) {
|
|
40674
|
+
let r = [];
|
|
40675
|
+
if (e.docChanged) {
|
|
40676
|
+
let t = vx(e);
|
|
40677
|
+
for (let e of t) r.push(...yJ(n.doc, e.newRange));
|
|
40678
|
+
}
|
|
40679
|
+
return e.selectionSet && (r.push(gJ(n.doc, hJ(n.doc, e.mapping.map(t.selection.anchor)))), r.push(gJ(n.doc, hJ(n.doc, n.selection.anchor)))), vJ(r);
|
|
40649
40680
|
}
|
|
40650
|
-
|
|
40651
|
-
|
|
40652
|
-
|
|
40653
|
-
|
|
40654
|
-
|
|
40655
|
-
|
|
40656
|
-
|
|
40657
|
-
|
|
40658
|
-
|
|
40659
|
-
|
|
40660
|
-
|
|
40661
|
-
|
|
40662
|
-
|
|
40663
|
-
|
|
40664
|
-
|
|
40665
|
-
|
|
40681
|
+
function xJ(e, t, n) {
|
|
40682
|
+
let r = Math.max(0, Math.min(e, n.content.size));
|
|
40683
|
+
return {
|
|
40684
|
+
from: r,
|
|
40685
|
+
to: Math.max(r, Math.min(t, n.content.size))
|
|
40686
|
+
};
|
|
40687
|
+
}
|
|
40688
|
+
function SJ({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
40689
|
+
let s = e;
|
|
40690
|
+
for (let e of t) {
|
|
40691
|
+
let { from: t, to: c } = xJ(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
40692
|
+
l.length && (s = s.remove(l));
|
|
40693
|
+
let u = pJ({
|
|
40694
|
+
editor: n,
|
|
40695
|
+
options: r,
|
|
40696
|
+
dataAttribute: i,
|
|
40697
|
+
doc: a,
|
|
40698
|
+
selection: o,
|
|
40699
|
+
from: t,
|
|
40700
|
+
to: c
|
|
40701
|
+
});
|
|
40702
|
+
u.length && (s = s.add(a, u));
|
|
40666
40703
|
}
|
|
40667
|
-
|
|
40668
|
-
|
|
40669
|
-
|
|
40670
|
-
|
|
40671
|
-
|
|
40672
|
-
|
|
40673
|
-
|
|
40674
|
-
|
|
40675
|
-
|
|
40676
|
-
|
|
40677
|
-
|
|
40678
|
-
|
|
40679
|
-
|
|
40680
|
-
|
|
40681
|
-
|
|
40682
|
-
|
|
40683
|
-
|
|
40684
|
-
|
|
40685
|
-
|
|
40686
|
-
|
|
40687
|
-
|
|
40688
|
-
|
|
40689
|
-
|
|
40690
|
-
r !== null && cancelAnimationFrame(r), t.removeEventListener("scroll", a);
|
|
40704
|
+
return s;
|
|
40705
|
+
}
|
|
40706
|
+
function CJ({ editor: e, options: t, dataAttribute: n }) {
|
|
40707
|
+
return {
|
|
40708
|
+
init(r, i) {
|
|
40709
|
+
return mJ({
|
|
40710
|
+
editor: e,
|
|
40711
|
+
options: t,
|
|
40712
|
+
dataAttribute: n,
|
|
40713
|
+
doc: i.doc,
|
|
40714
|
+
selection: i.selection
|
|
40715
|
+
}) ?? Dv.empty;
|
|
40716
|
+
},
|
|
40717
|
+
apply(r, i, a, o) {
|
|
40718
|
+
return !r.docChanged && !r.selectionSet ? i : SJ({
|
|
40719
|
+
decorations: i.map(r.mapping, r.doc),
|
|
40720
|
+
ranges: bJ(r, a, o),
|
|
40721
|
+
editor: e,
|
|
40722
|
+
options: t,
|
|
40723
|
+
dataAttribute: n,
|
|
40724
|
+
doc: o.doc,
|
|
40725
|
+
selection: o.selection
|
|
40726
|
+
});
|
|
40691
40727
|
}
|
|
40692
40728
|
};
|
|
40693
40729
|
}
|
|
40694
|
-
function
|
|
40695
|
-
|
|
40730
|
+
function wJ(e) {
|
|
40731
|
+
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
40732
|
+
}
|
|
40733
|
+
function TJ({ editor: e, options: t }) {
|
|
40734
|
+
let n = t.dataAttribute ? `data-${wJ(t.dataAttribute)}` : `data-${lJ}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
40696
40735
|
return new Ef({
|
|
40697
40736
|
key: uJ,
|
|
40698
|
-
state:
|
|
40699
|
-
|
|
40700
|
-
|
|
40737
|
+
...r ? {} : { state: CJ({
|
|
40738
|
+
editor: e,
|
|
40739
|
+
options: t,
|
|
40740
|
+
dataAttribute: n
|
|
40741
|
+
}) },
|
|
40742
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => mJ({
|
|
40701
40743
|
editor: e,
|
|
40702
40744
|
options: t,
|
|
40703
40745
|
dataAttribute: n,
|
|
40704
40746
|
doc: r,
|
|
40705
40747
|
selection: i
|
|
40706
|
-
}) }
|
|
40748
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Dv.empty : uJ.getState(n) ?? Dv.empty }
|
|
40707
40749
|
});
|
|
40708
40750
|
}
|
|
40709
|
-
var
|
|
40751
|
+
var EJ = xS.create({
|
|
40710
40752
|
name: "placeholder",
|
|
40711
40753
|
addOptions() {
|
|
40712
40754
|
return {
|
|
@@ -40720,12 +40762,25 @@ var SJ = xS.create({
|
|
|
40720
40762
|
};
|
|
40721
40763
|
},
|
|
40722
40764
|
addProseMirrorPlugins() {
|
|
40723
|
-
return [
|
|
40765
|
+
return [TJ({
|
|
40724
40766
|
editor: this.editor,
|
|
40725
40767
|
options: this.options
|
|
40726
40768
|
})];
|
|
40727
40769
|
}
|
|
40728
40770
|
});
|
|
40771
|
+
function DJ(e, t) {
|
|
40772
|
+
return !e.selection.empty && !Ax(e.selection) && t.isEditable;
|
|
40773
|
+
}
|
|
40774
|
+
function OJ(e, t) {
|
|
40775
|
+
return DJ(e, t) && !t.isFocused && !t.view.dragging;
|
|
40776
|
+
}
|
|
40777
|
+
function kJ() {
|
|
40778
|
+
var e;
|
|
40779
|
+
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
40780
|
+
}
|
|
40781
|
+
function AJ(e) {
|
|
40782
|
+
e.focus();
|
|
40783
|
+
}
|
|
40729
40784
|
xS.create({
|
|
40730
40785
|
name: "selection",
|
|
40731
40786
|
addOptions() {
|
|
@@ -40735,13 +40790,25 @@ xS.create({
|
|
|
40735
40790
|
let { editor: e, options: t } = this;
|
|
40736
40791
|
return [new Ef({
|
|
40737
40792
|
key: new kf("selection"),
|
|
40738
|
-
props: {
|
|
40739
|
-
|
|
40740
|
-
|
|
40793
|
+
props: {
|
|
40794
|
+
decorations(n) {
|
|
40795
|
+
return OJ(n, e) ? Dv.create(n.doc, [wv.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
40796
|
+
},
|
|
40797
|
+
handleDOMEvents: {
|
|
40798
|
+
blur(t) {
|
|
40799
|
+
return DJ(t.state, e) && kJ(), !1;
|
|
40800
|
+
},
|
|
40801
|
+
focus(t) {
|
|
40802
|
+
return DJ(t.state, e) && requestAnimationFrame(() => {
|
|
40803
|
+
!e.isDestroyed && t.hasFocus() && AJ(t);
|
|
40804
|
+
}), !1;
|
|
40805
|
+
}
|
|
40806
|
+
}
|
|
40807
|
+
}
|
|
40741
40808
|
})];
|
|
40742
40809
|
}
|
|
40743
40810
|
});
|
|
40744
|
-
function
|
|
40811
|
+
function jJ({ types: e, node: t }) {
|
|
40745
40812
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
40746
40813
|
}
|
|
40747
40814
|
xS.create({
|
|
@@ -40763,7 +40830,7 @@ xS.create({
|
|
|
40763
40830
|
state: {
|
|
40764
40831
|
init: (e, t) => {
|
|
40765
40832
|
let r = t.tr.doc.lastChild;
|
|
40766
|
-
return !
|
|
40833
|
+
return !jJ({
|
|
40767
40834
|
node: r,
|
|
40768
40835
|
types: n
|
|
40769
40836
|
});
|
|
@@ -40771,7 +40838,7 @@ xS.create({
|
|
|
40771
40838
|
apply: (e, t) => {
|
|
40772
40839
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
40773
40840
|
let r = e.doc.lastChild;
|
|
40774
|
-
return !
|
|
40841
|
+
return !jJ({
|
|
40775
40842
|
node: r,
|
|
40776
40843
|
types: n
|
|
40777
40844
|
});
|
|
@@ -40806,7 +40873,7 @@ xS.create({
|
|
|
40806
40873
|
};
|
|
40807
40874
|
}
|
|
40808
40875
|
});
|
|
40809
|
-
var
|
|
40876
|
+
var MJ = pS.create({
|
|
40810
40877
|
name: "superscript",
|
|
40811
40878
|
addOptions() {
|
|
40812
40879
|
return { HTMLAttributes: {} };
|
|
@@ -40836,7 +40903,7 @@ var wJ = pS.create({
|
|
|
40836
40903
|
addKeyboardShortcuts() {
|
|
40837
40904
|
return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
|
|
40838
40905
|
}
|
|
40839
|
-
}),
|
|
40906
|
+
}), NJ = pS.create({
|
|
40840
40907
|
name: "subscript",
|
|
40841
40908
|
addOptions() {
|
|
40842
40909
|
return { HTMLAttributes: {} };
|
|
@@ -40866,7 +40933,7 @@ var wJ = pS.create({
|
|
|
40866
40933
|
addKeyboardShortcuts() {
|
|
40867
40934
|
return { "Mod-,": () => this.editor.commands.toggleSubscript() };
|
|
40868
40935
|
}
|
|
40869
|
-
}),
|
|
40936
|
+
}), PJ = xS.create({
|
|
40870
40937
|
name: "textAlign",
|
|
40871
40938
|
addOptions() {
|
|
40872
40939
|
return {
|
|
@@ -40908,7 +40975,7 @@ var wJ = pS.create({
|
|
|
40908
40975
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
40909
40976
|
};
|
|
40910
40977
|
}
|
|
40911
|
-
}),
|
|
40978
|
+
}), FJ = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, IJ = ZS.create({
|
|
40912
40979
|
name: "image",
|
|
40913
40980
|
addOptions() {
|
|
40914
40981
|
return {
|
|
@@ -40951,34 +41018,55 @@ var wJ = pS.create({
|
|
|
40951
41018
|
},
|
|
40952
41019
|
addNodeView() {
|
|
40953
41020
|
if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
|
|
40954
|
-
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize
|
|
40955
|
-
|
|
40956
|
-
|
|
40957
|
-
|
|
41021
|
+
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize, i = /* @__PURE__ */ new Set([
|
|
41022
|
+
"src",
|
|
41023
|
+
"width",
|
|
41024
|
+
"height"
|
|
41025
|
+
]);
|
|
41026
|
+
return ({ node: a, getPos: o, HTMLAttributes: s, editor: c }) => {
|
|
41027
|
+
let l = document.createElement("img");
|
|
41028
|
+
l.draggable = !1;
|
|
41029
|
+
let u = tx(this.options.HTMLAttributes, s);
|
|
41030
|
+
Object.entries(u).forEach(([e, t]) => {
|
|
40958
41031
|
if (t != null) switch (e) {
|
|
41032
|
+
case "src":
|
|
40959
41033
|
case "width":
|
|
40960
41034
|
case "height": break;
|
|
40961
|
-
default:
|
|
40962
|
-
c.setAttribute(e, t);
|
|
40963
|
-
break;
|
|
41035
|
+
default: l.setAttribute(e, t);
|
|
40964
41036
|
}
|
|
40965
|
-
}),
|
|
40966
|
-
let
|
|
40967
|
-
|
|
40968
|
-
|
|
40969
|
-
|
|
40970
|
-
|
|
41037
|
+
}), u.src !== null && (l.src = u.src);
|
|
41038
|
+
let d = { ...s }, f = (e) => {
|
|
41039
|
+
if (typeof e == "string" && e !== "") {
|
|
41040
|
+
l.getAttribute("src") !== e && (l.src = e);
|
|
41041
|
+
return;
|
|
41042
|
+
}
|
|
41043
|
+
l.hasAttribute("src") && l.removeAttribute("src"), l.src !== "" && (l.src = "");
|
|
41044
|
+
};
|
|
41045
|
+
f(s.src);
|
|
41046
|
+
let p = new BS({
|
|
41047
|
+
element: l,
|
|
41048
|
+
editor: c,
|
|
41049
|
+
node: a,
|
|
41050
|
+
getPos: o,
|
|
40971
41051
|
onResize: (e, t) => {
|
|
40972
|
-
|
|
41052
|
+
l.style.width = `${e}px`, l.style.height = `${t}px`;
|
|
40973
41053
|
},
|
|
40974
41054
|
onCommit: (e, t) => {
|
|
40975
|
-
let n =
|
|
41055
|
+
let n = o();
|
|
40976
41056
|
n !== void 0 && this.editor.chain().setNodeSelection(n).updateAttributes(this.name, {
|
|
40977
41057
|
width: e,
|
|
40978
41058
|
height: t
|
|
40979
41059
|
}).run();
|
|
40980
41060
|
},
|
|
40981
|
-
onUpdate: (e
|
|
41061
|
+
onUpdate: (e) => {
|
|
41062
|
+
if (e.type !== a.type) return !1;
|
|
41063
|
+
let t = nx(e, c.extensionManager.attributes.filter((t) => t.type === e.type.name));
|
|
41064
|
+
return Object.keys(d).forEach((e) => {
|
|
41065
|
+
!i.has(e) && !(e in t) && l.removeAttribute(e);
|
|
41066
|
+
}), Object.entries(t).forEach(([e, t]) => {
|
|
41067
|
+
i.has(e) || (t == null ? l.removeAttribute(e) : l.setAttribute(e, t));
|
|
41068
|
+
}), f(t.src), d = t, !0;
|
|
41069
|
+
},
|
|
40982
41070
|
options: {
|
|
40983
41071
|
directions: e,
|
|
40984
41072
|
min: {
|
|
@@ -40987,10 +41075,10 @@ var wJ = pS.create({
|
|
|
40987
41075
|
},
|
|
40988
41076
|
preserveAspectRatio: r === !0
|
|
40989
41077
|
}
|
|
40990
|
-
}),
|
|
40991
|
-
|
|
40992
|
-
|
|
40993
|
-
|
|
41078
|
+
}), m = p.dom, h = () => {
|
|
41079
|
+
m.style.visibility = "", m.style.pointerEvents = "";
|
|
41080
|
+
};
|
|
41081
|
+
return m.style.visibility = "hidden", m.style.pointerEvents = "none", l.complete && l.naturalWidth > 0 ? h() : (l.onload = h, l.onerror = h), p;
|
|
40994
41082
|
};
|
|
40995
41083
|
},
|
|
40996
41084
|
addCommands() {
|
|
@@ -41001,7 +41089,7 @@ var wJ = pS.create({
|
|
|
41001
41089
|
},
|
|
41002
41090
|
addInputRules() {
|
|
41003
41091
|
return [LS({
|
|
41004
|
-
find:
|
|
41092
|
+
find: FJ,
|
|
41005
41093
|
type: this.type,
|
|
41006
41094
|
getAttributes: (e) => {
|
|
41007
41095
|
let [, , t, n, r] = e;
|
|
@@ -41013,17 +41101,17 @@ var wJ = pS.create({
|
|
|
41013
41101
|
}
|
|
41014
41102
|
})];
|
|
41015
41103
|
}
|
|
41016
|
-
}),
|
|
41104
|
+
}), LJ = EJ, RJ = {
|
|
41017
41105
|
position: "bottom",
|
|
41018
41106
|
alignment: "left",
|
|
41019
41107
|
alwaysVisible: !1,
|
|
41020
41108
|
showDone: !0,
|
|
41021
41109
|
doneOn: "blur"
|
|
41022
|
-
},
|
|
41110
|
+
}, zJ = {
|
|
41023
41111
|
options: {},
|
|
41024
41112
|
respAreaToolbar: () => {},
|
|
41025
41113
|
onHandleAreaChange: () => {}
|
|
41026
|
-
},
|
|
41114
|
+
}, BJ = [
|
|
41027
41115
|
"bold",
|
|
41028
41116
|
"italic",
|
|
41029
41117
|
"underline",
|
|
@@ -41045,7 +41133,7 @@ var wJ = pS.create({
|
|
|
41045
41133
|
"h3",
|
|
41046
41134
|
"undo",
|
|
41047
41135
|
"redo"
|
|
41048
|
-
],
|
|
41136
|
+
], VJ = {
|
|
41049
41137
|
"--white": "#fff",
|
|
41050
41138
|
"--black": "#2e2b29",
|
|
41051
41139
|
"--black-contrast": "#110f0e",
|
|
@@ -41064,14 +41152,18 @@ var wJ = pS.create({
|
|
|
41064
41152
|
"--red": "#ff5c33",
|
|
41065
41153
|
"--red-light": "#ffebe5",
|
|
41066
41154
|
"--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
|
|
41067
|
-
},
|
|
41155
|
+
}, HJ = (e) => ({
|
|
41156
|
+
spellcheck: e ? "true" : "false",
|
|
41157
|
+
autocorrect: e ? "on" : "off",
|
|
41158
|
+
autocapitalize: e ? "on" : "off"
|
|
41159
|
+
}), UJ = (e) => {
|
|
41068
41160
|
let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = Dt([]), [a, o] = Dt(!1), { toolbarOpts: s } = e, c = bt((e) => {
|
|
41069
41161
|
i((t) => {
|
|
41070
41162
|
let n = t.filter((t) => t.pos !== e);
|
|
41071
41163
|
return n.length === 0 && o(!1), n;
|
|
41072
41164
|
});
|
|
41073
41165
|
}, [i]), l = {
|
|
41074
|
-
...
|
|
41166
|
+
...RJ,
|
|
41075
41167
|
...s
|
|
41076
41168
|
}, u = bt((t) => {
|
|
41077
41169
|
let n = t.getHTML();
|
|
@@ -41082,13 +41174,13 @@ var wJ = pS.create({
|
|
|
41082
41174
|
e.onDone,
|
|
41083
41175
|
l.doneOn
|
|
41084
41176
|
]), d = Tt(() => ({
|
|
41085
|
-
...
|
|
41177
|
+
...zJ,
|
|
41086
41178
|
...e.responseAreaProps,
|
|
41087
41179
|
onInlineDropdownToolbarClose: u
|
|
41088
41180
|
}), [e.responseAreaProps, u]), f = Tt(() => {
|
|
41089
41181
|
let { customPlugins: t, ...n } = e.pluginProps || {};
|
|
41090
41182
|
t ||= [];
|
|
41091
|
-
let r = (e.activePlugins ||
|
|
41183
|
+
let r = (e.activePlugins || BJ)?.filter((e) => {
|
|
41092
41184
|
let t = vl[e] || e, r = n[t] || {};
|
|
41093
41185
|
return !r || !r.disabled;
|
|
41094
41186
|
});
|
|
@@ -41106,103 +41198,112 @@ var wJ = pS.create({
|
|
|
41106
41198
|
setKeypadInteraction: {},
|
|
41107
41199
|
media: {}
|
|
41108
41200
|
});
|
|
41109
|
-
}, [e, d.type]), m =
|
|
41110
|
-
|
|
41111
|
-
|
|
41112
|
-
|
|
41113
|
-
|
|
41114
|
-
|
|
41115
|
-
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
|
|
41119
|
-
|
|
41120
|
-
|
|
41121
|
-
|
|
41122
|
-
|
|
41123
|
-
|
|
41124
|
-
|
|
41125
|
-
|
|
41126
|
-
|
|
41127
|
-
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41132
|
-
|
|
41133
|
-
|
|
41134
|
-
|
|
41135
|
-
|
|
41201
|
+
}, [e, d.type]), m = [
|
|
41202
|
+
PJ.configure({
|
|
41203
|
+
types: [
|
|
41204
|
+
"heading",
|
|
41205
|
+
"paragraph",
|
|
41206
|
+
"div",
|
|
41207
|
+
"headingParagraph",
|
|
41208
|
+
"h1",
|
|
41209
|
+
"h2",
|
|
41210
|
+
"h3",
|
|
41211
|
+
"h4",
|
|
41212
|
+
"h5",
|
|
41213
|
+
"h6",
|
|
41214
|
+
"td",
|
|
41215
|
+
"th"
|
|
41216
|
+
],
|
|
41217
|
+
alignments: [
|
|
41218
|
+
"left",
|
|
41219
|
+
"right",
|
|
41220
|
+
"center",
|
|
41221
|
+
"justify"
|
|
41222
|
+
]
|
|
41223
|
+
}),
|
|
41224
|
+
sJ,
|
|
41225
|
+
cJ.configure({ limit: e.charactersLimit || 1e6 }),
|
|
41226
|
+
Zq.configure({
|
|
41227
|
+
trailingNode: {
|
|
41136
41228
|
node: "paragraph",
|
|
41137
41229
|
notAfter: ["paragraph", "div"]
|
|
41138
|
-
}
|
|
41139
|
-
|
|
41140
|
-
|
|
41141
|
-
|
|
41142
|
-
|
|
41143
|
-
|
|
41144
|
-
|
|
41145
|
-
|
|
41146
|
-
|
|
41147
|
-
|
|
41148
|
-
|
|
41149
|
-
|
|
41150
|
-
|
|
41151
|
-
|
|
41152
|
-
|
|
41153
|
-
|
|
41154
|
-
|
|
41155
|
-
|
|
41156
|
-
|
|
41157
|
-
|
|
41158
|
-
|
|
41159
|
-
|
|
41160
|
-
|
|
41161
|
-
|
|
41162
|
-
|
|
41163
|
-
|
|
41164
|
-
|
|
41165
|
-
|
|
41166
|
-
|
|
41167
|
-
|
|
41168
|
-
|
|
41169
|
-
|
|
41170
|
-
|
|
41171
|
-
|
|
41172
|
-
|
|
41173
|
-
|
|
41174
|
-
|
|
41175
|
-
|
|
41176
|
-
|
|
41177
|
-
|
|
41178
|
-
|
|
41179
|
-
|
|
41180
|
-
|
|
41181
|
-
|
|
41182
|
-
|
|
41183
|
-
|
|
41184
|
-
|
|
41185
|
-
|
|
41186
|
-
|
|
41187
|
-
|
|
41188
|
-
|
|
41189
|
-
|
|
41190
|
-
|
|
41191
|
-
|
|
41192
|
-
|
|
41193
|
-
|
|
41194
|
-
|
|
41195
|
-
|
|
41196
|
-
|
|
41197
|
-
|
|
41198
|
-
|
|
41199
|
-
|
|
41200
|
-
|
|
41201
|
-
|
|
41230
|
+
},
|
|
41231
|
+
link: {
|
|
41232
|
+
autolink: !1,
|
|
41233
|
+
linkOnPaste: !1
|
|
41234
|
+
}
|
|
41235
|
+
}),
|
|
41236
|
+
tz,
|
|
41237
|
+
kk,
|
|
41238
|
+
nz,
|
|
41239
|
+
Ak,
|
|
41240
|
+
jk,
|
|
41241
|
+
LJ.configure({
|
|
41242
|
+
placeholder: e.placeholder,
|
|
41243
|
+
showOnlyWhenEditable: !0,
|
|
41244
|
+
showOnlyCurrent: !1,
|
|
41245
|
+
includeChildren: !0
|
|
41246
|
+
}),
|
|
41247
|
+
Tk,
|
|
41248
|
+
lk,
|
|
41249
|
+
Ok,
|
|
41250
|
+
Dk,
|
|
41251
|
+
zI.configure(d),
|
|
41252
|
+
BI.configure(d),
|
|
41253
|
+
HI.configure(d),
|
|
41254
|
+
UI.configure(d),
|
|
41255
|
+
VI.configure(d),
|
|
41256
|
+
EL.configure({
|
|
41257
|
+
toolbarOpts: l,
|
|
41258
|
+
math: e.pluginProps?.math || {}
|
|
41259
|
+
}),
|
|
41260
|
+
NJ,
|
|
41261
|
+
MJ,
|
|
41262
|
+
IJ,
|
|
41263
|
+
qL.configure({
|
|
41264
|
+
toolbarOpts: l,
|
|
41265
|
+
imageHandling: {
|
|
41266
|
+
disableImageAlignmentButtons: e.disableImageAlignmentButtons,
|
|
41267
|
+
onDone: (t) => e.onDone?.(t.getHTML()),
|
|
41268
|
+
onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
|
|
41269
|
+
let { src: n } = t.attrs;
|
|
41270
|
+
e.imageSupport.delete(n, (e) => {
|
|
41271
|
+
c(t.pos);
|
|
41272
|
+
});
|
|
41273
|
+
}),
|
|
41274
|
+
insertImageRequested: e.imageSupport && ((t, n, r) => {
|
|
41275
|
+
let [o, s] = n, l = (n) => {
|
|
41276
|
+
let r;
|
|
41277
|
+
a && n && (r = e.onChange), c(s), r?.(t.getHTML());
|
|
41278
|
+
};
|
|
41279
|
+
t._insertingImage = !0, i((e) => [...e, o]), (() => {
|
|
41280
|
+
let n = r(l), i = p(() => {
|
|
41281
|
+
let e = () => window.removeEventListener("focus", i);
|
|
41282
|
+
if (!t._insertingImage) {
|
|
41283
|
+
e();
|
|
41284
|
+
return;
|
|
41285
|
+
}
|
|
41286
|
+
c(s), t._insertingImage = !1, e();
|
|
41287
|
+
}, 500);
|
|
41288
|
+
window.addEventListener("focus", i), e.imageSupport.add(n);
|
|
41289
|
+
})();
|
|
41290
|
+
}),
|
|
41291
|
+
maxImageWidth: e.maxImageWidth,
|
|
41292
|
+
maxImageHeight: e.maxImageHeight
|
|
41293
|
+
},
|
|
41294
|
+
limit: 3
|
|
41295
|
+
}),
|
|
41296
|
+
mR.configure({ uploadSoundSupport: e.uploadSoundSupport }),
|
|
41297
|
+
bR.configure({ extraCSSRules: e.extraCSSRules })
|
|
41298
|
+
], h = e.spellCheck !== !1, g = rj({
|
|
41299
|
+
extensions: m,
|
|
41202
41300
|
immediatelyRender: !1,
|
|
41203
|
-
editorProps: {
|
|
41204
|
-
|
|
41205
|
-
|
|
41301
|
+
editorProps: {
|
|
41302
|
+
attributes: HJ(h),
|
|
41303
|
+
handleKeyDown(t, n) {
|
|
41304
|
+
return e.onKeyDown ? e.onKeyDown(n) : !1;
|
|
41305
|
+
}
|
|
41306
|
+
},
|
|
41206
41307
|
editable: !e.disabled,
|
|
41207
41308
|
content: Cl(e.markup),
|
|
41208
41309
|
onUpdate: ({ editor: t, transaction: n }) => {
|
|
@@ -41213,22 +41314,29 @@ var wJ = pS.create({
|
|
|
41213
41314
|
}
|
|
41214
41315
|
}, [e.charactersLimit]);
|
|
41215
41316
|
Ct(() => {
|
|
41216
|
-
e.editorRef && e.editorRef(
|
|
41217
|
-
}, [e.editorRef,
|
|
41218
|
-
|
|
41219
|
-
}, [e.disabled,
|
|
41220
|
-
if (!
|
|
41317
|
+
e.editorRef && e.editorRef(g);
|
|
41318
|
+
}, [e.editorRef, g]), Ct(() => {
|
|
41319
|
+
g?.setEditable(!e.disabled);
|
|
41320
|
+
}, [e.disabled, g]), Ct(() => {
|
|
41321
|
+
if (!g) return;
|
|
41322
|
+
let e = g.options?.editorProps, t = HJ(h);
|
|
41323
|
+
e?.attributes?.spellcheck !== t.spellcheck && g.setOptions({ editorProps: {
|
|
41324
|
+
...e,
|
|
41325
|
+
attributes: t
|
|
41326
|
+
} });
|
|
41327
|
+
}, [h, g]), Ct(() => {
|
|
41328
|
+
if (!g) return;
|
|
41221
41329
|
let t = Cl(e.markup);
|
|
41222
|
-
t !==
|
|
41223
|
-
}, [e.markup,
|
|
41224
|
-
Object.entries(
|
|
41330
|
+
t !== g.getHTML() && g.commands.setContent(t, { emitUpdate: !1 });
|
|
41331
|
+
}, [e.markup, g]), Ct(() => {
|
|
41332
|
+
Object.entries(VJ).forEach(([e, t]) => {
|
|
41225
41333
|
document.documentElement.style.setProperty(e, t);
|
|
41226
41334
|
});
|
|
41227
41335
|
}, []);
|
|
41228
|
-
let
|
|
41229
|
-
editor:
|
|
41336
|
+
let _ = $A({
|
|
41337
|
+
editor: g,
|
|
41230
41338
|
selector: (e) => ({ isFocused: e.editor?.isFocused })
|
|
41231
|
-
}),
|
|
41339
|
+
}), v = Tt(() => {
|
|
41232
41340
|
let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
|
|
41233
41341
|
return {
|
|
41234
41342
|
width: rz(n),
|
|
@@ -41243,20 +41351,20 @@ var wJ = pS.create({
|
|
|
41243
41351
|
...e,
|
|
41244
41352
|
activePlugins: f,
|
|
41245
41353
|
toolbarOpts: l,
|
|
41246
|
-
editorState:
|
|
41247
|
-
editor:
|
|
41248
|
-
children:
|
|
41354
|
+
editorState: _,
|
|
41355
|
+
editor: g,
|
|
41356
|
+
children: g && /* @__PURE__ */ F(WJ, {
|
|
41249
41357
|
style: {
|
|
41250
|
-
minHeight:
|
|
41251
|
-
height:
|
|
41252
|
-
maxHeight:
|
|
41358
|
+
minHeight: v.minHeight,
|
|
41359
|
+
height: v.height,
|
|
41360
|
+
maxHeight: v.maxHeight
|
|
41253
41361
|
},
|
|
41254
41362
|
showParagraph: t && !t.disabled,
|
|
41255
41363
|
separateParagraph: n && !n.disabled,
|
|
41256
|
-
editor:
|
|
41364
|
+
editor: g
|
|
41257
41365
|
})
|
|
41258
41366
|
});
|
|
41259
|
-
},
|
|
41367
|
+
}, WJ = M(XA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
|
|
41260
41368
|
display: "flex",
|
|
41261
41369
|
outline: "none !important",
|
|
41262
41370
|
"& .ProseMirror": {
|
|
@@ -41284,26 +41392,26 @@ var wJ = pS.create({
|
|
|
41284
41392
|
} },
|
|
41285
41393
|
...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
|
|
41286
41394
|
}
|
|
41287
|
-
})),
|
|
41395
|
+
})), GJ = UJ;
|
|
41288
41396
|
//#endregion
|
|
41289
41397
|
//#region ../../lib-react/config-ui/dist/feedback-config/feedback-selector.js
|
|
41290
|
-
function
|
|
41398
|
+
function KJ(e) {
|
|
41291
41399
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
41292
41400
|
}
|
|
41293
|
-
function
|
|
41294
|
-
return !e ||
|
|
41401
|
+
function qJ(e, t) {
|
|
41402
|
+
return !e || KJ(e) ? e : KJ(e.default) ? e.default : t && KJ(e[t]) ? e[t] : t && KJ(e[t]?.default) ? e[t].default : e;
|
|
41295
41403
|
}
|
|
41296
|
-
var
|
|
41404
|
+
var JJ = qJ(Me, "InputContainer") || qJ(ZJ.InputContainer, "InputContainer"), YJ = Je, XJ = YJ.default, ZJ = XJ && typeof XJ == "object" ? XJ : YJ, QJ = M(GJ)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), $J = {
|
|
41297
41405
|
default: "Simple Feedback",
|
|
41298
41406
|
none: "No Feedback",
|
|
41299
41407
|
custom: "Customized Feedback"
|
|
41300
|
-
},
|
|
41408
|
+
}, eY = M("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), tY = M(JJ)(() => ({ paddingBottom: 0 })), nY = M("div")(({ theme: e }) => ({
|
|
41301
41409
|
marginTop: "0px",
|
|
41302
41410
|
background: N.backgroundDark(),
|
|
41303
41411
|
padding: 0,
|
|
41304
41412
|
marginBottom: e.spacing(2),
|
|
41305
41413
|
borderRadius: "4px"
|
|
41306
|
-
})),
|
|
41414
|
+
})), rY = M("div")(({ theme: e }) => ({
|
|
41307
41415
|
marginTop: "0px",
|
|
41308
41416
|
background: N.backgroundDark(),
|
|
41309
41417
|
padding: e.spacing(2),
|
|
@@ -41311,7 +41419,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41311
41419
|
borderRadius: "4px",
|
|
41312
41420
|
fontFamily: e.typography.fontFamily,
|
|
41313
41421
|
cursor: "default"
|
|
41314
|
-
})),
|
|
41422
|
+
})), iY = M(hl)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), aY = {
|
|
41315
41423
|
type: L.default.oneOf([
|
|
41316
41424
|
"default",
|
|
41317
41425
|
"custom",
|
|
@@ -41319,11 +41427,11 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41319
41427
|
]),
|
|
41320
41428
|
default: L.default.string,
|
|
41321
41429
|
custom: L.default.string
|
|
41322
|
-
},
|
|
41430
|
+
}, oY = class extends pt.Component {
|
|
41323
41431
|
static propTypes = {
|
|
41324
41432
|
keys: L.default.arrayOf(L.default.string),
|
|
41325
41433
|
label: L.default.string.isRequired,
|
|
41326
|
-
feedback: L.default.shape(
|
|
41434
|
+
feedback: L.default.shape(aY).isRequired,
|
|
41327
41435
|
onChange: L.default.func.isRequired,
|
|
41328
41436
|
toolbarOpts: L.default.object,
|
|
41329
41437
|
mathMlOptions: L.default.object
|
|
@@ -41345,36 +41453,36 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41345
41453
|
};
|
|
41346
41454
|
render() {
|
|
41347
41455
|
let { keys: e, label: t, feedback: n, toolbarOpts: r, mathMlOptions: i = {} } = this.props;
|
|
41348
|
-
return /* @__PURE__ */ I(
|
|
41349
|
-
/* @__PURE__ */ F(
|
|
41456
|
+
return /* @__PURE__ */ I(eY, { children: [
|
|
41457
|
+
/* @__PURE__ */ F(tY, {
|
|
41350
41458
|
label: t,
|
|
41351
41459
|
extraClasses: { label: { transform: "translateY(-20%)" } },
|
|
41352
|
-
children: /* @__PURE__ */ F(
|
|
41353
|
-
keys: e || Object.keys(
|
|
41460
|
+
children: /* @__PURE__ */ F(iY, {
|
|
41461
|
+
keys: e || Object.keys($J),
|
|
41354
41462
|
label: t,
|
|
41355
41463
|
value: n.type,
|
|
41356
41464
|
onChange: this.changeType,
|
|
41357
|
-
feedbackLabels:
|
|
41465
|
+
feedbackLabels: $J
|
|
41358
41466
|
})
|
|
41359
41467
|
}),
|
|
41360
|
-
n.type === "custom" && /* @__PURE__ */ F(
|
|
41468
|
+
n.type === "custom" && /* @__PURE__ */ F(nY, { children: /* @__PURE__ */ F(QJ, {
|
|
41361
41469
|
onChange: this.changeCustom,
|
|
41362
41470
|
markup: n.custom || "",
|
|
41363
41471
|
toolbarOpts: r,
|
|
41364
41472
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41365
41473
|
mathMlOptions: i
|
|
41366
41474
|
}) }),
|
|
41367
|
-
n.type === "default" && /* @__PURE__ */ I(
|
|
41475
|
+
n.type === "default" && /* @__PURE__ */ I(rY, { children: [" ", n.default] })
|
|
41368
41476
|
] });
|
|
41369
41477
|
}
|
|
41370
|
-
},
|
|
41478
|
+
}, sY = O(/*#__PURE__*/ F("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"), cY = M("div")(() => ({
|
|
41371
41479
|
display: "flex",
|
|
41372
41480
|
flex: 1,
|
|
41373
41481
|
flexDirection: "column"
|
|
41374
|
-
})),
|
|
41482
|
+
})), lY = M(Ti)(() => ({
|
|
41375
41483
|
paddingTop: 0,
|
|
41376
41484
|
paddingBottom: 0
|
|
41377
|
-
})),
|
|
41485
|
+
})), uY = (e) => l({}, {
|
|
41378
41486
|
correct: {
|
|
41379
41487
|
type: "default",
|
|
41380
41488
|
default: "Correct"
|
|
@@ -41387,21 +41495,21 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41387
41495
|
type: "default",
|
|
41388
41496
|
default: "Nearly"
|
|
41389
41497
|
}
|
|
41390
|
-
}, e),
|
|
41498
|
+
}, e), dY = class extends pt.Component {
|
|
41391
41499
|
static propTypes = {
|
|
41392
41500
|
allowPartial: L.default.bool,
|
|
41393
41501
|
className: L.default.string,
|
|
41394
41502
|
feedback: L.default.shape({
|
|
41395
|
-
correct: L.default.shape(
|
|
41396
|
-
incorrect: L.default.shape(
|
|
41397
|
-
partial: L.default.shape(
|
|
41503
|
+
correct: L.default.shape(aY),
|
|
41504
|
+
incorrect: L.default.shape(aY),
|
|
41505
|
+
partial: L.default.shape(aY)
|
|
41398
41506
|
}),
|
|
41399
41507
|
onChange: L.default.func.isRequired,
|
|
41400
41508
|
toolbarOpts: L.default.object
|
|
41401
41509
|
};
|
|
41402
41510
|
static defaultProps = {
|
|
41403
41511
|
allowPartial: !0,
|
|
41404
|
-
feedback:
|
|
41512
|
+
feedback: uY()
|
|
41405
41513
|
};
|
|
41406
41514
|
onChange(e, t) {
|
|
41407
41515
|
let { feedback: n, onChange: r } = this.props;
|
|
@@ -41423,22 +41531,22 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41423
41531
|
exit: 195
|
|
41424
41532
|
} } },
|
|
41425
41533
|
children: [/* @__PURE__ */ F(Mi, {
|
|
41426
|
-
expandIcon: /* @__PURE__ */ F(
|
|
41534
|
+
expandIcon: /* @__PURE__ */ F(sY, {}),
|
|
41427
41535
|
children: /* @__PURE__ */ F(Gi, { children: "Feedback" })
|
|
41428
|
-
}), /* @__PURE__ */ F(
|
|
41429
|
-
/* @__PURE__ */ F(
|
|
41536
|
+
}), /* @__PURE__ */ F(lY, { children: /* @__PURE__ */ I(cY, { children: [
|
|
41537
|
+
/* @__PURE__ */ F(oY, {
|
|
41430
41538
|
label: "If correct, show",
|
|
41431
41539
|
feedback: n.correct,
|
|
41432
41540
|
onChange: this.onCorrectChange,
|
|
41433
41541
|
toolbarOpts: r
|
|
41434
41542
|
}),
|
|
41435
|
-
t && /* @__PURE__ */ F(
|
|
41543
|
+
t && /* @__PURE__ */ F(oY, {
|
|
41436
41544
|
label: "If partially correct, show",
|
|
41437
41545
|
feedback: n.partial,
|
|
41438
41546
|
onChange: this.onPartialChange,
|
|
41439
41547
|
toolbarOpts: r
|
|
41440
41548
|
}),
|
|
41441
|
-
/* @__PURE__ */ F(
|
|
41549
|
+
/* @__PURE__ */ F(oY, {
|
|
41442
41550
|
label: "If incorrect, show",
|
|
41443
41551
|
feedback: n.incorrect,
|
|
41444
41552
|
onChange: this.onIncorrectChange,
|
|
@@ -41448,7 +41556,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41448
41556
|
})
|
|
41449
41557
|
});
|
|
41450
41558
|
}
|
|
41451
|
-
},
|
|
41559
|
+
}, fY = M(Ac)(() => ({})), pY = class extends pt.Component {
|
|
41452
41560
|
static propTypes = {
|
|
41453
41561
|
className: L.default.string,
|
|
41454
41562
|
contentClassName: L.default.string,
|
|
@@ -41469,7 +41577,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41469
41577
|
indicatorColor: "primary",
|
|
41470
41578
|
value: e,
|
|
41471
41579
|
onChange: this.handleChange,
|
|
41472
|
-
children: pt.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ F(
|
|
41580
|
+
children: pt.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ F(fY, { label: e.props.title }, t) : null)
|
|
41473
41581
|
}), /* @__PURE__ */ F("div", {
|
|
41474
41582
|
className: r,
|
|
41475
41583
|
style: i,
|
|
@@ -41477,7 +41585,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41477
41585
|
})]
|
|
41478
41586
|
});
|
|
41479
41587
|
}
|
|
41480
|
-
},
|
|
41588
|
+
}, mY = M(yo)(({ theme: e, mini: t }) => ({
|
|
41481
41589
|
margin: 0,
|
|
41482
41590
|
marginLeft: 0,
|
|
41483
41591
|
padding: 0,
|
|
@@ -41491,7 +41599,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41491
41599
|
fontSize: e.typography.fontSize - 3
|
|
41492
41600
|
}
|
|
41493
41601
|
}
|
|
41494
|
-
})),
|
|
41602
|
+
})), hY = M(Fa)(({ theme: e, mini: t, error: n }) => ({
|
|
41495
41603
|
color: `${N.tertiary()} !important`,
|
|
41496
41604
|
...t && {
|
|
41497
41605
|
margin: 0,
|
|
@@ -41500,9 +41608,9 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41500
41608
|
height: e.spacing(3)
|
|
41501
41609
|
},
|
|
41502
41610
|
...n && { color: `${e.palette.error.main} !important` }
|
|
41503
|
-
})),
|
|
41611
|
+
})), gY = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ F(mY, {
|
|
41504
41612
|
mini: e,
|
|
41505
|
-
control: /* @__PURE__ */ F(
|
|
41613
|
+
control: /* @__PURE__ */ F(hY, {
|
|
41506
41614
|
checked: t,
|
|
41507
41615
|
onChange: n,
|
|
41508
41616
|
value: r,
|
|
@@ -41511,32 +41619,32 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
|
|
|
41511
41619
|
}),
|
|
41512
41620
|
label: i
|
|
41513
41621
|
});
|
|
41514
|
-
|
|
41622
|
+
gY.propTypes = {
|
|
41515
41623
|
mini: L.default.bool,
|
|
41516
41624
|
checked: L.default.bool.isRequired,
|
|
41517
41625
|
onChange: L.default.func.isRequired,
|
|
41518
41626
|
value: L.default.string,
|
|
41519
41627
|
label: L.default.string.isRequired,
|
|
41520
41628
|
error: L.default.bool
|
|
41521
|
-
},
|
|
41629
|
+
}, gY.defaultProps = {
|
|
41522
41630
|
value: "",
|
|
41523
41631
|
mini: !1,
|
|
41524
41632
|
error: !1
|
|
41525
41633
|
};
|
|
41526
41634
|
//#endregion
|
|
41527
41635
|
//#region ../../lib-react/config-ui/dist/form-section.js
|
|
41528
|
-
var
|
|
41636
|
+
var _Y = M("div")(({ theme: e }) => ({
|
|
41529
41637
|
marginTop: e.spacing(2),
|
|
41530
41638
|
marginBottom: e.spacing(2)
|
|
41531
|
-
})),
|
|
41639
|
+
})), vY = M(Gi)(({ theme: e }) => ({ marginBottom: e.spacing(1) })), yY = ({ className: e, label: t, children: n, labelExtraStyle: r }) => /* @__PURE__ */ I(_Y, {
|
|
41532
41640
|
className: e,
|
|
41533
|
-
children: [/* @__PURE__ */ F(
|
|
41641
|
+
children: [/* @__PURE__ */ F(vY, {
|
|
41534
41642
|
variant: "subtitle1",
|
|
41535
41643
|
style: r,
|
|
41536
41644
|
children: t
|
|
41537
41645
|
}), n]
|
|
41538
41646
|
});
|
|
41539
|
-
|
|
41647
|
+
yY.propTypes = {
|
|
41540
41648
|
className: L.default.string,
|
|
41541
41649
|
label: L.default.string,
|
|
41542
41650
|
children: L.default.node,
|
|
@@ -41544,7 +41652,7 @@ uY.propTypes = {
|
|
|
41544
41652
|
};
|
|
41545
41653
|
//#endregion
|
|
41546
41654
|
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
41547
|
-
var
|
|
41655
|
+
var bY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), xY = M(al)(({ theme: e }) => ({
|
|
41548
41656
|
marginRight: e.spacing(1),
|
|
41549
41657
|
"& .MuiInputLabel-root": {
|
|
41550
41658
|
width: "auto",
|
|
@@ -41566,11 +41674,11 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
|
|
|
41566
41674
|
minHeight: "auto",
|
|
41567
41675
|
padding: "6px 0 7px"
|
|
41568
41676
|
}
|
|
41569
|
-
})),
|
|
41677
|
+
})), SY = (e, t) => {
|
|
41570
41678
|
if (!o(e) && !o(t)) return 0;
|
|
41571
41679
|
if (!o(e) && o(t)) return t;
|
|
41572
41680
|
if (o(e)) return e;
|
|
41573
|
-
},
|
|
41681
|
+
}, CY = class extends pt.Component {
|
|
41574
41682
|
static propTypes = {
|
|
41575
41683
|
disabled: L.default.bool,
|
|
41576
41684
|
className: L.default.string,
|
|
@@ -41596,13 +41704,13 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
|
|
|
41596
41704
|
this.setState({ value: t });
|
|
41597
41705
|
}
|
|
41598
41706
|
clamp(e, t = this.props.min, n = this.props.max) {
|
|
41599
|
-
return o(e) ? (o(n) && (e = Math.min(e, n)), o(t) && (e = Math.max(e, t)), e) :
|
|
41707
|
+
return o(e) ? (o(n) && (e = Math.min(e, n)), o(t) && (e = Math.max(e, t)), e) : SY(t, n);
|
|
41600
41708
|
}
|
|
41601
41709
|
onBlur = (e) => {
|
|
41602
41710
|
let t = e.target.value, n = parseFloat(t);
|
|
41603
|
-
|
|
41711
|
+
bY("rawNumber: ", n);
|
|
41604
41712
|
let r = this.clamp(n);
|
|
41605
|
-
|
|
41713
|
+
bY("number: ", r), r !== this.state.value && (bY("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
41606
41714
|
this.props.onChange(e, r);
|
|
41607
41715
|
}));
|
|
41608
41716
|
};
|
|
@@ -41622,7 +41730,7 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
|
|
|
41622
41730
|
};
|
|
41623
41731
|
render() {
|
|
41624
41732
|
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();
|
|
41625
|
-
return /* @__PURE__ */ F(
|
|
41733
|
+
return /* @__PURE__ */ F(xY, {
|
|
41626
41734
|
variant: s ? "filled" : l || "standard",
|
|
41627
41735
|
inputRef: (e) => {
|
|
41628
41736
|
this.inputRef = e;
|
|
@@ -41657,19 +41765,19 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
|
|
|
41657
41765
|
};
|
|
41658
41766
|
//#endregion
|
|
41659
41767
|
//#region ../../lib-react/config-ui/dist/two-choice.js
|
|
41660
|
-
function
|
|
41768
|
+
function wY(e) {
|
|
41661
41769
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
41662
41770
|
}
|
|
41663
|
-
function
|
|
41664
|
-
return !e ||
|
|
41771
|
+
function TY(e, t) {
|
|
41772
|
+
return !e || wY(e) ? e : wY(e.default) ? e.default : t && wY(e[t]) ? e[t] : t && wY(e[t]?.default) ? e[t].default : e;
|
|
41665
41773
|
}
|
|
41666
|
-
var
|
|
41774
|
+
var EY = TY(Me, "InputContainer") || TY(kY.InputContainer, "InputContainer"), DY = Je, OY = DY.default, kY = OY && typeof OY == "object" ? OY : DY, AY = M("div")(({ theme: e, direction: t }) => ({
|
|
41667
41775
|
display: "flex",
|
|
41668
41776
|
flexWrap: "wrap",
|
|
41669
41777
|
paddingLeft: 0,
|
|
41670
41778
|
marginTop: e.spacing(1),
|
|
41671
41779
|
...t === "vertical" && { flexDirection: "column" }
|
|
41672
|
-
})),
|
|
41780
|
+
})), jY = class extends pt.Component {
|
|
41673
41781
|
static propTypes = {
|
|
41674
41782
|
header: L.default.string.isRequired,
|
|
41675
41783
|
className: L.default.string,
|
|
@@ -41687,10 +41795,10 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
|
|
|
41687
41795
|
label: e,
|
|
41688
41796
|
value: e
|
|
41689
41797
|
} : e), s = n || dl;
|
|
41690
|
-
return /* @__PURE__ */ F(
|
|
41798
|
+
return /* @__PURE__ */ F(EY, {
|
|
41691
41799
|
label: e,
|
|
41692
41800
|
className: t,
|
|
41693
|
-
children: /* @__PURE__ */ F(
|
|
41801
|
+
children: /* @__PURE__ */ F(AY, {
|
|
41694
41802
|
direction: a,
|
|
41695
41803
|
children: o.map((e, t) => /* @__PURE__ */ F(s, {
|
|
41696
41804
|
value: e.value,
|
|
@@ -41701,7 +41809,7 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
|
|
|
41701
41809
|
})
|
|
41702
41810
|
});
|
|
41703
41811
|
}
|
|
41704
|
-
},
|
|
41812
|
+
}, MY = L.default.shape({
|
|
41705
41813
|
label: L.default.string,
|
|
41706
41814
|
value: L.default.string
|
|
41707
41815
|
});
|
|
@@ -41710,14 +41818,14 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
|
|
|
41710
41818
|
header: L.default.string.isRequired,
|
|
41711
41819
|
value: L.default.string.isRequired,
|
|
41712
41820
|
onChange: L.default.func.isRequired,
|
|
41713
|
-
one: L.default.oneOfType([
|
|
41714
|
-
two: L.default.oneOfType([
|
|
41821
|
+
one: L.default.oneOfType([MY, L.default.string]),
|
|
41822
|
+
two: L.default.oneOfType([MY, L.default.string]),
|
|
41715
41823
|
className: L.default.string,
|
|
41716
41824
|
customLabel: L.default.func
|
|
41717
41825
|
};
|
|
41718
41826
|
render() {
|
|
41719
41827
|
let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
|
|
41720
|
-
return /* @__PURE__ */ F(
|
|
41828
|
+
return /* @__PURE__ */ F(jY, {
|
|
41721
41829
|
customLabel: i,
|
|
41722
41830
|
header: n,
|
|
41723
41831
|
className: r,
|
|
@@ -41729,21 +41837,21 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
|
|
|
41729
41837
|
});
|
|
41730
41838
|
//#endregion
|
|
41731
41839
|
//#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
|
|
41732
|
-
var
|
|
41840
|
+
var NY = Object.defineProperty, PY = (e, t) => {
|
|
41733
41841
|
let n = {};
|
|
41734
|
-
for (var r in e)
|
|
41842
|
+
for (var r in e) NY(n, r, {
|
|
41735
41843
|
get: e[r],
|
|
41736
41844
|
enumerable: !0
|
|
41737
41845
|
});
|
|
41738
|
-
return t ||
|
|
41739
|
-
},
|
|
41846
|
+
return t || NY(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
41847
|
+
}, FY = M("div")(() => ({
|
|
41740
41848
|
display: "flex",
|
|
41741
41849
|
flexDirection: "column",
|
|
41742
41850
|
position: "relative"
|
|
41743
|
-
})),
|
|
41851
|
+
})), IY = M("div")(() => ({
|
|
41744
41852
|
display: "flex",
|
|
41745
41853
|
justifyContent: "space-between"
|
|
41746
|
-
})),
|
|
41854
|
+
})), LY = M("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), RY = M("div")(() => ({ flex: "1" })), zY = M("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), BY = class extends pt.Component {
|
|
41747
41855
|
static propTypes = {
|
|
41748
41856
|
mode: L.default.oneOf(["tabbed", "inline"]),
|
|
41749
41857
|
secondary: L.default.oneOfType([L.default.arrayOf(L.default.node), L.default.node]),
|
|
@@ -41761,7 +41869,7 @@ var wY = Object.defineProperty, TY = (e, t) => {
|
|
|
41761
41869
|
} catch (e) {
|
|
41762
41870
|
console.log(e.toString());
|
|
41763
41871
|
}
|
|
41764
|
-
return /* @__PURE__ */ I(
|
|
41872
|
+
return /* @__PURE__ */ I(FY, {
|
|
41765
41873
|
style: {
|
|
41766
41874
|
minHeight: i,
|
|
41767
41875
|
minWidth: a,
|
|
@@ -41769,28 +41877,28 @@ var wY = Object.defineProperty, TY = (e, t) => {
|
|
|
41769
41877
|
maxWidth: s
|
|
41770
41878
|
},
|
|
41771
41879
|
children: [
|
|
41772
|
-
e === "inline" && /* @__PURE__ */ I(
|
|
41880
|
+
e === "inline" && /* @__PURE__ */ I(IY, { children: [/* @__PURE__ */ F(RY, {
|
|
41773
41881
|
className: "design-container",
|
|
41774
41882
|
children: n
|
|
41775
|
-
}), l && /* @__PURE__ */ F(
|
|
41883
|
+
}), l && /* @__PURE__ */ F(zY, {
|
|
41776
41884
|
className: "settings-container",
|
|
41777
41885
|
children: t
|
|
41778
41886
|
})] }),
|
|
41779
|
-
e === "tabbed" && l && /* @__PURE__ */ I(
|
|
41887
|
+
e === "tabbed" && l && /* @__PURE__ */ I(pY, {
|
|
41780
41888
|
onChange: this.onTabsChange,
|
|
41781
41889
|
contentClassName: "content-container",
|
|
41782
41890
|
indicatorColor: "primary",
|
|
41783
|
-
children: [/* @__PURE__ */ F(
|
|
41891
|
+
children: [/* @__PURE__ */ F(LY, {
|
|
41784
41892
|
title: "Design",
|
|
41785
41893
|
className: "design-container",
|
|
41786
41894
|
children: n
|
|
41787
|
-
}), /* @__PURE__ */ F(
|
|
41895
|
+
}), /* @__PURE__ */ F(LY, {
|
|
41788
41896
|
title: "Settings",
|
|
41789
41897
|
className: "settings-container",
|
|
41790
41898
|
children: t
|
|
41791
41899
|
})]
|
|
41792
41900
|
}),
|
|
41793
|
-
e === "tabbed" && !l && /* @__PURE__ */ F(
|
|
41901
|
+
e === "tabbed" && !l && /* @__PURE__ */ F(LY, {
|
|
41794
41902
|
className: "design-container",
|
|
41795
41903
|
children: n
|
|
41796
41904
|
})
|
|
@@ -41800,18 +41908,18 @@ var wY = Object.defineProperty, TY = (e, t) => {
|
|
|
41800
41908
|
};
|
|
41801
41909
|
//#endregion
|
|
41802
41910
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
41803
|
-
function
|
|
41804
|
-
return
|
|
41911
|
+
function VY() {
|
|
41912
|
+
return VY = Object.assign ? Object.assign.bind() : function(e) {
|
|
41805
41913
|
for (var t = 1; t < arguments.length; t++) {
|
|
41806
41914
|
var n = arguments[t];
|
|
41807
41915
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
41808
41916
|
}
|
|
41809
41917
|
return e;
|
|
41810
|
-
},
|
|
41918
|
+
}, VY.apply(null, arguments);
|
|
41811
41919
|
}
|
|
41812
41920
|
//#endregion
|
|
41813
41921
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
41814
|
-
function
|
|
41922
|
+
function HY(e, t) {
|
|
41815
41923
|
if (e == null) return {};
|
|
41816
41924
|
var n = {};
|
|
41817
41925
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -41822,19 +41930,19 @@ function NY(e, t) {
|
|
|
41822
41930
|
}
|
|
41823
41931
|
//#endregion
|
|
41824
41932
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
41825
|
-
function
|
|
41826
|
-
return
|
|
41933
|
+
function UY(e, t) {
|
|
41934
|
+
return UY = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
41827
41935
|
return e.__proto__ = t, e;
|
|
41828
|
-
},
|
|
41936
|
+
}, UY(e, t);
|
|
41829
41937
|
}
|
|
41830
41938
|
//#endregion
|
|
41831
41939
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
41832
|
-
function
|
|
41833
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
41940
|
+
function WY(e, t) {
|
|
41941
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, UY(e, t);
|
|
41834
41942
|
}
|
|
41835
41943
|
//#endregion
|
|
41836
41944
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
41837
|
-
var
|
|
41945
|
+
var GY = (function() {
|
|
41838
41946
|
if (typeof Map < "u") return Map;
|
|
41839
41947
|
function e(e, t) {
|
|
41840
41948
|
var n = -1;
|
|
@@ -41873,34 +41981,34 @@ var IY = (function() {
|
|
|
41873
41981
|
}
|
|
41874
41982
|
}, t;
|
|
41875
41983
|
}();
|
|
41876
|
-
})(),
|
|
41984
|
+
})(), KY = typeof window < "u" && typeof document < "u" && window.document === document, qY = (function() {
|
|
41877
41985
|
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")();
|
|
41878
|
-
})(),
|
|
41879
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
41986
|
+
})(), JY = (function() {
|
|
41987
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(qY) : function(e) {
|
|
41880
41988
|
return setTimeout(function() {
|
|
41881
41989
|
return e(Date.now());
|
|
41882
41990
|
}, 1e3 / 60);
|
|
41883
41991
|
};
|
|
41884
|
-
})(),
|
|
41885
|
-
function
|
|
41992
|
+
})(), YY = 2;
|
|
41993
|
+
function XY(e, t) {
|
|
41886
41994
|
var n = !1, r = !1, i = 0;
|
|
41887
41995
|
function a() {
|
|
41888
41996
|
n && (n = !1, e()), r && s();
|
|
41889
41997
|
}
|
|
41890
41998
|
function o() {
|
|
41891
|
-
|
|
41999
|
+
JY(a);
|
|
41892
42000
|
}
|
|
41893
42001
|
function s() {
|
|
41894
42002
|
var e = Date.now();
|
|
41895
42003
|
if (n) {
|
|
41896
|
-
if (e - i <
|
|
42004
|
+
if (e - i < YY) return;
|
|
41897
42005
|
r = !0;
|
|
41898
42006
|
} else n = !0, r = !1, setTimeout(o, t);
|
|
41899
42007
|
i = e;
|
|
41900
42008
|
}
|
|
41901
42009
|
return s;
|
|
41902
42010
|
}
|
|
41903
|
-
var
|
|
42011
|
+
var ZY = 20, QY = [
|
|
41904
42012
|
"top",
|
|
41905
42013
|
"right",
|
|
41906
42014
|
"bottom",
|
|
@@ -41909,9 +42017,9 @@ var HY = 20, UY = [
|
|
|
41909
42017
|
"height",
|
|
41910
42018
|
"size",
|
|
41911
42019
|
"weight"
|
|
41912
|
-
],
|
|
42020
|
+
], $Y = typeof MutationObserver < "u", eX = function() {
|
|
41913
42021
|
function e() {
|
|
41914
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
42022
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = XY(this.refresh.bind(this), ZY);
|
|
41915
42023
|
}
|
|
41916
42024
|
return e.prototype.addObserver = function(e) {
|
|
41917
42025
|
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
@@ -41928,23 +42036,23 @@ var HY = 20, UY = [
|
|
|
41928
42036
|
return e.broadcastActive();
|
|
41929
42037
|
}), e.length > 0;
|
|
41930
42038
|
}, e.prototype.connect_ = function() {
|
|
41931
|
-
!
|
|
42039
|
+
!KY || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), $Y ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
41932
42040
|
attributes: !0,
|
|
41933
42041
|
childList: !0,
|
|
41934
42042
|
characterData: !0,
|
|
41935
42043
|
subtree: !0
|
|
41936
42044
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
41937
42045
|
}, e.prototype.disconnect_ = function() {
|
|
41938
|
-
!
|
|
42046
|
+
!KY || !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);
|
|
41939
42047
|
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
41940
42048
|
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
41941
|
-
|
|
42049
|
+
QY.some(function(e) {
|
|
41942
42050
|
return !!~n.indexOf(e);
|
|
41943
42051
|
}) && this.refresh();
|
|
41944
42052
|
}, e.getInstance = function() {
|
|
41945
42053
|
return this.instance_ ||= new e(), this.instance_;
|
|
41946
42054
|
}, e.instance_ = null, e;
|
|
41947
|
-
}(),
|
|
42055
|
+
}(), tX = (function(e, t) {
|
|
41948
42056
|
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
41949
42057
|
var i = r[n];
|
|
41950
42058
|
Object.defineProperty(e, i, {
|
|
@@ -41955,19 +42063,19 @@ var HY = 20, UY = [
|
|
|
41955
42063
|
});
|
|
41956
42064
|
}
|
|
41957
42065
|
return e;
|
|
41958
|
-
}),
|
|
41959
|
-
return e && e.ownerDocument && e.ownerDocument.defaultView ||
|
|
41960
|
-
}),
|
|
41961
|
-
function
|
|
42066
|
+
}), nX = (function(e) {
|
|
42067
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || qY;
|
|
42068
|
+
}), rX = pX(0, 0, 0, 0);
|
|
42069
|
+
function iX(e) {
|
|
41962
42070
|
return parseFloat(e) || 0;
|
|
41963
42071
|
}
|
|
41964
|
-
function
|
|
42072
|
+
function aX(e) {
|
|
41965
42073
|
return [...arguments].slice(1).reduce(function(t, n) {
|
|
41966
42074
|
var r = e["border-" + n + "-width"];
|
|
41967
|
-
return t +
|
|
42075
|
+
return t + iX(r);
|
|
41968
42076
|
}, 0);
|
|
41969
42077
|
}
|
|
41970
|
-
function
|
|
42078
|
+
function oX(e) {
|
|
41971
42079
|
for (var t = [
|
|
41972
42080
|
"top",
|
|
41973
42081
|
"right",
|
|
@@ -41975,40 +42083,40 @@ function ZY(e) {
|
|
|
41975
42083
|
"left"
|
|
41976
42084
|
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
41977
42085
|
var a = i[r], o = e["padding-" + a];
|
|
41978
|
-
n[a] =
|
|
42086
|
+
n[a] = iX(o);
|
|
41979
42087
|
}
|
|
41980
42088
|
return n;
|
|
41981
42089
|
}
|
|
41982
|
-
function
|
|
42090
|
+
function sX(e) {
|
|
41983
42091
|
var t = e.getBBox();
|
|
41984
|
-
return
|
|
42092
|
+
return pX(0, 0, t.width, t.height);
|
|
41985
42093
|
}
|
|
41986
|
-
function
|
|
42094
|
+
function cX(e) {
|
|
41987
42095
|
var t = e.clientWidth, n = e.clientHeight;
|
|
41988
|
-
if (!t && !n) return
|
|
41989
|
-
var r =
|
|
41990
|
-
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
42096
|
+
if (!t && !n) return rX;
|
|
42097
|
+
var r = nX(e).getComputedStyle(e), i = oX(r), a = i.left + i.right, o = i.top + i.bottom, s = iX(r.width), c = iX(r.height);
|
|
42098
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= aX(r, "left", "right") + a), Math.round(c + o) !== n && (c -= aX(r, "top", "bottom") + o)), !uX(e)) {
|
|
41991
42099
|
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
41992
42100
|
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
41993
42101
|
}
|
|
41994
|
-
return
|
|
42102
|
+
return pX(i.left, i.top, s, c);
|
|
41995
42103
|
}
|
|
41996
|
-
var
|
|
42104
|
+
var lX = (function() {
|
|
41997
42105
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
41998
|
-
return e instanceof
|
|
42106
|
+
return e instanceof nX(e).SVGGraphicsElement;
|
|
41999
42107
|
} : function(e) {
|
|
42000
|
-
return e instanceof
|
|
42108
|
+
return e instanceof nX(e).SVGElement && typeof e.getBBox == "function";
|
|
42001
42109
|
};
|
|
42002
42110
|
})();
|
|
42003
|
-
function
|
|
42004
|
-
return e ===
|
|
42111
|
+
function uX(e) {
|
|
42112
|
+
return e === nX(e).document.documentElement;
|
|
42005
42113
|
}
|
|
42006
|
-
function
|
|
42007
|
-
return
|
|
42114
|
+
function dX(e) {
|
|
42115
|
+
return KY ? lX(e) ? sX(e) : cX(e) : rX;
|
|
42008
42116
|
}
|
|
42009
|
-
function
|
|
42117
|
+
function fX(e) {
|
|
42010
42118
|
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
42011
|
-
return
|
|
42119
|
+
return tX(a, {
|
|
42012
42120
|
x: t,
|
|
42013
42121
|
y: n,
|
|
42014
42122
|
width: r,
|
|
@@ -42019,7 +42127,7 @@ function rX(e) {
|
|
|
42019
42127
|
left: t
|
|
42020
42128
|
}), a;
|
|
42021
42129
|
}
|
|
42022
|
-
function
|
|
42130
|
+
function pX(e, t, n, r) {
|
|
42023
42131
|
return {
|
|
42024
42132
|
x: e,
|
|
42025
42133
|
y: t,
|
|
@@ -42027,42 +42135,42 @@ function iX(e, t, n, r) {
|
|
|
42027
42135
|
height: r
|
|
42028
42136
|
};
|
|
42029
42137
|
}
|
|
42030
|
-
var
|
|
42138
|
+
var mX = function() {
|
|
42031
42139
|
function e(e) {
|
|
42032
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
42140
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = pX(0, 0, 0, 0), this.target = e;
|
|
42033
42141
|
}
|
|
42034
42142
|
return e.prototype.isActive = function() {
|
|
42035
|
-
var e =
|
|
42143
|
+
var e = dX(this.target);
|
|
42036
42144
|
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
42037
42145
|
}, e.prototype.broadcastRect = function() {
|
|
42038
42146
|
var e = this.contentRect_;
|
|
42039
42147
|
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
42040
42148
|
}, e;
|
|
42041
|
-
}(),
|
|
42149
|
+
}(), hX = function() {
|
|
42042
42150
|
function e(e, t) {
|
|
42043
|
-
var n =
|
|
42044
|
-
|
|
42151
|
+
var n = fX(t);
|
|
42152
|
+
tX(this, {
|
|
42045
42153
|
target: e,
|
|
42046
42154
|
contentRect: n
|
|
42047
42155
|
});
|
|
42048
42156
|
}
|
|
42049
42157
|
return e;
|
|
42050
|
-
}(),
|
|
42158
|
+
}(), gX = function() {
|
|
42051
42159
|
function e(e, t, n) {
|
|
42052
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
42160
|
+
if (this.activeObservations_ = [], this.observations_ = new GY(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
42053
42161
|
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
42054
42162
|
}
|
|
42055
42163
|
return e.prototype.observe = function(e) {
|
|
42056
42164
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
42057
42165
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
42058
|
-
if (!(e instanceof
|
|
42166
|
+
if (!(e instanceof nX(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
42059
42167
|
var t = this.observations_;
|
|
42060
|
-
t.has(e) || (t.set(e, new
|
|
42168
|
+
t.has(e) || (t.set(e, new mX(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
42061
42169
|
}
|
|
42062
42170
|
}, e.prototype.unobserve = function(e) {
|
|
42063
42171
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
42064
42172
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
42065
|
-
if (!(e instanceof
|
|
42173
|
+
if (!(e instanceof nX(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
42066
42174
|
var t = this.observations_;
|
|
42067
42175
|
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
42068
42176
|
}
|
|
@@ -42076,7 +42184,7 @@ var aX = function() {
|
|
|
42076
42184
|
}, e.prototype.broadcastActive = function() {
|
|
42077
42185
|
if (this.hasActive()) {
|
|
42078
42186
|
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
42079
|
-
return new
|
|
42187
|
+
return new hX(e.target, e.broadcastRect());
|
|
42080
42188
|
});
|
|
42081
42189
|
this.callback_.call(e, t, e), this.clearActive();
|
|
42082
42190
|
}
|
|
@@ -42085,12 +42193,12 @@ var aX = function() {
|
|
|
42085
42193
|
}, e.prototype.hasActive = function() {
|
|
42086
42194
|
return this.activeObservations_.length > 0;
|
|
42087
42195
|
}, e;
|
|
42088
|
-
}(),
|
|
42196
|
+
}(), _X = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new GY(), vX = function() {
|
|
42089
42197
|
function e(t) {
|
|
42090
42198
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
42091
42199
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
42092
|
-
var n = new
|
|
42093
|
-
|
|
42200
|
+
var n = new gX(t, eX.getInstance(), this);
|
|
42201
|
+
_X.set(this, n);
|
|
42094
42202
|
}
|
|
42095
42203
|
return e;
|
|
42096
42204
|
}();
|
|
@@ -42099,27 +42207,27 @@ var aX = function() {
|
|
|
42099
42207
|
"unobserve",
|
|
42100
42208
|
"disconnect"
|
|
42101
42209
|
].forEach(function(e) {
|
|
42102
|
-
|
|
42210
|
+
vX.prototype[e] = function() {
|
|
42103
42211
|
var t;
|
|
42104
|
-
return (t =
|
|
42212
|
+
return (t = _X.get(this))[e].apply(t, arguments);
|
|
42105
42213
|
};
|
|
42106
42214
|
});
|
|
42107
|
-
var
|
|
42108
|
-
return
|
|
42109
|
-
})(),
|
|
42215
|
+
var yX = (function() {
|
|
42216
|
+
return qY.ResizeObserver === void 0 ? vX : qY.ResizeObserver;
|
|
42217
|
+
})(), bX = [
|
|
42110
42218
|
"client",
|
|
42111
42219
|
"offset",
|
|
42112
42220
|
"scroll",
|
|
42113
42221
|
"bounds",
|
|
42114
42222
|
"margin"
|
|
42115
42223
|
];
|
|
42116
|
-
function
|
|
42224
|
+
function xX(e) {
|
|
42117
42225
|
var t = [];
|
|
42118
|
-
return
|
|
42226
|
+
return bX.forEach(function(n) {
|
|
42119
42227
|
e[n] && t.push(n);
|
|
42120
42228
|
}), t;
|
|
42121
42229
|
}
|
|
42122
|
-
function
|
|
42230
|
+
function SX(e, t) {
|
|
42123
42231
|
var n = {};
|
|
42124
42232
|
if (t.indexOf("client") > -1 && (n.client = {
|
|
42125
42233
|
top: e.clientTop,
|
|
@@ -42158,14 +42266,14 @@ function pX(e, t) {
|
|
|
42158
42266
|
}
|
|
42159
42267
|
return n;
|
|
42160
42268
|
}
|
|
42161
|
-
function
|
|
42269
|
+
function CX(e) {
|
|
42162
42270
|
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
42163
42271
|
}
|
|
42164
|
-
function
|
|
42272
|
+
function wX(e) {
|
|
42165
42273
|
return function(t) {
|
|
42166
42274
|
var n, r;
|
|
42167
42275
|
return r = n = /*#__PURE__*/ function(n) {
|
|
42168
|
-
|
|
42276
|
+
WY(r, n);
|
|
42169
42277
|
function r() {
|
|
42170
42278
|
var t, r = [...arguments];
|
|
42171
42279
|
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
@@ -42176,24 +42284,24 @@ function hX(e) {
|
|
|
42176
42284
|
bounds: {},
|
|
42177
42285
|
margin: {}
|
|
42178
42286
|
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
42179
|
-
var r =
|
|
42287
|
+
var r = SX(t._node, e || xX(t.props));
|
|
42180
42288
|
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
42181
42289
|
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
42182
42290
|
});
|
|
42183
42291
|
}, t._handleRef = function(e) {
|
|
42184
|
-
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window =
|
|
42292
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = CX(t._node);
|
|
42185
42293
|
var n = t.props.innerRef;
|
|
42186
42294
|
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
42187
42295
|
}, t;
|
|
42188
42296
|
}
|
|
42189
42297
|
var i = r.prototype;
|
|
42190
42298
|
return i.componentDidMount = function() {
|
|
42191
|
-
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new
|
|
42299
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new yX(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(SX(this._node, e || xX(this.props))));
|
|
42192
42300
|
}, i.componentWillUnmount = function() {
|
|
42193
42301
|
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
42194
42302
|
}, i.render = function() {
|
|
42195
42303
|
var e = this.props;
|
|
42196
|
-
return e.innerRef, e.onResize, gt(t,
|
|
42304
|
+
return e.innerRef, e.onResize, gt(t, VY({}, HY(e, ["innerRef", "onResize"]), {
|
|
42197
42305
|
measureRef: this._handleRef,
|
|
42198
42306
|
measure: this.measure,
|
|
42199
42307
|
contentRect: this.state.contentRect
|
|
@@ -42210,7 +42318,7 @@ function hX(e) {
|
|
|
42210
42318
|
}, r;
|
|
42211
42319
|
};
|
|
42212
42320
|
}
|
|
42213
|
-
var
|
|
42321
|
+
var TX = wX()(function(e) {
|
|
42214
42322
|
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
42215
42323
|
return i({
|
|
42216
42324
|
measure: t,
|
|
@@ -42218,10 +42326,10 @@ var gX = hX()(function(e) {
|
|
|
42218
42326
|
contentRect: r
|
|
42219
42327
|
});
|
|
42220
42328
|
});
|
|
42221
|
-
|
|
42329
|
+
TX.displayName = "Measure", TX.propTypes.children = L.default.func;
|
|
42222
42330
|
//#endregion
|
|
42223
42331
|
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
42224
|
-
var
|
|
42332
|
+
var EX = M("div")(() => ({
|
|
42225
42333
|
backgroundColor: N.white(),
|
|
42226
42334
|
border: `2px solid ${N.border()}`,
|
|
42227
42335
|
display: "flex",
|
|
@@ -42231,7 +42339,7 @@ var _X = M("div")(() => ({
|
|
|
42231
42339
|
maxWidth: "300px",
|
|
42232
42340
|
padding: "20px 4px 4px 20px",
|
|
42233
42341
|
zIndex: 99
|
|
42234
|
-
})),
|
|
42342
|
+
})), DX = class extends pt.Component {
|
|
42235
42343
|
static propTypes = {
|
|
42236
42344
|
className: L.default.string,
|
|
42237
42345
|
children: L.default.oneOfType([L.default.arrayOf(L.default.node), L.default.node]).isRequired
|
|
@@ -42239,19 +42347,19 @@ var _X = M("div")(() => ({
|
|
|
42239
42347
|
static defaultProps = {};
|
|
42240
42348
|
render() {
|
|
42241
42349
|
let { className: e, children: t } = this.props;
|
|
42242
|
-
return /* @__PURE__ */ F(
|
|
42350
|
+
return /* @__PURE__ */ F(EX, {
|
|
42243
42351
|
className: e,
|
|
42244
42352
|
children: t
|
|
42245
42353
|
});
|
|
42246
42354
|
}
|
|
42247
|
-
},
|
|
42355
|
+
}, OX = ut({
|
|
42248
42356
|
typography: { fontFamily: "inherit" },
|
|
42249
42357
|
components: { MuiButton: { styleOverrides: { contained: {
|
|
42250
42358
|
backgroundColor: "#e0e0e0",
|
|
42251
42359
|
color: "#000000",
|
|
42252
42360
|
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
42253
42361
|
} } } }
|
|
42254
|
-
}),
|
|
42362
|
+
}), kX = class extends pt.Component {
|
|
42255
42363
|
static propTypes = {
|
|
42256
42364
|
children: L.default.oneOfType([
|
|
42257
42365
|
L.default.string,
|
|
@@ -42284,19 +42392,19 @@ var _X = M("div")(() => ({
|
|
|
42284
42392
|
return /* @__PURE__ */ F(de, {
|
|
42285
42393
|
injectFirst: !0,
|
|
42286
42394
|
children: /* @__PURE__ */ F(Qe, {
|
|
42287
|
-
theme:
|
|
42288
|
-
children: /* @__PURE__ */ F(
|
|
42395
|
+
theme: OX,
|
|
42396
|
+
children: /* @__PURE__ */ F(TX, {
|
|
42289
42397
|
bounds: !0,
|
|
42290
42398
|
onResize: this.onResize,
|
|
42291
42399
|
children: ({ measureRef: e }) => {
|
|
42292
|
-
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ F(
|
|
42400
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ F(DX, {
|
|
42293
42401
|
className: "settings-box",
|
|
42294
42402
|
children: n
|
|
42295
42403
|
}) : n;
|
|
42296
42404
|
return /* @__PURE__ */ I("div", {
|
|
42297
42405
|
ref: e,
|
|
42298
42406
|
className: "main-container extraCSSRules",
|
|
42299
|
-
children: [a?.rules ? /* @__PURE__ */ F("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ F(
|
|
42407
|
+
children: [a?.rules ? /* @__PURE__ */ F("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ F(BY, {
|
|
42300
42408
|
mode: o,
|
|
42301
42409
|
secondary: s,
|
|
42302
42410
|
dimensions: i,
|
|
@@ -42308,27 +42416,27 @@ var _X = M("div")(() => ({
|
|
|
42308
42416
|
})
|
|
42309
42417
|
});
|
|
42310
42418
|
}
|
|
42311
|
-
},
|
|
42312
|
-
ConfigLayout: () =>
|
|
42313
|
-
LayoutContents: () =>
|
|
42314
|
-
}),
|
|
42419
|
+
}, AX = wX("bounds")(kX), jX = /* @__PURE__ */ PY({
|
|
42420
|
+
ConfigLayout: () => AX,
|
|
42421
|
+
LayoutContents: () => BY
|
|
42422
|
+
}), MX = M("div")(() => ({
|
|
42315
42423
|
display: "flex",
|
|
42316
42424
|
width: "100%",
|
|
42317
42425
|
justifyContent: "space-between"
|
|
42318
|
-
})),
|
|
42426
|
+
})), NX = M(qe)(({ theme: e }) => ({
|
|
42319
42427
|
color: "rgba(0, 0, 0, 0.89)",
|
|
42320
42428
|
fontSize: e.typography.fontSize,
|
|
42321
42429
|
paddingTop: e.spacing(2)
|
|
42322
|
-
})),
|
|
42430
|
+
})), PX = M(Tc)(({ checked: e }) => ({
|
|
42323
42431
|
"&.Mui-checked .MuiSwitch-thumb": { color: `${N.tertiary()} !important` },
|
|
42324
42432
|
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${N.tertiaryLight()} !important` },
|
|
42325
42433
|
"& .MuiSwitch-track": { backgroundColor: e ? `${N.tertiaryLight()} !important` : void 0 }
|
|
42326
|
-
})),
|
|
42434
|
+
})), FX = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ I(MX, { children: [/* @__PURE__ */ F(NX, { children: n }), /* @__PURE__ */ F(PX, {
|
|
42327
42435
|
checked: e,
|
|
42328
42436
|
disabled: t,
|
|
42329
42437
|
onChange: (e) => r(e.target.checked)
|
|
42330
42438
|
})] });
|
|
42331
|
-
|
|
42439
|
+
FX.propTypes = {
|
|
42332
42440
|
checked: L.default.bool,
|
|
42333
42441
|
disabled: L.default.bool,
|
|
42334
42442
|
label: L.default.string.isRequired,
|
|
@@ -42336,20 +42444,20 @@ EX.propTypes = {
|
|
|
42336
42444
|
};
|
|
42337
42445
|
//#endregion
|
|
42338
42446
|
//#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
|
|
42339
|
-
var
|
|
42447
|
+
var IX = M(yo)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
|
|
42340
42448
|
color: "rgba(0, 0, 0, 0.89)",
|
|
42341
42449
|
fontSize: e.typography.fontSize - 2,
|
|
42342
42450
|
left: "-5px",
|
|
42343
42451
|
position: "relative"
|
|
42344
|
-
} })),
|
|
42452
|
+
} })), LX = M(_c)(() => ({ color: `${N.tertiary()} !important` })), RX = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ F(IX, {
|
|
42345
42453
|
value: t,
|
|
42346
|
-
control: /* @__PURE__ */ F(
|
|
42454
|
+
control: /* @__PURE__ */ F(LX, {
|
|
42347
42455
|
checked: n,
|
|
42348
42456
|
onChange: r
|
|
42349
42457
|
}),
|
|
42350
42458
|
label: e
|
|
42351
42459
|
});
|
|
42352
|
-
|
|
42460
|
+
RX.propTypes = {
|
|
42353
42461
|
label: L.default.string,
|
|
42354
42462
|
value: L.default.string,
|
|
42355
42463
|
checked: L.default.bool,
|
|
@@ -42357,26 +42465,26 @@ kX.propTypes = {
|
|
|
42357
42465
|
};
|
|
42358
42466
|
//#endregion
|
|
42359
42467
|
//#region ../../lib-react/config-ui/dist/settings/panel.js
|
|
42360
|
-
var
|
|
42468
|
+
var zX = (0, Jt.default)("pie-lib:config-ui:settings:panel"), BX = {
|
|
42361
42469
|
label: L.default.string,
|
|
42362
42470
|
value: L.default.string
|
|
42363
|
-
},
|
|
42471
|
+
}, VX = {
|
|
42364
42472
|
label: L.default.string,
|
|
42365
42473
|
value: L.default.string,
|
|
42366
42474
|
onChange: L.default.func
|
|
42367
|
-
},
|
|
42475
|
+
}, HX = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ F(gY, {
|
|
42368
42476
|
checked: t,
|
|
42369
42477
|
label: e,
|
|
42370
42478
|
onChange: (e) => {
|
|
42371
42479
|
n(e.target.checked);
|
|
42372
42480
|
}
|
|
42373
42481
|
});
|
|
42374
|
-
|
|
42482
|
+
HX.propTypes = {
|
|
42375
42483
|
label: L.default.string,
|
|
42376
42484
|
value: L.default.bool,
|
|
42377
42485
|
onChange: L.default.func
|
|
42378
42486
|
};
|
|
42379
|
-
var
|
|
42487
|
+
var UX = M(jY)(({ theme: e }) => ({
|
|
42380
42488
|
marginTop: e.spacing(.5),
|
|
42381
42489
|
paddingBottom: e.spacing(.5),
|
|
42382
42490
|
width: "100%",
|
|
@@ -42387,29 +42495,29 @@ var PX = M(SY)(({ theme: e }) => ({
|
|
|
42387
42495
|
marginTop: e.spacing(2.5)
|
|
42388
42496
|
},
|
|
42389
42497
|
"& > div": { marginTop: e.spacing(2.5) }
|
|
42390
|
-
})),
|
|
42498
|
+
})), WX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ F(UX, {
|
|
42391
42499
|
direction: "horizontal",
|
|
42392
|
-
customLabel:
|
|
42500
|
+
customLabel: RX,
|
|
42393
42501
|
value: t,
|
|
42394
42502
|
header: e,
|
|
42395
42503
|
opts: r,
|
|
42396
42504
|
onChange: n
|
|
42397
42505
|
});
|
|
42398
|
-
|
|
42399
|
-
...
|
|
42400
|
-
choices: L.default.arrayOf(L.default.shape(
|
|
42506
|
+
WX.propTypes = {
|
|
42507
|
+
...VX,
|
|
42508
|
+
choices: L.default.arrayOf(L.default.shape(BX))
|
|
42401
42509
|
};
|
|
42402
|
-
var
|
|
42510
|
+
var GX = WX, KX = M("p")(({ theme: e }) => ({
|
|
42403
42511
|
margin: 0,
|
|
42404
42512
|
fontSize: e.typography.fontSize
|
|
42405
|
-
})),
|
|
42513
|
+
})), qX = M(Xs)(({ theme: e }) => ({
|
|
42406
42514
|
marginTop: e.spacing(.5),
|
|
42407
42515
|
border: "2px solid lightgrey",
|
|
42408
42516
|
padding: `0 ${e.spacing(1)}`,
|
|
42409
42517
|
borderRadius: "4px"
|
|
42410
|
-
})),
|
|
42518
|
+
})), JX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
|
|
42411
42519
|
let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
|
|
42412
|
-
return /* @__PURE__ */ I("div", { children: [e && /* @__PURE__ */ F(
|
|
42520
|
+
return /* @__PURE__ */ I("div", { children: [e && /* @__PURE__ */ F(KX, { children: e }), /* @__PURE__ */ F(qX, {
|
|
42413
42521
|
value: t || r && r[0],
|
|
42414
42522
|
onChange: ({ target: e }) => n(e.value),
|
|
42415
42523
|
input: /* @__PURE__ */ F(ko, { id: `dropdown-${e}` }),
|
|
@@ -42424,14 +42532,14 @@ var IX = FX, LX = M("p")(({ theme: e }) => ({
|
|
|
42424
42532
|
}, t))
|
|
42425
42533
|
})] });
|
|
42426
42534
|
};
|
|
42427
|
-
|
|
42428
|
-
...
|
|
42535
|
+
JX.propTypes = {
|
|
42536
|
+
...VX,
|
|
42429
42537
|
choices: L.default.arrayOf(L.default.string)
|
|
42430
42538
|
};
|
|
42431
|
-
var
|
|
42539
|
+
var YX = M(Gi)(({ theme: e }) => ({
|
|
42432
42540
|
marginRight: e.spacing(3),
|
|
42433
42541
|
marginTop: e.spacing(1)
|
|
42434
|
-
})),
|
|
42542
|
+
})), XX = ({ label: e }) => /* @__PURE__ */ F(YX, { children: e }), ZX = M(CY)(({ theme: e }) => ({
|
|
42435
42543
|
width: "35%",
|
|
42436
42544
|
marginRight: e.spacing(3),
|
|
42437
42545
|
marginTop: e.spacing(1),
|
|
@@ -42442,7 +42550,7 @@ var BX = M(Gi)(({ theme: e }) => ({
|
|
|
42442
42550
|
padding: `0 ${e.spacing(1)}`,
|
|
42443
42551
|
backgroundColor: "transparent"
|
|
42444
42552
|
}
|
|
42445
|
-
})),
|
|
42553
|
+
})), QX = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ F(ZX, {
|
|
42446
42554
|
variant: "standard",
|
|
42447
42555
|
label: e || "Label",
|
|
42448
42556
|
value: t,
|
|
@@ -42453,45 +42561,45 @@ var BX = M(Gi)(({ theme: e }) => ({
|
|
|
42453
42561
|
showErrorWhenOutsideRange: !0,
|
|
42454
42562
|
disableUnderline: !0
|
|
42455
42563
|
});
|
|
42456
|
-
|
|
42457
|
-
...
|
|
42564
|
+
QX.propTypes = {
|
|
42565
|
+
...VX,
|
|
42458
42566
|
suffix: L.default.string,
|
|
42459
42567
|
min: L.default.number,
|
|
42460
42568
|
max: L.default.number,
|
|
42461
42569
|
value: L.default.number
|
|
42462
|
-
},
|
|
42463
|
-
var
|
|
42570
|
+
}, XX.propTypes = { ...VX };
|
|
42571
|
+
var $X = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ F(FX, {
|
|
42464
42572
|
label: t,
|
|
42465
42573
|
checked: !!n,
|
|
42466
42574
|
disabled: !!e,
|
|
42467
42575
|
toggle: r
|
|
42468
42576
|
});
|
|
42469
|
-
|
|
42470
|
-
...
|
|
42577
|
+
$X.propTypes = {
|
|
42578
|
+
...VX,
|
|
42471
42579
|
value: L.default.bool
|
|
42472
42580
|
};
|
|
42473
|
-
var
|
|
42474
|
-
toggle:
|
|
42475
|
-
radio:
|
|
42476
|
-
dropdown:
|
|
42477
|
-
numberField:
|
|
42478
|
-
checkbox:
|
|
42479
|
-
textField:
|
|
42480
|
-
},
|
|
42581
|
+
var eZ = {
|
|
42582
|
+
toggle: $X,
|
|
42583
|
+
radio: GX,
|
|
42584
|
+
dropdown: JX,
|
|
42585
|
+
numberField: QX,
|
|
42586
|
+
checkbox: HX,
|
|
42587
|
+
textField: XX
|
|
42588
|
+
}, tZ = M("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), nZ = M("div")(({ theme: e }) => ({
|
|
42481
42589
|
color: "#495B8F",
|
|
42482
42590
|
fontSize: e.typography.fontSize + 2,
|
|
42483
42591
|
fontWeight: 600,
|
|
42484
42592
|
marginBottom: e.spacing(1)
|
|
42485
|
-
})),
|
|
42593
|
+
})), rZ = M("p")(({ theme: e }) => ({
|
|
42486
42594
|
fontSize: e.typography.fontSize,
|
|
42487
42595
|
marginBottom: 0
|
|
42488
|
-
})),
|
|
42596
|
+
})), iZ = (e) => {
|
|
42489
42597
|
let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
|
|
42490
42598
|
let { isConfigProperty: o, ...s } = g(e, r || n), c = g(o ? i : t, n), l = {
|
|
42491
42599
|
...s,
|
|
42492
42600
|
key: n,
|
|
42493
42601
|
value: c
|
|
42494
|
-
}, u =
|
|
42602
|
+
}, u = eZ[l.type];
|
|
42495
42603
|
return /* @__PURE__ */ F(u, {
|
|
42496
42604
|
...l,
|
|
42497
42605
|
onChange: (e) => a(n, e, o)
|
|
@@ -42500,18 +42608,18 @@ var GX = {
|
|
|
42500
42608
|
let n = e[t];
|
|
42501
42609
|
if (!n) return null;
|
|
42502
42610
|
let { type: r, label: i, fields: a, choices: s } = n;
|
|
42503
|
-
return r === "numberFields" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(
|
|
42611
|
+
return r === "numberFields" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(rZ, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
|
|
42504
42612
|
};
|
|
42505
|
-
return /* @__PURE__ */ I(
|
|
42613
|
+
return /* @__PURE__ */ I(tZ, { children: [/* @__PURE__ */ F(nZ, { children: n }), Object.keys(r).map((e) => s(r, e))] });
|
|
42506
42614
|
};
|
|
42507
|
-
|
|
42615
|
+
iZ.propTypes = {
|
|
42508
42616
|
model: L.default.object,
|
|
42509
42617
|
label: L.default.string,
|
|
42510
42618
|
group: L.default.object,
|
|
42511
42619
|
configuration: L.default.object,
|
|
42512
42620
|
onChange: L.default.func
|
|
42513
42621
|
};
|
|
42514
|
-
var
|
|
42622
|
+
var aZ = class extends pt.Component {
|
|
42515
42623
|
static propTypes = {
|
|
42516
42624
|
model: L.default.object,
|
|
42517
42625
|
configuration: L.default.object,
|
|
@@ -42525,13 +42633,13 @@ var XX = class extends pt.Component {
|
|
|
42525
42633
|
onChangeConfiguration: () => {}
|
|
42526
42634
|
};
|
|
42527
42635
|
change = (e, t, n = !1) => {
|
|
42528
|
-
|
|
42636
|
+
zX("[changeModel]", e, t);
|
|
42529
42637
|
let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
|
|
42530
42638
|
n ? (f(o, e, t), i(o, e)) : (f(a, e, t), r(a, e));
|
|
42531
42639
|
};
|
|
42532
42640
|
render() {
|
|
42533
42641
|
let { groups: e, model: t, configuration: n, modal: r } = this.props;
|
|
42534
|
-
return
|
|
42642
|
+
return zX("render:", t), /* @__PURE__ */ I("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ F(iZ, {
|
|
42535
42643
|
label: r,
|
|
42536
42644
|
model: t,
|
|
42537
42645
|
configuration: n,
|
|
@@ -42539,59 +42647,59 @@ var XX = class extends pt.Component {
|
|
|
42539
42647
|
onChange: this.change
|
|
42540
42648
|
}, r) : null), r] });
|
|
42541
42649
|
}
|
|
42542
|
-
},
|
|
42543
|
-
Panel: () =>
|
|
42544
|
-
checkbox: () =>
|
|
42545
|
-
checkboxes: () =>
|
|
42546
|
-
dropdown: () =>
|
|
42547
|
-
numberField: () =>
|
|
42548
|
-
numberFields: () =>
|
|
42549
|
-
radio: () =>
|
|
42550
|
-
textField: () =>
|
|
42551
|
-
toggle: () =>
|
|
42552
|
-
}),
|
|
42650
|
+
}, oZ = /* @__PURE__ */ PY({
|
|
42651
|
+
Panel: () => aZ,
|
|
42652
|
+
checkbox: () => mZ,
|
|
42653
|
+
checkboxes: () => hZ,
|
|
42654
|
+
dropdown: () => dZ,
|
|
42655
|
+
numberField: () => fZ,
|
|
42656
|
+
numberFields: () => pZ,
|
|
42657
|
+
radio: () => uZ,
|
|
42658
|
+
textField: () => sZ,
|
|
42659
|
+
toggle: () => cZ
|
|
42660
|
+
}), sZ = (e, t = !0) => ({
|
|
42553
42661
|
label: e,
|
|
42554
42662
|
type: "textField",
|
|
42555
42663
|
isConfigProperty: t
|
|
42556
|
-
}),
|
|
42664
|
+
}), cZ = (e, t = !1, n = !1) => ({
|
|
42557
42665
|
type: "toggle",
|
|
42558
42666
|
label: e,
|
|
42559
42667
|
isConfigProperty: t,
|
|
42560
42668
|
disabled: n
|
|
42561
|
-
}),
|
|
42669
|
+
}), lZ = (e) => typeof e == "string" ? {
|
|
42562
42670
|
label: e,
|
|
42563
42671
|
value: e
|
|
42564
|
-
} : e,
|
|
42672
|
+
} : e, uZ = function() {
|
|
42565
42673
|
let [e, t, n = !1] = Array.prototype.slice.call(arguments);
|
|
42566
42674
|
return {
|
|
42567
42675
|
type: "radio",
|
|
42568
42676
|
label: e,
|
|
42569
|
-
choices: t && t.map((e) =>
|
|
42677
|
+
choices: t && t.map((e) => lZ(e)),
|
|
42570
42678
|
isConfigProperty: n
|
|
42571
42679
|
};
|
|
42572
|
-
},
|
|
42680
|
+
}, dZ = (e, t, n = !1) => ({
|
|
42573
42681
|
type: "dropdown",
|
|
42574
42682
|
label: e,
|
|
42575
42683
|
choices: t,
|
|
42576
42684
|
isConfigProperty: n
|
|
42577
|
-
}),
|
|
42685
|
+
}), fZ = (e, t, n = !1) => ({
|
|
42578
42686
|
...t,
|
|
42579
42687
|
label: e,
|
|
42580
42688
|
type: "numberField",
|
|
42581
42689
|
isConfigProperty: n
|
|
42582
|
-
}),
|
|
42583
|
-
t[e] =
|
|
42690
|
+
}), pZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
42691
|
+
t[e] = fZ(t[e].label, t[e], n);
|
|
42584
42692
|
}), {
|
|
42585
42693
|
type: "numberFields",
|
|
42586
42694
|
label: e,
|
|
42587
42695
|
fields: t
|
|
42588
|
-
}),
|
|
42696
|
+
}), mZ = (e, t, n = !1) => ({
|
|
42589
42697
|
...t,
|
|
42590
42698
|
label: e,
|
|
42591
42699
|
type: "checkbox",
|
|
42592
42700
|
isConfigProperty: n
|
|
42593
|
-
}),
|
|
42594
|
-
t[e] =
|
|
42701
|
+
}), hZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
42702
|
+
t[e] = mZ(t[e].label, t[e], n);
|
|
42595
42703
|
}), {
|
|
42596
42704
|
type: "checkboxes",
|
|
42597
42705
|
label: e,
|
|
@@ -42599,36 +42707,36 @@ var XX = class extends pt.Component {
|
|
|
42599
42707
|
});
|
|
42600
42708
|
//#endregion
|
|
42601
42709
|
//#region ../../lib-react/config-ui/dist/index.js
|
|
42602
|
-
function
|
|
42710
|
+
function gZ(e) {
|
|
42603
42711
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
42604
42712
|
}
|
|
42605
|
-
function
|
|
42606
|
-
return !e ||
|
|
42713
|
+
function _Z(e, t) {
|
|
42714
|
+
return !e || gZ(e) ? e : gZ(e.default) ? e.default : t && gZ(e[t]) ? e[t] : t && gZ(e[t]?.default) ? e[t].default : e;
|
|
42607
42715
|
}
|
|
42608
|
-
var
|
|
42716
|
+
var vZ = _Z(Me, "InputContainer") || _Z(xZ.InputContainer, "InputContainer"), yZ = Je, bZ = yZ.default, xZ = bZ && typeof bZ == "object" ? bZ : yZ, SZ = O(/*#__PURE__*/ F("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"), CZ = O(/*#__PURE__*/ F("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z" }), "RemoveCircle");
|
|
42609
42717
|
//#endregion
|
|
42610
42718
|
//#region src/author/choice-tile.tsx
|
|
42611
42719
|
(0, Jt.default)("@pie-element:placement-ordering:configure:choice-tile");
|
|
42612
|
-
var
|
|
42720
|
+
var wZ = M("div")(({ theme: e }) => ({
|
|
42613
42721
|
margin: `${e.spacing(1)} 0`,
|
|
42614
42722
|
backgroundColor: e.palette.background.paper,
|
|
42615
42723
|
display: "flex",
|
|
42616
42724
|
flexDirection: "column",
|
|
42617
42725
|
cursor: "move",
|
|
42618
42726
|
touchAction: "none"
|
|
42619
|
-
})),
|
|
42727
|
+
})), TZ = M(GJ)(({ theme: e, isTargetPrompt: t }) => ({
|
|
42620
42728
|
width: "80%",
|
|
42621
42729
|
borderRadius: "4px",
|
|
42622
42730
|
...t && { backgroundColor: e.palette.error.light }
|
|
42623
|
-
})),
|
|
42731
|
+
})), EZ = M("div")(() => ({
|
|
42624
42732
|
display: "flex",
|
|
42625
42733
|
justifyContent: "flex-end"
|
|
42626
|
-
})),
|
|
42734
|
+
})), DZ = M(SZ)(({ theme: e }) => ({ color: e.palette.error[400] })), OZ = M("div")(({ theme: e }) => ({
|
|
42627
42735
|
fontSize: e.typography.fontSize - 2,
|
|
42628
42736
|
color: e.palette.error.main,
|
|
42629
42737
|
marginLeft: e.spacing(5),
|
|
42630
42738
|
marginTop: e.spacing(1)
|
|
42631
|
-
})),
|
|
42739
|
+
})), kZ = M(CZ)(({ theme: e }) => ({ fill: e.palette.error[500] })), AZ = M(Ri)({ color: `${N.tertiary()} !important` }), jZ = (e) => {
|
|
42632
42740
|
let { choice: t, index: n, onChoiceChange: r, onDelete: i, imageSupport: a, spellCheck: o, toolbarOpts: s, pluginProps: c, maxImageWidth: l, maxImageHeight: u, error: d, mathMlOptions: f = {} } = e, { label: p, editable: m, type: h } = t, g = `${h}-${t.id}`, _ = `${h}-drop-${t.id}`, { attributes: v, listeners: y, setNodeRef: b, transform: x, isDragging: S } = Ne({
|
|
42633
42741
|
id: g,
|
|
42634
42742
|
data: {
|
|
@@ -42662,7 +42770,7 @@ var hZ = M("div")(({ theme: e }) => ({
|
|
|
42662
42770
|
te(e.target) || y?.onPointerDown?.(e);
|
|
42663
42771
|
},
|
|
42664
42772
|
...v,
|
|
42665
|
-
children: /* @__PURE__ */ I(
|
|
42773
|
+
children: /* @__PURE__ */ I(wZ, {
|
|
42666
42774
|
style: ee,
|
|
42667
42775
|
children: [/* @__PURE__ */ I("div", {
|
|
42668
42776
|
style: {
|
|
@@ -42671,8 +42779,8 @@ var hZ = M("div")(({ theme: e }) => ({
|
|
|
42671
42779
|
alignItems: "center"
|
|
42672
42780
|
},
|
|
42673
42781
|
children: [
|
|
42674
|
-
/* @__PURE__ */ F(ya, { children: /* @__PURE__ */ F(
|
|
42675
|
-
/* @__PURE__ */ F(
|
|
42782
|
+
/* @__PURE__ */ F(ya, { children: /* @__PURE__ */ F(DZ, {}) }),
|
|
42783
|
+
/* @__PURE__ */ F(TZ, {
|
|
42676
42784
|
disabled: !m,
|
|
42677
42785
|
placeholder: h !== "target" && !p.includes("data-latex") ? "Enter a choice" : "",
|
|
42678
42786
|
markup: p,
|
|
@@ -42689,18 +42797,18 @@ var hZ = M("div")(({ theme: e }) => ({
|
|
|
42689
42797
|
error: m && d,
|
|
42690
42798
|
mathMlOptions: f
|
|
42691
42799
|
}),
|
|
42692
|
-
m && /* @__PURE__ */ F(
|
|
42800
|
+
m && /* @__PURE__ */ F(EZ, { children: /* @__PURE__ */ F(AZ, {
|
|
42693
42801
|
onClick: i,
|
|
42694
42802
|
size: "large",
|
|
42695
|
-
children: /* @__PURE__ */ F(
|
|
42803
|
+
children: /* @__PURE__ */ F(kZ, {})
|
|
42696
42804
|
}) })
|
|
42697
42805
|
]
|
|
42698
|
-
}), m && d && /* @__PURE__ */ F(
|
|
42806
|
+
}), m && d && /* @__PURE__ */ F(OZ, { children: d })]
|
|
42699
42807
|
})
|
|
42700
42808
|
})
|
|
42701
42809
|
});
|
|
42702
42810
|
};
|
|
42703
|
-
|
|
42811
|
+
jZ.propTypes = {
|
|
42704
42812
|
id: L.default.any,
|
|
42705
42813
|
maxImageHeight: L.default.object,
|
|
42706
42814
|
maxImageWidth: L.default.object,
|
|
@@ -42728,24 +42836,24 @@ SZ.propTypes = {
|
|
|
42728
42836
|
};
|
|
42729
42837
|
//#endregion
|
|
42730
42838
|
//#region src/author/choice-editor.tsx
|
|
42731
|
-
function
|
|
42839
|
+
function MZ(e) {
|
|
42732
42840
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
42733
42841
|
}
|
|
42734
|
-
function
|
|
42735
|
-
return !e ||
|
|
42842
|
+
function NZ(e, t) {
|
|
42843
|
+
return !e || MZ(e) ? e : MZ(e.default) ? e.default : t && MZ(e[t]) ? e[t] : t && MZ(e[t]?.default) ? e[t].default : e;
|
|
42736
42844
|
}
|
|
42737
|
-
var
|
|
42738
|
-
function
|
|
42845
|
+
var PZ = NZ(Me, "InputContainer") || NZ(LZ.InputContainer, "InputContainer"), FZ = Je, IZ = FZ.default, LZ = IZ && typeof IZ == "object" ? IZ : FZ;
|
|
42846
|
+
function RZ(e) {
|
|
42739
42847
|
let t = 1, n = e.map((e) => e.id);
|
|
42740
42848
|
for (; n.includes(`c${t}`);) t++;
|
|
42741
42849
|
return t;
|
|
42742
42850
|
}
|
|
42743
42851
|
(0, Jt.default)("@pie-element:placement-ordering:configure:choice-editor");
|
|
42744
|
-
var
|
|
42852
|
+
var zZ = M("div")({
|
|
42745
42853
|
display: "flex",
|
|
42746
42854
|
alignItems: "center",
|
|
42747
42855
|
justifyContent: "space-between"
|
|
42748
|
-
}),
|
|
42856
|
+
}), BZ = M(Ae)(({ theme: e }) => ({
|
|
42749
42857
|
marginTop: e.spacing(2.5),
|
|
42750
42858
|
paddingLeft: e.spacing(1.5),
|
|
42751
42859
|
paddingRight: e.spacing(1.5),
|
|
@@ -42753,19 +42861,19 @@ var AZ = M("div")({
|
|
|
42753
42861
|
transition: "opacity 200ms linear",
|
|
42754
42862
|
"&:hover": { opacity: .3 }
|
|
42755
42863
|
}
|
|
42756
|
-
})),
|
|
42864
|
+
})), VZ = M("div")({
|
|
42757
42865
|
gridAutoFlow: "column",
|
|
42758
42866
|
display: "grid",
|
|
42759
42867
|
gridGap: "10px",
|
|
42760
42868
|
alignItems: "center"
|
|
42761
|
-
}),
|
|
42869
|
+
}), HZ = M(PZ)(({ theme: e }) => ({
|
|
42762
42870
|
width: "100%",
|
|
42763
42871
|
paddingTop: e.spacing(2)
|
|
42764
|
-
})),
|
|
42872
|
+
})), UZ = M("div")(({ theme: e }) => ({
|
|
42765
42873
|
fontSize: e.typography.fontSize - 2,
|
|
42766
42874
|
color: e.palette.error.main,
|
|
42767
42875
|
paddingTop: e.spacing(1)
|
|
42768
|
-
})),
|
|
42876
|
+
})), WZ = class extends pt.Component {
|
|
42769
42877
|
static propTypes = {
|
|
42770
42878
|
correctResponse: L.default.array.isRequired,
|
|
42771
42879
|
choices: L.default.array.isRequired,
|
|
@@ -42806,7 +42914,7 @@ var AZ = M("div")({
|
|
|
42806
42914
|
text: `There can be maximum 10 ${r}.`
|
|
42807
42915
|
} });
|
|
42808
42916
|
else {
|
|
42809
|
-
let r = `c${
|
|
42917
|
+
let r = `c${RZ(e)}`, i = {
|
|
42810
42918
|
id: r,
|
|
42811
42919
|
label: ""
|
|
42812
42920
|
}, a = {
|
|
@@ -42826,13 +42934,13 @@ var AZ = M("div")({
|
|
|
42826
42934
|
gridTemplateRows: `repeat(${t.length}, auto)`
|
|
42827
42935
|
};
|
|
42828
42936
|
return /* @__PURE__ */ I("div", { children: [
|
|
42829
|
-
/* @__PURE__ */ I(
|
|
42937
|
+
/* @__PURE__ */ I(VZ, {
|
|
42830
42938
|
style: { gridTemplateColumns: "repeat(2, 1fr)" },
|
|
42831
|
-
children: [/* @__PURE__ */ F(
|
|
42939
|
+
children: [/* @__PURE__ */ F(HZ, { label: `Student ${s || "Choices"}` }), /* @__PURE__ */ F(HZ, { label: "Correct Order" })]
|
|
42832
42940
|
}),
|
|
42833
|
-
/* @__PURE__ */ F(
|
|
42941
|
+
/* @__PURE__ */ F(VZ, {
|
|
42834
42942
|
style: _,
|
|
42835
|
-
children: p.tiles.map((e, a) => /* @__PURE__ */ F(
|
|
42943
|
+
children: p.tiles.map((e, a) => /* @__PURE__ */ F(jZ, {
|
|
42836
42944
|
choice: e,
|
|
42837
42945
|
index: a,
|
|
42838
42946
|
imageSupport: n,
|
|
@@ -42849,13 +42957,13 @@ var AZ = M("div")({
|
|
|
42849
42957
|
mathMlOptions: f
|
|
42850
42958
|
}, `${e.type}-${e.id}`))
|
|
42851
42959
|
}),
|
|
42852
|
-
g && /* @__PURE__ */ F(
|
|
42853
|
-
/* @__PURE__ */ I(
|
|
42960
|
+
g && /* @__PURE__ */ F(UZ, { children: g }),
|
|
42961
|
+
/* @__PURE__ */ I(zZ, { children: [/* @__PURE__ */ F(BZ, {
|
|
42854
42962
|
onClick: this.shuffleChoices,
|
|
42855
42963
|
size: "small",
|
|
42856
42964
|
variant: "contained",
|
|
42857
42965
|
children: `SHUFFLE ${o}`.toUpperCase()
|
|
42858
|
-
}), /* @__PURE__ */ F(
|
|
42966
|
+
}), /* @__PURE__ */ F(BZ, {
|
|
42859
42967
|
onClick: this.addChoice,
|
|
42860
42968
|
size: "small",
|
|
42861
42969
|
variant: "contained",
|
|
@@ -42869,11 +42977,11 @@ var AZ = M("div")({
|
|
|
42869
42977
|
})
|
|
42870
42978
|
] });
|
|
42871
42979
|
}
|
|
42872
|
-
},
|
|
42873
|
-
function
|
|
42980
|
+
}, GZ = () => "Validation requirements:\nThere should be at least 3 tokens.\nThe tokens should not be empty and should be unique.\nThe correct ordering should not be identical to the initial ordering.";
|
|
42981
|
+
function KZ(e, t) {
|
|
42874
42982
|
return e.type === "target" ? t.response.findIndex((t) => t.id === e.id) : e.type === "choice" ? t.choices.findIndex((t) => t.id === e.id) : -1;
|
|
42875
42983
|
}
|
|
42876
|
-
function
|
|
42984
|
+
function qZ(e, t, n, r) {
|
|
42877
42985
|
let { type: i, index: o } = n, { type: s, index: c } = r;
|
|
42878
42986
|
if (i === "target" && s === "target") {
|
|
42879
42987
|
let { movedItem: n, remainingItems: r } = (a(e) || []).reduce((e, t, n) => (n === o ? e.movedItem = t : e.remainingItems.push(t), e), {
|
|
@@ -42909,7 +43017,7 @@ function RZ(e, t, n, r) {
|
|
|
42909
43017
|
choices: t
|
|
42910
43018
|
};
|
|
42911
43019
|
}
|
|
42912
|
-
function
|
|
43020
|
+
function JZ(e, t) {
|
|
42913
43021
|
let n = t.map((t, n) => {
|
|
42914
43022
|
let r = t && t.id;
|
|
42915
43023
|
return {
|
|
@@ -42929,32 +43037,32 @@ function zZ(e, t) {
|
|
|
42929
43037
|
}
|
|
42930
43038
|
//#endregion
|
|
42931
43039
|
//#region src/author/design.tsx
|
|
42932
|
-
var
|
|
43040
|
+
var YZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: XZ, toggle: ZZ, radio: QZ, dropdown: $Z } = oZ, eQ = (e) => Xt.default.isPlural(e) ? {
|
|
42933
43041
|
singularLabel: Xt.default.singular(e),
|
|
42934
43042
|
pluralLabel: e
|
|
42935
43043
|
} : {
|
|
42936
43044
|
singularLabel: e,
|
|
42937
43045
|
pluralLabel: (0, Xt.default)(e)
|
|
42938
|
-
},
|
|
43046
|
+
}, tQ = M(vZ)(({ theme: e }) => ({
|
|
42939
43047
|
width: "100%",
|
|
42940
43048
|
paddingTop: e.spacing(2),
|
|
42941
43049
|
marginBottom: e.spacing(2)
|
|
42942
|
-
})),
|
|
43050
|
+
})), nQ = M("div")({
|
|
42943
43051
|
display: "grid",
|
|
42944
43052
|
gridAutoFlow: "column",
|
|
42945
43053
|
gridAutoColumns: "1fr",
|
|
42946
43054
|
gridGap: "8px"
|
|
42947
|
-
}),
|
|
43055
|
+
}), rQ = M(yY)(({ theme: e }) => ({
|
|
42948
43056
|
marginTop: 0,
|
|
42949
43057
|
marginBottom: e.spacing(2.5)
|
|
42950
|
-
})),
|
|
43058
|
+
})), iQ = M("div")({
|
|
42951
43059
|
display: "inline-flex",
|
|
42952
43060
|
position: "absolute"
|
|
42953
|
-
}),
|
|
43061
|
+
}), aQ = M("div")(({ theme: e }) => ({
|
|
42954
43062
|
fontSize: e.typography.fontSize - 2,
|
|
42955
43063
|
color: e.palette.error.main,
|
|
42956
43064
|
paddingTop: e.spacing(1)
|
|
42957
|
-
})),
|
|
43065
|
+
})), oQ = class extends pt.Component {
|
|
42958
43066
|
static propTypes = { uploadSoundSupport: L.default.object };
|
|
42959
43067
|
static defaultProps = {};
|
|
42960
43068
|
constructor(e) {
|
|
@@ -42962,7 +43070,7 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
42962
43070
|
let { model: t, onModelChanged: n } = this.props;
|
|
42963
43071
|
n(e(a(t)));
|
|
42964
43072
|
}, this.changeHandler = (e, t) => (n) => {
|
|
42965
|
-
|
|
43073
|
+
YZ("[changeHandler] value: ", n);
|
|
42966
43074
|
let r = t ? (0, Yt.get)(n, t) : n;
|
|
42967
43075
|
this.applyUpdate((t) => ((0, Yt.set)(t, e, r), t));
|
|
42968
43076
|
}, this.onPromptChange = this.changeHandler("prompt"), this.onTeacherInstructionsChange = this.changeHandler("teacherInstructions"), this.onRationaleChange = this.changeHandler("rationale"), this.onChoiceAreaLabelChange = this.changeHandler("choiceLabel", "target.value"), this.onAnswerAreaLabelChange = this.changeHandler("targetLabel", "target.value"), this.onFeedbackChange = this.changeHandler("feedback"), this.onChoiceEditorChange = (e, t) => {
|
|
@@ -42979,47 +43087,47 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
42979
43087
|
if (!r || !n) return;
|
|
42980
43088
|
let i = r.data.current, a = n.data.current, o = t.tiles.find((e) => e.id === a.id && e.type === a.type), s = i, c = {
|
|
42981
43089
|
...o,
|
|
42982
|
-
index:
|
|
43090
|
+
index: KZ(o, t)
|
|
42983
43091
|
}, l = {
|
|
42984
43092
|
...s,
|
|
42985
|
-
index:
|
|
42986
|
-
}, { response: u, choices: d } =
|
|
43093
|
+
index: KZ(s, t)
|
|
43094
|
+
}, { response: u, choices: d } = qZ(t.response, t.choices, c, l);
|
|
42987
43095
|
this.onChoiceEditorChange(d, u);
|
|
42988
43096
|
};
|
|
42989
43097
|
render() {
|
|
42990
43098
|
let { model: e, imageSupport: t, uploadSoundSupport: n, onModelChanged: r, configuration: i, onConfigurationChanged: a } = this.props, { baseInputConfiguration: o = {}, choiceLabel: s = {}, choices: c = {}, contentDimensions: l = {}, feedback: u = {}, prompt: f = {}, placementArea: p = {}, maxImageWidth: m = {}, maxImageHeight: h = {}, numberedGuides: g = {}, orientation: _ = {}, partialScoring: v = {}, rationale: y = {}, removeTilesAfterPlacing: b = {}, settingsPanelDisabled: x, studentInstructions: S = {}, spellCheck: C = {}, scoringType: w = {}, targetLabel: ee = {}, teacherInstructions: T = {}, withRubric: te = {}, mathMlOptions: E = {}, language: ne = {}, languageChoices: re = {} } = i || {}, { choiceLabelEnabled: ie, errors: D, extraCSSRules: ae, feedbackEnabled: oe, promptEnabled: se, rationaleEnabled: ce, spellCheckEnabled: le, teacherInstructionsEnabled: ue, toolbarEditorPosition: O, correctResponse: de } = e || {}, { prompt: k, rationale: fe, teacherInstructions: pe } = D || {}, me = {
|
|
42991
43099
|
choices: e.choices,
|
|
42992
43100
|
response: !de || d(de) ? Array(e.choices.length) : de,
|
|
42993
|
-
tiles:
|
|
42994
|
-
}, he =
|
|
42995
|
-
choiceLabelEnabled: s.settings &&
|
|
42996
|
-
placementArea: p.settings &&
|
|
42997
|
-
numberedGuides: g.settings && e.placementArea &&
|
|
42998
|
-
orientation: _.settings &&
|
|
42999
|
-
removeTilesAfterPlacing: b.settings &&
|
|
43000
|
-
partialScoring: v.settings &&
|
|
43001
|
-
feedbackEnabled: u.settings &&
|
|
43002
|
-
"language.enabled": ne.settings &&
|
|
43003
|
-
language: ne.settings && ne.enabled &&
|
|
43101
|
+
tiles: JZ(e.choices, de)
|
|
43102
|
+
}, he = GZ(), { singularLabel: ge = "", pluralLabel: _e = "" } = c?.label && eQ(c.label) || {}, ve = m && m.prompt, ye = h && h.prompt, be = m && e.placementArea ? m.choicesWithPlacementArea : m.choicesWithoutPlacementArea || ve, xe = h && h.choices || ye, A = { position: O === "top" ? "top" : "bottom" }, Se = {
|
|
43103
|
+
choiceLabelEnabled: s.settings && ZZ(s.label),
|
|
43104
|
+
placementArea: p.settings && ZZ(p.label),
|
|
43105
|
+
numberedGuides: g.settings && e.placementArea && ZZ(g.label),
|
|
43106
|
+
orientation: _.settings && QZ(_.label, ["vertical", "horizontal"]),
|
|
43107
|
+
removeTilesAfterPlacing: b.settings && ZZ(b.label),
|
|
43108
|
+
partialScoring: v.settings && ZZ(v.label),
|
|
43109
|
+
feedbackEnabled: u.settings && ZZ(u.label),
|
|
43110
|
+
"language.enabled": ne.settings && ZZ(ne.label, !0),
|
|
43111
|
+
language: ne.settings && ne.enabled && $Z(re.label, re.options)
|
|
43004
43112
|
}, j = {
|
|
43005
|
-
teacherInstructionsEnabled: T.settings &&
|
|
43006
|
-
studentInstructionsEnabled: S.settings &&
|
|
43007
|
-
rationaleEnabled: y.settings &&
|
|
43008
|
-
promptEnabled: f.settings &&
|
|
43009
|
-
spellCheckEnabled: C.settings &&
|
|
43010
|
-
scoringType: w.settings &&
|
|
43011
|
-
rubricEnabled: te?.settings &&
|
|
43113
|
+
teacherInstructionsEnabled: T.settings && ZZ(T.label),
|
|
43114
|
+
studentInstructionsEnabled: S.settings && ZZ(S.label),
|
|
43115
|
+
rationaleEnabled: y.settings && ZZ(y.label),
|
|
43116
|
+
promptEnabled: f.settings && ZZ(f.label),
|
|
43117
|
+
spellCheckEnabled: C.settings && ZZ(C.label),
|
|
43118
|
+
scoringType: w.settings && QZ(w.label, ["auto", "rubric"]),
|
|
43119
|
+
rubricEnabled: te?.settings && ZZ(te?.label)
|
|
43012
43120
|
}, Ce = (e = {}) => ({
|
|
43013
43121
|
...o,
|
|
43014
43122
|
...e
|
|
43015
43123
|
});
|
|
43016
43124
|
return /* @__PURE__ */ F(nt, {
|
|
43017
43125
|
onDragEnd: (e) => this.onDragEnd(e, me),
|
|
43018
|
-
children: /* @__PURE__ */ I(
|
|
43126
|
+
children: /* @__PURE__ */ I(jX.ConfigLayout, {
|
|
43019
43127
|
extraCSSRules: ae,
|
|
43020
43128
|
dimensions: l,
|
|
43021
43129
|
hideSettings: x,
|
|
43022
|
-
settings: /* @__PURE__ */ F(
|
|
43130
|
+
settings: /* @__PURE__ */ F(XZ, {
|
|
43023
43131
|
model: e,
|
|
43024
43132
|
configuration: i,
|
|
43025
43133
|
onChangeModel: (e) => r(e),
|
|
@@ -43030,9 +43138,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43030
43138
|
}
|
|
43031
43139
|
}),
|
|
43032
43140
|
children: [
|
|
43033
|
-
ue && /* @__PURE__ */ I(
|
|
43141
|
+
ue && /* @__PURE__ */ I(tQ, {
|
|
43034
43142
|
label: T.label,
|
|
43035
|
-
children: [/* @__PURE__ */ F(
|
|
43143
|
+
children: [/* @__PURE__ */ F(GJ, {
|
|
43036
43144
|
className: "prompt",
|
|
43037
43145
|
markup: e.teacherInstructions || "",
|
|
43038
43146
|
onChange: this.onTeacherInstructionsChange,
|
|
@@ -43052,9 +43160,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43052
43160
|
children: pe
|
|
43053
43161
|
})]
|
|
43054
43162
|
}),
|
|
43055
|
-
se && /* @__PURE__ */ I(
|
|
43163
|
+
se && /* @__PURE__ */ I(tQ, {
|
|
43056
43164
|
label: f && f.label,
|
|
43057
|
-
children: [/* @__PURE__ */ F(
|
|
43165
|
+
children: [/* @__PURE__ */ F(GJ, {
|
|
43058
43166
|
className: "prompt",
|
|
43059
43167
|
markup: e.prompt,
|
|
43060
43168
|
onChange: this.onPromptChange,
|
|
@@ -43073,11 +43181,11 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43073
43181
|
children: k
|
|
43074
43182
|
})]
|
|
43075
43183
|
}),
|
|
43076
|
-
/* @__PURE__ */ I(
|
|
43184
|
+
/* @__PURE__ */ I(rQ, {
|
|
43077
43185
|
label: `Define ${_e}`,
|
|
43078
43186
|
labelExtraStyle: { display: "inline-flex" },
|
|
43079
43187
|
children: [
|
|
43080
|
-
/* @__PURE__ */ F(
|
|
43188
|
+
/* @__PURE__ */ F(iQ, { children: /* @__PURE__ */ F(pi, {
|
|
43081
43189
|
slotProps: { tooltip: { sx: {
|
|
43082
43190
|
fontSize: 14,
|
|
43083
43191
|
whiteSpace: "pre",
|
|
@@ -43093,9 +43201,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43093
43201
|
style: { marginLeft: "8px" }
|
|
43094
43202
|
})
|
|
43095
43203
|
}) }),
|
|
43096
|
-
/* @__PURE__ */ I(
|
|
43204
|
+
/* @__PURE__ */ I(nQ, { children: [ie && /* @__PURE__ */ F(tQ, {
|
|
43097
43205
|
label: s && s.label && `${ge} label`,
|
|
43098
|
-
children: /* @__PURE__ */ F(
|
|
43206
|
+
children: /* @__PURE__ */ F(GJ, {
|
|
43099
43207
|
...e.placementArea && { autoWidthToolbar: !0 },
|
|
43100
43208
|
className: "prompt",
|
|
43101
43209
|
markup: e.choiceLabel,
|
|
@@ -43109,9 +43217,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43109
43217
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
43110
43218
|
mathMlOptions: E
|
|
43111
43219
|
})
|
|
43112
|
-
}), ee.settings && e.placementArea && /* @__PURE__ */ F(
|
|
43220
|
+
}), ee.settings && e.placementArea && /* @__PURE__ */ F(tQ, {
|
|
43113
43221
|
label: ee && ee.label && ee.label,
|
|
43114
|
-
children: /* @__PURE__ */ F(
|
|
43222
|
+
children: /* @__PURE__ */ F(GJ, {
|
|
43115
43223
|
autoWidthToolbar: !0,
|
|
43116
43224
|
className: "prompt",
|
|
43117
43225
|
markup: e.targetLabel,
|
|
@@ -43125,7 +43233,7 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43125
43233
|
mathMlOptions: E
|
|
43126
43234
|
})
|
|
43127
43235
|
})] }),
|
|
43128
|
-
c.settings && /* @__PURE__ */ F(
|
|
43236
|
+
c.settings && /* @__PURE__ */ F(WZ, {
|
|
43129
43237
|
correctResponse: de,
|
|
43130
43238
|
choices: e.choices,
|
|
43131
43239
|
onChange: this.onChoiceEditorChange,
|
|
@@ -43145,9 +43253,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43145
43253
|
})
|
|
43146
43254
|
]
|
|
43147
43255
|
}),
|
|
43148
|
-
ce && /* @__PURE__ */ I(
|
|
43256
|
+
ce && /* @__PURE__ */ I(tQ, {
|
|
43149
43257
|
label: y.label,
|
|
43150
|
-
children: [/* @__PURE__ */ F(
|
|
43258
|
+
children: [/* @__PURE__ */ F(GJ, {
|
|
43151
43259
|
className: "prompt",
|
|
43152
43260
|
markup: e.rationale || "",
|
|
43153
43261
|
onChange: this.onRationaleChange,
|
|
@@ -43161,9 +43269,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43161
43269
|
uploadSoundSupport: n,
|
|
43162
43270
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
43163
43271
|
mathMlOptions: E
|
|
43164
|
-
}), fe && /* @__PURE__ */ F(
|
|
43272
|
+
}), fe && /* @__PURE__ */ F(aQ, { children: fe })]
|
|
43165
43273
|
}),
|
|
43166
|
-
oe && /* @__PURE__ */ F(
|
|
43274
|
+
oe && /* @__PURE__ */ F(dY, {
|
|
43167
43275
|
feedback: e.feedback,
|
|
43168
43276
|
onChange: this.onFeedbackChange,
|
|
43169
43277
|
imageSupport: t,
|
|
@@ -43174,10 +43282,10 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
|
|
|
43174
43282
|
});
|
|
43175
43283
|
}
|
|
43176
43284
|
};
|
|
43177
|
-
|
|
43285
|
+
oQ.defaultProps = {
|
|
43178
43286
|
onModelChanged: () => {},
|
|
43179
43287
|
onConfigurationChanged: () => {}
|
|
43180
|
-
},
|
|
43288
|
+
}, oQ.propTypes = {
|
|
43181
43289
|
model: L.default.object.isRequired,
|
|
43182
43290
|
configuration: L.default.object.isRequired,
|
|
43183
43291
|
onModelChanged: L.default.func,
|
|
@@ -43186,7 +43294,7 @@ ZZ.defaultProps = {
|
|
|
43186
43294
|
};
|
|
43187
43295
|
//#endregion
|
|
43188
43296
|
//#region src/author/defaults.ts
|
|
43189
|
-
var
|
|
43297
|
+
var sQ = {
|
|
43190
43298
|
model: {
|
|
43191
43299
|
choiceLabel: "",
|
|
43192
43300
|
choiceLabelEnabled: !0,
|
|
@@ -43341,31 +43449,31 @@ var QZ = {
|
|
|
43341
43449
|
options: []
|
|
43342
43450
|
}
|
|
43343
43451
|
}
|
|
43344
|
-
},
|
|
43345
|
-
configuration: r(e,
|
|
43452
|
+
}, cQ = (e, t) => ({
|
|
43453
|
+
configuration: r(e, sQ.configuration),
|
|
43346
43454
|
model: t
|
|
43347
|
-
}),
|
|
43455
|
+
}), lQ = (e) => e && e.map((e) => e.weight === void 0 ? {
|
|
43348
43456
|
id: e.id || e,
|
|
43349
43457
|
weight: 0
|
|
43350
43458
|
} : {
|
|
43351
43459
|
id: e.id,
|
|
43352
43460
|
weight: e.weight
|
|
43353
|
-
}),
|
|
43461
|
+
}), uQ = class e extends HTMLElement {
|
|
43354
43462
|
static createDefaultModel = (e = {}) => {
|
|
43355
|
-
let t =
|
|
43463
|
+
let t = lQ(e.correctResponse) || ((e) => e && e.map((e) => ({
|
|
43356
43464
|
id: e.id,
|
|
43357
43465
|
weight: 0
|
|
43358
43466
|
})))(e.choices), n = {
|
|
43359
|
-
...
|
|
43467
|
+
...sQ.model,
|
|
43360
43468
|
...e
|
|
43361
43469
|
};
|
|
43362
43470
|
return t && (n.correctResponse = t), n;
|
|
43363
43471
|
};
|
|
43364
43472
|
constructor() {
|
|
43365
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration =
|
|
43473
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = sQ.configuration, this.onModelChanged = (e, t) => {
|
|
43366
43474
|
this._model = e, this._rerender(), this.dispatchUpdate(t);
|
|
43367
43475
|
}, this.onConfigurationChanged = (e) => {
|
|
43368
|
-
this._configuration =
|
|
43476
|
+
this._configuration = cQ(e).configuration, this.onModelChanged(this._model), this._rerender();
|
|
43369
43477
|
}, this.insertImage = (e) => {
|
|
43370
43478
|
this.dispatchEvent(new Ut(e));
|
|
43371
43479
|
}, this.deleteImage = (e, t) => {
|
|
@@ -43379,10 +43487,10 @@ var QZ = {
|
|
|
43379
43487
|
this._model = e.createDefaultModel(t), this._rerender();
|
|
43380
43488
|
}
|
|
43381
43489
|
set configuration(e) {
|
|
43382
|
-
let t =
|
|
43490
|
+
let t = cQ(e, this._model);
|
|
43383
43491
|
this.onModelChanged(t.model);
|
|
43384
43492
|
let n = {
|
|
43385
|
-
...
|
|
43493
|
+
...sQ.configuration,
|
|
43386
43494
|
...t.configuration
|
|
43387
43495
|
};
|
|
43388
43496
|
this._configuration = n, n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.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({
|
|
@@ -43397,7 +43505,7 @@ var QZ = {
|
|
|
43397
43505
|
this.dispatchEvent(new Wt(e, t));
|
|
43398
43506
|
}
|
|
43399
43507
|
_rerender() {
|
|
43400
|
-
let e = pt.createElement(
|
|
43508
|
+
let e = pt.createElement(oQ, {
|
|
43401
43509
|
model: this._model,
|
|
43402
43510
|
configuration: this._configuration,
|
|
43403
43511
|
onModelChanged: this.onModelChanged,
|
|
@@ -43421,6 +43529,6 @@ var QZ = {
|
|
|
43421
43529
|
}
|
|
43422
43530
|
};
|
|
43423
43531
|
//#endregion
|
|
43424
|
-
export {
|
|
43532
|
+
export { lQ as addWeightToCorrectResponse, uQ as default };
|
|
43425
43533
|
|
|
43426
43534
|
//# sourceMappingURL=index.js.map
|