easy-email-pro-editor 1.51.2 → 1.51.3
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/lib/index.js +169 -168
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var rn = (e, t) => {
|
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
22
|
var Y = (e, t, n) => (us(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
23
|
-
import { t as $t, PluginManager as au, NodeUtils as
|
|
23
|
+
import { t as $t, PluginManager as au, NodeUtils as M, BlockManager as ye, ElementCategory as Br, classnames as DE, mergeBlock as Ba, EditorCore as Iu, EditorAuth as va, PageTestingCss as CE, ElementType as Ae, ElementAllowAttributes as st, HTML_NODE_VOID_TAGS as sn, StandardType as Ir, SLATE_NODE_PLACEHOLDER_CLASSNAME as Sl, I18nManager as _E } from "easy-email-pro-core";
|
|
24
24
|
import { escapeRegExp as Ll, some as NE, find as yE, reduce as Sa, cloneDeep as qu, isEqual as Sr, get as p, merge as IE, camelCase as Wu, isString as mn, identity as xE, omitBy as BE, isNil as vE, uniqueId as Rl, isEmpty as SE, map as LE, min as RE, omit as bn, each as Ol, set as OE, pick as kE, flatMap as PE, sum as wE, isUndefined as FE, debounce as ME } from "lodash";
|
|
25
25
|
import f, { createContext as La, useEffect as It, useMemo as q, useContext as nr, useRef as Au, useCallback as Oe, useState as ur, createElement as Lr } from "react";
|
|
26
26
|
import { Transforms as Be, Node as At, Editor as ge, Path as Xe, Text as En, Range as Ca } from "slate";
|
|
@@ -441,11 +441,11 @@ const al = (e) => {
|
|
|
441
441
|
if (ge.above(s, {
|
|
442
442
|
at: We,
|
|
443
443
|
match(_e) {
|
|
444
|
-
return
|
|
444
|
+
return M.isUnsetElement(_e);
|
|
445
445
|
}
|
|
446
446
|
}))
|
|
447
447
|
Be.deselect(s);
|
|
448
|
-
else if (!s.selection &&
|
|
448
|
+
else if (!s.selection && M.isContentElement(se)) {
|
|
449
449
|
const _e = { anchor: We, focus: We };
|
|
450
450
|
Be.select(s, _e);
|
|
451
451
|
}
|
|
@@ -483,7 +483,7 @@ const al = (e) => {
|
|
|
483
483
|
} catch (j) {
|
|
484
484
|
}
|
|
485
485
|
It(() => {
|
|
486
|
-
if (pe &&
|
|
486
|
+
if (pe && M.isElement(pe)) {
|
|
487
487
|
const j = ye.getBlockByType(pe.type);
|
|
488
488
|
[Br.UNSET].includes(j.category) && I(null);
|
|
489
489
|
}
|
|
@@ -708,7 +708,7 @@ const Hl = La({}), Tg = (e) => /* @__PURE__ */ f.createElement(Hl.Provider, { va
|
|
|
708
708
|
z,
|
|
709
709
|
re
|
|
710
710
|
);
|
|
711
|
-
if (
|
|
711
|
+
if (M.isSectionElement(e) || M.isWrapperElement(e)) {
|
|
712
712
|
const j = t.attributes["content-background-color"];
|
|
713
713
|
j && !I && (me = Ba(
|
|
714
714
|
{ "background-color": j },
|
|
@@ -2009,7 +2009,7 @@ ya.exports;
|
|
|
2009
2009
|
return u;
|
|
2010
2010
|
}
|
|
2011
2011
|
function f2() {
|
|
2012
|
-
var u = this.__wrapped__.value(), r = this.__dir__, a = Se(u), o = r < 0, d = a ? u.length : 0, m = Cf(0, d, this.__views__), _ = m.start, x = m.end, L = x - _, G = o ? x : _ - 1,
|
|
2012
|
+
var u = this.__wrapped__.value(), r = this.__dir__, a = Se(u), o = r < 0, d = a ? u.length : 0, m = Cf(0, d, this.__views__), _ = m.start, x = m.end, L = x - _, G = o ? x : _ - 1, H = this.__iteratees__, K = H.length, ie = 0, he = Dt(L, this.__takeCount__);
|
|
2013
2013
|
if (!a || !o && d == L && he == L)
|
|
2014
2014
|
return So(u, this.__actions__);
|
|
2015
2015
|
var Te = [];
|
|
@@ -2017,7 +2017,7 @@ ya.exports;
|
|
|
2017
2017
|
for (; L-- && ie < he; ) {
|
|
2018
2018
|
G += r;
|
|
2019
2019
|
for (var Le = -1, De = u[G]; ++Le < K; ) {
|
|
2020
|
-
var Pe =
|
|
2020
|
+
var Pe = H[Le], we = Pe.iteratee, _t = Pe.type, Pt = we(De);
|
|
2021
2021
|
if (_t == z0)
|
|
2022
2022
|
De = Pt;
|
|
2023
2023
|
else if (!Pt) {
|
|
@@ -2203,8 +2203,8 @@ ya.exports;
|
|
|
2203
2203
|
return _;
|
|
2204
2204
|
if (!Ze(u))
|
|
2205
2205
|
return u;
|
|
2206
|
-
var
|
|
2207
|
-
if (
|
|
2206
|
+
var H = Se(u);
|
|
2207
|
+
if (H) {
|
|
2208
2208
|
if (_ = Nf(u), !x)
|
|
2209
2209
|
return Lt(u, _);
|
|
2210
2210
|
} else {
|
|
@@ -2229,7 +2229,7 @@ ya.exports;
|
|
|
2229
2229
|
}) : Yc(u) && u.forEach(function(De, Pe) {
|
|
2230
2230
|
_.set(Pe, Yt(De, r, a, Pe, u, m));
|
|
2231
2231
|
});
|
|
2232
|
-
var Te = G ? L ? xi : Ii : L ? Ot : ft, Le =
|
|
2232
|
+
var Te = G ? L ? xi : Ii : L ? Ot : ft, Le = H ? D : Te(u);
|
|
2233
2233
|
return c(Le || u, function(De, Pe) {
|
|
2234
2234
|
Le && (Pe = De, De = u[Pe]), Wr(_, Pe, Yt(De, r, a, Pe, u, m));
|
|
2235
2235
|
}), _;
|
|
@@ -2265,14 +2265,14 @@ ya.exports;
|
|
|
2265
2265
|
a && (r = B(r, fe(a))), o ? (m = O, _ = !1) : r.length >= Ha && (m = se, _ = !1, r = new ju(r));
|
|
2266
2266
|
e:
|
|
2267
2267
|
for (; ++d < x; ) {
|
|
2268
|
-
var
|
|
2269
|
-
if (
|
|
2268
|
+
var H = u[d], K = a == null ? H : a(H);
|
|
2269
|
+
if (H = o || H !== 0 ? H : 0, _ && K === K) {
|
|
2270
2270
|
for (var ie = G; ie--; )
|
|
2271
2271
|
if (r[ie] === K)
|
|
2272
2272
|
continue e;
|
|
2273
|
-
L.push(
|
|
2273
|
+
L.push(H);
|
|
2274
2274
|
} else
|
|
2275
|
-
m(r, K, o) || L.push(
|
|
2275
|
+
m(r, K, o) || L.push(H);
|
|
2276
2276
|
}
|
|
2277
2277
|
return L;
|
|
2278
2278
|
}
|
|
@@ -2348,14 +2348,14 @@ ya.exports;
|
|
|
2348
2348
|
}
|
|
2349
2349
|
function di(u, r, a) {
|
|
2350
2350
|
for (var o = a ? O : N, d = u[0].length, m = u.length, _ = m, x = ct(m), L = 1 / 0, G = []; _--; ) {
|
|
2351
|
-
var
|
|
2352
|
-
_ && r && (
|
|
2351
|
+
var H = u[_];
|
|
2352
|
+
_ && r && (H = B(H, fe(r))), L = Dt(H.length, L), x[_] = !a && (r || d >= 120 && H.length >= 120) ? new ju(_ && H) : D;
|
|
2353
2353
|
}
|
|
2354
|
-
|
|
2354
|
+
H = u[0];
|
|
2355
2355
|
var K = -1, ie = x[0];
|
|
2356
2356
|
e:
|
|
2357
2357
|
for (; ++K < d && G.length < L; ) {
|
|
2358
|
-
var he =
|
|
2358
|
+
var he = H[K], Te = r ? r(he) : he;
|
|
2359
2359
|
if (he = a || he !== 0 ? he : 0, !(ie ? se(ie, Te) : o(G, Te, a))) {
|
|
2360
2360
|
for (_ = m; --_; ) {
|
|
2361
2361
|
var Le = x[_];
|
|
@@ -2392,16 +2392,16 @@ ya.exports;
|
|
|
2392
2392
|
function j2(u, r, a, o, d, m) {
|
|
2393
2393
|
var _ = Se(u), x = Se(r), L = _ ? xn : Ct(u), G = x ? xn : Ct(r);
|
|
2394
2394
|
L = L == fr ? gu : L, G = G == fr ? gu : G;
|
|
2395
|
-
var
|
|
2395
|
+
var H = L == gu, K = G == gu, ie = L == G;
|
|
2396
2396
|
if (ie && Pu(u)) {
|
|
2397
2397
|
if (!Pu(r))
|
|
2398
2398
|
return !1;
|
|
2399
|
-
_ = !0,
|
|
2399
|
+
_ = !0, H = !1;
|
|
2400
2400
|
}
|
|
2401
|
-
if (ie && !
|
|
2401
|
+
if (ie && !H)
|
|
2402
2402
|
return m || (m = new uu()), _ || yr(u) ? jo(u, r, a, o, d, m) : pf(u, r, L, a, o, d, m);
|
|
2403
2403
|
if (!(a & cr)) {
|
|
2404
|
-
var he =
|
|
2404
|
+
var he = H && Qe.call(u, "__wrapped__"), Te = K && Qe.call(r, "__wrapped__");
|
|
2405
2405
|
if (he || Te) {
|
|
2406
2406
|
var Le = he ? u.value() : u, De = Te ? r.value() : r;
|
|
2407
2407
|
return m || (m = new uu()), d(Le, De, a, o, m);
|
|
@@ -2423,15 +2423,15 @@ ya.exports;
|
|
|
2423
2423
|
}
|
|
2424
2424
|
for (; ++d < m; ) {
|
|
2425
2425
|
x = a[d];
|
|
2426
|
-
var L = x[0], G = u[L],
|
|
2426
|
+
var L = x[0], G = u[L], H = x[1];
|
|
2427
2427
|
if (_ && x[2]) {
|
|
2428
2428
|
if (G === D && !(L in u))
|
|
2429
2429
|
return !1;
|
|
2430
2430
|
} else {
|
|
2431
2431
|
var K = new uu();
|
|
2432
2432
|
if (o)
|
|
2433
|
-
var ie = o(G,
|
|
2434
|
-
if (!(ie === D ? Gr(
|
|
2433
|
+
var ie = o(G, H, L, u, r, K);
|
|
2434
|
+
if (!(ie === D ? Gr(H, G, cr | yn, o, K) : ie))
|
|
2435
2435
|
return !1;
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
@@ -2503,12 +2503,12 @@ ya.exports;
|
|
|
2503
2503
|
var x = Li(u, a), L = Li(r, a), G = _.get(L);
|
|
2504
2504
|
if (G)
|
|
2505
2505
|
return si(u, a, G), D;
|
|
2506
|
-
var
|
|
2506
|
+
var H = m ? m(x, L, a + "", u, r, _) : D, K = H === D;
|
|
2507
2507
|
if (K) {
|
|
2508
2508
|
var ie = Se(L), he = !ie && Pu(L), Te = !ie && !he && yr(L);
|
|
2509
|
-
|
|
2509
|
+
H = L, ie || he || Te ? Se(x) ? H = x : ut(x) ? H = Lt(x) : he ? (K = !1, H = Ro(L, !0)) : Te ? (K = !1, H = Oo(L, !0)) : H = [] : Xr(L) || er(L) ? (H = x, er(x) ? H = Cc(x) : Ze(x) && !Nu(x) || (H = Ko(L))) : K = !1;
|
|
2510
2510
|
}
|
|
2511
|
-
K && (_.set(L,
|
|
2511
|
+
K && (_.set(L, H), d(H, L, o, m, _), _.delete(L)), si(u, a, H);
|
|
2512
2512
|
}
|
|
2513
2513
|
function _o(u, r) {
|
|
2514
2514
|
var a = u.length;
|
|
@@ -2550,7 +2550,7 @@ ya.exports;
|
|
|
2550
2550
|
function mi(u, r, a, o) {
|
|
2551
2551
|
var d = o ? z : V, m = -1, _ = r.length, x = u;
|
|
2552
2552
|
for (u === r && (r = Lt(r)), a && (x = B(u, fe(a))); ++m < _; )
|
|
2553
|
-
for (var L = 0, G = r[m],
|
|
2553
|
+
for (var L = 0, G = r[m], H = a ? a(G) : G; (L = d(x, H, L, o)) > -1; )
|
|
2554
2554
|
x !== u && oa.call(x, L, 1), oa.call(u, L, 1);
|
|
2555
2555
|
return u;
|
|
2556
2556
|
}
|
|
@@ -2600,8 +2600,8 @@ ya.exports;
|
|
|
2600
2600
|
if (L === "__proto__" || L === "constructor" || L === "prototype")
|
|
2601
2601
|
return u;
|
|
2602
2602
|
if (d != _) {
|
|
2603
|
-
var
|
|
2604
|
-
G = o ? o(
|
|
2603
|
+
var H = x[L];
|
|
2604
|
+
G = o ? o(H, L, x) : D, G === D && (G = Ze(H) ? H : _u(r[d + 1]) ? [] : {});
|
|
2605
2605
|
}
|
|
2606
2606
|
Wr(x, L, G), x = x[L];
|
|
2607
2607
|
}
|
|
@@ -2640,12 +2640,12 @@ ya.exports;
|
|
|
2640
2640
|
return 0;
|
|
2641
2641
|
r = a(r);
|
|
2642
2642
|
for (var _ = r !== r, x = r === null, L = Ut(r), G = r === D; d < m; ) {
|
|
2643
|
-
var
|
|
2643
|
+
var H = da((d + m) / 2), K = a(u[H]), ie = K !== D, he = K === null, Te = K === K, Le = Ut(K);
|
|
2644
2644
|
if (_)
|
|
2645
2645
|
var De = o || Te;
|
|
2646
2646
|
else
|
|
2647
2647
|
De = G ? Te && (o || ie) : x ? Te && ie && (o || !he) : L ? Te && ie && !he && (o || !Le) : !he && !Le && (o ? K <= r : K < r);
|
|
2648
|
-
De ? d =
|
|
2648
|
+
De ? d = H + 1 : m = H;
|
|
2649
2649
|
}
|
|
2650
2650
|
return Dt(m, K0);
|
|
2651
2651
|
}
|
|
@@ -2685,14 +2685,14 @@ ya.exports;
|
|
|
2685
2685
|
L = r ? [] : x;
|
|
2686
2686
|
e:
|
|
2687
2687
|
for (; ++o < m; ) {
|
|
2688
|
-
var
|
|
2689
|
-
if (
|
|
2688
|
+
var H = u[o], K = r ? r(H) : H;
|
|
2689
|
+
if (H = a || H !== 0 ? H : 0, _ && K === K) {
|
|
2690
2690
|
for (var ie = L.length; ie--; )
|
|
2691
2691
|
if (L[ie] === K)
|
|
2692
2692
|
continue e;
|
|
2693
|
-
r && L.push(K), x.push(
|
|
2693
|
+
r && L.push(K), x.push(H);
|
|
2694
2694
|
} else
|
|
2695
|
-
d(L, K, a) || (L !== x && L.push(K), x.push(
|
|
2695
|
+
d(L, K, a) || (L !== x && L.push(K), x.push(H));
|
|
2696
2696
|
}
|
|
2697
2697
|
return x;
|
|
2698
2698
|
}
|
|
@@ -2782,16 +2782,16 @@ ya.exports;
|
|
|
2782
2782
|
return u.index - r.index;
|
|
2783
2783
|
}
|
|
2784
2784
|
function Po(u, r, a, o) {
|
|
2785
|
-
for (var d = -1, m = u.length, _ = a.length, x = -1, L = r.length, G = lt(m - _, 0),
|
|
2786
|
-
|
|
2785
|
+
for (var d = -1, m = u.length, _ = a.length, x = -1, L = r.length, G = lt(m - _, 0), H = ct(L + G), K = !o; ++x < L; )
|
|
2786
|
+
H[x] = r[x];
|
|
2787
2787
|
for (; ++d < _; )
|
|
2788
|
-
(K || d < m) && (
|
|
2788
|
+
(K || d < m) && (H[a[d]] = u[d]);
|
|
2789
2789
|
for (; G--; )
|
|
2790
|
-
|
|
2791
|
-
return
|
|
2790
|
+
H[x++] = u[d++];
|
|
2791
|
+
return H;
|
|
2792
2792
|
}
|
|
2793
2793
|
function wo(u, r, a, o) {
|
|
2794
|
-
for (var d = -1, m = u.length, _ = -1, x = a.length, L = -1, G = r.length,
|
|
2794
|
+
for (var d = -1, m = u.length, _ = -1, x = a.length, L = -1, G = r.length, H = lt(m - x, 0), K = ct(H + G), ie = !o; ++d < H; )
|
|
2795
2795
|
K[d] = u[d];
|
|
2796
2796
|
for (var he = d; ++L < G; )
|
|
2797
2797
|
K[he + L] = r[L];
|
|
@@ -2940,28 +2940,28 @@ ya.exports;
|
|
|
2940
2940
|
_ = L && Si(L[0]) && L[1] == (Eu | su | ou | kr) && !L[4].length && L[9] == 1 ? _[Gn(L[0])].apply(_, L[3]) : m.length == 1 && Si(m) ? _[x]() : _.thru(m);
|
|
2941
2941
|
}
|
|
2942
2942
|
return function() {
|
|
2943
|
-
var G = arguments,
|
|
2944
|
-
if (_ && G.length == 1 && Se(
|
|
2945
|
-
return _.plant(
|
|
2946
|
-
for (var K = 0, ie = a ? r[K].apply(this, G) :
|
|
2943
|
+
var G = arguments, H = G[0];
|
|
2944
|
+
if (_ && G.length == 1 && Se(H))
|
|
2945
|
+
return _.plant(H).value();
|
|
2946
|
+
for (var K = 0, ie = a ? r[K].apply(this, G) : H; ++K < a; )
|
|
2947
2947
|
ie = r[K].call(this, ie);
|
|
2948
2948
|
return ie;
|
|
2949
2949
|
};
|
|
2950
2950
|
});
|
|
2951
2951
|
}
|
|
2952
2952
|
function qn(u, r, a, o, d, m, _, x, L, G) {
|
|
2953
|
-
function
|
|
2953
|
+
function H() {
|
|
2954
2954
|
for (var Pe = arguments.length, we = ct(Pe), _t = Pe; _t--; )
|
|
2955
2955
|
we[_t] = arguments[_t];
|
|
2956
2956
|
if (Te)
|
|
2957
|
-
var Pt = br(
|
|
2957
|
+
var Pt = br(H), wu = _e(we, Pt);
|
|
2958
2958
|
if (o && (we = Po(we, o, d, Te)), m && (we = wo(we, m, _, Te)), Pe -= wu, Te && Pe < G)
|
|
2959
|
-
return Vo(u, r, qn,
|
|
2959
|
+
return Vo(u, r, qn, H.placeholder, a, we, be(we, Pt), x, L, G - Pe);
|
|
2960
2960
|
var tt = ie ? a : this, Zt = he ? tt[u] : u;
|
|
2961
|
-
return Pe = we.length, x ? we = kf(we, x) : Le && Pe > 1 && we.reverse(), K && L < Pe && (we.length = L), this && this !== bt && this instanceof
|
|
2961
|
+
return Pe = we.length, x ? we = kf(we, x) : Le && Pe > 1 && we.reverse(), K && L < Pe && (we.length = L), this && this !== bt && this instanceof H && (Zt = De || zr(Zt)), Zt.apply(tt, we);
|
|
2962
2962
|
}
|
|
2963
2963
|
var K = r & Eu, ie = r & Vt, he = r & Vu, Te = r & (su | lr), Le = r & qa, De = he ? D : zr(u);
|
|
2964
|
-
return
|
|
2964
|
+
return H;
|
|
2965
2965
|
}
|
|
2966
2966
|
function Wo(u, r) {
|
|
2967
2967
|
return function(a, o) {
|
|
@@ -3001,7 +3001,7 @@ ya.exports;
|
|
|
3001
3001
|
}
|
|
3002
3002
|
function gf(u, r, a, o) {
|
|
3003
3003
|
function d() {
|
|
3004
|
-
for (var x = -1, L = arguments.length, G = -1,
|
|
3004
|
+
for (var x = -1, L = arguments.length, G = -1, H = o.length, K = ct(H + L), ie = this && this !== bt && this instanceof d ? _ : u; ++G < H; )
|
|
3005
3005
|
K[G] = o[G];
|
|
3006
3006
|
for (; L--; )
|
|
3007
3007
|
K[G++] = arguments[++x];
|
|
@@ -3021,8 +3021,8 @@ ya.exports;
|
|
|
3021
3021
|
};
|
|
3022
3022
|
}
|
|
3023
3023
|
function Vo(u, r, a, o, d, m, _, x, L, G) {
|
|
3024
|
-
var
|
|
3025
|
-
r |=
|
|
3024
|
+
var H = r & su, K = H ? _ : D, ie = H ? D : _, he = H ? m : D, Te = H ? D : m;
|
|
3025
|
+
r |= H ? ou : dr, r &= ~(H ? dr : ou), r & vs || (r &= ~(Vt | Vu));
|
|
3026
3026
|
var Le = [u, r, d, he, K, Te, ie, x, L, G], De = a.apply(D, Le);
|
|
3027
3027
|
return Si(u) && Wc(De, Le), De.placeholder = o, tc(De, u, r);
|
|
3028
3028
|
}
|
|
@@ -3048,10 +3048,10 @@ ya.exports;
|
|
|
3048
3048
|
throw new Kt(Qt);
|
|
3049
3049
|
var G = o ? o.length : 0;
|
|
3050
3050
|
if (G || (r &= ~(ou | dr), o = d = D), _ = _ === D ? _ : lt(Re(_), 0), x = x === D ? x : Re(x), G -= d ? d.length : 0, r & dr) {
|
|
3051
|
-
var
|
|
3051
|
+
var H = o, K = d;
|
|
3052
3052
|
o = d = D;
|
|
3053
3053
|
}
|
|
3054
|
-
var ie = L ? D : Xi(u), he = [u, r, a, o, d,
|
|
3054
|
+
var ie = L ? D : Xi(u), he = [u, r, a, o, d, H, K, m, _, x];
|
|
3055
3055
|
if (ie && Lf(he, ie), u = he[0], r = he[1], a = he[2], o = he[3], d = he[4], x = he[9] = he[9] === D ? L ? 0 : u.length : lt(he[9] - G, 0), !x && r & (su | lr) && (r &= ~(su | lr)), r && r != Vt)
|
|
3056
3056
|
Te = r == su || r == lr ? Ef(u, r, x) : r != ou && r != (Vt | ou) || d.length ? qn.apply(D, he) : gf(u, r, a, o);
|
|
3057
3057
|
else
|
|
@@ -3071,9 +3071,9 @@ ya.exports;
|
|
|
3071
3071
|
var _ = a & cr, x = u.length, L = r.length;
|
|
3072
3072
|
if (x != L && !(_ && L > x))
|
|
3073
3073
|
return !1;
|
|
3074
|
-
var G = m.get(u),
|
|
3075
|
-
if (G &&
|
|
3076
|
-
return G == r &&
|
|
3074
|
+
var G = m.get(u), H = m.get(r);
|
|
3075
|
+
if (G && H)
|
|
3076
|
+
return G == r && H == u;
|
|
3077
3077
|
var K = -1, ie = !0, he = a & yn ? new ju() : D;
|
|
3078
3078
|
for (m.set(u, r), m.set(r, u); ++K < x; ) {
|
|
3079
3079
|
var Te = u[K], Le = r[K];
|
|
@@ -3127,8 +3127,8 @@ ya.exports;
|
|
|
3127
3127
|
if (G)
|
|
3128
3128
|
return G == r;
|
|
3129
3129
|
o |= yn, _.set(u, r);
|
|
3130
|
-
var
|
|
3131
|
-
return _.delete(u),
|
|
3130
|
+
var H = jo(x(u), x(r), o, d, m, _);
|
|
3131
|
+
return _.delete(u), H;
|
|
3132
3132
|
case Sn:
|
|
3133
3133
|
if (en)
|
|
3134
3134
|
return en.call(u) == en.call(r);
|
|
@@ -3140,8 +3140,8 @@ ya.exports;
|
|
|
3140
3140
|
if (L != Ii(r).length && !_)
|
|
3141
3141
|
return !1;
|
|
3142
3142
|
for (var G = L; G--; ) {
|
|
3143
|
-
var
|
|
3144
|
-
if (!(_ ?
|
|
3143
|
+
var H = x[G];
|
|
3144
|
+
if (!(_ ? H in r : Qe.call(r, H)))
|
|
3145
3145
|
return !1;
|
|
3146
3146
|
}
|
|
3147
3147
|
var K = m.get(u), ie = m.get(r);
|
|
@@ -3150,15 +3150,15 @@ ya.exports;
|
|
|
3150
3150
|
var he = !0;
|
|
3151
3151
|
m.set(u, r), m.set(r, u);
|
|
3152
3152
|
for (var Te = _; ++G < L; ) {
|
|
3153
|
-
|
|
3154
|
-
var Le = u[
|
|
3153
|
+
H = x[G];
|
|
3154
|
+
var Le = u[H], De = r[H];
|
|
3155
3155
|
if (o)
|
|
3156
|
-
var Pe = _ ? o(De, Le,
|
|
3156
|
+
var Pe = _ ? o(De, Le, H, r, u, m) : o(Le, De, H, u, r, m);
|
|
3157
3157
|
if (!(Pe === D ? Le === De || d(Le, De, a, o, m) : Pe)) {
|
|
3158
3158
|
he = !1;
|
|
3159
3159
|
break;
|
|
3160
3160
|
}
|
|
3161
|
-
Te || (Te =
|
|
3161
|
+
Te || (Te = H == "constructor");
|
|
3162
3162
|
}
|
|
3163
3163
|
if (he && !Te) {
|
|
3164
3164
|
var we = u.constructor, _t = r.constructor;
|
|
@@ -3830,7 +3830,7 @@ ya.exports;
|
|
|
3830
3830
|
function G() {
|
|
3831
3831
|
De !== D && Uc(De), we = 0, ie = Pe = he = De = D;
|
|
3832
3832
|
}
|
|
3833
|
-
function
|
|
3833
|
+
function H() {
|
|
3834
3834
|
return De === D ? Le : L(Aa());
|
|
3835
3835
|
}
|
|
3836
3836
|
function K() {
|
|
@@ -3846,7 +3846,7 @@ ya.exports;
|
|
|
3846
3846
|
var ie, he, Te, Le, De, Pe, we = 0, _t = !1, Pt = !1, wu = !0;
|
|
3847
3847
|
if (typeof u != "function")
|
|
3848
3848
|
throw new Kt(Qt);
|
|
3849
|
-
return r = Xt(r) || 0, Ze(a) && (_t = !!a.leading, Pt = "maxWait" in a, Te = Pt ? lt(Xt(a.maxWait) || 0, r) : Te, wu = "trailing" in a ? !!a.trailing : wu), K.cancel = G, K.flush =
|
|
3849
|
+
return r = Xt(r) || 0, Ze(a) && (_t = !!a.leading, Pt = "maxWait" in a, Te = Pt ? lt(Xt(a.maxWait) || 0, r) : Te, wu = "trailing" in a ? !!a.trailing : wu), K.cancel = G, K.flush = H, K;
|
|
3850
3850
|
}
|
|
3851
3851
|
function Vh(u) {
|
|
3852
3852
|
return Du(u, qa);
|
|
@@ -4272,7 +4272,7 @@ ya.exports;
|
|
|
4272
4272
|
function tA(u, r, a) {
|
|
4273
4273
|
var o = l.templateSettings;
|
|
4274
4274
|
a && vt(u, r, a) && (r = D), u = qe(u), r = ma({}, r, o, Yo);
|
|
4275
|
-
var d, m, _ = ma({}, r.imports, o.imports, Yo), x = ft(_), L = j(_, x), G = 0,
|
|
4275
|
+
var d, m, _ = ma({}, r.imports, o.imports, Yo), x = ft(_), L = j(_, x), G = 0, H = r.interpolate || Ln, K = "__p += '", ie = Vi((r.escape || Ln).source + "|" + H.source + "|" + (H === Ps ? _d : Ln).source + "|" + (r.evaluate || Ln).source + "|$", "g"), he = "//# sourceURL=" + (Qe.call(r, "sourceURL") ? (r.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++$d + "]") + `
|
|
4276
4276
|
`;
|
|
4277
4277
|
u.replace(ie, function(De, Pe, we, _t, Pt, wu) {
|
|
4278
4278
|
return we || (we = _t), K += u.slice(G, wu).replace(Sd, Fe), Pe && (d = !0, K += `' +
|
|
@@ -4359,8 +4359,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4359
4359
|
return L + o;
|
|
4360
4360
|
if (_ && (x += L.length - x), es(d)) {
|
|
4361
4361
|
if (u.slice(x).search(d)) {
|
|
4362
|
-
var G,
|
|
4363
|
-
for (d.global || (d = Vi(d.source, qe(ws.exec(d)) + "g")), d.lastIndex = 0; G = d.exec(
|
|
4362
|
+
var G, H = L;
|
|
4363
|
+
for (d.global || (d = Vi(d.source, qe(ws.exec(d)) + "g")), d.lastIndex = 0; G = d.exec(H); )
|
|
4364
4364
|
var K = G.index;
|
|
4365
4365
|
L = L.slice(0, K === D ? x : K);
|
|
4366
4366
|
}
|
|
@@ -4422,8 +4422,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4422
4422
|
u[x] = L, _ && (u.prototype[x] = function() {
|
|
4423
4423
|
var G = this.__chain__;
|
|
4424
4424
|
if (m || G) {
|
|
4425
|
-
var
|
|
4426
|
-
return (
|
|
4425
|
+
var H = u(this.__wrapped__);
|
|
4426
|
+
return (H.__actions__ = Lt(this.__actions__)).push({ func: L, args: arguments, thisArg: u }), H.__chain__ = G, H;
|
|
4427
4427
|
}
|
|
4428
4428
|
return L.apply(u, P([this.value()], arguments));
|
|
4429
4429
|
});
|
|
@@ -4704,8 +4704,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4704
4704
|
var a = -1, o = r.length, d = o > 2 ? r[2] : D;
|
|
4705
4705
|
for (d && vt(r[0], r[1], d) && (o = 1); ++a < o; )
|
|
4706
4706
|
for (var m = r[a], _ = Ot(m), x = -1, L = _.length; ++x < L; ) {
|
|
4707
|
-
var G = _[x],
|
|
4708
|
-
(
|
|
4707
|
+
var G = _[x], H = u[G];
|
|
4708
|
+
(H === D || ru(H, Dr[G]) && !Qe.call(u, G)) && (u[G] = m[G]);
|
|
4709
4709
|
}
|
|
4710
4710
|
return u;
|
|
4711
4711
|
}), qm = ke(function(u) {
|
|
@@ -4824,13 +4824,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4824
4824
|
}, lu(le.prototype, function(u, r) {
|
|
4825
4825
|
var a = /^(?:filter|find|map|reject)|While$/.test(r), o = /^(?:head|last)$/.test(r), d = l[o ? "take" + (r == "last" ? "Right" : "") : r], m = o || /^find/.test(r);
|
|
4826
4826
|
d && (l.prototype[r] = function() {
|
|
4827
|
-
var _ = this.__wrapped__, x = o ? [1] : arguments, L = _ instanceof le, G = x[0],
|
|
4827
|
+
var _ = this.__wrapped__, x = o ? [1] : arguments, L = _ instanceof le, G = x[0], H = L || Se(_), K = function(Pe) {
|
|
4828
4828
|
var we = d.apply(l, P([Pe], x));
|
|
4829
4829
|
return o && ie ? we[0] : we;
|
|
4830
4830
|
};
|
|
4831
|
-
|
|
4831
|
+
H && a && typeof G == "function" && G.length != 1 && (L = H = !1);
|
|
4832
4832
|
var ie = this.__chain__, he = !!this.__actions__.length, Te = m && !ie, Le = L && !he;
|
|
4833
|
-
if (!m &&
|
|
4833
|
+
if (!m && H) {
|
|
4834
4834
|
_ = Le ? _ : new le(this);
|
|
4835
4835
|
var De = u.apply(_, x);
|
|
4836
4836
|
return De.__actions__.push({ func: jn, args: [K], thisArg: D }), new Ce(De, ie);
|
|
@@ -5693,7 +5693,7 @@ const Jg = (e) => {
|
|
|
5693
5693
|
defaultAttributes: e.Com.defaultAttributes,
|
|
5694
5694
|
allowedAttributes: e.Com.allowedAttributes,
|
|
5695
5695
|
getDefaultStyles: n,
|
|
5696
|
-
isWrapperParent: t.element &&
|
|
5696
|
+
isWrapperParent: t.element && M.isWrapperElement(t.element)
|
|
5697
5697
|
})), A = q(() => {
|
|
5698
5698
|
const { box: Q } = Oa({
|
|
5699
5699
|
attributes: s,
|
|
@@ -5817,7 +5817,7 @@ const EC = (e, t) => {
|
|
|
5817
5817
|
if (t === fs.REMOVE_FORMAT) {
|
|
5818
5818
|
const A = ge.above(e, {
|
|
5819
5819
|
match(b, I) {
|
|
5820
|
-
return
|
|
5820
|
+
return M.isHTMLBlockNodeElement(b);
|
|
5821
5821
|
},
|
|
5822
5822
|
mode: "lowest"
|
|
5823
5823
|
});
|
|
@@ -5827,7 +5827,7 @@ const EC = (e, t) => {
|
|
|
5827
5827
|
attributes: {}
|
|
5828
5828
|
},
|
|
5829
5829
|
{
|
|
5830
|
-
match:
|
|
5830
|
+
match: M.isHTMLBlockNodeElement,
|
|
5831
5831
|
split: !0,
|
|
5832
5832
|
at: A[1]
|
|
5833
5833
|
}
|
|
@@ -5845,7 +5845,8 @@ const EC = (e, t) => {
|
|
|
5845
5845
|
{
|
|
5846
5846
|
match: En.isText,
|
|
5847
5847
|
split: !0,
|
|
5848
|
-
at: s ? s[1] : void 0
|
|
5848
|
+
at: s ? s[1] : void 0,
|
|
5849
|
+
voids: !0
|
|
5849
5850
|
}
|
|
5850
5851
|
);
|
|
5851
5852
|
}, Dn = (e) => {
|
|
@@ -13989,7 +13990,7 @@ const lD = (e) => {
|
|
|
13989
13990
|
const t = $e(), n = bn(W(T(T({}, e.attributes), e.element.attributes), {
|
|
13990
13991
|
"data-slate-block": e.Com.componentType
|
|
13991
13992
|
})), s = e.element.children.every(
|
|
13992
|
-
(b) =>
|
|
13993
|
+
(b) => M.isTextNode(b)
|
|
13993
13994
|
), c = q(() => kE(t.attributes, [
|
|
13994
13995
|
"border-color",
|
|
13995
13996
|
"border-style",
|
|
@@ -14395,7 +14396,7 @@ const ED = (e) => {
|
|
|
14395
14396
|
[Ae.STANDARD_TABLE2_TD]: fD
|
|
14396
14397
|
}, gD = (e) => {
|
|
14397
14398
|
const t = q(() => Iu.mjmlToBlockElement(e.mjmlString), [e.mjmlString]);
|
|
14398
|
-
if (
|
|
14399
|
+
if (M.isTextNode(t))
|
|
14399
14400
|
return /* @__PURE__ */ f.createElement(rr, { text: t });
|
|
14400
14401
|
const n = _n[t.type];
|
|
14401
14402
|
if (!n)
|
|
@@ -14408,11 +14409,11 @@ const ED = (e) => {
|
|
|
14408
14409
|
elementAttributes: t.attributes,
|
|
14409
14410
|
isMobileActive: e.isMobileActive
|
|
14410
14411
|
},
|
|
14411
|
-
t.children.map((s, c) =>
|
|
14412
|
+
t.children.map((s, c) => M.isTextNode(s) ? /* @__PURE__ */ f.createElement(rr, { key: c, text: s }) : /* @__PURE__ */ f.createElement(P0, W(T({ key: c }, e), { element: s })))
|
|
14412
14413
|
);
|
|
14413
14414
|
}, P0 = (e) => {
|
|
14414
14415
|
const t = e.element;
|
|
14415
|
-
if (
|
|
14416
|
+
if (M.isTextNode(t))
|
|
14416
14417
|
return /* @__PURE__ */ f.createElement(rr, { text: t });
|
|
14417
14418
|
const n = _n[t.type];
|
|
14418
14419
|
if (!n)
|
|
@@ -14425,7 +14426,7 @@ const ED = (e) => {
|
|
|
14425
14426
|
elementAttributes: t.attributes,
|
|
14426
14427
|
isMobileActive: e.isMobileActive
|
|
14427
14428
|
},
|
|
14428
|
-
t.children.map((s, c) =>
|
|
14429
|
+
t.children.map((s, c) => M.isTextNode(s) ? /* @__PURE__ */ f.createElement(rr, { key: c, text: s }, s.text) : /* @__PURE__ */ f.createElement(P0, W(T({ key: c }, e), { element: s })))
|
|
14429
14430
|
);
|
|
14430
14431
|
}, bD = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
14431
14432
|
let pD = (e = 21) => {
|
|
@@ -14457,16 +14458,16 @@ const TD = () => {
|
|
|
14457
14458
|
} = e;
|
|
14458
14459
|
return e.isInline = (E) => {
|
|
14459
14460
|
const y = ye.getBlockByType(E.type);
|
|
14460
|
-
return y ?
|
|
14461
|
-
}, e.isElementReadOnly = (E) => ye.getBlockByType(E.type) &&
|
|
14462
|
-
if (
|
|
14461
|
+
return y ? M.isHTMLNodeElement(E) && sn.includes(E.data.tagName) ? !0 : !!y.inlineElement : N(E);
|
|
14462
|
+
}, e.isElementReadOnly = (E) => ye.getBlockByType(E.type) && M.isHTMLNodeElement(E) && sn.includes(E.data.tagName) ? !0 : B(E), e.isSelectable = (E) => M.isMergetagElement(E) ? !1 : P(E), e.markableVoid = (E) => M.isMergetagElement(E) || M.isHTMLNodeElement(E) && sn.includes(E.data.tagName) ? !0 : Q(E), e.isVoid = (E) => {
|
|
14463
|
+
if (M.isMergetagElement(E))
|
|
14463
14464
|
return !0;
|
|
14464
14465
|
const y = ye.getBlockByType(E.type), F = [Br.IMAGE].some(
|
|
14465
14466
|
(z) => y.category.includes(z)
|
|
14466
14467
|
), V = [
|
|
14467
14468
|
Ae.LINE_BREAK
|
|
14468
14469
|
].includes(E.type);
|
|
14469
|
-
return
|
|
14470
|
+
return M.isHTMLNodeElement(E) && sn.includes(E.data.tagName) || F || V ? !0 : b(E);
|
|
14470
14471
|
}, e.getSelectionRect = () => {
|
|
14471
14472
|
const E = Ye.getWindow(e).getSelection();
|
|
14472
14473
|
if (!E)
|
|
@@ -14480,7 +14481,7 @@ const TD = () => {
|
|
|
14480
14481
|
var y;
|
|
14481
14482
|
const [E] = ge.nodes(e, {
|
|
14482
14483
|
at: (y = e.selection) == null ? void 0 : y.anchor.path,
|
|
14483
|
-
match:
|
|
14484
|
+
match: M.isBlockElement,
|
|
14484
14485
|
mode: "lowest"
|
|
14485
14486
|
});
|
|
14486
14487
|
return E;
|
|
@@ -14488,7 +14489,7 @@ const TD = () => {
|
|
|
14488
14489
|
var y;
|
|
14489
14490
|
const [E] = ge.nodes(e, {
|
|
14490
14491
|
at: (y = e.selection) == null ? void 0 : y.anchor.path,
|
|
14491
|
-
match:
|
|
14492
|
+
match: M.isContentElement,
|
|
14492
14493
|
mode: "lowest"
|
|
14493
14494
|
});
|
|
14494
14495
|
return E;
|
|
@@ -14496,10 +14497,10 @@ const TD = () => {
|
|
|
14496
14497
|
const y = e.selection;
|
|
14497
14498
|
if (y) {
|
|
14498
14499
|
const F = e.above({
|
|
14499
|
-
match:
|
|
14500
|
+
match: M.isVoidBlockElement,
|
|
14500
14501
|
mode: "lowest"
|
|
14501
14502
|
}), V = e.above({
|
|
14502
|
-
match:
|
|
14503
|
+
match: M.isElement,
|
|
14503
14504
|
mode: "lowest"
|
|
14504
14505
|
});
|
|
14505
14506
|
if (F && V && !ge.string(e, V[1])) {
|
|
@@ -14525,7 +14526,7 @@ const TD = () => {
|
|
|
14525
14526
|
if (E != null && E.path && (y = At.get(e, E.path)), !y) {
|
|
14526
14527
|
const F = ge.above(e, {
|
|
14527
14528
|
match(V, z) {
|
|
14528
|
-
return
|
|
14529
|
+
return M.isElement(V);
|
|
14529
14530
|
},
|
|
14530
14531
|
mode: "lowest",
|
|
14531
14532
|
at: E == null ? void 0 : E.path
|
|
@@ -14534,7 +14535,7 @@ const TD = () => {
|
|
|
14534
14535
|
}
|
|
14535
14536
|
if (!y)
|
|
14536
14537
|
return;
|
|
14537
|
-
if (
|
|
14538
|
+
if (M.isContentElement(y) && (Be.insertNodes(
|
|
14538
14539
|
e,
|
|
14539
14540
|
{
|
|
14540
14541
|
type: Ir.STANDARD_PARAGRAPH,
|
|
@@ -14556,24 +14557,24 @@ const TD = () => {
|
|
|
14556
14557
|
at: E == null ? void 0 : E.at,
|
|
14557
14558
|
mode: "lowest"
|
|
14558
14559
|
});
|
|
14559
|
-
y && (
|
|
14560
|
+
y && (M.isTable2TdElement(y[0]) || M.isTable2TrElement(y[0])) || $(E);
|
|
14560
14561
|
}, e.removeNodes = (E) => {
|
|
14561
14562
|
const [y] = ge.nodes(e, {
|
|
14562
14563
|
at: E == null ? void 0 : E.at,
|
|
14563
14564
|
mode: "lowest"
|
|
14564
14565
|
});
|
|
14565
|
-
y && (
|
|
14566
|
+
y && (M.isTable2TdElement(y[0]) || M.isTable2TrElement(y[0])) || S(E);
|
|
14566
14567
|
}, e.deleteFragment = (E) => {
|
|
14567
14568
|
Array.from(
|
|
14568
14569
|
e.nodes({
|
|
14569
14570
|
mode: "lowest",
|
|
14570
|
-
match:
|
|
14571
|
+
match: M.isTable2TdElement
|
|
14571
14572
|
})
|
|
14572
14573
|
).length > 1 || re(E);
|
|
14573
14574
|
}, e.insertNewRow = (E) => {
|
|
14574
14575
|
const y = ge.above(e, {
|
|
14575
14576
|
match(z, X) {
|
|
14576
|
-
return
|
|
14577
|
+
return M.isSectionElement(z);
|
|
14577
14578
|
},
|
|
14578
14579
|
mode: "lowest",
|
|
14579
14580
|
at: E == null ? void 0 : E.path
|
|
@@ -14584,7 +14585,7 @@ const TD = () => {
|
|
|
14584
14585
|
if (!V) {
|
|
14585
14586
|
const z = ge.above(e, {
|
|
14586
14587
|
match(X) {
|
|
14587
|
-
return
|
|
14588
|
+
return M.isBlockElement(X) && M.isSectionElement(X);
|
|
14588
14589
|
}
|
|
14589
14590
|
});
|
|
14590
14591
|
z && (V = z[1]);
|
|
@@ -14622,13 +14623,13 @@ const TD = () => {
|
|
|
14622
14623
|
}, e.insertBreak = () => {
|
|
14623
14624
|
const E = ge.above(e, {
|
|
14624
14625
|
match(y, F) {
|
|
14625
|
-
return
|
|
14626
|
+
return M.isContentElement(y);
|
|
14626
14627
|
},
|
|
14627
14628
|
mode: "lowest"
|
|
14628
14629
|
});
|
|
14629
|
-
if (t.newLineWithBr && E && (
|
|
14630
|
+
if (t.newLineWithBr && E && (M.isTextElement(E[0]) || M.isTable2Element(E[0])) && !ge.above(e, {
|
|
14630
14631
|
match(F, V) {
|
|
14631
|
-
return
|
|
14632
|
+
return M.isHTMLBlockNodeElement(F);
|
|
14632
14633
|
},
|
|
14633
14634
|
mode: "lowest"
|
|
14634
14635
|
})) {
|
|
@@ -14645,7 +14646,7 @@ const TD = () => {
|
|
|
14645
14646
|
{
|
|
14646
14647
|
at: E[1],
|
|
14647
14648
|
match(F, V) {
|
|
14648
|
-
return
|
|
14649
|
+
return M.isTextNode(F) || M.isInlineElement(F);
|
|
14649
14650
|
},
|
|
14650
14651
|
mode: "highest"
|
|
14651
14652
|
}
|
|
@@ -14656,12 +14657,12 @@ const TD = () => {
|
|
|
14656
14657
|
}, e.splitColumns = (E) => {
|
|
14657
14658
|
const [y] = ge.nodes(e, {
|
|
14658
14659
|
at: E.path,
|
|
14659
|
-
match:
|
|
14660
|
+
match: M.isColumnElement
|
|
14660
14661
|
}), F = y[0];
|
|
14661
|
-
if (!
|
|
14662
|
+
if (!M.isElement(F))
|
|
14662
14663
|
return;
|
|
14663
14664
|
const z = ge.parent(e, y[1])[0].children.filter(
|
|
14664
|
-
(oe) =>
|
|
14665
|
+
(oe) => M.isElement(oe) && oe.type !== "raw"
|
|
14665
14666
|
);
|
|
14666
14667
|
if (z.length >= 2) {
|
|
14667
14668
|
const oe = ge.end(
|
|
@@ -14680,12 +14681,12 @@ const TD = () => {
|
|
|
14680
14681
|
focus: X
|
|
14681
14682
|
}), Be.splitNodes(e, {
|
|
14682
14683
|
at: ge.end(e, E.path),
|
|
14683
|
-
match:
|
|
14684
|
+
match: M.isSectionElement
|
|
14684
14685
|
});
|
|
14685
14686
|
const me = ge.before(e, E.path);
|
|
14686
14687
|
me && Be.splitNodes(e, {
|
|
14687
14688
|
at: ge.end(e, me),
|
|
14688
|
-
match:
|
|
14689
|
+
match: M.isSectionElement
|
|
14689
14690
|
});
|
|
14690
14691
|
const ae = `${z.length / 2 * 100}%`;
|
|
14691
14692
|
Be.setNodes(
|
|
@@ -14694,7 +14695,7 @@ const TD = () => {
|
|
|
14694
14695
|
attributes: W(T({}, F.attributes), { width: ae })
|
|
14695
14696
|
},
|
|
14696
14697
|
{
|
|
14697
|
-
match:
|
|
14698
|
+
match: M.isColumnElement
|
|
14698
14699
|
}
|
|
14699
14700
|
), Be.insertNodes(
|
|
14700
14701
|
e,
|
|
@@ -14711,7 +14712,7 @@ const TD = () => {
|
|
|
14711
14712
|
]
|
|
14712
14713
|
},
|
|
14713
14714
|
{
|
|
14714
|
-
match:
|
|
14715
|
+
match: M.isColumnElement
|
|
14715
14716
|
}
|
|
14716
14717
|
);
|
|
14717
14718
|
}, e.moveNode = (E) => {
|
|
@@ -14752,19 +14753,19 @@ const TD = () => {
|
|
|
14752
14753
|
ge.withoutNormalizing(e, () => {
|
|
14753
14754
|
var z;
|
|
14754
14755
|
const y = E.getData("application/x-slate-fragment"), F = ge.above(e, {
|
|
14755
|
-
match:
|
|
14756
|
+
match: M.isVoidBlockElement
|
|
14756
14757
|
});
|
|
14757
14758
|
if (ge.above(e, {
|
|
14758
14759
|
match(X, me) {
|
|
14759
|
-
return
|
|
14760
|
+
return M.isTextElement(X);
|
|
14760
14761
|
}
|
|
14761
14762
|
}))
|
|
14762
14763
|
if (y && !F) {
|
|
14763
14764
|
const X = decodeURIComponent(window.atob(y)), me = JSON.parse(X), ae = [...At.nodes(me[0])], oe = PE(
|
|
14764
|
-
ae.map((de) => de[0]).filter((de) =>
|
|
14765
|
-
).filter((de) =>
|
|
14765
|
+
ae.map((de) => de[0]).filter((de) => M.isContentElement(de)).map((de) => de.children)
|
|
14766
|
+
).filter((de) => M.isTextNode(de) || M.isHTMLBlockNodeElement(de) || M.isMergetagElement(de) || M.isHTMLNodeElement(de)), [Ie] = e.nodes({
|
|
14766
14767
|
mode: "lowest",
|
|
14767
|
-
match:
|
|
14768
|
+
match: M.isContentElement
|
|
14768
14769
|
});
|
|
14769
14770
|
if (Ie && !!(e.selection && ge.string(e, e.selection) === ge.string(e, Ie[1]))) {
|
|
14770
14771
|
const J = (z = e.selection) == null ? void 0 : z.anchor.path;
|
|
@@ -14798,13 +14799,13 @@ const TD = () => {
|
|
|
14798
14799
|
}, e.insertMergetag = (E) => {
|
|
14799
14800
|
ge.withoutNormalizing(e, () => {
|
|
14800
14801
|
const [y] = ge.nodes(e, {
|
|
14801
|
-
match: (F) =>
|
|
14802
|
+
match: (F) => M.isInlineElement(F) && F.type === Ae.MERGETAG,
|
|
14802
14803
|
mode: "all"
|
|
14803
14804
|
});
|
|
14804
14805
|
if (!y) {
|
|
14805
14806
|
if (Array.from(
|
|
14806
14807
|
ge.nodes(e, {
|
|
14807
|
-
match: (V) =>
|
|
14808
|
+
match: (V) => M.isContentElement(V),
|
|
14808
14809
|
mode: "lowest"
|
|
14809
14810
|
})
|
|
14810
14811
|
).length > 1)
|
|
@@ -14828,7 +14829,7 @@ const TD = () => {
|
|
|
14828
14829
|
});
|
|
14829
14830
|
}, e.normalizeNode = (E) => {
|
|
14830
14831
|
const [y, F] = E;
|
|
14831
|
-
if (!
|
|
14832
|
+
if (!M.isElement(y)) {
|
|
14832
14833
|
A(E);
|
|
14833
14834
|
return;
|
|
14834
14835
|
}
|
|
@@ -14850,13 +14851,13 @@ const TD = () => {
|
|
|
14850
14851
|
return;
|
|
14851
14852
|
}
|
|
14852
14853
|
if (y.children.find(
|
|
14853
|
-
(ae) =>
|
|
14854
|
+
(ae) => M.isLineBreakElement(ae)
|
|
14854
14855
|
)) {
|
|
14855
14856
|
e.withoutNormalizing(() => {
|
|
14856
14857
|
const ae = [];
|
|
14857
14858
|
let oe = [];
|
|
14858
14859
|
y.children.forEach((Ie) => {
|
|
14859
|
-
|
|
14860
|
+
M.isLineBreakElement(Ie) ? oe.length > 0 && (ae.push({
|
|
14860
14861
|
type: Ae.HTML_BLOCK_NODE,
|
|
14861
14862
|
children: oe,
|
|
14862
14863
|
attributes: {},
|
|
@@ -14890,13 +14891,13 @@ const TD = () => {
|
|
|
14890
14891
|
{
|
|
14891
14892
|
at: [0, 0]
|
|
14892
14893
|
}
|
|
14893
|
-
) :
|
|
14894
|
+
) : M.isContentElement(y) ? Be.insertNodes(
|
|
14894
14895
|
e,
|
|
14895
14896
|
{ text: "" },
|
|
14896
14897
|
{
|
|
14897
14898
|
at: [...F, 0]
|
|
14898
14899
|
}
|
|
14899
|
-
) :
|
|
14900
|
+
) : M.isTable2TrElement(y) ? Be.insertNodes(
|
|
14900
14901
|
e,
|
|
14901
14902
|
{ text: "" },
|
|
14902
14903
|
{
|
|
@@ -14928,7 +14929,7 @@ const TD = () => {
|
|
|
14928
14929
|
)
|
|
14929
14930
|
)) / oe.length;
|
|
14930
14931
|
y.children.forEach((J, xe) => {
|
|
14931
|
-
|
|
14932
|
+
M.isColumnElement(J) && !J.attributes.width && Be.setNodes(
|
|
14932
14933
|
e,
|
|
14933
14934
|
{
|
|
14934
14935
|
attributes: {
|
|
@@ -14942,13 +14943,13 @@ const TD = () => {
|
|
|
14942
14943
|
});
|
|
14943
14944
|
}
|
|
14944
14945
|
}
|
|
14945
|
-
if (
|
|
14946
|
+
if (M.isElement(y) && y.children.length === 0) {
|
|
14946
14947
|
Be.removeNodes(e, { at: F });
|
|
14947
14948
|
return;
|
|
14948
14949
|
}
|
|
14949
|
-
if (
|
|
14950
|
+
if (M.isColumnElement(y) && y.children.length > 1) {
|
|
14950
14951
|
const ae = y.children.findIndex(
|
|
14951
|
-
(oe) =>
|
|
14952
|
+
(oe) => M.isPlaceholderElement(oe)
|
|
14952
14953
|
);
|
|
14953
14954
|
if (ae != -1) {
|
|
14954
14955
|
e.withoutNormalizing(() => {
|
|
@@ -14975,7 +14976,7 @@ const TD = () => {
|
|
|
14975
14976
|
const V = ge.end(e, y);
|
|
14976
14977
|
ge.above(e, {
|
|
14977
14978
|
at: V,
|
|
14978
|
-
match:
|
|
14979
|
+
match: M.isUnsetElement
|
|
14979
14980
|
}) ? Be.deselect(e) : Be.setSelection(e, { anchor: V, focus: V });
|
|
14980
14981
|
});
|
|
14981
14982
|
}, e.removeNode = (E) => {
|
|
@@ -14988,7 +14989,7 @@ const TD = () => {
|
|
|
14988
14989
|
}, e.findSelfOrAncestorNodeByCategory = (E) => {
|
|
14989
14990
|
try {
|
|
14990
14991
|
const [y] = ge.nodes(e, {
|
|
14991
|
-
match:
|
|
14992
|
+
match: M.isElement,
|
|
14992
14993
|
at: E.path,
|
|
14993
14994
|
mode: "lowest"
|
|
14994
14995
|
});
|
|
@@ -15002,7 +15003,7 @@ const TD = () => {
|
|
|
15002
15003
|
{
|
|
15003
15004
|
const z = ge.above(e, {
|
|
15004
15005
|
at: Ye.findPath(e, F),
|
|
15005
|
-
match: (X) =>
|
|
15006
|
+
match: (X) => M.isElement(X) ? ye.getBlockByType(X.type).category === E.category : !1
|
|
15006
15007
|
});
|
|
15007
15008
|
return z ? [z[0], z[1]] : null;
|
|
15008
15009
|
}
|
|
@@ -15019,7 +15020,7 @@ const TD = () => {
|
|
|
15019
15020
|
{
|
|
15020
15021
|
const F = ge.above(e, {
|
|
15021
15022
|
at: Ye.findPath(e, y),
|
|
15022
|
-
match: (V) =>
|
|
15023
|
+
match: (V) => M.isElement(V) ? V.type === E.type : !1
|
|
15023
15024
|
});
|
|
15024
15025
|
return F ? [F[0], F[1]] : null;
|
|
15025
15026
|
}
|
|
@@ -15074,14 +15075,14 @@ const TD = () => {
|
|
|
15074
15075
|
if (!(E.type === "set_node" && Sr(E.newProperties, E.properties))) {
|
|
15075
15076
|
if (E.type === "move_node") {
|
|
15076
15077
|
const z = At.get(e, E.path), X = At.get(e, Xe.parent(E.newPath));
|
|
15077
|
-
if (
|
|
15078
|
+
if (M.isElement(z) && M.isElement(X) && !M.isParentCategoryType(z.type, X.type)) {
|
|
15078
15079
|
console.warn("move_node disallowed", z, X);
|
|
15079
15080
|
return;
|
|
15080
15081
|
}
|
|
15081
15082
|
}
|
|
15082
15083
|
if (E.type === "remove_text") {
|
|
15083
15084
|
const [z] = ge.nodes(e, {
|
|
15084
|
-
match: (X) =>
|
|
15085
|
+
match: (X) => M.isElement(X) && X.type === Ae.MERGETAG,
|
|
15085
15086
|
at: E.path
|
|
15086
15087
|
});
|
|
15087
15088
|
if (z) {
|
|
@@ -15092,9 +15093,9 @@ const TD = () => {
|
|
|
15092
15093
|
if (E.type === "remove_node" || E.type === "merge_node") {
|
|
15093
15094
|
const z = ge.above(e, {
|
|
15094
15095
|
at: E.path,
|
|
15095
|
-
match:
|
|
15096
|
+
match: M.isBlockElement
|
|
15096
15097
|
});
|
|
15097
|
-
if (z &&
|
|
15098
|
+
if (z && M.isVoidBlockElement(z[0]))
|
|
15098
15099
|
return;
|
|
15099
15100
|
}
|
|
15100
15101
|
if (E.type === "set_selection")
|
|
@@ -15105,15 +15106,15 @@ const TD = () => {
|
|
|
15105
15106
|
(V = (F = E.newProperties) == null ? void 0 : F.anchor) == null ? void 0 : V.path
|
|
15106
15107
|
)) {
|
|
15107
15108
|
const z = ge.above(e, {
|
|
15108
|
-
match: (X) =>
|
|
15109
|
+
match: (X) => M.isBlockElement(X),
|
|
15109
15110
|
at: E.newProperties.anchor.path,
|
|
15110
15111
|
mode: "lowest"
|
|
15111
15112
|
});
|
|
15112
15113
|
if (z) {
|
|
15113
15114
|
const X = z[0], me = X.children.findIndex(
|
|
15114
|
-
(oe) =>
|
|
15115
|
+
(oe) => M.isElement(oe) && oe.type === Ae.MERGETAG
|
|
15115
15116
|
), ae = X.children[X.children.length - 1];
|
|
15116
|
-
me === X.children.length - 2 &&
|
|
15117
|
+
me === X.children.length - 2 && M.isTextNode(ae) && ae.text === "" && Be.insertNodes(
|
|
15117
15118
|
e,
|
|
15118
15119
|
{ text: " " },
|
|
15119
15120
|
{
|
|
@@ -15381,7 +15382,7 @@ const TD = () => {
|
|
|
15381
15382
|
try {
|
|
15382
15383
|
O = ge.above(A, {
|
|
15383
15384
|
at: N,
|
|
15384
|
-
match: (V) =>
|
|
15385
|
+
match: (V) => M.isWidgetElement(V)
|
|
15385
15386
|
});
|
|
15386
15387
|
} catch (V) {
|
|
15387
15388
|
}
|
|
@@ -15420,7 +15421,7 @@ const TD = () => {
|
|
|
15420
15421
|
try {
|
|
15421
15422
|
const $ = ge.above(b, {
|
|
15422
15423
|
at: Ye.findPath(b, n),
|
|
15423
|
-
match:
|
|
15424
|
+
match: M.isWidgetElement
|
|
15424
15425
|
});
|
|
15425
15426
|
$ && (B = $[0].data.input);
|
|
15426
15427
|
} catch ($) {
|
|
@@ -15462,7 +15463,7 @@ const TD = () => {
|
|
|
15462
15463
|
Iu.mjmlToBlockElement(S)
|
|
15463
15464
|
);
|
|
15464
15465
|
const Q = qu(os.get(S));
|
|
15465
|
-
return
|
|
15466
|
+
return M.isTextNode(Q) ? null : /* @__PURE__ */ f.createElement(
|
|
15466
15467
|
LD,
|
|
15467
15468
|
W(T({}, e), {
|
|
15468
15469
|
element: n,
|
|
@@ -15539,7 +15540,7 @@ const RD = ({
|
|
|
15539
15540
|
I.current = 0;
|
|
15540
15541
|
let N = !1, O = !0;
|
|
15541
15542
|
const B = t, P = !!ye.getBlockByType(b.type).void;
|
|
15542
|
-
if (
|
|
15543
|
+
if (M.isWidgetElement(b))
|
|
15543
15544
|
b.data.contentEditable ? (n["data-slate-has-slate-node"] = !0, N = !0) : (N = !1, O = !1);
|
|
15544
15545
|
else if (P) {
|
|
15545
15546
|
const $ = (re) => {
|
|
@@ -15547,7 +15548,7 @@ const RD = ({
|
|
|
15547
15548
|
(Q = re.attributes["css-class"]) != null && Q.includes(
|
|
15548
15549
|
Sl
|
|
15549
15550
|
) ? (O = !1, n["data-slate-has-slate-node"] = !0) : re.children.forEach((E) => {
|
|
15550
|
-
|
|
15551
|
+
M.isElement(E) && $(E);
|
|
15551
15552
|
});
|
|
15552
15553
|
};
|
|
15553
15554
|
$(s);
|
|
@@ -15613,9 +15614,9 @@ const OD = ({
|
|
|
15613
15614
|
}) => {
|
|
15614
15615
|
var I;
|
|
15615
15616
|
const b = Au(void 0);
|
|
15616
|
-
return
|
|
15617
|
+
return M.isElement(e) && ((I = e.attributes["css-class"]) == null ? void 0 : I.includes(
|
|
15617
15618
|
Sl
|
|
15618
|
-
)) ? Array.isArray(t) ? (FE(b.current) && (b.current = n.current, n.current += 1), /* @__PURE__ */ f.createElement(f.Fragment, null, t[b.current])) : /* @__PURE__ */ f.createElement(f.Fragment, null, t) :
|
|
15619
|
+
)) ? Array.isArray(t) ? (FE(b.current) && (b.current = n.current, n.current += 1), /* @__PURE__ */ f.createElement(f.Fragment, null, t[b.current])) : /* @__PURE__ */ f.createElement(f.Fragment, null, t) : M.isTextNode(e) ? /* @__PURE__ */ f.createElement(rr, { leaf: e, text: e, contentUneditable: !0 }, e.text) : /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
15619
15620
|
w0,
|
|
15620
15621
|
{
|
|
15621
15622
|
shouldRenderByChildren: A,
|
|
@@ -15656,30 +15657,30 @@ const OD = ({
|
|
|
15656
15657
|
let se;
|
|
15657
15658
|
const We = !!ge.above(E, {
|
|
15658
15659
|
at: j,
|
|
15659
|
-
match: (te) =>
|
|
15660
|
+
match: (te) => M.isUnsetElement(te)
|
|
15660
15661
|
});
|
|
15661
|
-
if (
|
|
15662
|
+
if (M.isUniversalElement(fe) || M.isStandaloneElement(fe) || M.isVoidBlockElement(fe) ? se = [fe, j] : se = ge.above(E, {
|
|
15662
15663
|
at: j,
|
|
15663
|
-
match: (te) => B.current ?
|
|
15664
|
+
match: (te) => B.current ? M.isVoidBlockElement(te) : $.current ? M.isVoidBlockElement(te) : M.isUniversalElement(te) || M.isStandaloneElement(te) || M.isVoidBlockElement(te)
|
|
15664
15665
|
}), se) {
|
|
15665
15666
|
const te = ge.above(E, {
|
|
15666
15667
|
at: se[1],
|
|
15667
15668
|
match(_e, Fe) {
|
|
15668
|
-
return
|
|
15669
|
+
return M.isVoidBlockElement(_e);
|
|
15669
15670
|
}
|
|
15670
15671
|
});
|
|
15671
15672
|
fe = (te == null ? void 0 : te[0]) || se[0], j = (te == null ? void 0 : te[1]) || se[1];
|
|
15672
15673
|
} else {
|
|
15673
15674
|
const [te] = ge.nodes(E, {
|
|
15674
15675
|
at: j,
|
|
15675
|
-
match: (_e, Fe) => !(!Xe.equals(Fe, j) && !Xe.isAncestor(Fe, j) || !
|
|
15676
|
+
match: (_e, Fe) => !(!Xe.equals(Fe, j) && !Xe.isAncestor(Fe, j) || !M.isBlockElement(_e) || M.isUnsetElement(_e) || M.isTable2TrElement(_e) || M.isTable2TdElement(_e) || M.isTextListItemElement(_e) || M.isColumnElement(_e) || M.isGroupElement(_e)),
|
|
15676
15677
|
mode: "lowest"
|
|
15677
15678
|
});
|
|
15678
15679
|
if (!te)
|
|
15679
15680
|
return;
|
|
15680
15681
|
fe = te[0], j = te[1];
|
|
15681
15682
|
}
|
|
15682
|
-
if (
|
|
15683
|
+
if (M.isContentElement(fe)) {
|
|
15683
15684
|
if (xe && (ye.getBlockByType(fe.type).void || se || We))
|
|
15684
15685
|
try {
|
|
15685
15686
|
const _e = Ye.toDOMNode(E, fe);
|
|
@@ -15745,7 +15746,7 @@ const OD = ({
|
|
|
15745
15746
|
if (s) {
|
|
15746
15747
|
const J = At.get(E, s);
|
|
15747
15748
|
if (ye.getBlockByType(J.type).void) {
|
|
15748
|
-
if (
|
|
15749
|
+
if (M.isWidgetElement(J) && J.data.contentEditable)
|
|
15749
15750
|
return;
|
|
15750
15751
|
const ee = Ye.toDOMNode(E, J);
|
|
15751
15752
|
ee.getAttribute("data-slate-has-slate-node") === "true" || ee.querySelector("[data-slate-has-slate-node]") || Be.deselect(E);
|
|
@@ -15762,11 +15763,11 @@ const OD = ({
|
|
|
15762
15763
|
const xe = X(J);
|
|
15763
15764
|
if (xe) {
|
|
15764
15765
|
const ee = At.get(E, xe);
|
|
15765
|
-
if (
|
|
15766
|
+
if (M.isPageElement(ee)) {
|
|
15766
15767
|
J.preventDefault(), b(xe);
|
|
15767
15768
|
return;
|
|
15768
15769
|
}
|
|
15769
|
-
|
|
15770
|
+
M.isStandaloneElement(ee) ? (E.deselect(), b(xe), setTimeout(() => {
|
|
15770
15771
|
I(xe);
|
|
15771
15772
|
}, 100)) : b(xe);
|
|
15772
15773
|
}
|
|
@@ -15792,20 +15793,20 @@ const OD = ({
|
|
|
15792
15793
|
if (J.preventDefault(), J.stopPropagation(), F && ds(J.target) && J.target !== F.document.documentElement)
|
|
15793
15794
|
try {
|
|
15794
15795
|
let ee = Ye.toSlateNode(E, J.target);
|
|
15795
|
-
if (!
|
|
15796
|
+
if (!M.isBlockElement(ee)) {
|
|
15796
15797
|
const pe = Ye.findPath(E, ee);
|
|
15797
15798
|
let fe = ge.parent(E, pe);
|
|
15798
15799
|
for (; fe; )
|
|
15799
|
-
|
|
15800
|
+
M.isBlockElement(fe[0]) ? (ee = fe[0], fe = void 0) : fe = ge.parent(
|
|
15800
15801
|
E,
|
|
15801
15802
|
fe[1]
|
|
15802
15803
|
);
|
|
15803
15804
|
}
|
|
15804
|
-
if (
|
|
15805
|
+
if (M.isTable2Element(ee) || M.isTextElement(ee) || M.isButtonElement(ee)) {
|
|
15805
15806
|
let pe = Ye.findPath(E, ee);
|
|
15806
|
-
if (
|
|
15807
|
+
if (M.isTable2Element(ee)) {
|
|
15807
15808
|
const [se] = ge.nodes(E, {
|
|
15808
|
-
match:
|
|
15809
|
+
match: M.isTable2TdElement,
|
|
15809
15810
|
mode: "lowest"
|
|
15810
15811
|
});
|
|
15811
15812
|
se && (pe = se[1]);
|
|
@@ -15830,16 +15831,16 @@ const OD = ({
|
|
|
15830
15831
|
if (J.preventDefault(), F && ds(J.target) && J.target !== F.document.documentElement)
|
|
15831
15832
|
try {
|
|
15832
15833
|
const ee = Ye.toSlateNode(E, J.target), pe = Ye.findPath(E, ee);
|
|
15833
|
-
if (
|
|
15834
|
+
if (M.isMergetagElement(ee))
|
|
15834
15835
|
J.stopPropagation(), Be.select(E, pe);
|
|
15835
|
-
else if (
|
|
15836
|
+
else if (M.isHTMLNodeElement(ee) && ee.data.tagName === "img")
|
|
15836
15837
|
Be.select(E, pe);
|
|
15837
15838
|
else {
|
|
15838
15839
|
const fe = E.findSelfOrAncestorNode({
|
|
15839
15840
|
path: pe,
|
|
15840
|
-
match:
|
|
15841
|
+
match: M.isBlockElement
|
|
15841
15842
|
}), j = fe == null ? void 0 : fe[0];
|
|
15842
|
-
if (j && !
|
|
15843
|
+
if (j && !M.isTable2Element(j) && !M.isTextElement(j) && !M.isButtonElement(j) && !M.isVoidBlockElement(j)) {
|
|
15843
15844
|
const We = Ye.findDocumentOrShadowRoot(
|
|
15844
15845
|
E
|
|
15845
15846
|
).getSelection();
|
|
@@ -15847,7 +15848,7 @@ const OD = ({
|
|
|
15847
15848
|
} else {
|
|
15848
15849
|
const se = ge.above(E, {
|
|
15849
15850
|
at: pe,
|
|
15850
|
-
match:
|
|
15851
|
+
match: M.isMergetagElement
|
|
15851
15852
|
});
|
|
15852
15853
|
se && (J.stopPropagation(), Be.select(E, se[1]));
|
|
15853
15854
|
}
|