@yext/pages-components 1.0.6 → 1.0.7
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/{debugger-DtDduw6_.cjs → debugger-D3dRC_Z4.cjs} +1 -1
- package/dist/{debugger-DJqq9EyW.js → debugger-rZtaKqX7.js} +1 -1
- package/dist/{index-BEMHj1z8.js → index-1vQ0rgr7.js} +113 -109
- package/dist/{index-CKSiT08w.cjs → index-Bunl_w4Q.cjs} +2 -2
- package/dist/{index-BVBgwvGE.cjs → index-DWB4A6xg.cjs} +1 -1
- package/dist/{index-CBHRCjAx.js → index-VbkIXtJn.js} +1 -1
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var G_ = Object.defineProperty;
|
|
|
2
2
|
var Y_ = (e, t, n) => t in e ? G_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ie = (e, t, n) => Y_(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as j_ from "react";
|
|
5
|
-
import xn, { createElement as V_, createContext as Nc, useRef as sd, useState as Cr, useEffect as
|
|
5
|
+
import xn, { createElement as V_, createContext as Nc, useRef as sd, useState as Cr, useEffect as nr, Suspense as q_, lazy as Z_, useContext as us, forwardRef as J_, Fragment as X_, useMemo as tp } from "react";
|
|
6
6
|
import np, { createPortal as Q_ } from "react-dom";
|
|
7
7
|
var sf = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function rp(e) {
|
|
@@ -283,7 +283,7 @@ function ty() {
|
|
|
283
283
|
} finally {
|
|
284
284
|
A = !1, fe.current = zt, X(), Error.prepareStackTrace = kt;
|
|
285
285
|
}
|
|
286
|
-
var
|
|
286
|
+
var rr = pe ? pe.displayName || pe.name : "", Ln = rr ? B(rr) : "";
|
|
287
287
|
return typeof pe == "function" && F.set(pe, Ln), Ln;
|
|
288
288
|
}
|
|
289
289
|
function De(pe, Ze, nt) {
|
|
@@ -601,8 +601,8 @@ Check the top-level render call using <` + nt + ">.");
|
|
|
601
601
|
if (bn !== void 0)
|
|
602
602
|
if (vt)
|
|
603
603
|
if (qe(bn)) {
|
|
604
|
-
for (var
|
|
605
|
-
Bt(bn[
|
|
604
|
+
for (var rr = 0; rr < bn.length; rr++)
|
|
605
|
+
Bt(bn[rr], pe);
|
|
606
606
|
Object.freeze && Object.freeze(bn);
|
|
607
607
|
} else
|
|
608
608
|
I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -610,8 +610,8 @@ Check the top-level render call using <` + nt + ">.");
|
|
|
610
610
|
Bt(bn, pe);
|
|
611
611
|
}
|
|
612
612
|
if (ue.call(Ze, "key")) {
|
|
613
|
-
var Ln = Se(pe), dn = Object.keys(Ze).filter(function(
|
|
614
|
-
return
|
|
613
|
+
var Ln = Se(pe), dn = Object.keys(Ze).filter(function(ir) {
|
|
614
|
+
return ir !== "key";
|
|
615
615
|
}), Jn = dn.length > 0 ? "{key: someKey, " + dn.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
616
616
|
if (!Gt[Ln + Jn]) {
|
|
617
617
|
var bi = dn.length > 0 ? "{" + dn.join(": ..., ") + ": ...}" : "{}";
|
|
@@ -1616,7 +1616,7 @@ const tN = (e) => {
|
|
|
1616
1616
|
default:
|
|
1617
1617
|
return "";
|
|
1618
1618
|
}
|
|
1619
|
-
}, lp = Nc(null), nN = Z_(() => import("./debugger-
|
|
1619
|
+
}, lp = Nc(null), nN = Z_(() => import("./debugger-rZtaKqX7.js"));
|
|
1620
1620
|
function ZS(e) {
|
|
1621
1621
|
const {
|
|
1622
1622
|
children: t,
|
|
@@ -1627,7 +1627,7 @@ function ZS(e) {
|
|
|
1627
1627
|
disableSessionTracking: f,
|
|
1628
1628
|
enableDebugging: p
|
|
1629
1629
|
} = e, _ = sd(null), [T, E] = Cr(!1);
|
|
1630
|
-
|
|
1630
|
+
nr(() => {
|
|
1631
1631
|
E(!0);
|
|
1632
1632
|
}, []), _.current === null && (_.current = new rN(
|
|
1633
1633
|
n,
|
|
@@ -1638,7 +1638,11 @@ function ZS(e) {
|
|
|
1638
1638
|
p ?? Uu()
|
|
1639
1639
|
));
|
|
1640
1640
|
const S = _.current;
|
|
1641
|
-
return
|
|
1641
|
+
return nr(() => (window.enableYextAnalytics = () => {
|
|
1642
|
+
S.optIn();
|
|
1643
|
+
}, () => {
|
|
1644
|
+
delete window.enableYextAnalytics;
|
|
1645
|
+
}), [S]), /* @__PURE__ */ ft.jsxs(ft.Fragment, { children: [
|
|
1642
1646
|
/* @__PURE__ */ ft.jsx(lp.Provider, { value: S, children: t }),
|
|
1643
1647
|
T && (p || Uu()) && oa().name === "browser" ? /* @__PURE__ */ ft.jsx(q_, { fallback: /* @__PURE__ */ ft.jsx(ft.Fragment, {}), children: /* @__PURE__ */ ft.jsx(nN, {}) }) : null
|
|
1644
1648
|
] });
|
|
@@ -1756,7 +1760,7 @@ function JS(e) {
|
|
|
1756
1760
|
const t = ap(), [n] = Cr({
|
|
1757
1761
|
name: sp(t, e.name)
|
|
1758
1762
|
}), r = (f = ca()) == null ? void 0 : f.getDebugEnabled(), [l, d] = Cr(!1);
|
|
1759
|
-
return
|
|
1763
|
+
return nr(() => {
|
|
1760
1764
|
d(!0);
|
|
1761
1765
|
}, []), r && l ? /* @__PURE__ */ ft.jsx("section", { "data-ya-scope": n.name, children: /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children }) }) : /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children });
|
|
1762
1766
|
}
|
|
@@ -2012,7 +2016,7 @@ const XS = () => {
|
|
|
2012
2016
|
loading: T = "lazy"
|
|
2013
2017
|
}) => {
|
|
2014
2018
|
const E = sd(null), [S, w] = Cr(!1), M = "image" in e ? e.image : e;
|
|
2015
|
-
|
|
2019
|
+
nr(() => {
|
|
2016
2020
|
var ce;
|
|
2017
2021
|
(ce = E.current) != null && ce.complete && w(!0);
|
|
2018
2022
|
}, []), aN(
|
|
@@ -3646,19 +3650,19 @@ const ON = ({
|
|
|
3646
3650
|
const v = sd(null), [k, G] = Cr(new un(f)), [I, P] = Cr(!1), [H, j] = Cr(), [re, te] = Cr(p), ce = (V, z) => {
|
|
3647
3651
|
E(V, z), z && G(z.getCenter());
|
|
3648
3652
|
};
|
|
3649
|
-
return
|
|
3653
|
+
return nr(() => {
|
|
3650
3654
|
!I || !H || te(H.getZoom());
|
|
3651
|
-
}, [k]),
|
|
3655
|
+
}, [k]), nr(() => {
|
|
3652
3656
|
if (!t || !I || !H)
|
|
3653
3657
|
return;
|
|
3654
3658
|
const V = t.map((z) => new un(z));
|
|
3655
3659
|
H.fitCoordinates(V);
|
|
3656
|
-
}, [JSON.stringify(t), H]),
|
|
3660
|
+
}, [JSON.stringify(t), H]), nr(() => {
|
|
3657
3661
|
if (!I || H)
|
|
3658
3662
|
return;
|
|
3659
3663
|
const V = new pp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();
|
|
3660
3664
|
j(V), _ && (_.current = V);
|
|
3661
|
-
}, [I]),
|
|
3665
|
+
}, [I]), nr(() => {
|
|
3662
3666
|
I || H || !v.current || w.load(e, {
|
|
3663
3667
|
...M,
|
|
3664
3668
|
...l && { client: l }
|
|
@@ -3726,9 +3730,9 @@ const sw = ({
|
|
|
3726
3730
|
ClusterTemplate: n = DN
|
|
3727
3731
|
}) => {
|
|
3728
3732
|
const { map: r } = us(Cc), [l, d] = Cr([]), [f, p] = Cr(), [_, T] = Cr([]), [E, S] = Cr([]);
|
|
3729
|
-
return
|
|
3733
|
+
return nr(() => {
|
|
3730
3734
|
p(AN(l, r.getZoom(), e));
|
|
3731
|
-
}, [l, r.getZoom()]),
|
|
3735
|
+
}, [l, r.getZoom()]), nr(() => {
|
|
3732
3736
|
S(() => []), T(() => []), (f == null ? void 0 : f.length) !== 0 && (f == null || f.forEach((w) => {
|
|
3733
3737
|
if (w.length === 1) {
|
|
3734
3738
|
w[0].pin.setMap(r);
|
|
@@ -3832,12 +3836,12 @@ const sw = ({
|
|
|
3832
3836
|
hasPinUrl: T = !1
|
|
3833
3837
|
}) => {
|
|
3834
3838
|
const { map: E, provider: S } = us(Cc), w = us(ud), M = tp(() => new cd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(), []);
|
|
3835
|
-
|
|
3839
|
+
nr(() => {
|
|
3836
3840
|
if (_ !== 0 && !_)
|
|
3837
3841
|
return;
|
|
3838
3842
|
const v = M.getProviderPin().getWrapperElement();
|
|
3839
3843
|
v && (v.style.zIndex = _.toString());
|
|
3840
|
-
}, [_]),
|
|
3844
|
+
}, [_]), nr(() => {
|
|
3841
3845
|
M.setMap(E), M.setClickHandler(() => d(r)), M.setFocusHandler((k) => f(k, r)), M.setHoverHandler((k) => p(k, r));
|
|
3842
3846
|
const v = w == null ? void 0 : w.clusterIds.includes(r);
|
|
3843
3847
|
return w && !v && w.setPinStore((k) => [
|
|
@@ -4019,7 +4023,7 @@ function LN() {
|
|
|
4019
4023
|
}
|
|
4020
4024
|
return o.nodeType === Fe && c.isAttached();
|
|
4021
4025
|
}
|
|
4022
|
-
function
|
|
4026
|
+
function rr(u, o, c) {
|
|
4023
4027
|
vt = !0;
|
|
4024
4028
|
const h = performance.now() - kt > nt;
|
|
4025
4029
|
try {
|
|
@@ -4044,8 +4048,8 @@ function LN() {
|
|
|
4044
4048
|
const Ht = bt[Vt], Dt = ms(Ht), on = Ht.parentNode;
|
|
4045
4049
|
if (on != null && Ht !== ae && Dt === null && (Ht.nodeName !== "BR" || !yn(Ht, on, u))) {
|
|
4046
4050
|
if (De) {
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4051
|
+
const ar = Ht.innerText || Ht.nodeValue;
|
|
4052
|
+
ar && (me += ar);
|
|
4049
4053
|
}
|
|
4050
4054
|
on.removeChild(Ht);
|
|
4051
4055
|
}
|
|
@@ -4093,12 +4097,12 @@ function LN() {
|
|
|
4093
4097
|
const o = u._observer;
|
|
4094
4098
|
if (o !== null) {
|
|
4095
4099
|
const c = o.takeRecords();
|
|
4096
|
-
|
|
4100
|
+
rr(u, c, o);
|
|
4097
4101
|
}
|
|
4098
4102
|
}
|
|
4099
4103
|
function dn(u) {
|
|
4100
4104
|
Ct(u), u._observer = new MutationObserver((o, c) => {
|
|
4101
|
-
|
|
4105
|
+
rr(u, o, c);
|
|
4102
4106
|
});
|
|
4103
4107
|
}
|
|
4104
4108
|
function Jn(u, o) {
|
|
@@ -4109,7 +4113,7 @@ function LN() {
|
|
|
4109
4113
|
const c = u.mergeWithSibling(o), h = Tn()._normalizedNodes;
|
|
4110
4114
|
return h.add(u.__key), h.add(o.__key), c;
|
|
4111
4115
|
}
|
|
4112
|
-
function
|
|
4116
|
+
function ir(u) {
|
|
4113
4117
|
let o = u;
|
|
4114
4118
|
if (o.__text === "" && o.isSimpleText() && !o.isUnmergeable()) {
|
|
4115
4119
|
o.remove();
|
|
@@ -4328,7 +4332,7 @@ function LN() {
|
|
|
4328
4332
|
return u._pendingDecorators = c, c;
|
|
4329
4333
|
}
|
|
4330
4334
|
function _s(u) {
|
|
4331
|
-
return u.read(() =>
|
|
4335
|
+
return u.read(() => or().getTextContent());
|
|
4332
4336
|
}
|
|
4333
4337
|
function Ii(u, o) {
|
|
4334
4338
|
Ur(u, () => {
|
|
@@ -4336,7 +4340,7 @@ function LN() {
|
|
|
4336
4340
|
if (c.isEmpty())
|
|
4337
4341
|
return;
|
|
4338
4342
|
if (o === "root") {
|
|
4339
|
-
|
|
4343
|
+
or().markDirty();
|
|
4340
4344
|
return;
|
|
4341
4345
|
}
|
|
4342
4346
|
const h = c._nodeMap;
|
|
@@ -4346,7 +4350,7 @@ function LN() {
|
|
|
4346
4350
|
tag: "history-merge"
|
|
4347
4351
|
} : void 0);
|
|
4348
4352
|
}
|
|
4349
|
-
function
|
|
4353
|
+
function or() {
|
|
4350
4354
|
return gl(Si());
|
|
4351
4355
|
}
|
|
4352
4356
|
function gl(u) {
|
|
@@ -4583,7 +4587,7 @@ function LN() {
|
|
|
4583
4587
|
return u === 65 && Zr(o, c);
|
|
4584
4588
|
}
|
|
4585
4589
|
function xl() {
|
|
4586
|
-
const u =
|
|
4590
|
+
const u = or(), o = u.select(0, u.getChildrenSize());
|
|
4587
4591
|
Er(Ao(o));
|
|
4588
4592
|
}
|
|
4589
4593
|
function Bi(u, o) {
|
|
@@ -4824,7 +4828,7 @@ function LN() {
|
|
|
4824
4828
|
}
|
|
4825
4829
|
function Ss(u, o) {
|
|
4826
4830
|
let c = u;
|
|
4827
|
-
for (; c !==
|
|
4831
|
+
for (; c !== or() && c != null; ) {
|
|
4828
4832
|
if (o(c))
|
|
4829
4833
|
return c;
|
|
4830
4834
|
c = c.getParent();
|
|
@@ -5151,7 +5155,7 @@ function LN() {
|
|
|
5151
5155
|
throw Error(`Reconciliation: could not find DOM element for node key ${u}`);
|
|
5152
5156
|
return o;
|
|
5153
5157
|
}
|
|
5154
|
-
const dr = Object.freeze({}),
|
|
5158
|
+
const dr = Object.freeze({}), sr = 30, Ll = [["keydown", ge], ["pointerdown", $l], ["compositionstart", x], ["compositionend", Q], ["input", C], ["click", Ba], ["cut", dr], ["copy", dr], ["dragstart", dr], ["dragover", dr], ["dragend", dr], ["paste", dr], ["focus", dr], ["blur", dr], ["drop", dr]];
|
|
5155
5159
|
ee && Ll.push(["beforeinput", (u, o) => g(u, o)]);
|
|
5156
5160
|
let ji = 0, Il = 0, jo = 0, Wr = null, Vo = 0, Kr = !1, Ms = !1, qo = !1, Zo = !1, Rs = [0, "", 0, "root", 0];
|
|
5157
5161
|
function Vi(u, o, c, h, y) {
|
|
@@ -5195,7 +5199,7 @@ function LN() {
|
|
|
5195
5199
|
const ae = $.anchor, he = ae.getNode();
|
|
5196
5200
|
if ($.isCollapsed()) {
|
|
5197
5201
|
u.type === "Range" && u.anchorNode === u.focusNode && ($.dirty = !0);
|
|
5198
|
-
const me = Ts(o).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, Ve, ze, $e] = Rs, bt =
|
|
5202
|
+
const me = Ts(o).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, Ve, ze, $e] = Rs, bt = or(), Qe = o.isComposing() === !1 && bt.getTextContent() === "";
|
|
5199
5203
|
if (xe < $e + 200 && ae.offset === Ve && ae.key === ze)
|
|
5200
5204
|
$.format = we, $.style = Ce;
|
|
5201
5205
|
else if (ae.type === "text") {
|
|
@@ -5223,7 +5227,7 @@ function LN() {
|
|
|
5223
5227
|
if (h) {
|
|
5224
5228
|
if (xt(c)) {
|
|
5225
5229
|
const N = c.anchor, b = N.getNode();
|
|
5226
|
-
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Gr(b) &&
|
|
5230
|
+
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Gr(b) && or().getChildrenSize() === 1 && b.getTopLevelElementOrThrow().isEmpty() && y !== null && c.is(y))
|
|
5227
5231
|
h.removeAllRanges(), c.dirty = !0;
|
|
5228
5232
|
else if (u.detail === 3 && !c.isCollapsed()) {
|
|
5229
5233
|
const ae = c.focus.getNode();
|
|
@@ -5259,7 +5263,7 @@ function LN() {
|
|
|
5259
5263
|
return u !== o || et(u) || et(o) || !u.isToken() || !o.isToken();
|
|
5260
5264
|
}
|
|
5261
5265
|
function a(u) {
|
|
5262
|
-
return Il === 229 && u < ji +
|
|
5266
|
+
return Il === 229 && u < ji + sr;
|
|
5263
5267
|
}
|
|
5264
5268
|
function g(u, o) {
|
|
5265
5269
|
const c = u.inputType, h = s(u);
|
|
@@ -5283,7 +5287,7 @@ function LN() {
|
|
|
5283
5287
|
Ur(o, () => {
|
|
5284
5288
|
vn(null);
|
|
5285
5289
|
});
|
|
5286
|
-
},
|
|
5290
|
+
}, sr), xt(y)) {
|
|
5287
5291
|
const xe = y.anchor.getNode();
|
|
5288
5292
|
if (xe.markDirty(), y.format = xe.getFormat(), !mt(xe))
|
|
5289
5293
|
throw Error("Anchor node must be a TextNode");
|
|
@@ -5421,7 +5425,7 @@ function LN() {
|
|
|
5421
5425
|
vn(h.key), // If it has been 30ms since the last keydown, then we should
|
|
5422
5426
|
// apply the empty space heuristic. We can't do this for Safari,
|
|
5423
5427
|
// as the keydown fires after composition start.
|
|
5424
|
-
(u.timeStamp < ji +
|
|
5428
|
+
(u.timeStamp < ji + sr || // FF has issues around composing multibyte characters, so we also
|
|
5425
5429
|
// need to invoke the empty space heuristic below.
|
|
5426
5430
|
h.type === "element" || !c.isCollapsed() || y.getFormat() !== c.format || mt(y) && y.getStyle() !== c.style) && ct(o, p, Bt);
|
|
5427
5431
|
}
|
|
@@ -6818,7 +6822,7 @@ function LN() {
|
|
|
6818
6822
|
const Qe = pn(), dt = [Ce];
|
|
6819
6823
|
let Vt = xe.length;
|
|
6820
6824
|
for (let on = 1; on < me; on++) {
|
|
6821
|
-
const
|
|
6825
|
+
const ar = $[on], No = ar.length, pr = Dn(ar).getWritable();
|
|
6822
6826
|
pr.__format = Ve, pr.__style = ze, pr.__detail = $e;
|
|
6823
6827
|
const tn = pr.__key, Pn = Vt + No;
|
|
6824
6828
|
if (xt(Qe)) {
|
|
@@ -7210,7 +7214,7 @@ function LN() {
|
|
|
7210
7214
|
}
|
|
7211
7215
|
}
|
|
7212
7216
|
function xt(u) {
|
|
7213
|
-
return u instanceof
|
|
7217
|
+
return u instanceof lr;
|
|
7214
7218
|
}
|
|
7215
7219
|
function fr(u) {
|
|
7216
7220
|
return u instanceof Lr;
|
|
@@ -7241,7 +7245,7 @@ function LN() {
|
|
|
7241
7245
|
}
|
|
7242
7246
|
return null;
|
|
7243
7247
|
}
|
|
7244
|
-
class
|
|
7248
|
+
class lr extends Lr {
|
|
7245
7249
|
constructor(o, c, h, y) {
|
|
7246
7250
|
super(o, c), this.format = h, this.style = y;
|
|
7247
7251
|
}
|
|
@@ -7341,7 +7345,7 @@ function LN() {
|
|
|
7341
7345
|
*/
|
|
7342
7346
|
clone() {
|
|
7343
7347
|
const o = this.anchor, c = this.focus;
|
|
7344
|
-
return new
|
|
7348
|
+
return new lr(br(o.key, o.offset, o.type), br(c.key, c.offset, c.type), this.format, this.style);
|
|
7345
7349
|
}
|
|
7346
7350
|
/**
|
|
7347
7351
|
* Toggles the provided format on all the TextNodes in the Selection.
|
|
@@ -7471,12 +7475,12 @@ function LN() {
|
|
|
7471
7475
|
}
|
|
7472
7476
|
else
|
|
7473
7477
|
dt.add(Qe.__key);
|
|
7474
|
-
const on = Ht.getChildren(),
|
|
7478
|
+
const on = Ht.getChildren(), ar = new Set($), No = Vt.is(Ht), pr = Vt.isInline() && Ce.getNextSibling() === null ? Vt : Ce;
|
|
7475
7479
|
for (let tn = on.length - 1; tn >= 0; tn--) {
|
|
7476
7480
|
const Pn = on[tn];
|
|
7477
7481
|
if (Pn.is(Ce) || et(Pn) && Pn.isParentOf(Ce))
|
|
7478
7482
|
break;
|
|
7479
|
-
Pn.isAttached() && (!
|
|
7483
|
+
Pn.isAttached() && (!ar.has(Pn) || Pn.is(Dt) ? No || pr.insertAfter(Pn, !1) : Pn.remove());
|
|
7480
7484
|
}
|
|
7481
7485
|
if (!No) {
|
|
7482
7486
|
let tn = Ht, Pn = null;
|
|
@@ -7611,7 +7615,7 @@ function LN() {
|
|
|
7611
7615
|
insertParagraph() {
|
|
7612
7616
|
if (this.anchor.key === "root") {
|
|
7613
7617
|
const b = Ji();
|
|
7614
|
-
return
|
|
7618
|
+
return or().splice(this.anchor.offset, 0, [b]), b.select(), b;
|
|
7615
7619
|
}
|
|
7616
7620
|
const o = Bc(this), c = ws(this.anchor.getNode(), Ki);
|
|
7617
7621
|
if (!et(c))
|
|
@@ -7919,12 +7923,12 @@ function LN() {
|
|
|
7919
7923
|
return et(u) && !u.isInline();
|
|
7920
7924
|
}
|
|
7921
7925
|
function Hd(u, o, c, h, y, N) {
|
|
7922
|
-
const b = Si(), $ = new
|
|
7926
|
+
const b = Si(), $ = new lr(br(u, o, y), br(c, h, N), 0, "");
|
|
7923
7927
|
return $.dirty = !0, b._selection = $, $;
|
|
7924
7928
|
}
|
|
7925
7929
|
function g_() {
|
|
7926
7930
|
const u = br("root", 0, "element"), o = br("root", 0, "element");
|
|
7927
|
-
return new
|
|
7931
|
+
return new lr(u, o, 0, "");
|
|
7928
7932
|
}
|
|
7929
7933
|
function $c() {
|
|
7930
7934
|
return new vi(/* @__PURE__ */ new Set());
|
|
@@ -7950,7 +7954,7 @@ function LN() {
|
|
|
7950
7954
|
if (Ce === null)
|
|
7951
7955
|
return null;
|
|
7952
7956
|
const [Ve, ze] = Ce;
|
|
7953
|
-
return new
|
|
7957
|
+
return new lr(Ve, ze, xt(u) ? u.format : 0, xt(u) ? u.style : "");
|
|
7954
7958
|
}
|
|
7955
7959
|
function pn() {
|
|
7956
7960
|
return Si()._selection;
|
|
@@ -8036,22 +8040,22 @@ function LN() {
|
|
|
8036
8040
|
return;
|
|
8037
8041
|
}
|
|
8038
8042
|
const we = o.anchor, Ce = o.focus, Ve = we.key, ze = Ce.key, $e = Ho(c, Ve), bt = Ho(c, ze), Qe = we.offset, dt = Ce.offset, Vt = o.format, Ht = o.style, Dt = o.isCollapsed();
|
|
8039
|
-
let on = $e,
|
|
8043
|
+
let on = $e, ar = bt, No = !1;
|
|
8040
8044
|
if (we.type === "text") {
|
|
8041
8045
|
on = $r($e);
|
|
8042
8046
|
const pr = we.getNode();
|
|
8043
8047
|
No = pr.getFormat() !== Vt || pr.getStyle() !== Ht;
|
|
8044
8048
|
} else xt(u) && u.anchor.type === "text" && (No = !0);
|
|
8045
|
-
if (Ce.type === "text" && (
|
|
8049
|
+
if (Ce.type === "text" && (ar = $r(bt)), !(on === null || ar === null) && (Dt && (u === null || No || xt(u) && (u.format !== Vt || u.style !== Ht)) && jn(Vt, Ht, Qe, Ve, performance.now()), !(he === Qe && me === dt && $ === on && ae === ar && // Badly interpreted range selection when collapsed - #1482
|
|
8046
8050
|
!(h.type === "Range" && Dt) && ((xe === null || !N.contains(xe)) && N.focus({
|
|
8047
8051
|
preventScroll: !0
|
|
8048
8052
|
}), we.type !== "element")))) {
|
|
8049
8053
|
try {
|
|
8050
|
-
h.setBaseAndExtent(on, Qe,
|
|
8054
|
+
h.setBaseAndExtent(on, Qe, ar, dt);
|
|
8051
8055
|
} catch {
|
|
8052
8056
|
}
|
|
8053
8057
|
if (!y.has("skip-scroll-into-view") && o.isCollapsed() && N !== null && N === document.activeElement) {
|
|
8054
|
-
const pr = o instanceof
|
|
8058
|
+
const pr = o instanceof lr && o.anchor.type === "element" ? on.childNodes[Qe] || null : h.rangeCount > 0 ? h.getRangeAt(0) : null;
|
|
8055
8059
|
if (pr !== null) {
|
|
8056
8060
|
let tn;
|
|
8057
8061
|
if (pr instanceof Text) {
|
|
@@ -8067,7 +8071,7 @@ function LN() {
|
|
|
8067
8071
|
}
|
|
8068
8072
|
function y_(u) {
|
|
8069
8073
|
let o = pn() || Hs();
|
|
8070
|
-
o === null && (o =
|
|
8074
|
+
o === null && (o = or().selectEnd()), o.insertNodes(u);
|
|
8071
8075
|
}
|
|
8072
8076
|
function N_() {
|
|
8073
8077
|
const u = pn();
|
|
@@ -8148,7 +8152,7 @@ function LN() {
|
|
|
8148
8152
|
const c = u.getParent();
|
|
8149
8153
|
if (!c) {
|
|
8150
8154
|
const y = Ji();
|
|
8151
|
-
return
|
|
8155
|
+
return or().append(y), y.select(), [or(), 0];
|
|
8152
8156
|
}
|
|
8153
8157
|
if (mt(u)) {
|
|
8154
8158
|
const y = u.splitText(o);
|
|
@@ -8161,7 +8165,7 @@ function LN() {
|
|
|
8161
8165
|
return [c, u.getIndexWithinParent()];
|
|
8162
8166
|
const h = u.getChildAtIndex(o);
|
|
8163
8167
|
if (h) {
|
|
8164
|
-
const y = new
|
|
8168
|
+
const y = new lr(br(u.__key, o, "element"), br(u.__key, o, "element"), 0, ""), N = u.insertNewAfter(y);
|
|
8165
8169
|
N && N.append(h, ...h.getNextSiblings());
|
|
8166
8170
|
}
|
|
8167
8171
|
return [c, u.getIndexWithinParent() + 1];
|
|
@@ -8226,7 +8230,7 @@ function LN() {
|
|
|
8226
8230
|
const c = o._dirtyLeaves, h = u._nodeMap;
|
|
8227
8231
|
for (const y of c) {
|
|
8228
8232
|
const N = h.get(y);
|
|
8229
|
-
mt(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() &&
|
|
8233
|
+
mt(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() && ir(N);
|
|
8230
8234
|
}
|
|
8231
8235
|
}
|
|
8232
8236
|
function S_(u, o) {
|
|
@@ -8237,7 +8241,7 @@ function LN() {
|
|
|
8237
8241
|
o._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
8238
8242
|
for (const xe of $) {
|
|
8239
8243
|
const we = y.get(xe);
|
|
8240
|
-
mt(we) && we.isAttached() && we.isSimpleText() && !we.isUnmergeable() &&
|
|
8244
|
+
mt(we) && we.isAttached() && we.isSimpleText() && !we.isUnmergeable() && ir(we), we !== void 0 && jd(we, N) && Yd(o, we, b), c.add(xe);
|
|
8241
8245
|
}
|
|
8242
8246
|
if ($ = o._dirtyLeaves, ae = $.size, ae > 0) {
|
|
8243
8247
|
Va++;
|
|
@@ -8315,8 +8319,8 @@ function LN() {
|
|
|
8315
8319
|
if (u._pendingEditorState = null, u._editorState = c, !y && ae && Ce !== null) {
|
|
8316
8320
|
tr = u, er = c, kr = !1, u._updating = !0;
|
|
8317
8321
|
try {
|
|
8318
|
-
const Dt = u._dirtyType, on = u._dirtyElements,
|
|
8319
|
-
Ce.disconnect(), Ve = Yi(N, c, u, Dt, on,
|
|
8322
|
+
const Dt = u._dirtyType, on = u._dirtyElements, ar = u._dirtyLeaves;
|
|
8323
|
+
Ce.disconnect(), Ve = Yi(N, c, u, Dt, on, ar);
|
|
8320
8324
|
} catch (Dt) {
|
|
8321
8325
|
if (Dt instanceof Error && u._onError(Dt), !Hc)
|
|
8322
8326
|
tf(u, null, h, c), dn(u), u._dirtyType = at, Hc = !0, Qo(u, N), Hc = !1;
|
|
@@ -8894,7 +8898,7 @@ function LN() {
|
|
|
8894
8898
|
return super.append(...o);
|
|
8895
8899
|
}
|
|
8896
8900
|
static importJSON(o) {
|
|
8897
|
-
const c =
|
|
8901
|
+
const c = or();
|
|
8898
8902
|
return c.setFormat(o.format), c.setIndent(o.indent), c.setDirection(o.direction), c;
|
|
8899
8903
|
}
|
|
8900
8904
|
exportJSON() {
|
|
@@ -8964,7 +8968,7 @@ function LN() {
|
|
|
8964
8968
|
}
|
|
8965
8969
|
toJSON() {
|
|
8966
8970
|
return Vd(this, () => ({
|
|
8967
|
-
root: ef(
|
|
8971
|
+
root: ef(or())
|
|
8968
8972
|
}));
|
|
8969
8973
|
}
|
|
8970
8974
|
}
|
|
@@ -9095,8 +9099,8 @@ function LN() {
|
|
|
9095
9099
|
const Dt = $e.name;
|
|
9096
9100
|
if (Dt !== "RootNode") {
|
|
9097
9101
|
const on = $e.prototype;
|
|
9098
|
-
["getType", "clone"].forEach((
|
|
9099
|
-
$e.hasOwnProperty(
|
|
9102
|
+
["getType", "clone"].forEach((ar) => {
|
|
9103
|
+
$e.hasOwnProperty(ar) || console.warn(`${Dt} must implement static "${ar}" method`);
|
|
9100
9104
|
}), // eslint-disable-next-line no-prototype-builtins
|
|
9101
9105
|
!$e.hasOwnProperty("importDOM") && // eslint-disable-next-line no-prototype-builtins
|
|
9102
9106
|
$e.hasOwnProperty("exportDOM") && console.warn(`${Dt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`), on instanceof Kc && (on.hasOwnProperty("decorate") || console.warn(`${on.constructor.name} must implement "decorate" method`)), $e.hasOwnProperty("importJSON") || console.warn(`${Dt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`), on.hasOwnProperty("exportJSON") || console.warn(`${Dt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`);
|
|
@@ -9445,7 +9449,7 @@ function LN() {
|
|
|
9445
9449
|
focus(o, c = {}) {
|
|
9446
9450
|
const h = this._rootElement;
|
|
9447
9451
|
h !== null && (h.setAttribute("autocapitalize", "off"), Ur(this, () => {
|
|
9448
|
-
const y = pn(), N =
|
|
9452
|
+
const y = pn(), N = or();
|
|
9449
9453
|
y !== null ? y.dirty = !0 : N.getChildrenSize() !== 0 && (c.defaultSelection === "rootStart" ? N.selectStart() : N.selectEnd());
|
|
9450
9454
|
}, {
|
|
9451
9455
|
onUpdate: () => {
|
|
@@ -9531,7 +9535,7 @@ function LN() {
|
|
|
9531
9535
|
function Gc(u) {
|
|
9532
9536
|
return u instanceof of;
|
|
9533
9537
|
}
|
|
9534
|
-
return He.$INTERNAL_isPointSelection = fr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Ar, He.$copyNode = wl, He.$createLineBreakNode = yo, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = br, He.$createRangeSelection = g_, He.$createTabNode = Ps, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xs, He.$getNodeByKey = Nn, He.$getPreviousSelection = Hs, He.$getRoot =
|
|
9538
|
+
return He.$INTERNAL_isPointSelection = fr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Ar, He.$copyNode = wl, He.$createLineBreakNode = yo, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = br, He.$createRangeSelection = g_, He.$createTabNode = Ps, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xs, He.$getNodeByKey = Nn, He.$getPreviousSelection = Hs, He.$getRoot = or, He.$getSelection = pn, He.$getTextContent = N_, He.$hasAncestor = Wi, He.$hasUpdateTag = Gn, He.$insertNodes = y_, He.$isBlockElementNode = h_, He.$isDecoratorNode = An, He.$isElementNode = et, He.$isInlineElementOrDecoratorNode = Br, He.$isLeafNode = Ro, He.$isLineBreakNode = ci, He.$isNodeSelection = zr, He.$isParagraphNode = P_, He.$isRangeSelection = xt, He.$isRootNode = Gr, He.$isRootOrShadowRoot = si, He.$isTabNode = $s, He.$isTextNode = mt, He.$nodesOfType = Hi, He.$normalizeSelection__EXPERIMENTAL = Ao, He.$parseSerializedNode = w_, He.$selectAll = xl, He.$setCompositionKey = vn, He.$setSelection = Er, He.$splitNode = La, He.BLUR_COMMAND = B, He.CAN_REDO_COMMAND = X, He.CAN_UNDO_COMMAND = fe, He.CLEAR_EDITOR_COMMAND = R, He.CLEAR_HISTORY_COMMAND = U, He.CLICK_COMMAND = r, He.COMMAND_PRIORITY_CRITICAL = W_, He.COMMAND_PRIORITY_EDITOR = $_, He.COMMAND_PRIORITY_HIGH = H_, He.COMMAND_PRIORITY_LOW = F_, He.COMMAND_PRIORITY_NORMAL = B_, He.CONTROLLED_TEXT_INSERTION_COMMAND = p, He.COPY_COMMAND = Y, He.CUT_COMMAND = W, He.DELETE_CHARACTER_COMMAND = l, He.DELETE_LINE_COMMAND = S, He.DELETE_WORD_COMMAND = E, He.DEPRECATED_$computeGridMap = C_, He.DEPRECATED_$getGridCellNodeRect = Ir, He.DEPRECATED_$getNodeTriplet = zd, He.DEPRECATED_$isGridCellNode = Us, He.DEPRECATED_$isGridNode = rf, He.DEPRECATED_$isGridRowNode = Gc, He.DEPRECATED_GridCellNode = Uc, He.DEPRECATED_GridNode = nf, He.DEPRECATED_GridRowNode = of, He.DRAGEND_COMMAND = se, He.DRAGOVER_COMMAND = Z, He.DRAGSTART_COMMAND = O, He.DROP_COMMAND = de, He.DecoratorNode = Kc, He.ElementNode = es, He.FOCUS_COMMAND = _e, He.FORMAT_ELEMENT_COMMAND = K, He.FORMAT_TEXT_COMMAND = w, He.INDENT_CONTENT_COMMAND = Se, He.INSERT_LINE_BREAK_COMMAND = d, He.INSERT_PARAGRAPH_COMMAND = f, He.INSERT_TAB_COMMAND = Te, He.INTERNAL_PointSelection = Lr, He.KEY_ARROW_DOWN_COMMAND = j, He.KEY_ARROW_LEFT_COMMAND = I, He.KEY_ARROW_RIGHT_COMMAND = k, He.KEY_ARROW_UP_COMMAND = H, He.KEY_BACKSPACE_COMMAND = ce, He.KEY_DELETE_COMMAND = z, He.KEY_DOWN_COMMAND = v, He.KEY_ENTER_COMMAND = re, He.KEY_ESCAPE_COMMAND = V, He.KEY_MODIFIER_COMMAND = A, He.KEY_SPACE_COMMAND = te, He.KEY_TAB_COMMAND = q, He.LineBreakNode = qi, He.MOVE_TO_END = G, He.MOVE_TO_START = P, He.OUTDENT_CONTENT_COMMAND = Ee, He.PASTE_COMMAND = _, He.ParagraphNode = zs, He.REDO_COMMAND = m, He.REMOVE_TEXT_COMMAND = T, He.RootNode = Ks, He.SELECTION_CHANGE_COMMAND = t, He.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = n, He.SELECT_ALL_COMMAND = J, He.TabNode = vr, He.TextNode = Xr, He.UNDO_COMMAND = M, He.createCommand = e, He.createEditor = z_, He.getNearestEditorFromDOMNode = ul, He.isCurrentlyReadOnlyMode = Ws, He.isHTMLAnchorElement = Ia, He.isHTMLElement = zo, He.isSelectionCapturedInDecoratorInput = Mo, He.isSelectionWithinEditor = lo, He;
|
|
9535
9539
|
}
|
|
9536
9540
|
var We = {}, wf;
|
|
9537
9541
|
function IN() {
|
|
@@ -9873,7 +9877,7 @@ function IN() {
|
|
|
9873
9877
|
return s = (s = Ln(s).event) && s.inputType, s === "insertFromPaste" || s === "insertFromPasteAsQuotation";
|
|
9874
9878
|
}
|
|
9875
9879
|
function nn(s) {
|
|
9876
|
-
return !
|
|
9880
|
+
return !sr(s) && !s.isLastChild() && !s.isInline();
|
|
9877
9881
|
}
|
|
9878
9882
|
function an(s, i) {
|
|
9879
9883
|
return s = s._keyToDOMMap.get(i), s === void 0 && Y(75, i), s;
|
|
@@ -9881,7 +9885,7 @@ function IN() {
|
|
|
9881
9885
|
function bn(s) {
|
|
9882
9886
|
return s = s.assignedSlot || s.parentElement, s !== null && s.nodeType === 11 ? s.host : s;
|
|
9883
9887
|
}
|
|
9884
|
-
function
|
|
9888
|
+
function rr(s, i) {
|
|
9885
9889
|
for (s = s.getParent(); s !== null; ) {
|
|
9886
9890
|
if (s.is(i)) return !0;
|
|
9887
9891
|
s = s.getParent();
|
|
@@ -9896,18 +9900,18 @@ function IN() {
|
|
|
9896
9900
|
return s;
|
|
9897
9901
|
}
|
|
9898
9902
|
function Jn(s) {
|
|
9899
|
-
return
|
|
9903
|
+
return sr(s) || Je(s) && s.isShadowRoot();
|
|
9900
9904
|
}
|
|
9901
9905
|
function bi(s) {
|
|
9902
9906
|
return s = s.constructor.clone(s), _t(s, null), s;
|
|
9903
9907
|
}
|
|
9904
|
-
function
|
|
9908
|
+
function ir(s) {
|
|
9905
9909
|
var i = cn();
|
|
9906
9910
|
let a = s.constructor.getType();
|
|
9907
9911
|
return i = i._nodes.get(a), i === void 0 && Y(97), i = i.replace, i !== null ? (i = i(s), i instanceof s.constructor || Y(98), i) : s;
|
|
9908
9912
|
}
|
|
9909
9913
|
function Ao(s, i) {
|
|
9910
|
-
s = s.getParent(), !
|
|
9914
|
+
s = s.getParent(), !sr(s) || Je(i) || Cn(i) || Y(99);
|
|
9911
9915
|
}
|
|
9912
9916
|
function gs(s) {
|
|
9913
9917
|
return (Cn(s) || Je(s) && !s.canBeEmpty()) && !s.isInline();
|
|
@@ -9972,7 +9976,7 @@ function IN() {
|
|
|
9972
9976
|
function Ii(s, i) {
|
|
9973
9977
|
s.setProperty("text-align", i);
|
|
9974
9978
|
}
|
|
9975
|
-
function
|
|
9979
|
+
function or(s, i) {
|
|
9976
9980
|
var a = $r.theme.indent;
|
|
9977
9981
|
if (typeof a == "string") {
|
|
9978
9982
|
let g = s.classList.contains(a);
|
|
@@ -9989,7 +9993,7 @@ function IN() {
|
|
|
9989
9993
|
let C = g.createDOM($r, Hn);
|
|
9990
9994
|
var x = Hn._keyToDOMMap;
|
|
9991
9995
|
if (C["__lexicalKey_" + Hn._key] = s, x.set(s, C), Nt(g) ? C.setAttribute("data-lexical-text", "true") : Cn(g) && C.setAttribute("data-lexical-decorator", "true"), Je(g)) {
|
|
9992
|
-
if (s = g.__indent, x = g.__size, s !== 0 &&
|
|
9996
|
+
if (s = g.__indent, x = g.__size, s !== 0 && or(C, s), x !== 0) {
|
|
9993
9997
|
--x, s = Lo(g, Nn);
|
|
9994
9998
|
var D = Un;
|
|
9995
9999
|
Un = "", pl(s, g, 0, x, C, null), ya(g, C), Un = D;
|
|
@@ -10046,7 +10050,7 @@ function IN() {
|
|
|
10046
10050
|
if (a === g && !C) return Je(a) ? (g = x.__lexicalTextContent, g !== void 0 && (In += g, ii += g), g = x.__lexicalDirTextContent, g !== void 0 && (Un += g)) : (g = a.getTextContent(), Nt(a) && !a.isDirectionless() && (Un += g), ii += g, In += g), x;
|
|
10047
10051
|
if (a !== g && C && zt(oi, Ro, qr, g, "updated"), g.updateDOM(a, x, $r)) return g = Er(s, null, null), i === null && Y(62), i.replaceChild(g, x), bo(s, null), g;
|
|
10048
10052
|
if (Je(a) && Je(g)) {
|
|
10049
|
-
if (s = g.__indent, s !== a.__indent &&
|
|
10053
|
+
if (s = g.__indent, s !== a.__indent && or(x, s), s = g.__format, s !== a.__format && gl(x, s), C) {
|
|
10050
10054
|
s = Un, Un = "", C = In;
|
|
10051
10055
|
var D = a.__size, Q = g.__size;
|
|
10052
10056
|
if (In = "", D === 1 && Q === 1) {
|
|
@@ -10080,7 +10084,7 @@ function IN() {
|
|
|
10080
10084
|
}
|
|
10081
10085
|
nn(g) && (In += `
|
|
10082
10086
|
|
|
10083
|
-
`), x.__lexicalTextContent = In, In = C + In, ya(g, x), Un = s,
|
|
10087
|
+
`), x.__lexicalTextContent = In, In = C + In, ya(g, x), Un = s, sr(g) || g.isInline() || ml(a, g, x);
|
|
10084
10088
|
}
|
|
10085
10089
|
nn(g) && (In += `
|
|
10086
10090
|
|
|
@@ -10088,7 +10092,7 @@ function IN() {
|
|
|
10088
10092
|
|
|
10089
10093
|
`);
|
|
10090
10094
|
} else a = g.getTextContent(), Cn(g) ? (C = g.decorate(Hn, $r), C !== null && _l(s, C)) : Nt(g) && !g.isDirectionless() && (Un += a), In += a, ii += a;
|
|
10091
|
-
return !fl &&
|
|
10095
|
+
return !fl && sr(g) && g.__cachedText !== ii && (g.getWritable().__cachedText = ii), x;
|
|
10092
10096
|
}
|
|
10093
10097
|
function _l(s, i) {
|
|
10094
10098
|
let a = Hn._pendingDecorators, g = Hn._decorators;
|
|
@@ -10159,7 +10163,7 @@ function IN() {
|
|
|
10159
10163
|
if (g) if (Mt(a)) {
|
|
10160
10164
|
let D = a.anchor;
|
|
10161
10165
|
var x = D.getNode();
|
|
10162
|
-
D.type === "element" && D.offset === 0 && a.isCollapsed() && !
|
|
10166
|
+
D.type === "element" && D.offset === 0 && a.isCollapsed() && !sr(x) && Rt().getChildrenSize() === 1 && x.getTopLevelElementOrThrow().isEmpty() && C !== null && a.is(C) ? (g.removeAllRanges(), a.dirty = !0) : s.detail !== 3 || a.isCollapsed() || (g = a.focus.getNode(), x !== g && (Je(x) ? x.select(0) : x.getParentOrThrow().select(0)));
|
|
10163
10167
|
} else s.pointerType === "touch" && (x = g.anchorNode, x !== null && (x = x.nodeType, x === 1 || x === 3)) && (g = Yn(C, g, i, s), Xt(g));
|
|
10164
10168
|
lt(i, t, s);
|
|
10165
10169
|
});
|
|
@@ -10202,7 +10206,7 @@ function IN() {
|
|
|
10202
10206
|
}
|
|
10203
10207
|
}
|
|
10204
10208
|
if (Mt(C)) {
|
|
10205
|
-
x = s.data, ao !== null && Ze(!1, i, ao), C.dirty && ao === null || !C.isCollapsed() ||
|
|
10209
|
+
x = s.data, ao !== null && Ze(!1, i, ao), C.dirty && ao === null || !C.isCollapsed() || sr(C.anchor.getNode()) || g === null || C.applyDOMRange(g), ao = null;
|
|
10206
10210
|
var D = C.focus, Q = C.anchor.getNode();
|
|
10207
10211
|
if (D = D.getNode(), a === "insertText" || a === "insertTranspose") x === `
|
|
10208
10212
|
` ? (s.preventDefault(), lt(i, r, !1)) : x === `
|
|
@@ -10412,14 +10416,14 @@ function IN() {
|
|
|
10412
10416
|
var x = Yt();
|
|
10413
10417
|
if (Mt(x) && Je(s)) {
|
|
10414
10418
|
var { anchor: D, focus: Q } = x, ge = D.getNode(), Ae = Q.getNode();
|
|
10415
|
-
|
|
10419
|
+
rr(ge, s) && D.set(s.__key, 0, "element"), rr(Ae, s) && Q.set(s.__key, 0, "element");
|
|
10416
10420
|
}
|
|
10417
10421
|
if (ge = x, Ae = !1, Mt(ge) && i) {
|
|
10418
10422
|
x = ge.anchor;
|
|
10419
10423
|
let Ye = ge.focus;
|
|
10420
10424
|
x.key === g && (go(x, s, C, s.getPreviousSibling(), s.getNextSibling()), Ae = !0), Ye.key === g && (go(Ye, s, C, s.getPreviousSibling(), s.getNextSibling()), Ae = !0);
|
|
10421
10425
|
} else ur(ge) && i && s.isSelected() && s.selectPrevious();
|
|
10422
|
-
Mt(ge) && i && !Ae ? (g = s.getIndexWithinParent(), yt(s), Wn(ge, C, g, -1)) : yt(s), a || Jn(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i &&
|
|
10426
|
+
Mt(ge) && i && !Ae ? (g = s.getIndexWithinParent(), yt(s), Wn(ge, C, g, -1)) : yt(s), a || Jn(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i && sr(C) && C.isEmpty() && C.selectEnd();
|
|
10423
10427
|
}
|
|
10424
10428
|
}
|
|
10425
10429
|
class Bo {
|
|
@@ -10739,7 +10743,7 @@ function IN() {
|
|
|
10739
10743
|
return { node: Jr() };
|
|
10740
10744
|
}
|
|
10741
10745
|
function Jr() {
|
|
10742
|
-
return
|
|
10746
|
+
return ir(new Zr());
|
|
10743
10747
|
}
|
|
10744
10748
|
function $i(s) {
|
|
10745
10749
|
return s instanceof Zr;
|
|
@@ -11026,7 +11030,7 @@ function IN() {
|
|
|
11026
11030
|
return i === void 0 ? { node: null } : { forChild: (a) => (Nt(a) && !a.hasFormat(i) && a.toggleFormat(i), a), node: null };
|
|
11027
11031
|
}
|
|
11028
11032
|
function Gn(s = "") {
|
|
11029
|
-
return
|
|
11033
|
+
return ir(new Hi(s));
|
|
11030
11034
|
}
|
|
11031
11035
|
function Nt(s) {
|
|
11032
11036
|
return s instanceof Hi;
|
|
@@ -11069,7 +11073,7 @@ function IN() {
|
|
|
11069
11073
|
}
|
|
11070
11074
|
}
|
|
11071
11075
|
function Wi() {
|
|
11072
|
-
return
|
|
11076
|
+
return ir(new fo());
|
|
11073
11077
|
}
|
|
11074
11078
|
function ba(s) {
|
|
11075
11079
|
return s instanceof fo;
|
|
@@ -11117,7 +11121,7 @@ function IN() {
|
|
|
11117
11121
|
} else xs(s, i);
|
|
11118
11122
|
}
|
|
11119
11123
|
function wl(s, i, a, g) {
|
|
11120
|
-
let C = s.getNode(), x = C.getChildAtIndex(s.offset), D = Gn(), Q =
|
|
11124
|
+
let C = s.getNode(), x = C.getChildAtIndex(s.offset), D = Gn(), Q = sr(C) ? Kr().append(D) : D;
|
|
11121
11125
|
D.setFormat(a), D.setStyle(g), x === null ? C.append(Q) : x.insertBefore(Q), s.is(i) && i.set(D.__key, 0, "text"), s.set(D.__key, 0, "text");
|
|
11122
11126
|
}
|
|
11123
11127
|
function Ar(s, i, a, g) {
|
|
@@ -11338,7 +11342,7 @@ function IN() {
|
|
|
11338
11342
|
var gt = Gn(Ke.getTextContent());
|
|
11339
11343
|
Ke.replace(gt), Ke = gt;
|
|
11340
11344
|
}
|
|
11341
|
-
|
|
11345
|
+
sr(Ae.getNode()) || Ae.type !== "text" || (Ke = Ke.spliceText(0, Ye, "")), x.add(Ke.__key);
|
|
11342
11346
|
} else Ae = Ke.getParentOrThrow(), Ae.canBeEmpty() || Ae.getChildrenSize() !== 1 ? Ke.remove() : Ae.remove();
|
|
11343
11347
|
else x.add(Ke.__key);
|
|
11344
11348
|
for (Ae = D.getChildren(), Ye = new Set(Q), Ke = Pe.is(D), Pe = Pe.isInline() && a.getNextSibling() === null ? Pe : a, gt = Ae.length - 1; 0 <= gt; gt--) {
|
|
@@ -11441,8 +11445,8 @@ function IN() {
|
|
|
11441
11445
|
if (Cn(Q) && !Q.isIsolated()) D && Q.isKeyboardSelectable() ? (a = Dl(), a.add(Q.__key), Xt(a)) : (i = a ? Q.getPreviousSibling() : Q.getNextSibling(), Nt(i) ? (Q = i.__key, a = a ? i.getTextContent().length : 0, C.set(Q, a, "text"), D && x.set(Q, a, "text")) : (g = Q.getParentOrThrow(), Je(i) ? (g = i.__key, Q = a ? i.getChildrenSize() : 0) : (Q = Q.getIndexWithinParent(), g = g.__key, a || Q++), C.set(g, Q, "element"), D && x.set(g, Q, "element")));
|
|
11442
11446
|
else if (x = cn(), C = Vr(x._window)) {
|
|
11443
11447
|
var ge = x._blockCursorElement, Ae = x._rootElement;
|
|
11444
|
-
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x =
|
|
11445
|
-
for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge],
|
|
11448
|
+
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x = sr(x) ? x : dn(x), this.applyDOMRange(Q), this.dirty = !0, !D)) {
|
|
11449
|
+
for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge], rr(Ae, x) ? i.push(Ae) : g = !0;
|
|
11446
11450
|
g && 0 < i.length && (a ? (a = i[0], Je(a) ? a.selectStart() : a.getParentOrThrow().selectStart()) : (a = i[i.length - 1], Je(a) ? a.selectEnd() : a.getParentOrThrow().selectEnd())), (C.anchorNode !== Q.startContainer || C.anchorOffset !== Q.startOffset) && (a = this.focus, D = this.anchor, C = D.key, Q = D.offset, x = D.type, Ar(D, a.key, a.offset, a.type), Ar(a, C, Q, x), this._cachedNodes = null);
|
|
11447
11451
|
}
|
|
11448
11452
|
}
|
|
@@ -11482,7 +11486,7 @@ function IN() {
|
|
|
11482
11486
|
}
|
|
11483
11487
|
}
|
|
11484
11488
|
}
|
|
11485
|
-
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() &&
|
|
11489
|
+
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() && sr(i.getParent()) && i.getIndexWithinParent() === 0 && i.collapseAtStart(this));
|
|
11486
11490
|
}
|
|
11487
11491
|
deleteLine(i) {
|
|
11488
11492
|
this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", i, "lineboundary"), (i ? this.focus : this.anchor).offset === 0 && this.modify(
|
|
@@ -11771,9 +11775,9 @@ function IN() {
|
|
|
11771
11775
|
let hr = document.createRange();
|
|
11772
11776
|
hr.selectNode(fr), Ir = hr.getBoundingClientRect();
|
|
11773
11777
|
} else Ir = fr.getBoundingClientRect();
|
|
11774
|
-
let
|
|
11778
|
+
let lr = g.ownerDocument, zr = lr.defaultView;
|
|
11775
11779
|
if (zr !== null) for (var { top: Kl, bottom: Qr } = Ir, Dn, mt, vr = g; vr !== null; ) {
|
|
11776
|
-
let hr = vr ===
|
|
11780
|
+
let hr = vr === lr.body;
|
|
11777
11781
|
if (hr) Dn = 0, mt = Ln(s).innerHeight;
|
|
11778
11782
|
else {
|
|
11779
11783
|
let Bs = vr.getBoundingClientRect();
|
|
@@ -11807,20 +11811,20 @@ function IN() {
|
|
|
11807
11811
|
} else {
|
|
11808
11812
|
let Ir = En.getChildAtIndex(Lr);
|
|
11809
11813
|
if (gs(Ir)) {
|
|
11810
|
-
let
|
|
11811
|
-
(
|
|
11814
|
+
let lr = Ir.getPreviousSibling();
|
|
11815
|
+
(lr === null || gs(lr)) && (xt = !0, fr = s.getElementByKey(Ir.__key));
|
|
11812
11816
|
}
|
|
11813
11817
|
}
|
|
11814
11818
|
if (xt) {
|
|
11815
11819
|
let Ir = s.getElementByKey(En.__key);
|
|
11816
11820
|
if (gn === null) {
|
|
11817
|
-
let
|
|
11821
|
+
let lr = s._config.theme, zr = document.createElement("div");
|
|
11818
11822
|
zr.contentEditable = "false", zr.setAttribute("data-lexical-cursor", "true");
|
|
11819
|
-
let hr =
|
|
11823
|
+
let hr = lr.blockCursor;
|
|
11820
11824
|
if (hr !== void 0) {
|
|
11821
11825
|
if (typeof hr == "string") {
|
|
11822
11826
|
let ui = hr.split(" ");
|
|
11823
|
-
hr =
|
|
11827
|
+
hr = lr.blockCursor = ui;
|
|
11824
11828
|
}
|
|
11825
11829
|
hr !== void 0 && zr.classList.add(...hr);
|
|
11826
11830
|
}
|
|
@@ -12276,7 +12280,7 @@ function IN() {
|
|
|
12276
12280
|
return !0;
|
|
12277
12281
|
}
|
|
12278
12282
|
}
|
|
12279
|
-
function
|
|
12283
|
+
function sr(s) {
|
|
12280
12284
|
return s instanceof dr;
|
|
12281
12285
|
}
|
|
12282
12286
|
function Ll(s, i) {
|
|
@@ -12368,7 +12372,7 @@ function IN() {
|
|
|
12368
12372
|
return s.style && (i.setFormat(s.style.textAlign), s = parseInt(s.style.textIndent, 10) / 20, 0 < s && i.setIndent(s)), { node: i };
|
|
12369
12373
|
}
|
|
12370
12374
|
function Kr() {
|
|
12371
|
-
return
|
|
12375
|
+
return ir(new Wr());
|
|
12372
12376
|
}
|
|
12373
12377
|
function Ms(s, i, a, g) {
|
|
12374
12378
|
let C = s._keyToDOMMap;
|
|
@@ -12581,13 +12585,13 @@ function IN() {
|
|
|
12581
12585
|
}
|
|
12582
12586
|
return We.$INTERNAL_isPointSelection = Ko, We.$addUpdateTag = function(s) {
|
|
12583
12587
|
Xn(), cn()._updateTags.add(s);
|
|
12584
|
-
}, We.$applyNodeReplacement =
|
|
12588
|
+
}, We.$applyNodeReplacement = ir, We.$copyNode = bi, We.$createLineBreakNode = Jr, We.$createNodeSelection = Dl, We.$createParagraphNode = Kr, We.$createPoint = Br, We.$createRangeSelection = function() {
|
|
12585
12589
|
let s = Br("root", 0, "element"), i = Br("root", 0, "element");
|
|
12586
12590
|
return new Ei(s, i, 0, "");
|
|
12587
12591
|
}, We.$createTabNode = Wi, We.$createTextNode = Gn, We.$getAdjacentNode = Ct, We.$getNearestNodeFromDOMNode = Bt, We.$getNearestRootOrShadowRoot = dn, We.$getNodeByKey = pt, We.$getPreviousSelection = Tr, We.$getRoot = Rt, We.$getSelection = Yt, We.$getTextContent = function() {
|
|
12588
12592
|
let s = Yt();
|
|
12589
12593
|
return s === null ? "" : s.getTextContent();
|
|
12590
|
-
}, We.$hasAncestor =
|
|
12594
|
+
}, We.$hasAncestor = rr, We.$hasUpdateTag = function(s) {
|
|
12591
12595
|
return cn()._updateTags.has(s);
|
|
12592
12596
|
}, We.$insertNodes = function(s) {
|
|
12593
12597
|
let i = Yt() || Tr();
|
|
@@ -12600,7 +12604,7 @@ function IN() {
|
|
|
12600
12604
|
return Nt(s) || $i(s) || Cn(s);
|
|
12601
12605
|
}, We.$isLineBreakNode = $i, We.$isNodeSelection = ur, We.$isParagraphNode = function(s) {
|
|
12602
12606
|
return s instanceof Wr;
|
|
12603
|
-
}, We.$isRangeSelection = Mt, We.$isRootNode =
|
|
12607
|
+
}, We.$isRangeSelection = Mt, We.$isRootNode = sr, We.$isRootOrShadowRoot = Jn, We.$isTabNode = ba, We.$isTextNode = Nt, We.$nodesOfType = function(s) {
|
|
12604
12608
|
var i = Hr();
|
|
12605
12609
|
let a = i._readOnly, g = s.getType();
|
|
12606
12610
|
i = i._nodeMap;
|
|
@@ -18389,19 +18393,19 @@ function wC() {
|
|
|
18389
18393
|
if (!e.DEPRECATED_$isGridRowNode(nn))
|
|
18390
18394
|
return !1;
|
|
18391
18395
|
const an = yn.getChildren(), bn = nn.getChildren();
|
|
18392
|
-
let
|
|
18396
|
+
let rr = 0;
|
|
18393
18397
|
for (let Ln = Ni; Ln <= Ze; Ln++) {
|
|
18394
18398
|
const dn = an[Ln];
|
|
18395
18399
|
if (!e.DEPRECATED_$isGridCellNode(dn))
|
|
18396
18400
|
return !1;
|
|
18397
|
-
const Jn = bn[
|
|
18401
|
+
const Jn = bn[rr];
|
|
18398
18402
|
if (!e.DEPRECATED_$isGridCellNode(Jn))
|
|
18399
18403
|
return !1;
|
|
18400
18404
|
Ct === pe && Ln === Ni ? zt = dn.getKey() : Ct === nt && Ln === Ze && (Pt = dn.getKey());
|
|
18401
18405
|
const bi = dn.getChildren();
|
|
18402
|
-
Jn.getChildren().forEach((
|
|
18403
|
-
e.$isTextNode(
|
|
18404
|
-
}), bi.forEach((
|
|
18406
|
+
Jn.getChildren().forEach((ir) => {
|
|
18407
|
+
e.$isTextNode(ir) && e.$createParagraphNode().append(ir), dn.append(ir);
|
|
18408
|
+
}), bi.forEach((ir) => ir.remove()), rr++;
|
|
18405
18409
|
}
|
|
18406
18410
|
kt++;
|
|
18407
18411
|
}
|
|
@@ -23912,7 +23916,7 @@ const IC = process.env.NODE_ENV === "development" ? bC() : LC();
|
|
|
23912
23916
|
var ju = IC, pd = Zn();
|
|
23913
23917
|
function kC() {
|
|
23914
23918
|
const [e] = pd.useLexicalComposerContext();
|
|
23915
|
-
return
|
|
23919
|
+
return nr(() => ju.registerCodeHighlighting(e), [e]), null;
|
|
23916
23920
|
}
|
|
23917
23921
|
var Xh = hn(), Bn = Ut();
|
|
23918
23922
|
function PC({
|
|
@@ -24021,7 +24025,7 @@ const FC = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
24021
24025
|
);
|
|
24022
24026
|
function HC() {
|
|
24023
24027
|
const [e] = pd.useLexicalComposerContext();
|
|
24024
|
-
return
|
|
24028
|
+
return nr(() => {
|
|
24025
24029
|
if (!e.hasNodes([il]))
|
|
24026
24030
|
throw new Error("ImagePlugin: ImageNode not registered on editor");
|
|
24027
24031
|
return Xh.mergeRegister(
|
|
@@ -24153,7 +24157,7 @@ function VC(e) {
|
|
|
24153
24157
|
}
|
|
24154
24158
|
function qC({ maxDepth: e }) {
|
|
24155
24159
|
const [t] = pd.useLexicalComposerContext();
|
|
24156
|
-
return
|
|
24160
|
+
return nr(() => t.registerCommand(
|
|
24157
24161
|
Bn.INDENT_CONTENT_COMMAND,
|
|
24158
24162
|
() => !VC(e || 7),
|
|
24159
24163
|
jC
|
|
@@ -26107,11 +26111,11 @@ const FT = (e, t) => e(t, "i", oo(e, t)), BT = (e, t) => e(t, "b", oo(e, t)), HT
|
|
|
26107
26111
|
}, yw = (e) => {
|
|
26108
26112
|
const [t, n] = Cr();
|
|
26109
26113
|
let r;
|
|
26110
|
-
return
|
|
26114
|
+
return nr(() => {
|
|
26111
26115
|
(async () => {
|
|
26112
26116
|
if (!r)
|
|
26113
26117
|
try {
|
|
26114
|
-
r = (await import("./index-
|
|
26118
|
+
r = (await import("./index-VbkIXtJn.js")).default;
|
|
26115
26119
|
} catch {
|
|
26116
26120
|
throw new Error(
|
|
26117
26121
|
"Failed to import React Markdown, cannot properly render LegacyRichText."
|
|
@@ -31810,7 +31814,7 @@ function Qv(e, t) {
|
|
|
31810
31814
|
}
|
|
31811
31815
|
const Nw = (e) => {
|
|
31812
31816
|
const [t, n] = Cr(!1), [r, l] = Cr(!1);
|
|
31813
|
-
|
|
31817
|
+
nr(() => {
|
|
31814
31818
|
l(!0);
|
|
31815
31819
|
}, []);
|
|
31816
31820
|
const d = e.statusTemplate || Qv, f = new t_(e.hours, e.timezone), p = f.isOpenNow(), _ = f.getCurrentInterval(), T = f.getNextInterval(), E = (_ == null ? void 0 : _.end) || (T == null ? void 0 : T.start);
|
|
@@ -31868,7 +31872,7 @@ function nS(e, t, n) {
|
|
|
31868
31872
|
}
|
|
31869
31873
|
const Cw = (e) => {
|
|
31870
31874
|
const [t, n] = Cr(!1);
|
|
31871
|
-
|
|
31875
|
+
nr(() => {
|
|
31872
31876
|
n(!0);
|
|
31873
31877
|
}, []);
|
|
31874
31878
|
const r = new t_(
|