@pie-element/fraction-model 6.1.2-next.7 → 6.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 +567 -459
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/{delivery-Dno334Uk.js → delivery-C4VfEPIn.js} +4255 -4253
- package/dist/browser/delivery-C4VfEPIn.js.map +1 -0
- package/dist/index.iife.js +28 -28
- package/package.json +5 -5
- package/dist/browser/delivery-Dno334Uk.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as ee, Y as te, Z as ne, _ as re, _t as ie, a as ae, at as w, b as oe, bt as se, c as ce, ct as le, d as ue, dt as de, et as T, f as fe, ft as pe, g as me, gt as he, h as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, o as Oe, ot as ke, p as Ae, pt as je, q as Me, r as Ne, rt as Pe, s as Fe, st as Ie, tt as Le, u as E, ut as Re, v as ze, vt as Be, w as Ve, x as He, y as Ue, yt as We, z as Ge } from "../delivery-
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as ee, Y as te, Z as ne, _ as re, _t as ie, a as ae, at as w, b as oe, bt as se, c as ce, ct as le, d as ue, dt as de, et as T, f as fe, ft as pe, g as me, gt as he, h as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, o as Oe, ot as ke, p as Ae, pt as je, q as Me, r as Ne, rt as Pe, s as Fe, st as Ie, tt as Le, u as E, ut as Re, v as ze, vt as Be, w as Ve, x as He, y as Ue, yt as We, z as Ge } from "../delivery-C4VfEPIn.js";
|
|
2
2
|
import { a as Ke, c as qe, d as Je, i as Ye, l as Xe, n as Ze, o as Qe, r as $e, s as et, t as tt, u as nt } from "../dist-ClmZaEGT.js";
|
|
3
3
|
import * as D from "react";
|
|
4
4
|
import O, { Component as rt, createContext as it, createElement as at, createRef as ot, forwardRef as st, memo as ct, useCallback as lt, useContext as ut, useDebugValue as dt, useEffect as ft, useLayoutEffect as pt, useMemo as mt, useRef as ht, useState as gt, version as _t } from "react";
|
|
@@ -37398,8 +37398,8 @@ Iv.create({
|
|
|
37398
37398
|
})) ?? null };
|
|
37399
37399
|
}
|
|
37400
37400
|
});
|
|
37401
|
-
var IG = "placeholder", LG = new L("tiptap__placeholder")
|
|
37402
|
-
function
|
|
37401
|
+
var IG = "placeholder", LG = new L("tiptap__placeholder");
|
|
37402
|
+
function RG(e) {
|
|
37403
37403
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
37404
37404
|
return o && u.push(l), zm.node(i, i + a.nodeSize, {
|
|
37405
37405
|
class: u.join(" "),
|
|
@@ -37411,156 +37411,198 @@ function zG(e) {
|
|
|
37411
37411
|
}) : n
|
|
37412
37412
|
});
|
|
37413
37413
|
}
|
|
37414
|
-
function
|
|
37414
|
+
function zG(e, t) {
|
|
37415
|
+
return typeof e == "function" ? e(t) : e;
|
|
37416
|
+
}
|
|
37417
|
+
function BG({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
37418
|
+
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
37419
|
+
return r.nodesBetween(a, o, (r, i) => {
|
|
37420
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && W_(r);
|
|
37421
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(RG({
|
|
37422
|
+
editor: e,
|
|
37423
|
+
isEmptyDoc: l,
|
|
37424
|
+
dataAttribute: n,
|
|
37425
|
+
hasAnchor: a,
|
|
37426
|
+
placeholder: t.placeholder,
|
|
37427
|
+
classes: {
|
|
37428
|
+
emptyEditor: t.emptyEditorClass,
|
|
37429
|
+
emptyNode: zG(t.emptyNodeClass, {
|
|
37430
|
+
editor: e,
|
|
37431
|
+
node: r,
|
|
37432
|
+
pos: i,
|
|
37433
|
+
hasAnchor: a
|
|
37434
|
+
})
|
|
37435
|
+
},
|
|
37436
|
+
node: r,
|
|
37437
|
+
pos: i
|
|
37438
|
+
})), t.includeChildren;
|
|
37439
|
+
}), c;
|
|
37440
|
+
}
|
|
37441
|
+
function VG({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
37415
37442
|
if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
|
|
37416
|
-
let { anchor: a } = i, o = [], s = e.isEmpty
|
|
37417
|
-
emptyEditor: t.emptyEditorClass,
|
|
37418
|
-
emptyNode: t.emptyNodeClass
|
|
37419
|
-
};
|
|
37443
|
+
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
37420
37444
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
37421
|
-
let i = r.resolve(a),
|
|
37422
|
-
if (
|
|
37423
|
-
let r = a >=
|
|
37424
|
-
o.push(
|
|
37445
|
+
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
37446
|
+
if (c && c.type.isTextblock && W_(c)) {
|
|
37447
|
+
let r = a >= l && a <= l + c.nodeSize;
|
|
37448
|
+
o.push(RG({
|
|
37425
37449
|
editor: e,
|
|
37426
37450
|
isEmptyDoc: s,
|
|
37427
37451
|
dataAttribute: n,
|
|
37428
37452
|
hasAnchor: r,
|
|
37429
37453
|
placeholder: t.placeholder,
|
|
37430
|
-
classes:
|
|
37431
|
-
|
|
37432
|
-
|
|
37454
|
+
classes: {
|
|
37455
|
+
emptyEditor: t.emptyEditorClass,
|
|
37456
|
+
emptyNode: zG(t.emptyNodeClass, {
|
|
37457
|
+
editor: e,
|
|
37458
|
+
node: c,
|
|
37459
|
+
pos: l,
|
|
37460
|
+
hasAnchor: r
|
|
37461
|
+
})
|
|
37462
|
+
},
|
|
37463
|
+
node: c,
|
|
37464
|
+
pos: l
|
|
37433
37465
|
}));
|
|
37434
37466
|
}
|
|
37435
|
-
} else {
|
|
37436
|
-
|
|
37437
|
-
|
|
37438
|
-
|
|
37439
|
-
|
|
37440
|
-
|
|
37441
|
-
|
|
37442
|
-
|
|
37443
|
-
|
|
37444
|
-
placeholder: t.placeholder,
|
|
37445
|
-
classes: c,
|
|
37446
|
-
node: r,
|
|
37447
|
-
pos: i
|
|
37448
|
-
})), t.includeChildren;
|
|
37449
|
-
});
|
|
37450
|
-
}
|
|
37467
|
+
} else o.push(...BG({
|
|
37468
|
+
editor: e,
|
|
37469
|
+
options: t,
|
|
37470
|
+
dataAttribute: n,
|
|
37471
|
+
doc: r,
|
|
37472
|
+
selection: i,
|
|
37473
|
+
from: 0,
|
|
37474
|
+
to: r.content.size
|
|
37475
|
+
}));
|
|
37451
37476
|
return Hm.create(r, o);
|
|
37452
37477
|
}
|
|
37453
|
-
function
|
|
37454
|
-
|
|
37478
|
+
function HG(e, t) {
|
|
37479
|
+
let n = e.resolve(t);
|
|
37480
|
+
if (n.depth === 0) {
|
|
37481
|
+
let e = n.nodeAfter ?? n.nodeBefore;
|
|
37482
|
+
if (!e) return {
|
|
37483
|
+
from: t,
|
|
37484
|
+
to: t
|
|
37485
|
+
};
|
|
37486
|
+
let r = n.nodeAfter ? t : t - e.nodeSize;
|
|
37487
|
+
return {
|
|
37488
|
+
from: r,
|
|
37489
|
+
to: r + e.nodeSize
|
|
37490
|
+
};
|
|
37491
|
+
}
|
|
37492
|
+
let r = n.before(1);
|
|
37493
|
+
return {
|
|
37494
|
+
from: r,
|
|
37495
|
+
to: r + n.node(1).nodeSize
|
|
37496
|
+
};
|
|
37455
37497
|
}
|
|
37456
|
-
function
|
|
37457
|
-
|
|
37458
|
-
|
|
37498
|
+
function UG(e, t) {
|
|
37499
|
+
return {
|
|
37500
|
+
from: Math.max(0, t.from - 1),
|
|
37501
|
+
to: Math.min(e.content.size, t.to - 1)
|
|
37502
|
+
};
|
|
37459
37503
|
}
|
|
37460
|
-
function
|
|
37461
|
-
let
|
|
37462
|
-
|
|
37463
|
-
|
|
37464
|
-
|
|
37465
|
-
|
|
37466
|
-
|
|
37467
|
-
|
|
37468
|
-
|
|
37469
|
-
|
|
37470
|
-
|
|
37471
|
-
|
|
37472
|
-
|
|
37473
|
-
|
|
37504
|
+
function WG(e, t, n) {
|
|
37505
|
+
let r = [];
|
|
37506
|
+
return e.forEach((e, i) => {
|
|
37507
|
+
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
37508
|
+
s < n && c > t && r.push({
|
|
37509
|
+
from: a,
|
|
37510
|
+
to: o
|
|
37511
|
+
});
|
|
37512
|
+
}), r;
|
|
37513
|
+
}
|
|
37514
|
+
function GG(e) {
|
|
37515
|
+
if (e.length === 0) return [];
|
|
37516
|
+
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
37517
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
37518
|
+
let r = n[n.length - 1], i = t[e];
|
|
37519
|
+
i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
|
|
37474
37520
|
}
|
|
37475
|
-
return
|
|
37521
|
+
return n;
|
|
37476
37522
|
}
|
|
37477
|
-
function
|
|
37478
|
-
|
|
37479
|
-
|
|
37480
|
-
bottom: window.innerHeight
|
|
37481
|
-
} : e.getBoundingClientRect();
|
|
37523
|
+
function KG(e, t) {
|
|
37524
|
+
let n = WG(e, t.from, t.to);
|
|
37525
|
+
return n.push(UG(e, HG(e, t.from))), t.to > t.from ? n.push(UG(e, HG(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(UG(e, HG(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
37482
37526
|
}
|
|
37483
|
-
function
|
|
37484
|
-
let r =
|
|
37485
|
-
|
|
37486
|
-
|
|
37487
|
-
|
|
37488
|
-
|
|
37489
|
-
|
|
37490
|
-
bottom: e.content.size
|
|
37491
|
-
};
|
|
37492
|
-
let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
|
|
37493
|
-
left: s,
|
|
37494
|
-
top: a + 2
|
|
37495
|
-
}), l = t.posAtCoords({
|
|
37496
|
-
left: s,
|
|
37497
|
-
top: o - 2
|
|
37498
|
-
});
|
|
37499
|
-
return {
|
|
37500
|
-
top: c ? c.pos : 0,
|
|
37501
|
-
bottom: l ? l.pos : e.content.size
|
|
37502
|
-
};
|
|
37527
|
+
function qG(e, t, n) {
|
|
37528
|
+
let r = [];
|
|
37529
|
+
if (e.docChanged) {
|
|
37530
|
+
let t = N_(e);
|
|
37531
|
+
for (let e of t) r.push(...KG(n.doc, e.newRange));
|
|
37532
|
+
}
|
|
37533
|
+
return e.selectionSet && (r.push(UG(n.doc, HG(n.doc, e.mapping.map(t.selection.anchor)))), r.push(UG(n.doc, HG(n.doc, n.selection.anchor)))), GG(r);
|
|
37503
37534
|
}
|
|
37504
|
-
|
|
37505
|
-
|
|
37506
|
-
|
|
37507
|
-
|
|
37508
|
-
|
|
37509
|
-
|
|
37510
|
-
|
|
37511
|
-
|
|
37512
|
-
|
|
37513
|
-
|
|
37514
|
-
|
|
37515
|
-
|
|
37516
|
-
|
|
37517
|
-
|
|
37518
|
-
|
|
37519
|
-
|
|
37535
|
+
function JG(e, t, n) {
|
|
37536
|
+
let r = Math.max(0, Math.min(e, n.content.size));
|
|
37537
|
+
return {
|
|
37538
|
+
from: r,
|
|
37539
|
+
to: Math.max(r, Math.min(t, n.content.size))
|
|
37540
|
+
};
|
|
37541
|
+
}
|
|
37542
|
+
function YG({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
37543
|
+
let s = e;
|
|
37544
|
+
for (let e of t) {
|
|
37545
|
+
let { from: t, to: c } = JG(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
37546
|
+
l.length && (s = s.remove(l));
|
|
37547
|
+
let u = BG({
|
|
37548
|
+
editor: n,
|
|
37549
|
+
options: r,
|
|
37550
|
+
dataAttribute: i,
|
|
37551
|
+
doc: a,
|
|
37552
|
+
selection: o,
|
|
37553
|
+
from: t,
|
|
37554
|
+
to: c
|
|
37555
|
+
});
|
|
37556
|
+
u.length && (s = s.add(a, u));
|
|
37520
37557
|
}
|
|
37521
|
-
|
|
37522
|
-
|
|
37523
|
-
|
|
37524
|
-
|
|
37525
|
-
|
|
37526
|
-
|
|
37527
|
-
|
|
37528
|
-
|
|
37529
|
-
|
|
37530
|
-
|
|
37531
|
-
|
|
37532
|
-
|
|
37533
|
-
r === null && (r = requestAnimationFrame(() => {
|
|
37534
|
-
r = null;
|
|
37535
|
-
let e = performance.now();
|
|
37536
|
-
e - i >= 150 ? (i = e, n()) : a();
|
|
37537
|
-
}));
|
|
37538
|
-
};
|
|
37539
|
-
return t.addEventListener("scroll", a, { passive: !0 }), n(), {
|
|
37540
|
-
update(t, n) {
|
|
37541
|
-
e.state.doc.content.size !== n.doc.content.size && a();
|
|
37558
|
+
return s;
|
|
37559
|
+
}
|
|
37560
|
+
function XG({ editor: e, options: t, dataAttribute: n }) {
|
|
37561
|
+
return {
|
|
37562
|
+
init(r, i) {
|
|
37563
|
+
return VG({
|
|
37564
|
+
editor: e,
|
|
37565
|
+
options: t,
|
|
37566
|
+
dataAttribute: n,
|
|
37567
|
+
doc: i.doc,
|
|
37568
|
+
selection: i.selection
|
|
37569
|
+
}) ?? Hm.empty;
|
|
37542
37570
|
},
|
|
37543
|
-
|
|
37544
|
-
r
|
|
37571
|
+
apply(r, i, a, o) {
|
|
37572
|
+
return !r.docChanged && !r.selectionSet ? i : YG({
|
|
37573
|
+
decorations: i.map(r.mapping, r.doc),
|
|
37574
|
+
ranges: qG(r, a, o),
|
|
37575
|
+
editor: e,
|
|
37576
|
+
options: t,
|
|
37577
|
+
dataAttribute: n,
|
|
37578
|
+
doc: o.doc,
|
|
37579
|
+
selection: o.selection
|
|
37580
|
+
});
|
|
37545
37581
|
}
|
|
37546
37582
|
};
|
|
37547
37583
|
}
|
|
37548
|
-
function
|
|
37549
|
-
|
|
37584
|
+
function ZG(e) {
|
|
37585
|
+
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
37586
|
+
}
|
|
37587
|
+
function QG({ editor: e, options: t }) {
|
|
37588
|
+
let n = t.dataAttribute ? `data-${ZG(t.dataAttribute)}` : `data-${IG}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
37550
37589
|
return new I({
|
|
37551
37590
|
key: LG,
|
|
37552
|
-
state:
|
|
37553
|
-
|
|
37554
|
-
|
|
37591
|
+
...r ? {} : { state: XG({
|
|
37592
|
+
editor: e,
|
|
37593
|
+
options: t,
|
|
37594
|
+
dataAttribute: n
|
|
37595
|
+
}) },
|
|
37596
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => VG({
|
|
37555
37597
|
editor: e,
|
|
37556
37598
|
options: t,
|
|
37557
37599
|
dataAttribute: n,
|
|
37558
37600
|
doc: r,
|
|
37559
37601
|
selection: i
|
|
37560
|
-
}) }
|
|
37602
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Hm.empty : LG.getState(n) ?? Hm.empty }
|
|
37561
37603
|
});
|
|
37562
37604
|
}
|
|
37563
|
-
var
|
|
37605
|
+
var $G = Iv.create({
|
|
37564
37606
|
name: "placeholder",
|
|
37565
37607
|
addOptions() {
|
|
37566
37608
|
return {
|
|
@@ -37574,12 +37616,25 @@ var YG = Iv.create({
|
|
|
37574
37616
|
};
|
|
37575
37617
|
},
|
|
37576
37618
|
addProseMirrorPlugins() {
|
|
37577
|
-
return [
|
|
37619
|
+
return [QG({
|
|
37578
37620
|
editor: this.editor,
|
|
37579
37621
|
options: this.options
|
|
37580
37622
|
})];
|
|
37581
37623
|
}
|
|
37582
37624
|
});
|
|
37625
|
+
function eK(e, t) {
|
|
37626
|
+
return !e.selection.empty && !G_(e.selection) && t.isEditable;
|
|
37627
|
+
}
|
|
37628
|
+
function tK(e, t) {
|
|
37629
|
+
return eK(e, t) && !t.isFocused && !t.view.dragging;
|
|
37630
|
+
}
|
|
37631
|
+
function nK() {
|
|
37632
|
+
var e;
|
|
37633
|
+
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
37634
|
+
}
|
|
37635
|
+
function rK(e) {
|
|
37636
|
+
e.focus();
|
|
37637
|
+
}
|
|
37583
37638
|
Iv.create({
|
|
37584
37639
|
name: "selection",
|
|
37585
37640
|
addOptions() {
|
|
@@ -37589,13 +37644,25 @@ Iv.create({
|
|
|
37589
37644
|
let { editor: e, options: t } = this;
|
|
37590
37645
|
return [new I({
|
|
37591
37646
|
key: new L("selection"),
|
|
37592
|
-
props: {
|
|
37593
|
-
|
|
37594
|
-
|
|
37647
|
+
props: {
|
|
37648
|
+
decorations(n) {
|
|
37649
|
+
return tK(n, e) ? Hm.create(n.doc, [zm.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
37650
|
+
},
|
|
37651
|
+
handleDOMEvents: {
|
|
37652
|
+
blur(t) {
|
|
37653
|
+
return eK(t.state, e) && nK(), !1;
|
|
37654
|
+
},
|
|
37655
|
+
focus(t) {
|
|
37656
|
+
return eK(t.state, e) && requestAnimationFrame(() => {
|
|
37657
|
+
!e.isDestroyed && t.hasFocus() && rK(t);
|
|
37658
|
+
}), !1;
|
|
37659
|
+
}
|
|
37660
|
+
}
|
|
37661
|
+
}
|
|
37595
37662
|
})];
|
|
37596
37663
|
}
|
|
37597
37664
|
});
|
|
37598
|
-
function
|
|
37665
|
+
function iK({ types: e, node: t }) {
|
|
37599
37666
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
37600
37667
|
}
|
|
37601
37668
|
Iv.create({
|
|
@@ -37617,7 +37684,7 @@ Iv.create({
|
|
|
37617
37684
|
state: {
|
|
37618
37685
|
init: (e, t) => {
|
|
37619
37686
|
let r = t.tr.doc.lastChild;
|
|
37620
|
-
return !
|
|
37687
|
+
return !iK({
|
|
37621
37688
|
node: r,
|
|
37622
37689
|
types: n
|
|
37623
37690
|
});
|
|
@@ -37625,7 +37692,7 @@ Iv.create({
|
|
|
37625
37692
|
apply: (e, t) => {
|
|
37626
37693
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
37627
37694
|
let r = e.doc.lastChild;
|
|
37628
|
-
return !
|
|
37695
|
+
return !iK({
|
|
37629
37696
|
node: r,
|
|
37630
37697
|
types: n
|
|
37631
37698
|
});
|
|
@@ -37660,7 +37727,7 @@ Iv.create({
|
|
|
37660
37727
|
};
|
|
37661
37728
|
}
|
|
37662
37729
|
});
|
|
37663
|
-
var
|
|
37730
|
+
var aK = Ov.create({
|
|
37664
37731
|
name: "superscript",
|
|
37665
37732
|
addOptions() {
|
|
37666
37733
|
return { HTMLAttributes: {} };
|
|
@@ -37690,7 +37757,7 @@ var ZG = Ov.create({
|
|
|
37690
37757
|
addKeyboardShortcuts() {
|
|
37691
37758
|
return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
|
|
37692
37759
|
}
|
|
37693
|
-
}),
|
|
37760
|
+
}), oK = Ov.create({
|
|
37694
37761
|
name: "subscript",
|
|
37695
37762
|
addOptions() {
|
|
37696
37763
|
return { HTMLAttributes: {} };
|
|
@@ -37720,7 +37787,7 @@ var ZG = Ov.create({
|
|
|
37720
37787
|
addKeyboardShortcuts() {
|
|
37721
37788
|
return { "Mod-,": () => this.editor.commands.toggleSubscript() };
|
|
37722
37789
|
}
|
|
37723
|
-
}),
|
|
37790
|
+
}), sK = Iv.create({
|
|
37724
37791
|
name: "textAlign",
|
|
37725
37792
|
addOptions() {
|
|
37726
37793
|
return {
|
|
@@ -37762,7 +37829,7 @@ var ZG = Ov.create({
|
|
|
37762
37829
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
37763
37830
|
};
|
|
37764
37831
|
}
|
|
37765
|
-
}),
|
|
37832
|
+
}), cK = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, lK = fy.create({
|
|
37766
37833
|
name: "image",
|
|
37767
37834
|
addOptions() {
|
|
37768
37835
|
return {
|
|
@@ -37805,34 +37872,55 @@ var ZG = Ov.create({
|
|
|
37805
37872
|
},
|
|
37806
37873
|
addNodeView() {
|
|
37807
37874
|
if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
|
|
37808
|
-
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize
|
|
37809
|
-
|
|
37810
|
-
|
|
37811
|
-
|
|
37875
|
+
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize, i = /* @__PURE__ */ new Set([
|
|
37876
|
+
"src",
|
|
37877
|
+
"width",
|
|
37878
|
+
"height"
|
|
37879
|
+
]);
|
|
37880
|
+
return ({ node: a, getPos: o, HTMLAttributes: s, editor: c }) => {
|
|
37881
|
+
let l = document.createElement("img");
|
|
37882
|
+
l.draggable = !1;
|
|
37883
|
+
let u = g_(this.options.HTMLAttributes, s);
|
|
37884
|
+
Object.entries(u).forEach(([e, t]) => {
|
|
37812
37885
|
if (t != null) switch (e) {
|
|
37886
|
+
case "src":
|
|
37813
37887
|
case "width":
|
|
37814
37888
|
case "height": break;
|
|
37815
|
-
default:
|
|
37816
|
-
c.setAttribute(e, t);
|
|
37817
|
-
break;
|
|
37889
|
+
default: l.setAttribute(e, t);
|
|
37818
37890
|
}
|
|
37819
|
-
}),
|
|
37820
|
-
let
|
|
37821
|
-
|
|
37822
|
-
|
|
37823
|
-
|
|
37824
|
-
|
|
37891
|
+
}), u.src !== null && (l.src = u.src);
|
|
37892
|
+
let d = { ...s }, f = (e) => {
|
|
37893
|
+
if (typeof e == "string" && e !== "") {
|
|
37894
|
+
l.getAttribute("src") !== e && (l.src = e);
|
|
37895
|
+
return;
|
|
37896
|
+
}
|
|
37897
|
+
l.hasAttribute("src") && l.removeAttribute("src"), l.src !== "" && (l.src = "");
|
|
37898
|
+
};
|
|
37899
|
+
f(s.src);
|
|
37900
|
+
let p = new ty({
|
|
37901
|
+
element: l,
|
|
37902
|
+
editor: c,
|
|
37903
|
+
node: a,
|
|
37904
|
+
getPos: o,
|
|
37825
37905
|
onResize: (e, t) => {
|
|
37826
|
-
|
|
37906
|
+
l.style.width = `${e}px`, l.style.height = `${t}px`;
|
|
37827
37907
|
},
|
|
37828
37908
|
onCommit: (e, t) => {
|
|
37829
|
-
let n =
|
|
37909
|
+
let n = o();
|
|
37830
37910
|
n !== void 0 && this.editor.chain().setNodeSelection(n).updateAttributes(this.name, {
|
|
37831
37911
|
width: e,
|
|
37832
37912
|
height: t
|
|
37833
37913
|
}).run();
|
|
37834
37914
|
},
|
|
37835
|
-
onUpdate: (e
|
|
37915
|
+
onUpdate: (e) => {
|
|
37916
|
+
if (e.type !== a.type) return !1;
|
|
37917
|
+
let t = __(e, c.extensionManager.attributes.filter((t) => t.type === e.type.name));
|
|
37918
|
+
return Object.keys(d).forEach((e) => {
|
|
37919
|
+
!i.has(e) && !(e in t) && l.removeAttribute(e);
|
|
37920
|
+
}), Object.entries(t).forEach(([e, t]) => {
|
|
37921
|
+
i.has(e) || (t == null ? l.removeAttribute(e) : l.setAttribute(e, t));
|
|
37922
|
+
}), f(t.src), d = t, !0;
|
|
37923
|
+
},
|
|
37836
37924
|
options: {
|
|
37837
37925
|
directions: e,
|
|
37838
37926
|
min: {
|
|
@@ -37841,10 +37929,10 @@ var ZG = Ov.create({
|
|
|
37841
37929
|
},
|
|
37842
37930
|
preserveAspectRatio: r === !0
|
|
37843
37931
|
}
|
|
37844
|
-
}),
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
|
|
37932
|
+
}), m = p.dom, h = () => {
|
|
37933
|
+
m.style.visibility = "", m.style.pointerEvents = "";
|
|
37934
|
+
};
|
|
37935
|
+
return m.style.visibility = "hidden", m.style.pointerEvents = "none", l.complete && l.naturalWidth > 0 ? h() : (l.onload = h, l.onerror = h), p;
|
|
37848
37936
|
};
|
|
37849
37937
|
},
|
|
37850
37938
|
addCommands() {
|
|
@@ -37855,7 +37943,7 @@ var ZG = Ov.create({
|
|
|
37855
37943
|
},
|
|
37856
37944
|
addInputRules() {
|
|
37857
37945
|
return [Qv({
|
|
37858
|
-
find:
|
|
37946
|
+
find: cK,
|
|
37859
37947
|
type: this.type,
|
|
37860
37948
|
getAttributes: (e) => {
|
|
37861
37949
|
let [, , t, n, r] = e;
|
|
@@ -37867,17 +37955,17 @@ var ZG = Ov.create({
|
|
|
37867
37955
|
}
|
|
37868
37956
|
})];
|
|
37869
37957
|
}
|
|
37870
|
-
}),
|
|
37958
|
+
}), uK = $G, dK = {
|
|
37871
37959
|
position: "bottom",
|
|
37872
37960
|
alignment: "left",
|
|
37873
37961
|
alwaysVisible: !1,
|
|
37874
37962
|
showDone: !0,
|
|
37875
37963
|
doneOn: "blur"
|
|
37876
|
-
},
|
|
37964
|
+
}, fK = {
|
|
37877
37965
|
options: {},
|
|
37878
37966
|
respAreaToolbar: () => {},
|
|
37879
37967
|
onHandleAreaChange: () => {}
|
|
37880
|
-
},
|
|
37968
|
+
}, pK = [
|
|
37881
37969
|
"bold",
|
|
37882
37970
|
"italic",
|
|
37883
37971
|
"underline",
|
|
@@ -37899,7 +37987,7 @@ var ZG = Ov.create({
|
|
|
37899
37987
|
"h3",
|
|
37900
37988
|
"undo",
|
|
37901
37989
|
"redo"
|
|
37902
|
-
],
|
|
37990
|
+
], mK = {
|
|
37903
37991
|
"--white": "#fff",
|
|
37904
37992
|
"--black": "#2e2b29",
|
|
37905
37993
|
"--black-contrast": "#110f0e",
|
|
@@ -37918,14 +38006,18 @@ var ZG = Ov.create({
|
|
|
37918
38006
|
"--red": "#ff5c33",
|
|
37919
38007
|
"--red-light": "#ffebe5",
|
|
37920
38008
|
"--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
|
|
37921
|
-
},
|
|
38009
|
+
}, hK = (e) => ({
|
|
38010
|
+
spellcheck: e ? "true" : "false",
|
|
38011
|
+
autocorrect: e ? "on" : "off",
|
|
38012
|
+
autocapitalize: e ? "on" : "off"
|
|
38013
|
+
}), gK = (e) => {
|
|
37922
38014
|
let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = gt([]), [a, o] = gt(!1), { toolbarOpts: s } = e, c = lt((e) => {
|
|
37923
38015
|
i((t) => {
|
|
37924
38016
|
let n = t.filter((t) => t.pos !== e);
|
|
37925
38017
|
return n.length === 0 && o(!1), n;
|
|
37926
38018
|
});
|
|
37927
38019
|
}, [i]), l = {
|
|
37928
|
-
...
|
|
38020
|
+
...dK,
|
|
37929
38021
|
...s
|
|
37930
38022
|
}, u = lt((t) => {
|
|
37931
38023
|
let n = t.getHTML();
|
|
@@ -37936,13 +38028,13 @@ var ZG = Ov.create({
|
|
|
37936
38028
|
e.onDone,
|
|
37937
38029
|
l.doneOn
|
|
37938
38030
|
]), d = mt(() => ({
|
|
37939
|
-
...
|
|
38031
|
+
...fK,
|
|
37940
38032
|
...e.responseAreaProps,
|
|
37941
38033
|
onInlineDropdownToolbarClose: u
|
|
37942
38034
|
}), [e.responseAreaProps, u]), f = mt(() => {
|
|
37943
38035
|
let { customPlugins: t, ...n } = e.pluginProps || {};
|
|
37944
38036
|
t ||= [];
|
|
37945
|
-
let r = (e.activePlugins ||
|
|
38037
|
+
let r = (e.activePlugins || pK)?.filter((e) => {
|
|
37946
38038
|
let t = Na[e] || e, r = n[t] || {};
|
|
37947
38039
|
return !r || !r.disabled;
|
|
37948
38040
|
});
|
|
@@ -37960,103 +38052,112 @@ var ZG = Ov.create({
|
|
|
37960
38052
|
setKeypadInteraction: {},
|
|
37961
38053
|
media: {}
|
|
37962
38054
|
});
|
|
37963
|
-
}, [e, d.type]), p =
|
|
37964
|
-
|
|
37965
|
-
|
|
37966
|
-
|
|
37967
|
-
|
|
37968
|
-
|
|
37969
|
-
|
|
37970
|
-
|
|
37971
|
-
|
|
37972
|
-
|
|
37973
|
-
|
|
37974
|
-
|
|
37975
|
-
|
|
37976
|
-
|
|
37977
|
-
|
|
37978
|
-
|
|
37979
|
-
|
|
37980
|
-
|
|
37981
|
-
|
|
37982
|
-
|
|
37983
|
-
|
|
37984
|
-
|
|
37985
|
-
|
|
37986
|
-
|
|
37987
|
-
|
|
37988
|
-
|
|
37989
|
-
|
|
38055
|
+
}, [e, d.type]), p = [
|
|
38056
|
+
sK.configure({
|
|
38057
|
+
types: [
|
|
38058
|
+
"heading",
|
|
38059
|
+
"paragraph",
|
|
38060
|
+
"div",
|
|
38061
|
+
"headingParagraph",
|
|
38062
|
+
"h1",
|
|
38063
|
+
"h2",
|
|
38064
|
+
"h3",
|
|
38065
|
+
"h4",
|
|
38066
|
+
"h5",
|
|
38067
|
+
"h6",
|
|
38068
|
+
"td",
|
|
38069
|
+
"th"
|
|
38070
|
+
],
|
|
38071
|
+
alignments: [
|
|
38072
|
+
"left",
|
|
38073
|
+
"right",
|
|
38074
|
+
"center",
|
|
38075
|
+
"justify"
|
|
38076
|
+
]
|
|
38077
|
+
}),
|
|
38078
|
+
PG,
|
|
38079
|
+
FG.configure({ limit: e.charactersLimit || 1e6 }),
|
|
38080
|
+
wG.configure({
|
|
38081
|
+
trailingNode: {
|
|
37990
38082
|
node: "paragraph",
|
|
37991
38083
|
notAfter: ["paragraph", "div"]
|
|
37992
|
-
}
|
|
37993
|
-
|
|
37994
|
-
|
|
37995
|
-
|
|
37996
|
-
|
|
37997
|
-
|
|
37998
|
-
|
|
37999
|
-
|
|
38000
|
-
|
|
38001
|
-
|
|
38002
|
-
|
|
38003
|
-
|
|
38004
|
-
|
|
38005
|
-
|
|
38006
|
-
|
|
38007
|
-
|
|
38008
|
-
|
|
38009
|
-
|
|
38010
|
-
|
|
38011
|
-
|
|
38012
|
-
|
|
38013
|
-
|
|
38014
|
-
|
|
38015
|
-
|
|
38016
|
-
|
|
38017
|
-
|
|
38018
|
-
|
|
38019
|
-
|
|
38020
|
-
|
|
38021
|
-
|
|
38022
|
-
|
|
38023
|
-
|
|
38024
|
-
|
|
38025
|
-
|
|
38026
|
-
|
|
38027
|
-
|
|
38028
|
-
|
|
38029
|
-
|
|
38030
|
-
|
|
38031
|
-
|
|
38032
|
-
|
|
38033
|
-
|
|
38034
|
-
|
|
38035
|
-
|
|
38036
|
-
|
|
38037
|
-
|
|
38038
|
-
|
|
38039
|
-
|
|
38040
|
-
|
|
38041
|
-
|
|
38042
|
-
|
|
38043
|
-
|
|
38044
|
-
|
|
38045
|
-
|
|
38046
|
-
|
|
38047
|
-
|
|
38048
|
-
|
|
38049
|
-
|
|
38050
|
-
|
|
38051
|
-
|
|
38052
|
-
|
|
38053
|
-
|
|
38054
|
-
|
|
38055
|
-
|
|
38084
|
+
},
|
|
38085
|
+
link: {
|
|
38086
|
+
autolink: !1,
|
|
38087
|
+
linkOnPaste: !1
|
|
38088
|
+
}
|
|
38089
|
+
}),
|
|
38090
|
+
OI,
|
|
38091
|
+
WT,
|
|
38092
|
+
kI,
|
|
38093
|
+
GT,
|
|
38094
|
+
KT,
|
|
38095
|
+
uK.configure({
|
|
38096
|
+
placeholder: e.placeholder,
|
|
38097
|
+
showOnlyWhenEditable: !0,
|
|
38098
|
+
showOnlyCurrent: !1,
|
|
38099
|
+
includeChildren: !0
|
|
38100
|
+
}),
|
|
38101
|
+
BT,
|
|
38102
|
+
wT,
|
|
38103
|
+
UT,
|
|
38104
|
+
HT,
|
|
38105
|
+
fP.configure(d),
|
|
38106
|
+
pP.configure(d),
|
|
38107
|
+
hP.configure(d),
|
|
38108
|
+
gP.configure(d),
|
|
38109
|
+
mP.configure(d),
|
|
38110
|
+
$P.configure({
|
|
38111
|
+
toolbarOpts: l,
|
|
38112
|
+
math: e.pluginProps?.math || {}
|
|
38113
|
+
}),
|
|
38114
|
+
oK,
|
|
38115
|
+
aK,
|
|
38116
|
+
lK,
|
|
38117
|
+
bF.configure({
|
|
38118
|
+
toolbarOpts: l,
|
|
38119
|
+
imageHandling: {
|
|
38120
|
+
disableImageAlignmentButtons: e.disableImageAlignmentButtons,
|
|
38121
|
+
onDone: (t) => e.onDone?.(t.getHTML()),
|
|
38122
|
+
onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
|
|
38123
|
+
let { src: n } = t.attrs;
|
|
38124
|
+
e.imageSupport.delete(n, (e) => {
|
|
38125
|
+
c(t.pos);
|
|
38126
|
+
});
|
|
38127
|
+
}),
|
|
38128
|
+
insertImageRequested: e.imageSupport && ((t, n, r) => {
|
|
38129
|
+
let [o, s] = n, l = (n) => {
|
|
38130
|
+
let r;
|
|
38131
|
+
a && n && (r = e.onChange), c(s), r?.(t.getHTML());
|
|
38132
|
+
};
|
|
38133
|
+
t._insertingImage = !0, i((e) => [...e, o]), (() => {
|
|
38134
|
+
let n = r(l), i = Ke(() => {
|
|
38135
|
+
let e = () => window.removeEventListener("focus", i);
|
|
38136
|
+
if (!t._insertingImage) {
|
|
38137
|
+
e();
|
|
38138
|
+
return;
|
|
38139
|
+
}
|
|
38140
|
+
c(s), t._insertingImage = !1, e();
|
|
38141
|
+
}, 500);
|
|
38142
|
+
window.addEventListener("focus", i), e.imageSupport.add(n);
|
|
38143
|
+
})();
|
|
38144
|
+
}),
|
|
38145
|
+
maxImageWidth: e.maxImageWidth,
|
|
38146
|
+
maxImageHeight: e.maxImageHeight
|
|
38147
|
+
},
|
|
38148
|
+
limit: 3
|
|
38149
|
+
}),
|
|
38150
|
+
VF.configure({ uploadSoundSupport: e.uploadSoundSupport }),
|
|
38151
|
+
qF.configure({ extraCSSRules: e.extraCSSRules })
|
|
38152
|
+
], m = e.spellCheck !== !1, h = hD({
|
|
38153
|
+
extensions: p,
|
|
38056
38154
|
immediatelyRender: !1,
|
|
38057
|
-
editorProps: {
|
|
38058
|
-
|
|
38059
|
-
|
|
38155
|
+
editorProps: {
|
|
38156
|
+
attributes: hK(m),
|
|
38157
|
+
handleKeyDown(t, n) {
|
|
38158
|
+
return e.onKeyDown ? e.onKeyDown(n) : !1;
|
|
38159
|
+
}
|
|
38160
|
+
},
|
|
38060
38161
|
editable: !e.disabled,
|
|
38061
38162
|
content: Ra(e.markup),
|
|
38062
38163
|
onUpdate: ({ editor: t, transaction: n }) => {
|
|
@@ -38067,22 +38168,29 @@ var ZG = Ov.create({
|
|
|
38067
38168
|
}
|
|
38068
38169
|
}, [e.charactersLimit]);
|
|
38069
38170
|
ft(() => {
|
|
38070
|
-
e.editorRef && e.editorRef(
|
|
38071
|
-
}, [e.editorRef,
|
|
38072
|
-
|
|
38073
|
-
}, [e.disabled,
|
|
38074
|
-
if (!
|
|
38171
|
+
e.editorRef && e.editorRef(h);
|
|
38172
|
+
}, [e.editorRef, h]), ft(() => {
|
|
38173
|
+
h?.setEditable(!e.disabled);
|
|
38174
|
+
}, [e.disabled, h]), ft(() => {
|
|
38175
|
+
if (!h) return;
|
|
38176
|
+
let e = h.options?.editorProps, t = hK(m);
|
|
38177
|
+
e?.attributes?.spellcheck !== t.spellcheck && h.setOptions({ editorProps: {
|
|
38178
|
+
...e,
|
|
38179
|
+
attributes: t
|
|
38180
|
+
} });
|
|
38181
|
+
}, [m, h]), ft(() => {
|
|
38182
|
+
if (!h) return;
|
|
38075
38183
|
let t = Ra(e.markup);
|
|
38076
|
-
t !==
|
|
38077
|
-
}, [e.markup,
|
|
38078
|
-
Object.entries(
|
|
38184
|
+
t !== h.getHTML() && h.commands.setContent(t, { emitUpdate: !1 });
|
|
38185
|
+
}, [e.markup, h]), ft(() => {
|
|
38186
|
+
Object.entries(mK).forEach(([e, t]) => {
|
|
38079
38187
|
document.documentElement.style.setProperty(e, t);
|
|
38080
38188
|
});
|
|
38081
38189
|
}, []);
|
|
38082
|
-
let
|
|
38083
|
-
editor:
|
|
38190
|
+
let g = dD({
|
|
38191
|
+
editor: h,
|
|
38084
38192
|
selector: (e) => ({ isFocused: e.editor?.isFocused })
|
|
38085
|
-
}),
|
|
38193
|
+
}), _ = mt(() => {
|
|
38086
38194
|
let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
|
|
38087
38195
|
return {
|
|
38088
38196
|
width: AI(n),
|
|
@@ -38097,20 +38205,20 @@ var ZG = Ov.create({
|
|
|
38097
38205
|
...e,
|
|
38098
38206
|
activePlugins: f,
|
|
38099
38207
|
toolbarOpts: l,
|
|
38100
|
-
editorState:
|
|
38101
|
-
editor:
|
|
38102
|
-
children:
|
|
38208
|
+
editorState: g,
|
|
38209
|
+
editor: h,
|
|
38210
|
+
children: h && /* @__PURE__ */ k(_K, {
|
|
38103
38211
|
style: {
|
|
38104
|
-
minHeight:
|
|
38105
|
-
height:
|
|
38106
|
-
maxHeight:
|
|
38212
|
+
minHeight: _.minHeight,
|
|
38213
|
+
height: _.height,
|
|
38214
|
+
maxHeight: _.maxHeight
|
|
38107
38215
|
},
|
|
38108
38216
|
showParagraph: t && !t.disabled,
|
|
38109
38217
|
separateParagraph: n && !n.disabled,
|
|
38110
|
-
editor:
|
|
38218
|
+
editor: h
|
|
38111
38219
|
})
|
|
38112
38220
|
});
|
|
38113
|
-
},
|
|
38221
|
+
}, _K = w(cD, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
|
|
38114
38222
|
display: "flex",
|
|
38115
38223
|
outline: "none !important",
|
|
38116
38224
|
"& .ProseMirror": {
|
|
@@ -38138,7 +38246,7 @@ var ZG = Ov.create({
|
|
|
38138
38246
|
} },
|
|
38139
38247
|
...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
|
|
38140
38248
|
}
|
|
38141
|
-
})),
|
|
38249
|
+
})), vK = gK, yK = w(aa)(() => ({})), bK = class extends O.Component {
|
|
38142
38250
|
static propTypes = {
|
|
38143
38251
|
className: z.default.string,
|
|
38144
38252
|
contentClassName: z.default.string,
|
|
@@ -38159,7 +38267,7 @@ var ZG = Ov.create({
|
|
|
38159
38267
|
indicatorColor: "primary",
|
|
38160
38268
|
value: e,
|
|
38161
38269
|
onChange: this.handleChange,
|
|
38162
|
-
children: O.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ k(
|
|
38270
|
+
children: O.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ k(yK, { label: e.props.title }, t) : null)
|
|
38163
38271
|
}), /* @__PURE__ */ k("div", {
|
|
38164
38272
|
className: r,
|
|
38165
38273
|
style: i,
|
|
@@ -38167,7 +38275,7 @@ var ZG = Ov.create({
|
|
|
38167
38275
|
})]
|
|
38168
38276
|
});
|
|
38169
38277
|
}
|
|
38170
|
-
},
|
|
38278
|
+
}, xK = w(ei)(({ theme: e, mini: t }) => ({
|
|
38171
38279
|
margin: 0,
|
|
38172
38280
|
marginLeft: 0,
|
|
38173
38281
|
padding: 0,
|
|
@@ -38181,7 +38289,7 @@ var ZG = Ov.create({
|
|
|
38181
38289
|
fontSize: e.typography.fontSize - 3
|
|
38182
38290
|
}
|
|
38183
38291
|
}
|
|
38184
|
-
})),
|
|
38292
|
+
})), SK = w(qr)(({ theme: e, mini: t, error: n }) => ({
|
|
38185
38293
|
color: `${E.tertiary()} !important`,
|
|
38186
38294
|
...t && {
|
|
38187
38295
|
margin: 0,
|
|
@@ -38190,9 +38298,9 @@ var ZG = Ov.create({
|
|
|
38190
38298
|
height: e.spacing(3)
|
|
38191
38299
|
},
|
|
38192
38300
|
...n && { color: `${e.palette.error.main} !important` }
|
|
38193
|
-
})),
|
|
38301
|
+
})), CK = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ k(xK, {
|
|
38194
38302
|
mini: e,
|
|
38195
|
-
control: /* @__PURE__ */ k(
|
|
38303
|
+
control: /* @__PURE__ */ k(SK, {
|
|
38196
38304
|
checked: t,
|
|
38197
38305
|
onChange: n,
|
|
38198
38306
|
value: r,
|
|
@@ -38201,32 +38309,32 @@ var ZG = Ov.create({
|
|
|
38201
38309
|
}),
|
|
38202
38310
|
label: i
|
|
38203
38311
|
});
|
|
38204
|
-
|
|
38312
|
+
CK.propTypes = {
|
|
38205
38313
|
mini: z.default.bool,
|
|
38206
38314
|
checked: z.default.bool.isRequired,
|
|
38207
38315
|
onChange: z.default.func.isRequired,
|
|
38208
38316
|
value: z.default.string,
|
|
38209
38317
|
label: z.default.string.isRequired,
|
|
38210
38318
|
error: z.default.bool
|
|
38211
|
-
},
|
|
38319
|
+
}, CK.defaultProps = {
|
|
38212
38320
|
value: "",
|
|
38213
38321
|
mini: !1,
|
|
38214
38322
|
error: !1
|
|
38215
38323
|
};
|
|
38216
38324
|
//#endregion
|
|
38217
38325
|
//#region ../../lib-react/config-ui/dist/form-section.js
|
|
38218
|
-
var
|
|
38326
|
+
var wK = w("div")(({ theme: e }) => ({
|
|
38219
38327
|
marginTop: e.spacing(2),
|
|
38220
38328
|
marginBottom: e.spacing(2)
|
|
38221
|
-
})),
|
|
38329
|
+
})), TK = w(p)(({ theme: e }) => ({ marginBottom: e.spacing(1) })), EK = ({ className: e, label: t, children: n, labelExtraStyle: r }) => /* @__PURE__ */ A(wK, {
|
|
38222
38330
|
className: e,
|
|
38223
|
-
children: [/* @__PURE__ */ k(
|
|
38331
|
+
children: [/* @__PURE__ */ k(TK, {
|
|
38224
38332
|
variant: "subtitle1",
|
|
38225
38333
|
style: r,
|
|
38226
38334
|
children: t
|
|
38227
38335
|
}), n]
|
|
38228
38336
|
});
|
|
38229
|
-
|
|
38337
|
+
EK.propTypes = {
|
|
38230
38338
|
className: z.default.string,
|
|
38231
38339
|
label: z.default.string,
|
|
38232
38340
|
children: z.default.node,
|
|
@@ -38234,7 +38342,7 @@ _K.propTypes = {
|
|
|
38234
38342
|
};
|
|
38235
38343
|
//#endregion
|
|
38236
38344
|
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
38237
|
-
var
|
|
38345
|
+
var DK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), OK = w(ue)(({ theme: e }) => ({
|
|
38238
38346
|
marginRight: e.spacing(1),
|
|
38239
38347
|
"& .MuiInputLabel-root": {
|
|
38240
38348
|
width: "auto",
|
|
@@ -38256,11 +38364,11 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38256
38364
|
minHeight: "auto",
|
|
38257
38365
|
padding: "6px 0 7px"
|
|
38258
38366
|
}
|
|
38259
|
-
})),
|
|
38367
|
+
})), kK = (e, t) => {
|
|
38260
38368
|
if (!Ze(e) && !Ze(t)) return 0;
|
|
38261
38369
|
if (!Ze(e) && Ze(t)) return t;
|
|
38262
38370
|
if (Ze(e)) return e;
|
|
38263
|
-
},
|
|
38371
|
+
}, AK = class extends O.Component {
|
|
38264
38372
|
static propTypes = {
|
|
38265
38373
|
disabled: z.default.bool,
|
|
38266
38374
|
className: z.default.string,
|
|
@@ -38286,13 +38394,13 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38286
38394
|
this.setState({ value: t });
|
|
38287
38395
|
}
|
|
38288
38396
|
clamp(e, t = this.props.min, n = this.props.max) {
|
|
38289
|
-
return Ze(e) ? (Ze(n) && (e = Math.min(e, n)), Ze(t) && (e = Math.max(e, t)), e) :
|
|
38397
|
+
return Ze(e) ? (Ze(n) && (e = Math.min(e, n)), Ze(t) && (e = Math.max(e, t)), e) : kK(t, n);
|
|
38290
38398
|
}
|
|
38291
38399
|
onBlur = (e) => {
|
|
38292
38400
|
let t = e.target.value, n = parseFloat(t);
|
|
38293
|
-
|
|
38401
|
+
DK("rawNumber: ", n);
|
|
38294
38402
|
let r = this.clamp(n);
|
|
38295
|
-
|
|
38403
|
+
DK("number: ", r), r !== this.state.value && (DK("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
38296
38404
|
this.props.onChange(e, r);
|
|
38297
38405
|
}));
|
|
38298
38406
|
};
|
|
@@ -38312,7 +38420,7 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38312
38420
|
};
|
|
38313
38421
|
render() {
|
|
38314
38422
|
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();
|
|
38315
|
-
return /* @__PURE__ */ k(
|
|
38423
|
+
return /* @__PURE__ */ k(OK, {
|
|
38316
38424
|
variant: s ? "filled" : l || "standard",
|
|
38317
38425
|
inputRef: (e) => {
|
|
38318
38426
|
this.inputRef = e;
|
|
@@ -38344,21 +38452,21 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38344
38452
|
margin: "normal"
|
|
38345
38453
|
});
|
|
38346
38454
|
}
|
|
38347
|
-
},
|
|
38455
|
+
}, jK = Object.defineProperty, MK = (e, t) => {
|
|
38348
38456
|
let n = {};
|
|
38349
|
-
for (var r in e)
|
|
38457
|
+
for (var r in e) jK(n, r, {
|
|
38350
38458
|
get: e[r],
|
|
38351
38459
|
enumerable: !0
|
|
38352
38460
|
});
|
|
38353
|
-
return t ||
|
|
38354
|
-
},
|
|
38461
|
+
return t || jK(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
38462
|
+
}, NK = w("div")(() => ({
|
|
38355
38463
|
display: "flex",
|
|
38356
38464
|
flexDirection: "column",
|
|
38357
38465
|
position: "relative"
|
|
38358
|
-
})),
|
|
38466
|
+
})), PK = w("div")(() => ({
|
|
38359
38467
|
display: "flex",
|
|
38360
38468
|
justifyContent: "space-between"
|
|
38361
|
-
})),
|
|
38469
|
+
})), FK = w("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), IK = w("div")(() => ({ flex: "1" })), LK = w("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), RK = class extends O.Component {
|
|
38362
38470
|
static propTypes = {
|
|
38363
38471
|
mode: z.default.oneOf(["tabbed", "inline"]),
|
|
38364
38472
|
secondary: z.default.oneOfType([z.default.arrayOf(z.default.node), z.default.node]),
|
|
@@ -38376,7 +38484,7 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38376
38484
|
} catch (e) {
|
|
38377
38485
|
console.log(e.toString());
|
|
38378
38486
|
}
|
|
38379
|
-
return /* @__PURE__ */ A(
|
|
38487
|
+
return /* @__PURE__ */ A(NK, {
|
|
38380
38488
|
style: {
|
|
38381
38489
|
minHeight: i,
|
|
38382
38490
|
minWidth: a,
|
|
@@ -38384,28 +38492,28 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38384
38492
|
maxWidth: s
|
|
38385
38493
|
},
|
|
38386
38494
|
children: [
|
|
38387
|
-
e === "inline" && /* @__PURE__ */ A(
|
|
38495
|
+
e === "inline" && /* @__PURE__ */ A(PK, { children: [/* @__PURE__ */ k(IK, {
|
|
38388
38496
|
className: "design-container",
|
|
38389
38497
|
children: n
|
|
38390
|
-
}), l && /* @__PURE__ */ k(
|
|
38498
|
+
}), l && /* @__PURE__ */ k(LK, {
|
|
38391
38499
|
className: "settings-container",
|
|
38392
38500
|
children: t
|
|
38393
38501
|
})] }),
|
|
38394
|
-
e === "tabbed" && l && /* @__PURE__ */ A(
|
|
38502
|
+
e === "tabbed" && l && /* @__PURE__ */ A(bK, {
|
|
38395
38503
|
onChange: this.onTabsChange,
|
|
38396
38504
|
contentClassName: "content-container",
|
|
38397
38505
|
indicatorColor: "primary",
|
|
38398
|
-
children: [/* @__PURE__ */ k(
|
|
38506
|
+
children: [/* @__PURE__ */ k(FK, {
|
|
38399
38507
|
title: "Design",
|
|
38400
38508
|
className: "design-container",
|
|
38401
38509
|
children: n
|
|
38402
|
-
}), /* @__PURE__ */ k(
|
|
38510
|
+
}), /* @__PURE__ */ k(FK, {
|
|
38403
38511
|
title: "Settings",
|
|
38404
38512
|
className: "settings-container",
|
|
38405
38513
|
children: t
|
|
38406
38514
|
})]
|
|
38407
38515
|
}),
|
|
38408
|
-
e === "tabbed" && !l && /* @__PURE__ */ k(
|
|
38516
|
+
e === "tabbed" && !l && /* @__PURE__ */ k(FK, {
|
|
38409
38517
|
className: "design-container",
|
|
38410
38518
|
children: n
|
|
38411
38519
|
})
|
|
@@ -38415,18 +38523,18 @@ var vK = (0, Aa.default)("@pie-lib:config-ui:number-text-field"), yK = w(ue)(({
|
|
|
38415
38523
|
};
|
|
38416
38524
|
//#endregion
|
|
38417
38525
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
38418
|
-
function
|
|
38419
|
-
return
|
|
38526
|
+
function zK() {
|
|
38527
|
+
return zK = Object.assign ? Object.assign.bind() : function(e) {
|
|
38420
38528
|
for (var t = 1; t < arguments.length; t++) {
|
|
38421
38529
|
var n = arguments[t];
|
|
38422
38530
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
38423
38531
|
}
|
|
38424
38532
|
return e;
|
|
38425
|
-
},
|
|
38533
|
+
}, zK.apply(null, arguments);
|
|
38426
38534
|
}
|
|
38427
38535
|
//#endregion
|
|
38428
38536
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
38429
|
-
function
|
|
38537
|
+
function BK(e, t) {
|
|
38430
38538
|
if (e == null) return {};
|
|
38431
38539
|
var n = {};
|
|
38432
38540
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -38437,19 +38545,19 @@ function jK(e, t) {
|
|
|
38437
38545
|
}
|
|
38438
38546
|
//#endregion
|
|
38439
38547
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
38440
|
-
function
|
|
38441
|
-
return
|
|
38548
|
+
function VK(e, t) {
|
|
38549
|
+
return VK = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
38442
38550
|
return e.__proto__ = t, e;
|
|
38443
|
-
},
|
|
38551
|
+
}, VK(e, t);
|
|
38444
38552
|
}
|
|
38445
38553
|
//#endregion
|
|
38446
38554
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
38447
|
-
function
|
|
38448
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
38555
|
+
function HK(e, t) {
|
|
38556
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, VK(e, t);
|
|
38449
38557
|
}
|
|
38450
38558
|
//#endregion
|
|
38451
38559
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
38452
|
-
var
|
|
38560
|
+
var UK = (function() {
|
|
38453
38561
|
if (typeof Map < "u") return Map;
|
|
38454
38562
|
function e(e, t) {
|
|
38455
38563
|
var n = -1;
|
|
@@ -38488,34 +38596,34 @@ var PK = (function() {
|
|
|
38488
38596
|
}
|
|
38489
38597
|
}, t;
|
|
38490
38598
|
}();
|
|
38491
|
-
})(),
|
|
38599
|
+
})(), WK = typeof window < "u" && typeof document < "u" && window.document === document, GK = (function() {
|
|
38492
38600
|
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")();
|
|
38493
|
-
})(),
|
|
38494
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
38601
|
+
})(), KK = (function() {
|
|
38602
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(GK) : function(e) {
|
|
38495
38603
|
return setTimeout(function() {
|
|
38496
38604
|
return e(Date.now());
|
|
38497
38605
|
}, 1e3 / 60);
|
|
38498
38606
|
};
|
|
38499
|
-
})(),
|
|
38500
|
-
function
|
|
38607
|
+
})(), qK = 2;
|
|
38608
|
+
function JK(e, t) {
|
|
38501
38609
|
var n = !1, r = !1, i = 0;
|
|
38502
38610
|
function a() {
|
|
38503
38611
|
n && (n = !1, e()), r && s();
|
|
38504
38612
|
}
|
|
38505
38613
|
function o() {
|
|
38506
|
-
|
|
38614
|
+
KK(a);
|
|
38507
38615
|
}
|
|
38508
38616
|
function s() {
|
|
38509
38617
|
var e = Date.now();
|
|
38510
38618
|
if (n) {
|
|
38511
|
-
if (e - i <
|
|
38619
|
+
if (e - i < qK) return;
|
|
38512
38620
|
r = !0;
|
|
38513
38621
|
} else n = !0, r = !1, setTimeout(o, t);
|
|
38514
38622
|
i = e;
|
|
38515
38623
|
}
|
|
38516
38624
|
return s;
|
|
38517
38625
|
}
|
|
38518
|
-
var
|
|
38626
|
+
var YK = 20, XK = [
|
|
38519
38627
|
"top",
|
|
38520
38628
|
"right",
|
|
38521
38629
|
"bottom",
|
|
@@ -38524,9 +38632,9 @@ var BK = 20, VK = [
|
|
|
38524
38632
|
"height",
|
|
38525
38633
|
"size",
|
|
38526
38634
|
"weight"
|
|
38527
|
-
],
|
|
38635
|
+
], ZK = typeof MutationObserver < "u", QK = function() {
|
|
38528
38636
|
function e() {
|
|
38529
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
38637
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = JK(this.refresh.bind(this), YK);
|
|
38530
38638
|
}
|
|
38531
38639
|
return e.prototype.addObserver = function(e) {
|
|
38532
38640
|
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
@@ -38543,23 +38651,23 @@ var BK = 20, VK = [
|
|
|
38543
38651
|
return e.broadcastActive();
|
|
38544
38652
|
}), e.length > 0;
|
|
38545
38653
|
}, e.prototype.connect_ = function() {
|
|
38546
|
-
!
|
|
38654
|
+
!WK || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), ZK ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
38547
38655
|
attributes: !0,
|
|
38548
38656
|
childList: !0,
|
|
38549
38657
|
characterData: !0,
|
|
38550
38658
|
subtree: !0
|
|
38551
38659
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
38552
38660
|
}, e.prototype.disconnect_ = function() {
|
|
38553
|
-
!
|
|
38661
|
+
!WK || !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);
|
|
38554
38662
|
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
38555
38663
|
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
38556
|
-
|
|
38664
|
+
XK.some(function(e) {
|
|
38557
38665
|
return !!~n.indexOf(e);
|
|
38558
38666
|
}) && this.refresh();
|
|
38559
38667
|
}, e.getInstance = function() {
|
|
38560
38668
|
return this.instance_ ||= new e(), this.instance_;
|
|
38561
38669
|
}, e.instance_ = null, e;
|
|
38562
|
-
}(),
|
|
38670
|
+
}(), $K = (function(e, t) {
|
|
38563
38671
|
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
38564
38672
|
var i = r[n];
|
|
38565
38673
|
Object.defineProperty(e, i, {
|
|
@@ -38570,19 +38678,19 @@ var BK = 20, VK = [
|
|
|
38570
38678
|
});
|
|
38571
38679
|
}
|
|
38572
38680
|
return e;
|
|
38573
|
-
}),
|
|
38574
|
-
return e && e.ownerDocument && e.ownerDocument.defaultView ||
|
|
38575
|
-
}),
|
|
38576
|
-
function
|
|
38681
|
+
}), eq = (function(e) {
|
|
38682
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || GK;
|
|
38683
|
+
}), tq = dq(0, 0, 0, 0);
|
|
38684
|
+
function nq(e) {
|
|
38577
38685
|
return parseFloat(e) || 0;
|
|
38578
38686
|
}
|
|
38579
|
-
function
|
|
38687
|
+
function rq(e) {
|
|
38580
38688
|
return [...arguments].slice(1).reduce(function(t, n) {
|
|
38581
38689
|
var r = e["border-" + n + "-width"];
|
|
38582
|
-
return t +
|
|
38690
|
+
return t + nq(r);
|
|
38583
38691
|
}, 0);
|
|
38584
38692
|
}
|
|
38585
|
-
function
|
|
38693
|
+
function iq(e) {
|
|
38586
38694
|
for (var t = [
|
|
38587
38695
|
"top",
|
|
38588
38696
|
"right",
|
|
@@ -38590,40 +38698,40 @@ function YK(e) {
|
|
|
38590
38698
|
"left"
|
|
38591
38699
|
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
38592
38700
|
var a = i[r], o = e["padding-" + a];
|
|
38593
|
-
n[a] =
|
|
38701
|
+
n[a] = nq(o);
|
|
38594
38702
|
}
|
|
38595
38703
|
return n;
|
|
38596
38704
|
}
|
|
38597
|
-
function
|
|
38705
|
+
function aq(e) {
|
|
38598
38706
|
var t = e.getBBox();
|
|
38599
|
-
return
|
|
38707
|
+
return dq(0, 0, t.width, t.height);
|
|
38600
38708
|
}
|
|
38601
|
-
function
|
|
38709
|
+
function oq(e) {
|
|
38602
38710
|
var t = e.clientWidth, n = e.clientHeight;
|
|
38603
|
-
if (!t && !n) return
|
|
38604
|
-
var r =
|
|
38605
|
-
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
38711
|
+
if (!t && !n) return tq;
|
|
38712
|
+
var r = eq(e).getComputedStyle(e), i = iq(r), a = i.left + i.right, o = i.top + i.bottom, s = nq(r.width), c = nq(r.height);
|
|
38713
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= rq(r, "left", "right") + a), Math.round(c + o) !== n && (c -= rq(r, "top", "bottom") + o)), !cq(e)) {
|
|
38606
38714
|
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
38607
38715
|
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
38608
38716
|
}
|
|
38609
|
-
return
|
|
38717
|
+
return dq(i.left, i.top, s, c);
|
|
38610
38718
|
}
|
|
38611
|
-
var
|
|
38719
|
+
var sq = (function() {
|
|
38612
38720
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
38613
|
-
return e instanceof
|
|
38721
|
+
return e instanceof eq(e).SVGGraphicsElement;
|
|
38614
38722
|
} : function(e) {
|
|
38615
|
-
return e instanceof
|
|
38723
|
+
return e instanceof eq(e).SVGElement && typeof e.getBBox == "function";
|
|
38616
38724
|
};
|
|
38617
38725
|
})();
|
|
38618
|
-
function
|
|
38619
|
-
return e ===
|
|
38726
|
+
function cq(e) {
|
|
38727
|
+
return e === eq(e).document.documentElement;
|
|
38620
38728
|
}
|
|
38621
|
-
function
|
|
38622
|
-
return
|
|
38729
|
+
function lq(e) {
|
|
38730
|
+
return WK ? sq(e) ? aq(e) : oq(e) : tq;
|
|
38623
38731
|
}
|
|
38624
|
-
function
|
|
38732
|
+
function uq(e) {
|
|
38625
38733
|
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
38626
|
-
return
|
|
38734
|
+
return $K(a, {
|
|
38627
38735
|
x: t,
|
|
38628
38736
|
y: n,
|
|
38629
38737
|
width: r,
|
|
@@ -38634,7 +38742,7 @@ function tq(e) {
|
|
|
38634
38742
|
left: t
|
|
38635
38743
|
}), a;
|
|
38636
38744
|
}
|
|
38637
|
-
function
|
|
38745
|
+
function dq(e, t, n, r) {
|
|
38638
38746
|
return {
|
|
38639
38747
|
x: e,
|
|
38640
38748
|
y: t,
|
|
@@ -38642,42 +38750,42 @@ function nq(e, t, n, r) {
|
|
|
38642
38750
|
height: r
|
|
38643
38751
|
};
|
|
38644
38752
|
}
|
|
38645
|
-
var
|
|
38753
|
+
var fq = function() {
|
|
38646
38754
|
function e(e) {
|
|
38647
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
38755
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = dq(0, 0, 0, 0), this.target = e;
|
|
38648
38756
|
}
|
|
38649
38757
|
return e.prototype.isActive = function() {
|
|
38650
|
-
var e =
|
|
38758
|
+
var e = lq(this.target);
|
|
38651
38759
|
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
38652
38760
|
}, e.prototype.broadcastRect = function() {
|
|
38653
38761
|
var e = this.contentRect_;
|
|
38654
38762
|
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
38655
38763
|
}, e;
|
|
38656
|
-
}(),
|
|
38764
|
+
}(), pq = function() {
|
|
38657
38765
|
function e(e, t) {
|
|
38658
|
-
var n =
|
|
38659
|
-
|
|
38766
|
+
var n = uq(t);
|
|
38767
|
+
$K(this, {
|
|
38660
38768
|
target: e,
|
|
38661
38769
|
contentRect: n
|
|
38662
38770
|
});
|
|
38663
38771
|
}
|
|
38664
38772
|
return e;
|
|
38665
|
-
}(),
|
|
38773
|
+
}(), mq = function() {
|
|
38666
38774
|
function e(e, t, n) {
|
|
38667
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
38775
|
+
if (this.activeObservations_ = [], this.observations_ = new UK(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
38668
38776
|
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
38669
38777
|
}
|
|
38670
38778
|
return e.prototype.observe = function(e) {
|
|
38671
38779
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
38672
38780
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
38673
|
-
if (!(e instanceof
|
|
38781
|
+
if (!(e instanceof eq(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
38674
38782
|
var t = this.observations_;
|
|
38675
|
-
t.has(e) || (t.set(e, new
|
|
38783
|
+
t.has(e) || (t.set(e, new fq(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
38676
38784
|
}
|
|
38677
38785
|
}, e.prototype.unobserve = function(e) {
|
|
38678
38786
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
38679
38787
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
38680
|
-
if (!(e instanceof
|
|
38788
|
+
if (!(e instanceof eq(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
38681
38789
|
var t = this.observations_;
|
|
38682
38790
|
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
38683
38791
|
}
|
|
@@ -38691,7 +38799,7 @@ var rq = function() {
|
|
|
38691
38799
|
}, e.prototype.broadcastActive = function() {
|
|
38692
38800
|
if (this.hasActive()) {
|
|
38693
38801
|
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
38694
|
-
return new
|
|
38802
|
+
return new pq(e.target, e.broadcastRect());
|
|
38695
38803
|
});
|
|
38696
38804
|
this.callback_.call(e, t, e), this.clearActive();
|
|
38697
38805
|
}
|
|
@@ -38700,12 +38808,12 @@ var rq = function() {
|
|
|
38700
38808
|
}, e.prototype.hasActive = function() {
|
|
38701
38809
|
return this.activeObservations_.length > 0;
|
|
38702
38810
|
}, e;
|
|
38703
|
-
}(),
|
|
38811
|
+
}(), hq = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new UK(), gq = function() {
|
|
38704
38812
|
function e(t) {
|
|
38705
38813
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
38706
38814
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
38707
|
-
var n = new
|
|
38708
|
-
|
|
38815
|
+
var n = new mq(t, QK.getInstance(), this);
|
|
38816
|
+
hq.set(this, n);
|
|
38709
38817
|
}
|
|
38710
38818
|
return e;
|
|
38711
38819
|
}();
|
|
@@ -38714,27 +38822,27 @@ var rq = function() {
|
|
|
38714
38822
|
"unobserve",
|
|
38715
38823
|
"disconnect"
|
|
38716
38824
|
].forEach(function(e) {
|
|
38717
|
-
|
|
38825
|
+
gq.prototype[e] = function() {
|
|
38718
38826
|
var t;
|
|
38719
|
-
return (t =
|
|
38827
|
+
return (t = hq.get(this))[e].apply(t, arguments);
|
|
38720
38828
|
};
|
|
38721
38829
|
});
|
|
38722
|
-
var
|
|
38723
|
-
return
|
|
38724
|
-
})(),
|
|
38830
|
+
var _q = (function() {
|
|
38831
|
+
return GK.ResizeObserver === void 0 ? gq : GK.ResizeObserver;
|
|
38832
|
+
})(), vq = [
|
|
38725
38833
|
"client",
|
|
38726
38834
|
"offset",
|
|
38727
38835
|
"scroll",
|
|
38728
38836
|
"bounds",
|
|
38729
38837
|
"margin"
|
|
38730
38838
|
];
|
|
38731
|
-
function
|
|
38839
|
+
function yq(e) {
|
|
38732
38840
|
var t = [];
|
|
38733
|
-
return
|
|
38841
|
+
return vq.forEach(function(n) {
|
|
38734
38842
|
e[n] && t.push(n);
|
|
38735
38843
|
}), t;
|
|
38736
38844
|
}
|
|
38737
|
-
function
|
|
38845
|
+
function bq(e, t) {
|
|
38738
38846
|
var n = {};
|
|
38739
38847
|
if (t.indexOf("client") > -1 && (n.client = {
|
|
38740
38848
|
top: e.clientTop,
|
|
@@ -38773,14 +38881,14 @@ function dq(e, t) {
|
|
|
38773
38881
|
}
|
|
38774
38882
|
return n;
|
|
38775
38883
|
}
|
|
38776
|
-
function
|
|
38884
|
+
function xq(e) {
|
|
38777
38885
|
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
38778
38886
|
}
|
|
38779
|
-
function
|
|
38887
|
+
function Sq(e) {
|
|
38780
38888
|
return function(t) {
|
|
38781
38889
|
var n, r;
|
|
38782
38890
|
return r = n = /*#__PURE__*/ function(n) {
|
|
38783
|
-
|
|
38891
|
+
HK(r, n);
|
|
38784
38892
|
function r() {
|
|
38785
38893
|
var t, r = [...arguments];
|
|
38786
38894
|
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
@@ -38791,24 +38899,24 @@ function pq(e) {
|
|
|
38791
38899
|
bounds: {},
|
|
38792
38900
|
margin: {}
|
|
38793
38901
|
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
38794
|
-
var r =
|
|
38902
|
+
var r = bq(t._node, e || yq(t.props));
|
|
38795
38903
|
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
38796
38904
|
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
38797
38905
|
});
|
|
38798
38906
|
}, t._handleRef = function(e) {
|
|
38799
|
-
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window =
|
|
38907
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = xq(t._node);
|
|
38800
38908
|
var n = t.props.innerRef;
|
|
38801
38909
|
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
38802
38910
|
}, t;
|
|
38803
38911
|
}
|
|
38804
38912
|
var i = r.prototype;
|
|
38805
38913
|
return i.componentDidMount = function() {
|
|
38806
|
-
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new
|
|
38914
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new _q(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(bq(this._node, e || yq(this.props))));
|
|
38807
38915
|
}, i.componentWillUnmount = function() {
|
|
38808
38916
|
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
38809
38917
|
}, i.render = function() {
|
|
38810
38918
|
var e = this.props;
|
|
38811
|
-
return e.innerRef, e.onResize, at(t,
|
|
38919
|
+
return e.innerRef, e.onResize, at(t, zK({}, BK(e, ["innerRef", "onResize"]), {
|
|
38812
38920
|
measureRef: this._handleRef,
|
|
38813
38921
|
measure: this.measure,
|
|
38814
38922
|
contentRect: this.state.contentRect
|
|
@@ -38825,7 +38933,7 @@ function pq(e) {
|
|
|
38825
38933
|
}, r;
|
|
38826
38934
|
};
|
|
38827
38935
|
}
|
|
38828
|
-
var
|
|
38936
|
+
var Cq = Sq()(function(e) {
|
|
38829
38937
|
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
38830
38938
|
return i({
|
|
38831
38939
|
measure: t,
|
|
@@ -38833,10 +38941,10 @@ var mq = pq()(function(e) {
|
|
|
38833
38941
|
contentRect: r
|
|
38834
38942
|
});
|
|
38835
38943
|
});
|
|
38836
|
-
|
|
38944
|
+
Cq.displayName = "Measure", Cq.propTypes.children = z.default.func;
|
|
38837
38945
|
//#endregion
|
|
38838
38946
|
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
38839
|
-
var
|
|
38947
|
+
var wq = w("div")(() => ({
|
|
38840
38948
|
backgroundColor: E.white(),
|
|
38841
38949
|
border: `2px solid ${E.border()}`,
|
|
38842
38950
|
display: "flex",
|
|
@@ -38846,7 +38954,7 @@ var hq = w("div")(() => ({
|
|
|
38846
38954
|
maxWidth: "300px",
|
|
38847
38955
|
padding: "20px 4px 4px 20px",
|
|
38848
38956
|
zIndex: 99
|
|
38849
|
-
})),
|
|
38957
|
+
})), Tq = class extends O.Component {
|
|
38850
38958
|
static propTypes = {
|
|
38851
38959
|
className: z.default.string,
|
|
38852
38960
|
children: z.default.oneOfType([z.default.arrayOf(z.default.node), z.default.node]).isRequired
|
|
@@ -38854,19 +38962,19 @@ var hq = w("div")(() => ({
|
|
|
38854
38962
|
static defaultProps = {};
|
|
38855
38963
|
render() {
|
|
38856
38964
|
let { className: e, children: t } = this.props;
|
|
38857
|
-
return /* @__PURE__ */ k(
|
|
38965
|
+
return /* @__PURE__ */ k(wq, {
|
|
38858
38966
|
className: e,
|
|
38859
38967
|
children: t
|
|
38860
38968
|
});
|
|
38861
38969
|
}
|
|
38862
|
-
},
|
|
38970
|
+
}, Eq = le({
|
|
38863
38971
|
typography: { fontFamily: "inherit" },
|
|
38864
38972
|
components: { MuiButton: { styleOverrides: { contained: {
|
|
38865
38973
|
backgroundColor: "#e0e0e0",
|
|
38866
38974
|
color: "#000000",
|
|
38867
38975
|
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
38868
38976
|
} } } }
|
|
38869
|
-
}),
|
|
38977
|
+
}), Dq = class extends O.Component {
|
|
38870
38978
|
static propTypes = {
|
|
38871
38979
|
children: z.default.oneOfType([
|
|
38872
38980
|
z.default.string,
|
|
@@ -38899,19 +39007,19 @@ var hq = w("div")(() => ({
|
|
|
38899
39007
|
return /* @__PURE__ */ k(he, {
|
|
38900
39008
|
injectFirst: !0,
|
|
38901
39009
|
children: /* @__PURE__ */ k(ye, {
|
|
38902
|
-
theme:
|
|
38903
|
-
children: /* @__PURE__ */ k(
|
|
39010
|
+
theme: Eq,
|
|
39011
|
+
children: /* @__PURE__ */ k(Cq, {
|
|
38904
39012
|
bounds: !0,
|
|
38905
39013
|
onResize: this.onResize,
|
|
38906
39014
|
children: ({ measureRef: e }) => {
|
|
38907
|
-
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ k(
|
|
39015
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ k(Tq, {
|
|
38908
39016
|
className: "settings-box",
|
|
38909
39017
|
children: n
|
|
38910
39018
|
}) : n;
|
|
38911
39019
|
return /* @__PURE__ */ A("div", {
|
|
38912
39020
|
ref: e,
|
|
38913
39021
|
className: "main-container extraCSSRules",
|
|
38914
|
-
children: [a?.rules ? /* @__PURE__ */ k("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ k(
|
|
39022
|
+
children: [a?.rules ? /* @__PURE__ */ k("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ k(RK, {
|
|
38915
39023
|
mode: o,
|
|
38916
39024
|
secondary: s,
|
|
38917
39025
|
dimensions: i,
|
|
@@ -38923,41 +39031,41 @@ var hq = w("div")(() => ({
|
|
|
38923
39031
|
})
|
|
38924
39032
|
});
|
|
38925
39033
|
}
|
|
38926
|
-
},
|
|
38927
|
-
ConfigLayout: () =>
|
|
38928
|
-
LayoutContents: () =>
|
|
38929
|
-
}),
|
|
39034
|
+
}, Oq = Sq("bounds")(Dq), kq = /* @__PURE__ */ MK({
|
|
39035
|
+
ConfigLayout: () => Oq,
|
|
39036
|
+
LayoutContents: () => RK
|
|
39037
|
+
}), Aq = T(/*#__PURE__*/ k("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "Info"), jq = T(/*#__PURE__*/ k("path", { d: "M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4" }), "HelpOutline"), Mq = w("div")({
|
|
38930
39038
|
display: "flex",
|
|
38931
39039
|
justifyContent: "space-between"
|
|
38932
|
-
}),
|
|
39040
|
+
}), Nq = w("div")({
|
|
38933
39041
|
display: "flex",
|
|
38934
39042
|
alignItems: "center"
|
|
38935
|
-
}),
|
|
39043
|
+
}), Pq = w(Dt)({
|
|
38936
39044
|
margin: 0,
|
|
38937
39045
|
padding: 0
|
|
38938
|
-
}),
|
|
39046
|
+
}), Fq = w(ea)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": { fontSize: e.typography.fontSize - 2 } })), Iq = (e) => {
|
|
38939
39047
|
let { header: t, children: n, mini: r, info: i } = e;
|
|
38940
|
-
return /* @__PURE__ */ A(
|
|
39048
|
+
return /* @__PURE__ */ A(Mq, { children: [/* @__PURE__ */ A(Nq, { children: [/* @__PURE__ */ k(p, {
|
|
38941
39049
|
variant: r ? "h6" : "h5",
|
|
38942
39050
|
children: t
|
|
38943
|
-
}), i] }), n && /* @__PURE__ */ k(
|
|
39051
|
+
}), i] }), n && /* @__PURE__ */ k(Fq, {
|
|
38944
39052
|
title: n,
|
|
38945
|
-
children: /* @__PURE__ */ k(
|
|
39053
|
+
children: /* @__PURE__ */ k(Pq, {
|
|
38946
39054
|
"aria-label": "Delete",
|
|
38947
39055
|
size: "large",
|
|
38948
|
-
children: /* @__PURE__ */ k(
|
|
39056
|
+
children: /* @__PURE__ */ k(jq, {})
|
|
38949
39057
|
})
|
|
38950
39058
|
})] });
|
|
38951
39059
|
};
|
|
38952
|
-
|
|
39060
|
+
Iq.propTypes = {
|
|
38953
39061
|
mini: z.default.bool,
|
|
38954
39062
|
header: z.default.string,
|
|
38955
39063
|
children: z.default.node,
|
|
38956
39064
|
info: z.default.any
|
|
38957
|
-
}, w(
|
|
39065
|
+
}, w(AK)(({ theme: e }) => ({ marginLeft: e.spacing(1) }));
|
|
38958
39066
|
//#endregion
|
|
38959
39067
|
//#region src/author/number-text-field.tsx
|
|
38960
|
-
var
|
|
39068
|
+
var Lq = w(AK)({
|
|
38961
39069
|
maxWidth: "120px",
|
|
38962
39070
|
width: "120px",
|
|
38963
39071
|
marginTop: "0",
|
|
@@ -38968,25 +39076,25 @@ var Oq = w(xK)({
|
|
|
38968
39076
|
"& [class^=\"MuiInputBase-input\"]": { padding: "18.5px 14px" }
|
|
38969
39077
|
});
|
|
38970
39078
|
O.Component;
|
|
38971
|
-
var
|
|
39079
|
+
var Rq = O.forwardRef((e, t) => /* @__PURE__ */ k(Lq, {
|
|
38972
39080
|
...e,
|
|
38973
39081
|
ref: t,
|
|
38974
39082
|
variant: "outlined"
|
|
38975
|
-
})),
|
|
39083
|
+
})), zq = w("div")({
|
|
38976
39084
|
alignItems: "center",
|
|
38977
39085
|
display: "flex",
|
|
38978
39086
|
gap: "20px"
|
|
38979
|
-
}),
|
|
39087
|
+
}), Bq = w("div")({ margin: "12px 0" }), Vq = w("label")({
|
|
38980
39088
|
display: "block",
|
|
38981
39089
|
marginBottom: "4px"
|
|
38982
|
-
}),
|
|
39090
|
+
}), Hq = w(fe)({
|
|
38983
39091
|
width: "80px",
|
|
38984
39092
|
alignItems: "center",
|
|
38985
39093
|
height: "40px",
|
|
38986
39094
|
verticalAlign: "top",
|
|
38987
39095
|
marginBottom: "8px",
|
|
38988
39096
|
"& .MuiSelect-select": { paddingLeft: "10px" }
|
|
38989
|
-
}),
|
|
39097
|
+
}), Uq = w("div")({ marginLeft: "-15px" }), Wq = w("span")({ verticalAlign: "middle" }), Gq = class extends O.Component {
|
|
38990
39098
|
static propTypes = {
|
|
38991
39099
|
model: z.default.object.isRequired,
|
|
38992
39100
|
onChange: z.default.func,
|
|
@@ -39006,10 +39114,10 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39006
39114
|
render() {
|
|
39007
39115
|
let { model: e, modelOptions: t } = this.props, { maxOfModel: n, partsPerModel: r, modelTypeChoices: i } = t;
|
|
39008
39116
|
return /* @__PURE__ */ A("div", { children: [
|
|
39009
|
-
/* @__PURE__ */ k(
|
|
39117
|
+
/* @__PURE__ */ k(Iq, { header: "Configure Fraction Model" }),
|
|
39010
39118
|
/* @__PURE__ */ k("br", {}),
|
|
39011
|
-
/* @__PURE__ */ A(
|
|
39012
|
-
/* @__PURE__ */ A(
|
|
39119
|
+
/* @__PURE__ */ A(zq, { children: [
|
|
39120
|
+
/* @__PURE__ */ A(Bq, { children: [/* @__PURE__ */ k(Vq, { children: "Model Type" }), /* @__PURE__ */ k(Hq, {
|
|
39013
39121
|
onChange: this.handleSelect,
|
|
39014
39122
|
value: e.modelTypeSelected,
|
|
39015
39123
|
MenuProps: { transitionDuration: {
|
|
@@ -39021,14 +39129,14 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39021
39129
|
children: e.label
|
|
39022
39130
|
}, "item_" + t))
|
|
39023
39131
|
})] }),
|
|
39024
|
-
/* @__PURE__ */ A(
|
|
39132
|
+
/* @__PURE__ */ A(Bq, { children: [/* @__PURE__ */ k(Vq, { children: "Max # of Models" }), /* @__PURE__ */ k(Rq, {
|
|
39025
39133
|
min: n.min,
|
|
39026
39134
|
max: n.max,
|
|
39027
39135
|
value: e.maxModelSelected,
|
|
39028
39136
|
name: "max-model",
|
|
39029
39137
|
onChange: this.changeMaxModel
|
|
39030
39138
|
})] }),
|
|
39031
|
-
/* @__PURE__ */ A(
|
|
39139
|
+
/* @__PURE__ */ A(Bq, { children: [/* @__PURE__ */ k(Vq, { children: "Parts per Model" }), /* @__PURE__ */ k(Rq, {
|
|
39032
39140
|
min: r.min,
|
|
39033
39141
|
max: r.max,
|
|
39034
39142
|
value: e.partsPerModel,
|
|
@@ -39036,22 +39144,22 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39036
39144
|
onChange: this.changePartModel
|
|
39037
39145
|
})] })
|
|
39038
39146
|
] }),
|
|
39039
|
-
/* @__PURE__ */ A(
|
|
39147
|
+
/* @__PURE__ */ A(Uq, { children: [/* @__PURE__ */ k(CK, {
|
|
39040
39148
|
onChange: this.studentConfig,
|
|
39041
39149
|
checked: e.allowedStudentConfig,
|
|
39042
39150
|
label: ""
|
|
39043
|
-
}), /* @__PURE__ */ k(
|
|
39151
|
+
}), /* @__PURE__ */ k(Wq, { children: "Allow student to configure number of models and parts per model" })] })
|
|
39044
39152
|
] });
|
|
39045
39153
|
}
|
|
39046
|
-
},
|
|
39154
|
+
}, Kq = w(EK)(({ theme: e }) => ({ marginBottom: e.spacing(4) })), qq = w(ea)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
39047
39155
|
fontSize: e.typography.fontSize - 2,
|
|
39048
39156
|
whiteSpace: "pre",
|
|
39049
39157
|
maxWidth: "500px"
|
|
39050
|
-
} })),
|
|
39158
|
+
} })), Jq = w("div")(({ theme: e }) => ({
|
|
39051
39159
|
fontSize: e.typography.fontSize - 2,
|
|
39052
39160
|
color: e.palette.error.main,
|
|
39053
39161
|
marginTop: e.spacing(1)
|
|
39054
|
-
})),
|
|
39162
|
+
})), Yq = w("div")(({ theme: e, hasError: t }) => ({ ...t && { border: `2px solid ${e.palette.error.main}` } })), Xq = w("label")(({ theme: e }) => ({ marginBottom: e.spacing(4) })), Zq = class extends O.Component {
|
|
39055
39163
|
static propTypes = {
|
|
39056
39164
|
model: z.default.object.isRequired,
|
|
39057
39165
|
configuration: z.default.object.isRequired,
|
|
@@ -39084,15 +39192,15 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39084
39192
|
...a,
|
|
39085
39193
|
...e
|
|
39086
39194
|
}), v = this.generateRandomKey();
|
|
39087
|
-
return /* @__PURE__ */ A(
|
|
39195
|
+
return /* @__PURE__ */ A(kq.ConfigLayout, {
|
|
39088
39196
|
extraCSSRules: f,
|
|
39089
39197
|
dimensions: o,
|
|
39090
39198
|
hideSettings: !0,
|
|
39091
39199
|
children: [
|
|
39092
|
-
/* @__PURE__ */ k(
|
|
39093
|
-
/* @__PURE__ */ k(
|
|
39200
|
+
/* @__PURE__ */ k(Iq, { header: "Set Up" }),
|
|
39201
|
+
/* @__PURE__ */ k(Kq, {
|
|
39094
39202
|
label: s?.label || "Title",
|
|
39095
|
-
children: /* @__PURE__ */ k(
|
|
39203
|
+
children: /* @__PURE__ */ k(vK, {
|
|
39096
39204
|
markup: e.title || "",
|
|
39097
39205
|
onChange: (e) => t({ title: e }),
|
|
39098
39206
|
toolbarOpts: g,
|
|
@@ -39114,9 +39222,9 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39114
39222
|
mathMlOptions: u
|
|
39115
39223
|
})
|
|
39116
39224
|
}),
|
|
39117
|
-
/* @__PURE__ */ k(
|
|
39225
|
+
/* @__PURE__ */ k(Kq, {
|
|
39118
39226
|
label: c?.label || "Question",
|
|
39119
|
-
children: /* @__PURE__ */ k(
|
|
39227
|
+
children: /* @__PURE__ */ k(vK, {
|
|
39120
39228
|
markup: e.prompt || "",
|
|
39121
39229
|
minHeight: 60,
|
|
39122
39230
|
onChange: (e) => t({ prompt: e }),
|
|
@@ -39129,21 +39237,21 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39129
39237
|
mathMlOptions: u
|
|
39130
39238
|
})
|
|
39131
39239
|
}),
|
|
39132
|
-
/* @__PURE__ */ k(
|
|
39240
|
+
/* @__PURE__ */ k(EK, { children: /* @__PURE__ */ k(Gq, {
|
|
39133
39241
|
model: e,
|
|
39134
39242
|
onChange: this.onModelOptionsChange,
|
|
39135
39243
|
modelOptions: l
|
|
39136
39244
|
}) }),
|
|
39137
|
-
/* @__PURE__ */ A(
|
|
39245
|
+
/* @__PURE__ */ A(EK, { children: [
|
|
39138
39246
|
" ",
|
|
39139
|
-
/* @__PURE__ */ k(
|
|
39247
|
+
/* @__PURE__ */ k(Iq, {
|
|
39140
39248
|
header: "Correct Answer",
|
|
39141
|
-
info: /* @__PURE__ */ k(
|
|
39249
|
+
info: /* @__PURE__ */ k(qq, {
|
|
39142
39250
|
disableFocusListener: !0,
|
|
39143
39251
|
disableTouchListener: !0,
|
|
39144
39252
|
placement: "right",
|
|
39145
39253
|
title: "The correct answer should include no more than one partially-filled model",
|
|
39146
|
-
children: /* @__PURE__ */ k(
|
|
39254
|
+
children: /* @__PURE__ */ k(Aq, {
|
|
39147
39255
|
fontSize: "small",
|
|
39148
39256
|
color: "primary",
|
|
39149
39257
|
style: { marginLeft: "8px" }
|
|
@@ -39151,9 +39259,9 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39151
39259
|
})
|
|
39152
39260
|
}),
|
|
39153
39261
|
/* @__PURE__ */ k("br", {}),
|
|
39154
|
-
/* @__PURE__ */ k(
|
|
39262
|
+
/* @__PURE__ */ k(Xq, { children: "Click/touch the number of parts to represent the correct fraction model" }),
|
|
39155
39263
|
/* @__PURE__ */ k("br", {}),
|
|
39156
|
-
/* @__PURE__ */ k(
|
|
39264
|
+
/* @__PURE__ */ k(Yq, {
|
|
39157
39265
|
hasError: !!d.correctResponse,
|
|
39158
39266
|
children: /* @__PURE__ */ k(Ne, {
|
|
39159
39267
|
value: e.correctResponse,
|
|
@@ -39164,7 +39272,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39164
39272
|
onChange: this.onCorrectAnswerChange
|
|
39165
39273
|
}, v)
|
|
39166
39274
|
}),
|
|
39167
|
-
d.correctResponse && /* @__PURE__ */ k(
|
|
39275
|
+
d.correctResponse && /* @__PURE__ */ k(Jq, { children: d.correctResponse })
|
|
39168
39276
|
] }),
|
|
39169
39277
|
/* @__PURE__ */ k(Ee, {
|
|
39170
39278
|
open: h.open,
|
|
@@ -39184,7 +39292,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39184
39292
|
]
|
|
39185
39293
|
});
|
|
39186
39294
|
}
|
|
39187
|
-
},
|
|
39295
|
+
}, Qq = class e extends CustomEvent {
|
|
39188
39296
|
static {
|
|
39189
39297
|
this.TYPE = "model.updated";
|
|
39190
39298
|
}
|
|
@@ -39197,7 +39305,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39197
39305
|
}
|
|
39198
39306
|
}), this.update = t, this.reset = n;
|
|
39199
39307
|
}
|
|
39200
|
-
},
|
|
39308
|
+
}, $q = class e extends CustomEvent {
|
|
39201
39309
|
static {
|
|
39202
39310
|
this.TYPE = "delete.image";
|
|
39203
39311
|
}
|
|
@@ -39210,7 +39318,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39210
39318
|
}
|
|
39211
39319
|
}), this.src = t, this.done = n;
|
|
39212
39320
|
}
|
|
39213
|
-
},
|
|
39321
|
+
}, eJ = class e extends CustomEvent {
|
|
39214
39322
|
static {
|
|
39215
39323
|
this.TYPE = "insert.image";
|
|
39216
39324
|
}
|
|
@@ -39220,7 +39328,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39220
39328
|
detail: t
|
|
39221
39329
|
}), this.handler = t;
|
|
39222
39330
|
}
|
|
39223
|
-
},
|
|
39331
|
+
}, tJ = class e extends CustomEvent {
|
|
39224
39332
|
static {
|
|
39225
39333
|
this.TYPE = "delete.sound";
|
|
39226
39334
|
}
|
|
@@ -39233,7 +39341,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39233
39341
|
}
|
|
39234
39342
|
}), this.src = t, this.done = n;
|
|
39235
39343
|
}
|
|
39236
|
-
},
|
|
39344
|
+
}, nJ = class e extends CustomEvent {
|
|
39237
39345
|
static {
|
|
39238
39346
|
this.TYPE = "insert.sound";
|
|
39239
39347
|
}
|
|
@@ -39243,7 +39351,7 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39243
39351
|
detail: t
|
|
39244
39352
|
}), this.handler = t;
|
|
39245
39353
|
}
|
|
39246
|
-
},
|
|
39354
|
+
}, rJ = {
|
|
39247
39355
|
model: {
|
|
39248
39356
|
correctResponse: [],
|
|
39249
39357
|
title: "",
|
|
@@ -39323,24 +39431,24 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39323
39431
|
},
|
|
39324
39432
|
settingsPanelDisabled: !0
|
|
39325
39433
|
}
|
|
39326
|
-
},
|
|
39434
|
+
}, iJ = class e extends HTMLElement {
|
|
39327
39435
|
static createDefaultModel = (e = {}) => {
|
|
39328
|
-
let t =
|
|
39436
|
+
let t = rJ.configuration, n = e.language || "";
|
|
39329
39437
|
return !n && t.language && t.language.enabled && t.languageChoices?.options?.length && (n = t.languageChoices.options[0].value), {
|
|
39330
|
-
...
|
|
39438
|
+
...rJ.model,
|
|
39331
39439
|
...e,
|
|
39332
39440
|
language: n
|
|
39333
39441
|
};
|
|
39334
39442
|
};
|
|
39335
39443
|
constructor() {
|
|
39336
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration =
|
|
39444
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = rJ.configuration;
|
|
39337
39445
|
}
|
|
39338
39446
|
set model(t) {
|
|
39339
39447
|
this._model = e.createDefaultModel(t), this.render();
|
|
39340
39448
|
}
|
|
39341
39449
|
set configuration(e) {
|
|
39342
39450
|
let t = {
|
|
39343
|
-
...
|
|
39451
|
+
...rJ.configuration,
|
|
39344
39452
|
...e
|
|
39345
39453
|
};
|
|
39346
39454
|
this._configuration = t, this.resetModelAfterConfigurationIsSet(), t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.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({
|
|
@@ -39356,32 +39464,32 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39356
39464
|
this.render();
|
|
39357
39465
|
}
|
|
39358
39466
|
modelChanged(e) {
|
|
39359
|
-
this._model = e, this.dispatchEvent(new
|
|
39467
|
+
this._model = e, this.dispatchEvent(new Qq(this._model), !0), this.render();
|
|
39360
39468
|
}
|
|
39361
39469
|
onChange = (e) => {
|
|
39362
39470
|
this._model = {
|
|
39363
39471
|
...this._model,
|
|
39364
39472
|
...e
|
|
39365
|
-
}, this.dispatchEvent(new
|
|
39473
|
+
}, this.dispatchEvent(new Qq(this._model)), this.render();
|
|
39366
39474
|
};
|
|
39367
39475
|
onConfigurationChanged(e) {
|
|
39368
39476
|
this._configuration = e, this.render();
|
|
39369
39477
|
}
|
|
39370
39478
|
insertImage(e) {
|
|
39371
|
-
this.dispatchEvent(new
|
|
39479
|
+
this.dispatchEvent(new eJ(e));
|
|
39372
39480
|
}
|
|
39373
39481
|
onDeleteImage(e, t) {
|
|
39374
|
-
this.dispatchEvent(new
|
|
39482
|
+
this.dispatchEvent(new $q(e, t));
|
|
39375
39483
|
}
|
|
39376
39484
|
insertSound(e) {
|
|
39377
|
-
this.dispatchEvent(new
|
|
39485
|
+
this.dispatchEvent(new nJ(e));
|
|
39378
39486
|
}
|
|
39379
39487
|
onDeleteSound(e, t) {
|
|
39380
|
-
this.dispatchEvent(new
|
|
39488
|
+
this.dispatchEvent(new tJ(e, t));
|
|
39381
39489
|
}
|
|
39382
39490
|
render() {
|
|
39383
39491
|
if (this._model) {
|
|
39384
|
-
let e = O.createElement(
|
|
39492
|
+
let e = O.createElement(Zq, {
|
|
39385
39493
|
classes: {},
|
|
39386
39494
|
model: this._model,
|
|
39387
39495
|
configuration: this._configuration,
|
|
@@ -39404,6 +39512,6 @@ var kq = O.forwardRef((e, t) => /* @__PURE__ */ k(Oq, {
|
|
|
39404
39512
|
}
|
|
39405
39513
|
};
|
|
39406
39514
|
//#endregion
|
|
39407
|
-
export {
|
|
39515
|
+
export { iJ as default };
|
|
39408
39516
|
|
|
39409
39517
|
//# sourceMappingURL=index.js.map
|