@templatical/editor 0.16.5 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CYAbVB2G.js → AiChatSidebar-LxCHMdcj.js} +1 -1
- package/dist/{AiFeatureMenu-B1oEJebq.js → AiFeatureMenu-Cr8pLXMj.js} +3 -3
- package/dist/{BlockIssueBadge-BLytBabN.js → BlockIssueBadge-BQ1yB1me.js} +2 -2
- package/dist/{CloudEditor-D6KNL6VU.js → CloudEditor-qzoNS8K4.js} +11 -10
- package/dist/{CollaboratorBar-C_EhXQ5R.js → CollaboratorBar-BkfR0CyD.js} +2 -2
- package/dist/{ColorPicker-CppJgX_T.js → ColorPicker-DfzDyNKe.js} +4 -4
- package/dist/{CommentsSidebar-C_XLBbo3.js → CommentsSidebar-Cl93TN96.js} +3 -3
- package/dist/{CountdownBlock-173fiO5Z.js → CountdownBlock-DbXfzwae.js} +1 -1
- package/dist/{CountdownToolbar-D5GaA_lt.js → CountdownToolbar-BqaMWRyB.js} +3 -3
- package/dist/{DesignReferenceSidebar-Bh9uAZ4B.js → DesignReferenceSidebar-jVrdS8wW.js} +2 -2
- package/dist/{IssuesPanel-DltSuU6H.js → IssuesPanel-Bq3yXg6M.js} +2 -2
- package/dist/{MergeTagSuggestion-jIpT_jmz.js → MergeTagSuggestion-DCuaSOPQ.js} +148 -162
- package/dist/{ModuleBrowserModal-CXy8Bbv9.js → ModuleBrowserModal-XEHfEO0O.js} +7 -7
- package/dist/{ModulePreviewCanvas-CJC9kyZN.js → ModulePreviewCanvas-BM8XUgbc.js} +2 -2
- package/dist/{NumberWithSuffix-DNi-v4l1.js → NumberWithSuffix-9FG7mNnn.js} +1 -1
- package/dist/{ParagraphEditor-nk5Vvr7M.js → ParagraphEditor-Cs47wU1V.js} +19 -19
- package/dist/{RichTextEditorContent-DBaCrvH0.js → RichTextEditorContent-DCzmVeyb.js} +5 -5
- package/dist/{SaveModuleDialog-CYu5PhBz.js → SaveModuleDialog-BgOS9vCQ.js} +6 -6
- package/dist/{SnapshotHistory-B38ImqMO.js → SnapshotHistory-CLfYzwv9.js} +4 -4
- package/dist/{TemplateScoringPanel-ZhObHWeb.js → TemplateScoringPanel-CMrfa9Rd.js} +3 -3
- package/dist/{TestEmailModal-DbstIzEf.js → TestEmailModal-DTLfATNt.js} +3 -3
- package/dist/{TitleEditor-CmfkOHJT.js → TitleEditor-Bq9S0C8Z.js} +10 -10
- package/dist/{TplModal-BXnx3sLr.js → TplModal-BW0FAtYe.js} +3 -3
- package/dist/{blockTypeIcons-BVIEw0XJ.js → blockTypeIcons-CvSfLeyV.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js → AiFeatureMenu-B0zH66nO.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js.map → AiFeatureMenu-B0zH66nO.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js → BlockIssueBadge-yD4pKsU9.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js.map → BlockIssueBadge-yD4pKsU9.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-1Ms0w691.js → CloudEditor-Da-aSmw5.js} +10 -9
- package/dist/cdn/chunks/CloudEditor-Da-aSmw5.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js → CollaboratorBar-DixaFis-.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js.map → CollaboratorBar-DixaFis-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js → ColorPicker-O6xXCPEg.js} +2 -2
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js.map → ColorPicker-O6xXCPEg.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js → CountdownBlock-jgBPbI1p.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js.map → CountdownBlock-jgBPbI1p.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js → CountdownToolbar-DrmZwvIH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js.map → CountdownToolbar-DrmZwvIH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js → IssuesPanel-CpyhXg9M.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js.map → IssuesPanel-CpyhXg9M.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js → MergeTagSuggestion-BmMmdcRg.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js.map → MergeTagSuggestion-BmMmdcRg.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js → ModuleBrowserModal-DPQLFTti.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js.map → ModuleBrowserModal-DPQLFTti.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js → ModulePreviewCanvas-Csc6M0RA.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js.map → ModulePreviewCanvas-Csc6M0RA.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js → NumberWithSuffix-YmcsBmCd.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js.map → NumberWithSuffix-YmcsBmCd.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js → ParagraphEditor-DR5AcHB0.js} +17 -17
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js.map → ParagraphEditor-DR5AcHB0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js → RichTextEditorContent-52c2EuCT.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js.map → RichTextEditorContent-52c2EuCT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js → SaveModuleDialog-dpRlVrrQ.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js.map → SaveModuleDialog-dpRlVrrQ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js → TitleEditor-DtQTPAg3.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js.map → TitleEditor-DtQTPAg3.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.js → blockTypeIcons-B0ktHdUG.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.js.map → blockTypeIcons-B0ktHdUG.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +2 -2
- package/dist/cdn/chunks/ca-CSl--oWR.js.map +1 -0
- package/dist/{de-q9lTCMre.js → cdn/chunks/de-ZaffrKDP.js} +3 -1
- package/dist/cdn/chunks/de-ZaffrKDP.js.map +1 -0
- package/dist/cdn/chunks/{en-CR4LItrX.js → en-CHuXeJDt.js} +2 -2
- package/dist/cdn/chunks/en-CHuXeJDt.js.map +1 -0
- package/dist/cdn/chunks/{es-CEt-lrGd.js → es-CaC8VQjO.js} +2 -2
- package/dist/cdn/chunks/es-CaC8VQjO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BGUoo2a5.js → extensions-CiewgCtw.js} +4 -4
- package/dist/cdn/chunks/{extensions-BGUoo2a5.js.map → extensions-CiewgCtw.js.map} +1 -1
- package/dist/cdn/chunks/{features-BSpDuFFR.js → features-DLu_D-6j.js} +702 -671
- package/dist/cdn/chunks/features-DLu_D-6j.js.map +1 -0
- package/dist/cdn/chunks/{icons-k3XVoRvc.js → icons-B03IY-pm.js} +2 -2
- package/dist/cdn/chunks/{icons-k3XVoRvc.js.map → icons-B03IY-pm.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-iDq3otm6.js → media-library-CYF18RNk.js} +3 -3
- package/dist/cdn/chunks/{media-library-iDq3otm6.js.map → media-library-CYF18RNk.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +2 -2
- package/dist/cdn/chunks/pt-BR-C74zfEWH.js.map +1 -0
- package/dist/cdn/chunks/{quality-Bb7vN32U.js → quality-LmsngN2B.js} +2 -2
- package/dist/cdn/chunks/{quality-Bb7vN32U.js.map → quality-LmsngN2B.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-cOvtk8HM.js → renderer-DAeNIQqa.js} +4 -4
- package/dist/cdn/chunks/renderer-DAeNIQqa.js.map +1 -0
- package/dist/cdn/chunks/{src-Ddp969zE.js → src-CModhUDN.js} +4 -4
- package/dist/cdn/chunks/{src-Ddp969zE.js.map → src-CModhUDN.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CW_gRVVR.js → styles-hd_LBGaF.js} +10 -10
- package/dist/cdn/chunks/{styles-CW_gRVVR.js.map → styles-hd_LBGaF.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-zpXk5mN4.js → tiptap-C2indasq.js} +806 -811
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +13 -12
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cdn/chunks/de-q9lTCMre.js → de-ZaffrKDP.js} +1 -3
- package/dist/{dist-BReUTadj.js → dist-8TKf-Jpg.js} +2 -2
- package/dist/{dist-BE9m_i60.js → dist-BDVm2MrW.js} +1 -1
- package/dist/{dist-D1WmF8BF.js → dist-BKKo5wPC.js} +1 -1
- package/dist/{dist-DhY2di4U.js → dist-COSN3oDJ.js} +1 -1
- package/dist/{dist-CHLoeloJ.js → dist-CcX5sLpz.js} +1 -1
- package/dist/{dist-D9g4CSnm.js → dist-CgTKuIUN.js} +300 -298
- package/dist/{dist-i_Z7t67A.js → dist-Cx7IUM7J.js} +22 -15
- package/dist/{dist-Bm07Z3Es.js → dist-D6M5FAY7.js} +1 -1
- package/dist/{dist-DGEaAAIb.js → dist-DXAZUjj3.js} +1 -1
- package/dist/{dist-BXR1aBJV.js → dist-DbekZDmJ.js} +1 -1
- package/dist/{dist-DcKlLQ8d.js → dist-Dk5AdwoQ.js} +1 -1
- package/dist/{dist-BPPeDw62.js → dist-YSCPD13F.js} +1 -1
- package/dist/{en-CR4LItrX.js → en-CHuXeJDt.js} +1 -1
- package/dist/{es-CEt-lrGd.js → es-CaC8VQjO.js} +1 -1
- package/dist/{extensions-Cjd-VAII.js → extensions-DhgbhfBX.js} +5 -5
- package/dist/index.d.ts +44 -0
- package/dist/keys-WVNarXg8.js +10 -0
- package/dist/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DJfTblY7.js → styles-BWC0jc5-.js} +26 -26
- package/dist/templatical-editor.js +11 -10
- package/dist/{useCloudI18n-WbfVWq5k.js → useCloudI18n-CIKI0hCd.js} +1 -1
- package/dist/{useEditorCore-DnOG2a_b.js → useEditorCore-FLMIhtv1.js} +703 -672
- package/dist/{useI18n-eR1yVW0v.js → useI18n-0EU_JVe7.js} +1 -1
- package/dist/{useMergeTag-C3GfSktg.js → useMergeTag-C7v6MVah.js} +2 -2
- package/dist/{usePopoverPosition-B3Byo68F.js → usePopoverPosition-BDqqnMeo.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/CloudEditor-1Ms0w691.js.map +0 -1
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +0 -1
- package/dist/cdn/chunks/de-q9lTCMre.js.map +0 -1
- package/dist/cdn/chunks/en-CR4LItrX.js.map +0 -1
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +0 -1
- package/dist/cdn/chunks/features-BSpDuFFR.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +0 -1
- package/dist/cdn/chunks/renderer-cOvtk8HM.js.map +0 -1
- package/dist/cdn/chunks/tiptap-zpXk5mN4.js.map +0 -1
- package/dist/keys-BbDgCU6K.js +0 -10
|
@@ -66,7 +66,7 @@ _.prototype = {
|
|
|
66
66
|
return new _(t);
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
69
|
-
//#region ../../node_modules/.pnpm/prosemirror-model@1.25.
|
|
69
|
+
//#region ../../node_modules/.pnpm/prosemirror-model@1.25.11/node_modules/prosemirror-model/dist/index.js
|
|
70
70
|
function v(e, t, n) {
|
|
71
71
|
for (let r = 0;; r++) {
|
|
72
72
|
if (r == e.childCount || r == t.childCount) return e.childCount == t.childCount ? null : n;
|
|
@@ -1400,6 +1400,7 @@ var Je = class e {
|
|
|
1400
1400
|
article: !0,
|
|
1401
1401
|
aside: !0,
|
|
1402
1402
|
blockquote: !0,
|
|
1403
|
+
body: !0,
|
|
1403
1404
|
canvas: !0,
|
|
1404
1405
|
dd: !0,
|
|
1405
1406
|
div: !0,
|
|
@@ -3894,7 +3895,7 @@ function Rr(e) {
|
|
|
3894
3895
|
};
|
|
3895
3896
|
}
|
|
3896
3897
|
//#endregion
|
|
3897
|
-
//#region ../../node_modules/.pnpm/prosemirror-view@1.42.
|
|
3898
|
+
//#region ../../node_modules/.pnpm/prosemirror-view@1.42.1/node_modules/prosemirror-view/dist/index.js
|
|
3898
3899
|
var F = function(e) {
|
|
3899
3900
|
for (var t = 0;; t++) if (e = e.previousSibling, !e) return t;
|
|
3900
3901
|
}, zr = function(e) {
|
|
@@ -4017,6 +4018,7 @@ function bi(e) {
|
|
|
4017
4018
|
};
|
|
4018
4019
|
}
|
|
4019
4020
|
function xi(e, t, n) {
|
|
4021
|
+
if (!Ii(t) && t.left == 0) return;
|
|
4020
4022
|
let r = e.someProp("scrollThreshold") || 0, i = e.someProp("scrollMargin") || 5, a = e.dom.ownerDocument;
|
|
4021
4023
|
for (let o = n || e.dom; o;) {
|
|
4022
4024
|
if (o.nodeType != 1) {
|
|
@@ -10817,11 +10819,10 @@ function Yf(e) {
|
|
|
10817
10819
|
}
|
|
10818
10820
|
function Xf(e) {
|
|
10819
10821
|
return {
|
|
10820
|
-
top: 0,
|
|
10821
|
-
right: 0,
|
|
10822
|
-
bottom: 0,
|
|
10823
|
-
left: 0
|
|
10824
|
-
...e
|
|
10822
|
+
top: e.top ?? 0,
|
|
10823
|
+
right: e.right ?? 0,
|
|
10824
|
+
bottom: e.bottom ?? 0,
|
|
10825
|
+
left: e.left ?? 0
|
|
10825
10826
|
};
|
|
10826
10827
|
}
|
|
10827
10828
|
function Zf(e) {
|
|
@@ -10846,7 +10847,7 @@ function Qf(e) {
|
|
|
10846
10847
|
};
|
|
10847
10848
|
}
|
|
10848
10849
|
//#endregion
|
|
10849
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.
|
|
10850
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
10850
10851
|
function $f(e, t, n) {
|
|
10851
10852
|
let { reference: r, floating: i } = e, a = Rf(t), o = zf(t), s = Lf(o), c = Pf(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
10852
10853
|
switch (c) {
|
|
@@ -10879,15 +10880,8 @@ function $f(e, t, n) {
|
|
|
10879
10880
|
y: r.y
|
|
10880
10881
|
};
|
|
10881
10882
|
}
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
p[o] -= f * (n && l ? -1 : 1);
|
|
10885
|
-
break;
|
|
10886
|
-
case "end":
|
|
10887
|
-
p[o] += f * (n && l ? -1 : 1);
|
|
10888
|
-
break;
|
|
10889
|
-
}
|
|
10890
|
-
return p;
|
|
10883
|
+
let m = Ff(t);
|
|
10884
|
+
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
10891
10885
|
}
|
|
10892
10886
|
async function ep(e, t) {
|
|
10893
10887
|
t === void 0 && (t = {});
|
|
@@ -11046,7 +11040,7 @@ var op = function(e) {
|
|
|
11046
11040
|
};
|
|
11047
11041
|
};
|
|
11048
11042
|
//#endregion
|
|
11049
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
11043
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
11050
11044
|
function sp() {
|
|
11051
11045
|
return typeof window < "u";
|
|
11052
11046
|
}
|
|
@@ -11128,7 +11122,7 @@ function Op(e) {
|
|
|
11128
11122
|
}
|
|
11129
11123
|
function kp(e) {
|
|
11130
11124
|
let t = Op(e);
|
|
11131
|
-
return Tp(t) ? e.ownerDocument
|
|
11125
|
+
return Tp(t) ? (e.ownerDocument || e).body : pp(t) && hp(t) ? t : kp(t);
|
|
11132
11126
|
}
|
|
11133
11127
|
function Ap(e, t, n) {
|
|
11134
11128
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
@@ -11142,7 +11136,7 @@ function jp(e) {
|
|
|
11142
11136
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
11143
11137
|
}
|
|
11144
11138
|
//#endregion
|
|
11145
|
-
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
11139
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
11146
11140
|
function Mp(e) {
|
|
11147
11141
|
let t = Ep(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = pp(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = kf(n) !== a || kf(r) !== o;
|
|
11148
11142
|
return s && (n = a, r = o), {
|
|
@@ -11172,16 +11166,16 @@ function Ip(e) {
|
|
|
11172
11166
|
};
|
|
11173
11167
|
}
|
|
11174
11168
|
function Lp(e, t, n) {
|
|
11175
|
-
return t === void 0 && (t = !1),
|
|
11169
|
+
return t === void 0 && (t = !1), !!n && t && n === lp(e);
|
|
11176
11170
|
}
|
|
11177
11171
|
function Rp(e, t, n, r) {
|
|
11178
11172
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
11179
11173
|
let i = e.getBoundingClientRect(), a = Np(e), o = jf(1);
|
|
11180
11174
|
t && (r ? fp(r) && (o = Pp(r)) : o = Pp(e));
|
|
11181
11175
|
let s = Lp(a, n, r) ? Ip(a) : jf(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
11182
|
-
if (a) {
|
|
11183
|
-
let e = lp(a), t =
|
|
11184
|
-
for (; i &&
|
|
11176
|
+
if (a && r) {
|
|
11177
|
+
let e = lp(a), t = fp(r) ? lp(r) : r, n = e, i = jp(n);
|
|
11178
|
+
for (; i && t !== n;) {
|
|
11185
11179
|
let e = Pp(i), t = i.getBoundingClientRect(), r = Ep(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
11186
11180
|
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = lp(i), i = jp(n);
|
|
11187
11181
|
}
|
|
@@ -11211,7 +11205,7 @@ function Vp(e) {
|
|
|
11211
11205
|
scrollLeft: 0,
|
|
11212
11206
|
scrollTop: 0
|
|
11213
11207
|
}, l = jf(1), u = jf(0), d = pp(r);
|
|
11214
|
-
if ((d || !
|
|
11208
|
+
if ((d || !a) && ((cp(r) !== "body" || hp(o)) && (c = Dp(r)), d)) {
|
|
11215
11209
|
let e = Rp(r);
|
|
11216
11210
|
l = Pp(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
11217
11211
|
}
|
|
@@ -11224,39 +11218,38 @@ function Vp(e) {
|
|
|
11224
11218
|
};
|
|
11225
11219
|
}
|
|
11226
11220
|
function Hp(e) {
|
|
11227
|
-
return Array.from(e.getClientRects());
|
|
11221
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
11228
11222
|
}
|
|
11229
11223
|
function Up(e) {
|
|
11230
|
-
let t =
|
|
11231
|
-
return Ep(
|
|
11232
|
-
width:
|
|
11233
|
-
height:
|
|
11234
|
-
x:
|
|
11235
|
-
y:
|
|
11224
|
+
let t = Dp(e), n = e.ownerDocument.body, r = Of(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Of(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + zp(e), o = -t.scrollTop;
|
|
11225
|
+
return Ep(n).direction === "rtl" && (a += Of(e.clientWidth, n.clientWidth) - r), {
|
|
11226
|
+
width: r,
|
|
11227
|
+
height: i,
|
|
11228
|
+
x: a,
|
|
11229
|
+
y: o
|
|
11236
11230
|
};
|
|
11237
11231
|
}
|
|
11238
11232
|
var Wp = 25;
|
|
11239
|
-
function Gp(e, t) {
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
let e = wp();
|
|
11244
|
-
|
|
11245
|
-
}
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
} else l <= Wp && (a += l);
|
|
11233
|
+
function Gp(e, t, n) {
|
|
11234
|
+
n === void 0 && (n = "viewport");
|
|
11235
|
+
let r = n === "layoutViewport", i = lp(e), a = up(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
11236
|
+
if (o) {
|
|
11237
|
+
let e = !wp() || t === "fixed";
|
|
11238
|
+
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
11239
|
+
}
|
|
11240
|
+
if (zp(a) <= 0) {
|
|
11241
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
11242
|
+
o <= Wp && (s -= o);
|
|
11243
|
+
}
|
|
11251
11244
|
return {
|
|
11252
|
-
width:
|
|
11253
|
-
height:
|
|
11254
|
-
x:
|
|
11255
|
-
y:
|
|
11245
|
+
width: s,
|
|
11246
|
+
height: c,
|
|
11247
|
+
x: l,
|
|
11248
|
+
y: u
|
|
11256
11249
|
};
|
|
11257
11250
|
}
|
|
11258
11251
|
function Kp(e, t) {
|
|
11259
|
-
let n = Rp(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a =
|
|
11252
|
+
let n = Rp(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Pp(e);
|
|
11260
11253
|
return {
|
|
11261
11254
|
width: e.clientWidth * a.x,
|
|
11262
11255
|
height: e.clientHeight * a.y,
|
|
@@ -11266,7 +11259,7 @@ function Kp(e, t) {
|
|
|
11266
11259
|
}
|
|
11267
11260
|
function qp(e, t, n) {
|
|
11268
11261
|
let r;
|
|
11269
|
-
if (t === "viewport") r = Gp(e, n);
|
|
11262
|
+
if (t === "viewport" || t === "layoutViewport") r = Gp(e, n, t);
|
|
11270
11263
|
else if (t === "document") r = Up(up(e));
|
|
11271
11264
|
else if (fp(t)) r = Kp(t, n);
|
|
11272
11265
|
else {
|
|
@@ -11281,21 +11274,17 @@ function qp(e, t, n) {
|
|
|
11281
11274
|
return Qf(r);
|
|
11282
11275
|
}
|
|
11283
11276
|
function Jp(e, t) {
|
|
11284
|
-
let n = Op(e);
|
|
11285
|
-
return n === t || !fp(n) || Tp(n) ? !1 : Ep(n).position === "fixed" || Jp(n, t);
|
|
11286
|
-
}
|
|
11287
|
-
function Yp(e, t) {
|
|
11288
11277
|
let n = t.get(e);
|
|
11289
11278
|
if (n) return n;
|
|
11290
11279
|
let r = Ap(e, [], !1).filter((e) => fp(e) && cp(e) !== "body"), i = null, a = Ep(e).position === "fixed", o = a ? Op(e) : e;
|
|
11291
11280
|
for (; fp(o) && !Tp(o);) {
|
|
11292
|
-
let
|
|
11293
|
-
!
|
|
11281
|
+
let e = Ep(o), t = Sp(o), n = i ? i.position : a ? "fixed" : "";
|
|
11282
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = Op(o);
|
|
11294
11283
|
}
|
|
11295
11284
|
return t.set(e, r), r;
|
|
11296
11285
|
}
|
|
11297
|
-
function
|
|
11298
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? _p(t) ? [] :
|
|
11286
|
+
function Yp(e) {
|
|
11287
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? _p(t) ? [] : Jp(t, this._c) : [].concat(n), r], o = qp(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
11299
11288
|
for (let e = 1; e < a.length; e++) {
|
|
11300
11289
|
let n = qp(t, a[e], i);
|
|
11301
11290
|
s = Of(n.top, s), c = Df(n.right, c), l = Df(n.bottom, l), u = Of(n.left, u);
|
|
@@ -11307,62 +11296,59 @@ function Xp(e) {
|
|
|
11307
11296
|
y: s
|
|
11308
11297
|
};
|
|
11309
11298
|
}
|
|
11310
|
-
function
|
|
11299
|
+
function Xp(e) {
|
|
11311
11300
|
let { width: t, height: n } = Mp(e);
|
|
11312
11301
|
return {
|
|
11313
11302
|
width: t,
|
|
11314
11303
|
height: n
|
|
11315
11304
|
};
|
|
11316
11305
|
}
|
|
11317
|
-
function
|
|
11306
|
+
function Zp(e, t, n) {
|
|
11318
11307
|
let r = pp(t), i = up(t), a = n === "fixed", o = Rp(e, !0, a, t), s = {
|
|
11319
11308
|
scrollLeft: 0,
|
|
11320
11309
|
scrollTop: 0
|
|
11321
11310
|
}, c = jf(0);
|
|
11322
|
-
|
|
11323
|
-
c.x = zp(i);
|
|
11324
|
-
}
|
|
11325
|
-
if (r || !r && !a) if ((cp(t) !== "body" || hp(i)) && (s = Dp(t)), r) {
|
|
11311
|
+
if ((r || !a) && ((cp(t) !== "body" || hp(i)) && (s = Dp(t)), r)) {
|
|
11326
11312
|
let e = Rp(t, !0, a, t);
|
|
11327
11313
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
11328
|
-
}
|
|
11329
|
-
|
|
11330
|
-
let
|
|
11314
|
+
}
|
|
11315
|
+
!r && i && (c.x = zp(i));
|
|
11316
|
+
let l = i && !r && !a ? Bp(i, s) : jf(0);
|
|
11331
11317
|
return {
|
|
11332
|
-
x: o.left + s.scrollLeft - c.x -
|
|
11333
|
-
y: o.top + s.scrollTop - c.y -
|
|
11318
|
+
x: o.left + s.scrollLeft - c.x - l.x,
|
|
11319
|
+
y: o.top + s.scrollTop - c.y - l.y,
|
|
11334
11320
|
width: o.width,
|
|
11335
11321
|
height: o.height
|
|
11336
11322
|
};
|
|
11337
11323
|
}
|
|
11338
|
-
function
|
|
11324
|
+
function Qp(e) {
|
|
11339
11325
|
return Ep(e).position === "static";
|
|
11340
11326
|
}
|
|
11341
|
-
function
|
|
11327
|
+
function $p(e, t) {
|
|
11342
11328
|
if (!pp(e) || Ep(e).position === "fixed") return null;
|
|
11343
11329
|
if (t) return t(e);
|
|
11344
11330
|
let n = e.offsetParent;
|
|
11345
11331
|
return up(e) === n && (n = n.ownerDocument.body), n;
|
|
11346
11332
|
}
|
|
11347
|
-
function
|
|
11333
|
+
function em(e, t) {
|
|
11348
11334
|
let n = lp(e);
|
|
11349
11335
|
if (_p(e)) return n;
|
|
11350
11336
|
if (!pp(e)) {
|
|
11351
11337
|
let t = Op(e);
|
|
11352
11338
|
for (; t && !Tp(t);) {
|
|
11353
|
-
if (fp(t) &&
|
|
11339
|
+
if (fp(t) && !Qp(t)) return t;
|
|
11354
11340
|
t = Op(t);
|
|
11355
11341
|
}
|
|
11356
11342
|
return n;
|
|
11357
11343
|
}
|
|
11358
|
-
let r =
|
|
11359
|
-
for (; r && gp(r) &&
|
|
11360
|
-
return r && Tp(r) &&
|
|
11344
|
+
let r = $p(e, t);
|
|
11345
|
+
for (; r && gp(r) && Qp(r);) r = $p(r, t);
|
|
11346
|
+
return r && Tp(r) && Qp(r) && !Sp(r) ? n : r || Cp(e) || n;
|
|
11361
11347
|
}
|
|
11362
|
-
var
|
|
11363
|
-
let t = this.getOffsetParent ||
|
|
11348
|
+
var tm = async function(e) {
|
|
11349
|
+
let t = this.getOffsetParent || em, n = this.getDimensions, r = await n(e.floating);
|
|
11364
11350
|
return {
|
|
11365
|
-
reference:
|
|
11351
|
+
reference: Zp(e.reference, await t(e.floating), e.strategy),
|
|
11366
11352
|
floating: {
|
|
11367
11353
|
x: 0,
|
|
11368
11354
|
y: 0,
|
|
@@ -11371,67 +11357,71 @@ var nm = async function(e) {
|
|
|
11371
11357
|
}
|
|
11372
11358
|
};
|
|
11373
11359
|
};
|
|
11374
|
-
function
|
|
11360
|
+
function nm(e) {
|
|
11375
11361
|
return Ep(e).direction === "rtl";
|
|
11376
11362
|
}
|
|
11377
|
-
var
|
|
11363
|
+
var rm = {
|
|
11378
11364
|
convertOffsetParentRelativeRectToViewportRelativeRect: Vp,
|
|
11379
11365
|
getDocumentElement: up,
|
|
11380
|
-
getClippingRect:
|
|
11381
|
-
getOffsetParent:
|
|
11382
|
-
getElementRects:
|
|
11366
|
+
getClippingRect: Yp,
|
|
11367
|
+
getOffsetParent: em,
|
|
11368
|
+
getElementRects: tm,
|
|
11383
11369
|
getClientRects: Hp,
|
|
11384
|
-
getDimensions:
|
|
11370
|
+
getDimensions: Xp,
|
|
11385
11371
|
getScale: Pp,
|
|
11386
11372
|
isElement: fp,
|
|
11387
|
-
isRTL:
|
|
11373
|
+
isRTL: nm
|
|
11388
11374
|
};
|
|
11389
|
-
function
|
|
11375
|
+
function im(e, t) {
|
|
11390
11376
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
11391
11377
|
}
|
|
11392
|
-
function
|
|
11393
|
-
let
|
|
11394
|
-
function
|
|
11378
|
+
function am(e, t, n) {
|
|
11379
|
+
let r = null, i, a = up(e);
|
|
11380
|
+
function o() {
|
|
11395
11381
|
var e;
|
|
11396
|
-
clearTimeout(
|
|
11382
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
11397
11383
|
}
|
|
11398
|
-
function
|
|
11399
|
-
|
|
11384
|
+
function s(n, c) {
|
|
11385
|
+
n === void 0 && (n = !1), c === void 0 && (c = 1), o();
|
|
11400
11386
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
11401
|
-
if (
|
|
11402
|
-
let m = Af(d), h = Af(
|
|
11387
|
+
if (n || t(), !f || !p) return;
|
|
11388
|
+
let m = Af(d), h = Af(a.clientWidth - (u + f)), g = Af(a.clientHeight - (d + p)), _ = Af(u), v = {
|
|
11403
11389
|
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
11404
11390
|
threshold: Of(0, Df(1, c)) || 1
|
|
11405
11391
|
}, y = !0;
|
|
11406
11392
|
function b(t) {
|
|
11407
11393
|
let n = t[0].intersectionRatio;
|
|
11394
|
+
if (!im(l, e.getBoundingClientRect())) return s();
|
|
11408
11395
|
if (n !== c) {
|
|
11409
|
-
if (!y) return
|
|
11410
|
-
n ?
|
|
11411
|
-
|
|
11396
|
+
if (!y) return s();
|
|
11397
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
11398
|
+
s(!1, 1e-7);
|
|
11412
11399
|
}, 1e3);
|
|
11413
11400
|
}
|
|
11414
|
-
|
|
11401
|
+
y = !1;
|
|
11415
11402
|
}
|
|
11416
11403
|
try {
|
|
11417
|
-
|
|
11404
|
+
r = new IntersectionObserver(b, {
|
|
11418
11405
|
...v,
|
|
11419
|
-
root:
|
|
11406
|
+
root: a.ownerDocument
|
|
11420
11407
|
});
|
|
11421
11408
|
} catch {
|
|
11422
|
-
|
|
11409
|
+
r = new IntersectionObserver(b, v);
|
|
11423
11410
|
}
|
|
11424
|
-
|
|
11411
|
+
r.observe(e);
|
|
11425
11412
|
}
|
|
11426
|
-
|
|
11413
|
+
let c = lp(e), l = () => s(n);
|
|
11414
|
+
return c.addEventListener("resize", l), s(!0), () => {
|
|
11415
|
+
c.removeEventListener("resize", l), o();
|
|
11416
|
+
};
|
|
11427
11417
|
}
|
|
11428
|
-
function
|
|
11418
|
+
function om(e, t, n, r) {
|
|
11429
11419
|
r === void 0 && (r = {});
|
|
11430
11420
|
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Np(e), u = i || a ? [...l ? Ap(l) : [], ...t ? Ap(t) : []] : [];
|
|
11431
11421
|
u.forEach((e) => {
|
|
11432
|
-
i && e.addEventListener("scroll", n
|
|
11422
|
+
i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
|
|
11433
11423
|
});
|
|
11434
|
-
let d = l && s ?
|
|
11424
|
+
let d = l && s ? am(l, n, a) : null, f = -1, p = null;
|
|
11435
11425
|
o && (p = new ResizeObserver((e) => {
|
|
11436
11426
|
let [r] = e;
|
|
11437
11427
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -11443,7 +11433,7 @@ function sm(e, t, n, r) {
|
|
|
11443
11433
|
c && g();
|
|
11444
11434
|
function g() {
|
|
11445
11435
|
let t = Rp(e);
|
|
11446
|
-
h && !
|
|
11436
|
+
h && !im(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
11447
11437
|
}
|
|
11448
11438
|
return n(), () => {
|
|
11449
11439
|
var e;
|
|
@@ -11452,11 +11442,9 @@ function sm(e, t, n, r) {
|
|
|
11452
11442
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
11453
11443
|
};
|
|
11454
11444
|
}
|
|
11455
|
-
var
|
|
11456
|
-
let r = /* @__PURE__ */ new Map(), i = {
|
|
11457
|
-
|
|
11458
|
-
...n
|
|
11459
|
-
}, a = {
|
|
11445
|
+
var sm = op, cm = rp, lm = (e, t, n) => {
|
|
11446
|
+
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
11447
|
+
...rm,
|
|
11460
11448
|
...i.platform,
|
|
11461
11449
|
_c: r
|
|
11462
11450
|
};
|
|
@@ -11466,8 +11454,8 @@ var cm = op, lm = rp, um = (e, t, n) => {
|
|
|
11466
11454
|
});
|
|
11467
11455
|
};
|
|
11468
11456
|
//#endregion
|
|
11469
|
-
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.
|
|
11470
|
-
function
|
|
11457
|
+
//#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.8.0_@tiptap+core@3.28.0_@tiptap+pm@3.28.0__@tiptap+pm@3.28.0/node_modules/@tiptap/suggestion/dist/index.js
|
|
11458
|
+
function um(e) {
|
|
11471
11459
|
let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = pd(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), p = o.nodeBefore?.isText && o.nodeBefore.text;
|
|
11472
11460
|
if (!p) return null;
|
|
11473
11461
|
let m = o.pos - p.length, h = Array.from(p.matchAll(f)).pop();
|
|
@@ -11484,7 +11472,7 @@ function dm(e) {
|
|
|
11484
11472
|
text: h[0]
|
|
11485
11473
|
} : null;
|
|
11486
11474
|
}
|
|
11487
|
-
function
|
|
11475
|
+
function dm(e) {
|
|
11488
11476
|
return e.docChanged ? e.steps.some((e) => {
|
|
11489
11477
|
let t = e.slice;
|
|
11490
11478
|
if (!t?.content) return !1;
|
|
@@ -11492,7 +11480,7 @@ function fm(e) {
|
|
|
11492
11480
|
return /\s/.test(n);
|
|
11493
11481
|
}) : !1;
|
|
11494
11482
|
}
|
|
11495
|
-
function
|
|
11483
|
+
function fm(e) {
|
|
11496
11484
|
return () => {
|
|
11497
11485
|
let { top: t, right: n, bottom: r, left: i } = e.view.coordsAtPos(e.state.selection.$anchor.pos);
|
|
11498
11486
|
try {
|
|
@@ -11502,13 +11490,13 @@ function pm(e) {
|
|
|
11502
11490
|
}
|
|
11503
11491
|
};
|
|
11504
11492
|
}
|
|
11505
|
-
function
|
|
11493
|
+
function pm(e, t, n, r) {
|
|
11506
11494
|
return n ? () => {
|
|
11507
11495
|
let n = r.getState(e.state);
|
|
11508
11496
|
return t.dom.querySelector(`[data-decoration-id="${n?.decorationId}"]`)?.getBoundingClientRect() || null;
|
|
11509
|
-
} :
|
|
11497
|
+
} : fm(e);
|
|
11510
11498
|
}
|
|
11511
|
-
function
|
|
11499
|
+
function mm({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
|
|
11512
11500
|
return a?.({
|
|
11513
11501
|
editor: i,
|
|
11514
11502
|
state: n,
|
|
@@ -11516,13 +11504,13 @@ function hm({ match: e, dismissedRange: t, state: n, transaction: r, editor: i,
|
|
|
11516
11504
|
match: e,
|
|
11517
11505
|
transaction: r,
|
|
11518
11506
|
allowSpaces: o
|
|
11519
|
-
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !
|
|
11507
|
+
}) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !dm(r);
|
|
11520
11508
|
}
|
|
11521
|
-
function
|
|
11509
|
+
function hm({ view: e, pluginKeyRef: t }) {
|
|
11522
11510
|
let n = e.state.tr.setMeta(t, { exit: !0 });
|
|
11523
11511
|
e.dispatch(n);
|
|
11524
11512
|
}
|
|
11525
|
-
function
|
|
11513
|
+
function gm({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
|
|
11526
11514
|
return {
|
|
11527
11515
|
handleKeyDown(t, n) {
|
|
11528
11516
|
var r;
|
|
@@ -11550,7 +11538,7 @@ function _m({ pluginKey: e, decorationTag: t, decorationClass: n, decorationCont
|
|
|
11550
11538
|
}
|
|
11551
11539
|
};
|
|
11552
11540
|
}
|
|
11553
|
-
function
|
|
11541
|
+
function _m({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
|
|
11554
11542
|
return {
|
|
11555
11543
|
init() {
|
|
11556
11544
|
return {
|
|
@@ -11609,7 +11597,7 @@ function vm({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r
|
|
|
11609
11597
|
}
|
|
11610
11598
|
};
|
|
11611
11599
|
}
|
|
11612
|
-
function
|
|
11600
|
+
function vm({ editor: e, items: t }) {
|
|
11613
11601
|
let n = null, r = null, i = null, a = () => {
|
|
11614
11602
|
r !== null && (clearTimeout(r), r = null), i?.(), i = null;
|
|
11615
11603
|
}, o = (e) => new Promise((t) => {
|
|
@@ -11643,18 +11631,18 @@ function ym({ editor: e, items: t }) {
|
|
|
11643
11631
|
}
|
|
11644
11632
|
};
|
|
11645
11633
|
}
|
|
11646
|
-
function
|
|
11647
|
-
let i = [
|
|
11634
|
+
function ym({ placement: e, offset: t, flip: n, floatingUi: r }) {
|
|
11635
|
+
let i = [sm({
|
|
11648
11636
|
mainAxis: t.mainAxis ?? 4,
|
|
11649
11637
|
crossAxis: t.crossAxis ?? 0
|
|
11650
11638
|
})];
|
|
11651
|
-
return n && i.push(
|
|
11639
|
+
return n && i.push(cm()), r?.middleware?.length && i.push(...r.middleware), {
|
|
11652
11640
|
placement: e,
|
|
11653
11641
|
strategy: r?.strategy ?? "absolute",
|
|
11654
11642
|
middleware: i
|
|
11655
11643
|
};
|
|
11656
11644
|
}
|
|
11657
|
-
function
|
|
11645
|
+
function bm(e) {
|
|
11658
11646
|
if (e instanceof HTMLElement) return e;
|
|
11659
11647
|
if (typeof e == "string") try {
|
|
11660
11648
|
let t = document.querySelector(e);
|
|
@@ -11664,15 +11652,15 @@ function xm(e) {
|
|
|
11664
11652
|
}
|
|
11665
11653
|
return document.body;
|
|
11666
11654
|
}
|
|
11667
|
-
function
|
|
11655
|
+
function xm({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
|
|
11668
11656
|
return (o, s = {}) => {
|
|
11669
11657
|
let c = {
|
|
11670
11658
|
getBoundingClientRect: () => e() ?? new DOMRect(),
|
|
11671
11659
|
contextElement: t
|
|
11672
11660
|
}, l = !1, u = !o.isConnected;
|
|
11673
|
-
u &&
|
|
11674
|
-
let d =
|
|
11675
|
-
|
|
11661
|
+
u && bm(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
|
|
11662
|
+
let d = om(c, o, () => {
|
|
11663
|
+
lm(c, o, {
|
|
11676
11664
|
placement: n.placement,
|
|
11677
11665
|
strategy: n.strategy,
|
|
11678
11666
|
middleware: n.middleware
|
|
@@ -11701,11 +11689,11 @@ function Sm({ getReferenceRect: e, contextElement: t, config: n, container: r, d
|
|
|
11701
11689
|
};
|
|
11702
11690
|
};
|
|
11703
11691
|
}
|
|
11704
|
-
function
|
|
11705
|
-
let g, _ =
|
|
11692
|
+
function Sm({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
|
|
11693
|
+
let g, _ = vm({
|
|
11706
11694
|
editor: e,
|
|
11707
11695
|
items: n
|
|
11708
|
-
}), v =
|
|
11696
|
+
}), v = ym({
|
|
11709
11697
|
placement: s,
|
|
11710
11698
|
offset: c,
|
|
11711
11699
|
flip: u,
|
|
@@ -11759,7 +11747,7 @@ function Cm({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
11759
11747
|
container: l,
|
|
11760
11748
|
flip: u,
|
|
11761
11749
|
floatingUi: v,
|
|
11762
|
-
mount:
|
|
11750
|
+
mount: xm({
|
|
11763
11751
|
getReferenceRect: D,
|
|
11764
11752
|
contextElement: n.dom,
|
|
11765
11753
|
config: v,
|
|
@@ -11805,24 +11793,24 @@ function Cm({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
|
|
|
11805
11793
|
}
|
|
11806
11794
|
};
|
|
11807
11795
|
}
|
|
11808
|
-
var
|
|
11809
|
-
function
|
|
11810
|
-
let ee = S?.(), D = r && !i, te = (n, r) =>
|
|
11796
|
+
var Cm = new P("suggestion");
|
|
11797
|
+
function wm({ pluginKey: e = Cm, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: _ = {}, container: v, flip: y = !0, floatingUi: b, dismissOnOutsideClick: x = !0, render: S = () => ({}), allow: C = () => !0, findSuggestionMatch: w = um, shouldShow: T, shouldResetDismissed: E }) {
|
|
11798
|
+
let ee = S?.(), D = r && !i, te = (n, r) => pm(t, n, r, e);
|
|
11811
11799
|
function ne(e) {
|
|
11812
|
-
return
|
|
11800
|
+
return mm({
|
|
11813
11801
|
...e,
|
|
11814
11802
|
editor: t,
|
|
11815
11803
|
shouldResetDismissed: E,
|
|
11816
11804
|
effectiveAllowSpaces: D
|
|
11817
11805
|
});
|
|
11818
11806
|
}
|
|
11819
|
-
let re = (t) =>
|
|
11807
|
+
let re = (t) => hm({
|
|
11820
11808
|
view: t,
|
|
11821
11809
|
pluginKeyRef: e
|
|
11822
11810
|
});
|
|
11823
11811
|
return new N({
|
|
11824
11812
|
key: e,
|
|
11825
|
-
view: () =>
|
|
11813
|
+
view: () => Sm({
|
|
11826
11814
|
editor: t,
|
|
11827
11815
|
pluginKey: e,
|
|
11828
11816
|
items: f,
|
|
@@ -11840,7 +11828,7 @@ function Tm({ pluginKey: e = wm, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
11840
11828
|
clientRectFor: te,
|
|
11841
11829
|
dispatchExit: re
|
|
11842
11830
|
}),
|
|
11843
|
-
state:
|
|
11831
|
+
state: _m({
|
|
11844
11832
|
editor: t,
|
|
11845
11833
|
char: n,
|
|
11846
11834
|
effectiveAllowSpaces: D,
|
|
@@ -11853,7 +11841,7 @@ function Tm({ pluginKey: e = wm, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
11853
11841
|
shouldKeepDismissed: ne,
|
|
11854
11842
|
pluginKey: e
|
|
11855
11843
|
}),
|
|
11856
|
-
props:
|
|
11844
|
+
props: gm({
|
|
11857
11845
|
pluginKey: e,
|
|
11858
11846
|
decorationTag: s,
|
|
11859
11847
|
decorationClass: c,
|
|
@@ -11864,27 +11852,27 @@ function Tm({ pluginKey: e = wm, editor: t, char: n = "@", allowSpaces: r = !1,
|
|
|
11864
11852
|
})
|
|
11865
11853
|
});
|
|
11866
11854
|
}
|
|
11867
|
-
var
|
|
11868
|
-
BackgroundColor: () =>
|
|
11869
|
-
Color: () =>
|
|
11870
|
-
FontFamily: () =>
|
|
11871
|
-
FontSize: () =>
|
|
11872
|
-
LineHeight: () =>
|
|
11873
|
-
TextStyle: () =>
|
|
11874
|
-
TextStyleKit: () =>
|
|
11875
|
-
}),
|
|
11855
|
+
var Tm = wm, Em = /* @__PURE__ */ e({
|
|
11856
|
+
BackgroundColor: () => jm,
|
|
11857
|
+
Color: () => Mm,
|
|
11858
|
+
FontFamily: () => Nm,
|
|
11859
|
+
FontSize: () => Pm,
|
|
11860
|
+
LineHeight: () => Fm,
|
|
11861
|
+
TextStyle: () => Am,
|
|
11862
|
+
TextStyleKit: () => Im
|
|
11863
|
+
}), Dm = 20, Om = (e, t = 0) => {
|
|
11876
11864
|
let n = [];
|
|
11877
|
-
return !e.children.length || t >
|
|
11878
|
-
e.tagName === "SPAN" ? n.push(e) : e.children.length && n.push(...
|
|
11865
|
+
return !e.children.length || t > Dm || Array.from(e.children).forEach((e) => {
|
|
11866
|
+
e.tagName === "SPAN" ? n.push(e) : e.children.length && n.push(...Om(e, t + 1));
|
|
11879
11867
|
}), n;
|
|
11880
|
-
},
|
|
11868
|
+
}, km = (e) => {
|
|
11881
11869
|
if (!e.children.length) return;
|
|
11882
|
-
let t =
|
|
11870
|
+
let t = Om(e);
|
|
11883
11871
|
t && t.forEach((e) => {
|
|
11884
11872
|
let t = e.getAttribute("style"), n = (e.parentElement?.closest("span"))?.getAttribute("style");
|
|
11885
11873
|
e.setAttribute("style", `${n};${t}`);
|
|
11886
11874
|
});
|
|
11887
|
-
},
|
|
11875
|
+
}, Am = Hd.create({
|
|
11888
11876
|
name: "textStyle",
|
|
11889
11877
|
priority: 101,
|
|
11890
11878
|
addOptions() {
|
|
@@ -11897,7 +11885,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
11897
11885
|
return [{
|
|
11898
11886
|
tag: "span",
|
|
11899
11887
|
consuming: !1,
|
|
11900
|
-
getAttrs: (e) => e.hasAttribute("style") ? (this.options.mergeNestedSpanStyles &&
|
|
11888
|
+
getAttrs: (e) => e.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && km(e), {}) : !1
|
|
11901
11889
|
}];
|
|
11902
11890
|
},
|
|
11903
11891
|
renderHTML({ HTMLAttributes: e }) {
|
|
@@ -11919,7 +11907,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
11919
11907
|
}
|
|
11920
11908
|
};
|
|
11921
11909
|
}
|
|
11922
|
-
}),
|
|
11910
|
+
}), jm = q.create({
|
|
11923
11911
|
name: "backgroundColor",
|
|
11924
11912
|
addOptions() {
|
|
11925
11913
|
return { types: ["textStyle"] };
|
|
@@ -11940,7 +11928,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
11940
11928
|
unsetBackgroundColor: () => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
|
|
11941
11929
|
};
|
|
11942
11930
|
}
|
|
11943
|
-
}),
|
|
11931
|
+
}), Mm = q.create({
|
|
11944
11932
|
name: "color",
|
|
11945
11933
|
addOptions() {
|
|
11946
11934
|
return { types: ["textStyle"] };
|
|
@@ -11961,7 +11949,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
11961
11949
|
unsetColor: () => ({ chain: e }) => e().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
|
|
11962
11950
|
};
|
|
11963
11951
|
}
|
|
11964
|
-
}),
|
|
11952
|
+
}), Nm = q.create({
|
|
11965
11953
|
name: "fontFamily",
|
|
11966
11954
|
addOptions() {
|
|
11967
11955
|
return { types: ["textStyle"] };
|
|
@@ -11982,7 +11970,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
11982
11970
|
unsetFontFamily: () => ({ chain: e }) => e().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
|
|
11983
11971
|
};
|
|
11984
11972
|
}
|
|
11985
|
-
}),
|
|
11973
|
+
}), Pm = q.create({
|
|
11986
11974
|
name: "fontSize",
|
|
11987
11975
|
addOptions() {
|
|
11988
11976
|
return { types: ["textStyle"] };
|
|
@@ -12003,7 +11991,7 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
12003
11991
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
12004
11992
|
};
|
|
12005
11993
|
}
|
|
12006
|
-
}),
|
|
11994
|
+
}), Fm = q.create({
|
|
12007
11995
|
name: "lineHeight",
|
|
12008
11996
|
addOptions() {
|
|
12009
11997
|
return { types: ["textStyle"] };
|
|
@@ -12024,24 +12012,24 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
12024
12012
|
unsetLineHeight: () => ({ chain: e }) => e().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
|
|
12025
12013
|
};
|
|
12026
12014
|
}
|
|
12027
|
-
}),
|
|
12015
|
+
}), Im = q.create({
|
|
12028
12016
|
name: "textStyleKit",
|
|
12029
12017
|
addExtensions() {
|
|
12030
12018
|
let e = [];
|
|
12031
|
-
return this.options.backgroundColor !== !1 && e.push(
|
|
12032
|
-
}
|
|
12033
|
-
}),
|
|
12034
|
-
Color: () =>
|
|
12035
|
-
default: () =>
|
|
12036
|
-
}),
|
|
12037
|
-
FontFamily: () =>
|
|
12038
|
-
default: () =>
|
|
12039
|
-
}),
|
|
12040
|
-
Highlight: () =>
|
|
12041
|
-
default: () =>
|
|
12042
|
-
inputRegex: () =>
|
|
12043
|
-
pasteRegex: () =>
|
|
12044
|
-
}),
|
|
12019
|
+
return this.options.backgroundColor !== !1 && e.push(jm.configure(this.options.backgroundColor)), this.options.color !== !1 && e.push(Mm.configure(this.options.color)), this.options.fontFamily !== !1 && e.push(Nm.configure(this.options.fontFamily)), this.options.fontSize !== !1 && e.push(Pm.configure(this.options.fontSize)), this.options.lineHeight !== !1 && e.push(Fm.configure(this.options.lineHeight)), this.options.textStyle !== !1 && e.push(Am.configure(this.options.textStyle)), e;
|
|
12020
|
+
}
|
|
12021
|
+
}), Lm = /* @__PURE__ */ e({
|
|
12022
|
+
Color: () => Mm,
|
|
12023
|
+
default: () => Rm
|
|
12024
|
+
}), Rm = Mm, zm = /* @__PURE__ */ e({
|
|
12025
|
+
FontFamily: () => Nm,
|
|
12026
|
+
default: () => Bm
|
|
12027
|
+
}), Bm = Nm, Vm = /* @__PURE__ */ e({
|
|
12028
|
+
Highlight: () => Wm,
|
|
12029
|
+
default: () => Gm,
|
|
12030
|
+
inputRegex: () => Hm,
|
|
12031
|
+
pasteRegex: () => Um
|
|
12032
|
+
}), Hm = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Um = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Wm = Hd.create({
|
|
12045
12033
|
name: "highlight",
|
|
12046
12034
|
addOptions() {
|
|
12047
12035
|
return {
|
|
@@ -12100,36 +12088,36 @@ var Em = Tm, Dm = /* @__PURE__ */ e({
|
|
|
12100
12088
|
},
|
|
12101
12089
|
addInputRules() {
|
|
12102
12090
|
return [ff({
|
|
12103
|
-
find:
|
|
12091
|
+
find: Hm,
|
|
12104
12092
|
type: this.type
|
|
12105
12093
|
})];
|
|
12106
12094
|
},
|
|
12107
12095
|
addPasteRules() {
|
|
12108
12096
|
return [Cf({
|
|
12109
|
-
find:
|
|
12097
|
+
find: Um,
|
|
12110
12098
|
type: this.type
|
|
12111
12099
|
})];
|
|
12112
12100
|
}
|
|
12113
|
-
}),
|
|
12114
|
-
function
|
|
12101
|
+
}), Gm = Wm, Km = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", qm = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Jm = "numeric", Ym = "ascii", Xm = "alpha", Zm = "asciinumeric", Qm = "alphanumeric", $m = "domain", eh = "emoji", th = "scheme", nh = "slashscheme", rh = "whitespace";
|
|
12102
|
+
function ih(e, t) {
|
|
12115
12103
|
return e in t || (t[e] = []), t[e];
|
|
12116
12104
|
}
|
|
12117
|
-
function
|
|
12118
|
-
t[
|
|
12105
|
+
function ah(e, t, n) {
|
|
12106
|
+
t[Jm] && (t[Zm] = !0, t[Qm] = !0), t[Ym] && (t[Zm] = !0, t[Xm] = !0), t[Zm] && (t[Qm] = !0), t[Xm] && (t[Qm] = !0), t[Qm] && (t[$m] = !0), t[eh] && (t[$m] = !0);
|
|
12119
12107
|
for (let r in t) {
|
|
12120
|
-
let t =
|
|
12108
|
+
let t = ih(r, n);
|
|
12121
12109
|
t.indexOf(e) < 0 && t.push(e);
|
|
12122
12110
|
}
|
|
12123
12111
|
}
|
|
12124
|
-
function
|
|
12112
|
+
function oh(e, t) {
|
|
12125
12113
|
let n = {};
|
|
12126
12114
|
for (let r in t) t[r].indexOf(e) >= 0 && (n[r] = !0);
|
|
12127
12115
|
return n;
|
|
12128
12116
|
}
|
|
12129
|
-
function
|
|
12117
|
+
function sh(e = null) {
|
|
12130
12118
|
this.j = {}, this.jr = [], this.jd = null, this.t = e;
|
|
12131
12119
|
}
|
|
12132
|
-
|
|
12120
|
+
sh.groups = {}, sh.prototype = {
|
|
12133
12121
|
accepts() {
|
|
12134
12122
|
return !!this.t;
|
|
12135
12123
|
},
|
|
@@ -12149,9 +12137,9 @@ ch.groups = {}, ch.prototype = {
|
|
|
12149
12137
|
for (let i = 0; i < e.length; i++) this.tt(e[i], t, n, r);
|
|
12150
12138
|
},
|
|
12151
12139
|
tr(e, t, n, r) {
|
|
12152
|
-
r ||=
|
|
12140
|
+
r ||= sh.groups;
|
|
12153
12141
|
let i;
|
|
12154
|
-
return t && t.j ? i = t : (i = new
|
|
12142
|
+
return t && t.j ? i = t : (i = new sh(t), n && r && ah(t, n, r)), this.jr.push([e, i]), i;
|
|
12155
12143
|
},
|
|
12156
12144
|
ts(e, t, n, r) {
|
|
12157
12145
|
let i = this, a = e.length;
|
|
@@ -12160,119 +12148,119 @@ ch.groups = {}, ch.prototype = {
|
|
|
12160
12148
|
return i.tt(e[a - 1], t, n, r);
|
|
12161
12149
|
},
|
|
12162
12150
|
tt(e, t, n, r) {
|
|
12163
|
-
r ||=
|
|
12151
|
+
r ||= sh.groups;
|
|
12164
12152
|
let i = this;
|
|
12165
12153
|
if (t && t.j) return i.j[e] = t, t;
|
|
12166
12154
|
let a = t, o, s = i.go(e);
|
|
12167
|
-
return s ? (o = new
|
|
12155
|
+
return s ? (o = new sh(), Object.assign(o.j, s.j), o.jr.push.apply(o.jr, s.jr), o.jd = s.jd, o.t = s.t) : o = new sh(), a && (r && (o.t && typeof o.t == "string" ? ah(a, Object.assign(oh(o.t, r), n), r) : n && ah(a, n, r)), o.t = a), i.j[e] = o, o;
|
|
12168
12156
|
}
|
|
12169
12157
|
};
|
|
12170
|
-
var Y = (e, t, n, r, i) => e.ta(t, n, r, i), X = (e, t, n, r, i) => e.tr(t, n, r, i),
|
|
12158
|
+
var Y = (e, t, n, r, i) => e.ta(t, n, r, i), X = (e, t, n, r, i) => e.tr(t, n, r, i), ch = (e, t, n, r, i) => e.ts(t, n, r, i), Z = (e, t, n, r, i) => e.tt(t, n, r, i), lh = "WORD", uh = "UWORD", dh = "ASCIINUMERICAL", fh = "ALPHANUMERICAL", ph = "LOCALHOST", mh = "TLD", hh = "UTLD", gh = "SCHEME", _h = "SLASH_SCHEME", vh = "NUM", yh = "WS", bh = "NL", xh = "OPENBRACE", Sh = "CLOSEBRACE", Ch = "OPENBRACKET", wh = "CLOSEBRACKET", Th = "OPENPAREN", Eh = "CLOSEPAREN", Dh = "OPENANGLEBRACKET", Oh = "CLOSEANGLEBRACKET", kh = "FULLWIDTHLEFTPAREN", Ah = "FULLWIDTHRIGHTPAREN", jh = "LEFTCORNERBRACKET", Mh = "RIGHTCORNERBRACKET", Nh = "LEFTWHITECORNERBRACKET", Ph = "RIGHTWHITECORNERBRACKET", Fh = "FULLWIDTHLESSTHAN", Ih = "FULLWIDTHGREATERTHAN", Lh = "AMPERSAND", Rh = "APOSTROPHE", zh = "ASTERISK", Bh = "AT", Vh = "BACKSLASH", Hh = "BACKTICK", Uh = "CARET", Wh = "COLON", Gh = "COMMA", Kh = "DOLLAR", qh = "DOT", Jh = "EQUALS", Yh = "EXCLAMATION", Xh = "HYPHEN", Zh = "PERCENT", Qh = "PIPE", $h = "PLUS", eg = "POUND", tg = "QUERY", ng = "QUOTE", rg = "FULLWIDTHMIDDLEDOT", ig = "SEMI", ag = "SLASH", og = "TILDE", sg = "UNDERSCORE", cg = "EMOJI", lg = "SYM", ug = /*#__PURE__*/ Object.freeze({
|
|
12171
12159
|
__proto__: null,
|
|
12172
|
-
ALPHANUMERICAL:
|
|
12173
|
-
AMPERSAND:
|
|
12174
|
-
APOSTROPHE:
|
|
12175
|
-
ASCIINUMERICAL:
|
|
12176
|
-
ASTERISK:
|
|
12177
|
-
AT:
|
|
12178
|
-
BACKSLASH:
|
|
12179
|
-
BACKTICK:
|
|
12180
|
-
CARET:
|
|
12181
|
-
CLOSEANGLEBRACKET:
|
|
12182
|
-
CLOSEBRACE:
|
|
12183
|
-
CLOSEBRACKET:
|
|
12184
|
-
CLOSEPAREN:
|
|
12185
|
-
COLON:
|
|
12186
|
-
COMMA:
|
|
12187
|
-
DOLLAR:
|
|
12188
|
-
DOT:
|
|
12189
|
-
EMOJI:
|
|
12190
|
-
EQUALS:
|
|
12191
|
-
EXCLAMATION:
|
|
12192
|
-
FULLWIDTHGREATERTHAN:
|
|
12193
|
-
FULLWIDTHLEFTPAREN:
|
|
12194
|
-
FULLWIDTHLESSTHAN:
|
|
12195
|
-
FULLWIDTHMIDDLEDOT:
|
|
12196
|
-
FULLWIDTHRIGHTPAREN:
|
|
12197
|
-
HYPHEN:
|
|
12198
|
-
LEFTCORNERBRACKET:
|
|
12199
|
-
LEFTWHITECORNERBRACKET:
|
|
12200
|
-
LOCALHOST:
|
|
12201
|
-
NL:
|
|
12202
|
-
NUM:
|
|
12203
|
-
OPENANGLEBRACKET:
|
|
12204
|
-
OPENBRACE:
|
|
12205
|
-
OPENBRACKET:
|
|
12206
|
-
OPENPAREN:
|
|
12207
|
-
PERCENT:
|
|
12208
|
-
PIPE:
|
|
12209
|
-
PLUS:
|
|
12210
|
-
POUND:
|
|
12211
|
-
QUERY:
|
|
12212
|
-
QUOTE:
|
|
12213
|
-
RIGHTCORNERBRACKET:
|
|
12214
|
-
RIGHTWHITECORNERBRACKET:
|
|
12215
|
-
SCHEME:
|
|
12216
|
-
SEMI:
|
|
12217
|
-
SLASH:
|
|
12218
|
-
SLASH_SCHEME:
|
|
12219
|
-
SYM:
|
|
12220
|
-
TILDE:
|
|
12221
|
-
TLD:
|
|
12222
|
-
UNDERSCORE:
|
|
12223
|
-
UTLD:
|
|
12224
|
-
UWORD:
|
|
12225
|
-
WORD:
|
|
12226
|
-
WS:
|
|
12227
|
-
}),
|
|
12228
|
-
function
|
|
12160
|
+
ALPHANUMERICAL: fh,
|
|
12161
|
+
AMPERSAND: Lh,
|
|
12162
|
+
APOSTROPHE: Rh,
|
|
12163
|
+
ASCIINUMERICAL: dh,
|
|
12164
|
+
ASTERISK: zh,
|
|
12165
|
+
AT: Bh,
|
|
12166
|
+
BACKSLASH: Vh,
|
|
12167
|
+
BACKTICK: Hh,
|
|
12168
|
+
CARET: Uh,
|
|
12169
|
+
CLOSEANGLEBRACKET: Oh,
|
|
12170
|
+
CLOSEBRACE: Sh,
|
|
12171
|
+
CLOSEBRACKET: wh,
|
|
12172
|
+
CLOSEPAREN: Eh,
|
|
12173
|
+
COLON: Wh,
|
|
12174
|
+
COMMA: Gh,
|
|
12175
|
+
DOLLAR: Kh,
|
|
12176
|
+
DOT: qh,
|
|
12177
|
+
EMOJI: cg,
|
|
12178
|
+
EQUALS: Jh,
|
|
12179
|
+
EXCLAMATION: Yh,
|
|
12180
|
+
FULLWIDTHGREATERTHAN: Ih,
|
|
12181
|
+
FULLWIDTHLEFTPAREN: kh,
|
|
12182
|
+
FULLWIDTHLESSTHAN: Fh,
|
|
12183
|
+
FULLWIDTHMIDDLEDOT: rg,
|
|
12184
|
+
FULLWIDTHRIGHTPAREN: Ah,
|
|
12185
|
+
HYPHEN: Xh,
|
|
12186
|
+
LEFTCORNERBRACKET: jh,
|
|
12187
|
+
LEFTWHITECORNERBRACKET: Nh,
|
|
12188
|
+
LOCALHOST: ph,
|
|
12189
|
+
NL: bh,
|
|
12190
|
+
NUM: vh,
|
|
12191
|
+
OPENANGLEBRACKET: Dh,
|
|
12192
|
+
OPENBRACE: xh,
|
|
12193
|
+
OPENBRACKET: Ch,
|
|
12194
|
+
OPENPAREN: Th,
|
|
12195
|
+
PERCENT: Zh,
|
|
12196
|
+
PIPE: Qh,
|
|
12197
|
+
PLUS: $h,
|
|
12198
|
+
POUND: eg,
|
|
12199
|
+
QUERY: tg,
|
|
12200
|
+
QUOTE: ng,
|
|
12201
|
+
RIGHTCORNERBRACKET: Mh,
|
|
12202
|
+
RIGHTWHITECORNERBRACKET: Ph,
|
|
12203
|
+
SCHEME: gh,
|
|
12204
|
+
SEMI: ig,
|
|
12205
|
+
SLASH: ag,
|
|
12206
|
+
SLASH_SCHEME: _h,
|
|
12207
|
+
SYM: lg,
|
|
12208
|
+
TILDE: og,
|
|
12209
|
+
TLD: mh,
|
|
12210
|
+
UNDERSCORE: sg,
|
|
12211
|
+
UTLD: hh,
|
|
12212
|
+
UWORD: uh,
|
|
12213
|
+
WORD: lh,
|
|
12214
|
+
WS: yh
|
|
12215
|
+
}), dg = /[a-z]/, fg = /\p{L}/u, pg = /\p{Emoji}/u, mg = /\d/, hg = /\s/, gg = "\r", _g = "\n", vg = "️", yg = "", bg = "", xg = null, Sg = null;
|
|
12216
|
+
function Cg(e = []) {
|
|
12229
12217
|
let t = {};
|
|
12230
|
-
|
|
12231
|
-
let n = new
|
|
12232
|
-
|
|
12233
|
-
let r = X(n,
|
|
12234
|
-
X(r,
|
|
12235
|
-
let i = X(r,
|
|
12236
|
-
X(o,
|
|
12237
|
-
let s = X(n,
|
|
12238
|
-
X(s,
|
|
12239
|
-
let c = Z(n,
|
|
12240
|
-
Z(n,
|
|
12241
|
-
let d = X(n,
|
|
12242
|
-
Z(d, "#"), X(d,
|
|
12243
|
-
let f = Z(d,
|
|
12244
|
-
Z(f, "#"), X(f,
|
|
12245
|
-
let p = [[
|
|
12246
|
-
[
|
|
12247
|
-
[
|
|
12248
|
-
[
|
|
12218
|
+
sh.groups = t;
|
|
12219
|
+
let n = new sh();
|
|
12220
|
+
xg ??= Dg(Km), Sg ??= Dg(qm), Z(n, "'", Rh), Z(n, "{", xh), Z(n, "}", Sh), Z(n, "[", Ch), Z(n, "]", wh), Z(n, "(", Th), Z(n, ")", Eh), Z(n, "<", Dh), Z(n, ">", Oh), Z(n, "(", kh), Z(n, ")", Ah), Z(n, "「", jh), Z(n, "」", Mh), Z(n, "『", Nh), Z(n, "』", Ph), Z(n, "<", Fh), Z(n, ">", Ih), Z(n, "&", Lh), Z(n, "*", zh), Z(n, "@", Bh), Z(n, "`", Hh), Z(n, "^", Uh), Z(n, ":", Wh), Z(n, ",", Gh), Z(n, "$", Kh), Z(n, ".", qh), Z(n, "=", Jh), Z(n, "!", Yh), Z(n, "-", Xh), Z(n, "%", Zh), Z(n, "|", Qh), Z(n, "+", $h), Z(n, "#", eg), Z(n, "?", tg), Z(n, "\"", ng), Z(n, "/", ag), Z(n, ";", ig), Z(n, "~", og), Z(n, "_", sg), Z(n, "\\", Vh), Z(n, "・", rg);
|
|
12221
|
+
let r = X(n, mg, vh, { [Jm]: !0 });
|
|
12222
|
+
X(r, mg, r);
|
|
12223
|
+
let i = X(r, dg, dh, { [Zm]: !0 }), a = X(r, fg, fh, { [Qm]: !0 }), o = X(n, dg, lh, { [Ym]: !0 });
|
|
12224
|
+
X(o, mg, i), X(o, dg, o), X(i, mg, i), X(i, dg, i);
|
|
12225
|
+
let s = X(n, fg, uh, { [Xm]: !0 });
|
|
12226
|
+
X(s, dg), X(s, mg, a), X(s, fg, s), X(a, mg, a), X(a, dg), X(a, fg, a);
|
|
12227
|
+
let c = Z(n, _g, bh, { [rh]: !0 }), l = Z(n, gg, yh, { [rh]: !0 }), u = X(n, hg, yh, { [rh]: !0 });
|
|
12228
|
+
Z(n, bg, u), Z(l, _g, c), Z(l, bg, u), X(l, hg, u), Z(u, gg), Z(u, _g), X(u, hg, u), Z(u, bg, u);
|
|
12229
|
+
let d = X(n, pg, cg, { [eh]: !0 });
|
|
12230
|
+
Z(d, "#"), X(d, pg, d), Z(d, vg, d);
|
|
12231
|
+
let f = Z(d, yg);
|
|
12232
|
+
Z(f, "#"), X(f, pg, d);
|
|
12233
|
+
let p = [[dg, o], [mg, i]], m = [
|
|
12234
|
+
[dg, null],
|
|
12235
|
+
[fg, s],
|
|
12236
|
+
[mg, a]
|
|
12249
12237
|
];
|
|
12250
|
-
for (let e = 0; e <
|
|
12251
|
-
for (let e = 0; e <
|
|
12252
|
-
|
|
12238
|
+
for (let e = 0; e < xg.length; e++) Eg(n, xg[e], mh, lh, p);
|
|
12239
|
+
for (let e = 0; e < Sg.length; e++) Eg(n, Sg[e], hh, uh, m);
|
|
12240
|
+
ah(mh, {
|
|
12253
12241
|
tld: !0,
|
|
12254
12242
|
ascii: !0
|
|
12255
|
-
}, t),
|
|
12243
|
+
}, t), ah(hh, {
|
|
12256
12244
|
utld: !0,
|
|
12257
12245
|
alpha: !0
|
|
12258
|
-
}, t),
|
|
12246
|
+
}, t), Eg(n, "file", gh, lh, p), Eg(n, "mailto", gh, lh, p), Eg(n, "http", _h, lh, p), Eg(n, "https", _h, lh, p), Eg(n, "ftp", _h, lh, p), Eg(n, "ftps", _h, lh, p), ah(gh, {
|
|
12259
12247
|
scheme: !0,
|
|
12260
12248
|
ascii: !0
|
|
12261
|
-
}, t),
|
|
12249
|
+
}, t), ah(_h, {
|
|
12262
12250
|
slashscheme: !0,
|
|
12263
12251
|
ascii: !0
|
|
12264
12252
|
}, t), e = e.sort((e, t) => e[0] > t[0] ? 1 : -1);
|
|
12265
12253
|
for (let t = 0; t < e.length; t++) {
|
|
12266
|
-
let r = e[t][0], i = e[t][1] ? { [
|
|
12267
|
-
r.indexOf("-") >= 0 ? i[
|
|
12254
|
+
let r = e[t][0], i = e[t][1] ? { [th]: !0 } : { [nh]: !0 };
|
|
12255
|
+
r.indexOf("-") >= 0 ? i[$m] = !0 : dg.test(r) ? mg.test(r) ? i[Zm] = !0 : i[Ym] = !0 : i[Jm] = !0, ch(n, r, r, i);
|
|
12268
12256
|
}
|
|
12269
|
-
return
|
|
12257
|
+
return ch(n, "localhost", ph, { ascii: !0 }), n.jd = new sh(lg), {
|
|
12270
12258
|
start: n,
|
|
12271
|
-
tokens: Object.assign({ groups: t },
|
|
12259
|
+
tokens: Object.assign({ groups: t }, ug)
|
|
12272
12260
|
};
|
|
12273
12261
|
}
|
|
12274
|
-
function
|
|
12275
|
-
let n =
|
|
12262
|
+
function wg(e, t) {
|
|
12263
|
+
let n = Tg(t.replace(/[A-Z]/g, (e) => e.toLowerCase())), r = n.length, i = [], a = 0, o = 0;
|
|
12276
12264
|
for (; o < r;) {
|
|
12277
12265
|
let s = e, c = null, l = 0, u = null, d = -1, f = -1;
|
|
12278
12266
|
for (; o < r && (c = s.go(n[o]));) s = c, s.accepts() ? (d = 0, f = 0, u = s) : d >= 0 && (d += n[o].length, f++), l += n[o].length, a += n[o].length, o++;
|
|
@@ -12285,7 +12273,7 @@ function Tg(e, t) {
|
|
|
12285
12273
|
}
|
|
12286
12274
|
return i;
|
|
12287
12275
|
}
|
|
12288
|
-
function
|
|
12276
|
+
function Tg(e) {
|
|
12289
12277
|
let t = [], n = e.length, r = 0;
|
|
12290
12278
|
for (; r < n;) {
|
|
12291
12279
|
let i = e.charCodeAt(r), a, o = i < 55296 || i > 56319 || r + 1 === n || (a = e.charCodeAt(r + 1)) < 56320 || a > 57343 ? e[r] : e.slice(r, r + 2);
|
|
@@ -12293,15 +12281,15 @@ function Eg(e) {
|
|
|
12293
12281
|
}
|
|
12294
12282
|
return t;
|
|
12295
12283
|
}
|
|
12296
|
-
function
|
|
12284
|
+
function Eg(e, t, n, r, i) {
|
|
12297
12285
|
let a, o = t.length;
|
|
12298
12286
|
for (let n = 0; n < o - 1; n++) {
|
|
12299
12287
|
let o = t[n];
|
|
12300
|
-
e.j[o] ? a = e.j[o] : (a = new
|
|
12288
|
+
e.j[o] ? a = e.j[o] : (a = new sh(r), a.jr = i.slice(), e.j[o] = a), e = a;
|
|
12301
12289
|
}
|
|
12302
|
-
return a = new
|
|
12290
|
+
return a = new sh(n), a.jr = i.slice(), e.j[t[o - 1]] = a, a;
|
|
12303
12291
|
}
|
|
12304
|
-
function
|
|
12292
|
+
function Dg(e) {
|
|
12305
12293
|
let t = [], n = [], r = 0;
|
|
12306
12294
|
for (; r < e.length;) {
|
|
12307
12295
|
let i = 0;
|
|
@@ -12314,11 +12302,11 @@ function Og(e) {
|
|
|
12314
12302
|
}
|
|
12315
12303
|
return t;
|
|
12316
12304
|
}
|
|
12317
|
-
var
|
|
12305
|
+
var Og = {
|
|
12318
12306
|
defaultProtocol: "http",
|
|
12319
12307
|
events: null,
|
|
12320
|
-
format:
|
|
12321
|
-
formatHref:
|
|
12308
|
+
format: Ag,
|
|
12309
|
+
formatHref: Ag,
|
|
12322
12310
|
nl2br: !1,
|
|
12323
12311
|
tagName: "a",
|
|
12324
12312
|
target: null,
|
|
@@ -12330,15 +12318,15 @@ var kg = {
|
|
|
12330
12318
|
ignoreTags: [],
|
|
12331
12319
|
render: null
|
|
12332
12320
|
};
|
|
12333
|
-
function
|
|
12334
|
-
let n = Object.assign({},
|
|
12335
|
-
e && (n = Object.assign(n, e instanceof
|
|
12321
|
+
function kg(e, t = null) {
|
|
12322
|
+
let n = Object.assign({}, Og);
|
|
12323
|
+
e && (n = Object.assign(n, e instanceof kg ? e.o : e));
|
|
12336
12324
|
let r = n.ignoreTags, i = [];
|
|
12337
12325
|
for (let e = 0; e < r.length; e++) i.push(r[e].toUpperCase());
|
|
12338
12326
|
this.o = n, t && (this.defaultRender = t), this.ignoreTags = i;
|
|
12339
12327
|
}
|
|
12340
|
-
|
|
12341
|
-
o:
|
|
12328
|
+
kg.prototype = {
|
|
12329
|
+
o: Og,
|
|
12342
12330
|
ignoreTags: [],
|
|
12343
12331
|
defaultRender(e) {
|
|
12344
12332
|
return e;
|
|
@@ -12348,7 +12336,7 @@ Ag.prototype = {
|
|
|
12348
12336
|
},
|
|
12349
12337
|
get(e, t, n) {
|
|
12350
12338
|
let r = t != null, i = this.o[e];
|
|
12351
|
-
return i && (typeof i == "object" ? (i = n.t in i ? i[n.t] :
|
|
12339
|
+
return i && (typeof i == "object" ? (i = n.t in i ? i[n.t] : Og[e], typeof i == "function" && r && (i = i(t, n))) : typeof i == "function" && r && (i = i(t, n.t, n)), i);
|
|
12352
12340
|
},
|
|
12353
12341
|
getObj(e, t, n) {
|
|
12354
12342
|
let r = this.o[e];
|
|
@@ -12359,13 +12347,13 @@ Ag.prototype = {
|
|
|
12359
12347
|
return (this.get("render", null, e) || this.defaultRender)(t, e.t, e);
|
|
12360
12348
|
}
|
|
12361
12349
|
};
|
|
12362
|
-
function
|
|
12350
|
+
function Ag(e) {
|
|
12363
12351
|
return e;
|
|
12364
12352
|
}
|
|
12365
|
-
function
|
|
12353
|
+
function jg(e, t) {
|
|
12366
12354
|
this.t = "token", this.v = e, this.tk = t;
|
|
12367
12355
|
}
|
|
12368
|
-
|
|
12356
|
+
jg.prototype = {
|
|
12369
12357
|
isLink: !1,
|
|
12370
12358
|
toString() {
|
|
12371
12359
|
return this.v;
|
|
@@ -12386,7 +12374,7 @@ Mg.prototype = {
|
|
|
12386
12374
|
endIndex() {
|
|
12387
12375
|
return this.tk[this.tk.length - 1].e;
|
|
12388
12376
|
},
|
|
12389
|
-
toObject(e =
|
|
12377
|
+
toObject(e = Og.defaultProtocol) {
|
|
12390
12378
|
return {
|
|
12391
12379
|
type: this.t,
|
|
12392
12380
|
value: this.toString(),
|
|
@@ -12419,8 +12407,8 @@ Mg.prototype = {
|
|
|
12419
12407
|
};
|
|
12420
12408
|
}
|
|
12421
12409
|
};
|
|
12422
|
-
function
|
|
12423
|
-
class n extends
|
|
12410
|
+
function Mg(e, t) {
|
|
12411
|
+
class n extends jg {
|
|
12424
12412
|
constructor(t, n) {
|
|
12425
12413
|
super(t, n), this.t = e;
|
|
12426
12414
|
}
|
|
@@ -12428,138 +12416,138 @@ function Ng(e, t) {
|
|
|
12428
12416
|
for (let e in t) n.prototype[e] = t[e];
|
|
12429
12417
|
return n.t = e, n;
|
|
12430
12418
|
}
|
|
12431
|
-
var
|
|
12419
|
+
var Ng = Mg("email", {
|
|
12432
12420
|
isLink: !0,
|
|
12433
12421
|
toHref() {
|
|
12434
12422
|
return "mailto:" + this.toString();
|
|
12435
12423
|
}
|
|
12436
|
-
}),
|
|
12424
|
+
}), Pg = Mg("text"), Fg = Mg("nl"), Ig = Mg("url", {
|
|
12437
12425
|
isLink: !0,
|
|
12438
|
-
toHref(e =
|
|
12426
|
+
toHref(e = Og.defaultProtocol) {
|
|
12439
12427
|
return this.hasProtocol() ? this.v : `${e}://${this.v}`;
|
|
12440
12428
|
},
|
|
12441
12429
|
hasProtocol() {
|
|
12442
12430
|
let e = this.tk;
|
|
12443
|
-
return e.length >= 2 && e[0].t !==
|
|
12431
|
+
return e.length >= 2 && e[0].t !== ph && e[1].t === Wh;
|
|
12444
12432
|
}
|
|
12445
|
-
}),
|
|
12446
|
-
function
|
|
12433
|
+
}), Lg = (e) => new sh(e);
|
|
12434
|
+
function Rg({ groups: e }) {
|
|
12447
12435
|
let t = e.domain.concat([
|
|
12448
|
-
|
|
12436
|
+
Lh,
|
|
12437
|
+
zh,
|
|
12449
12438
|
Bh,
|
|
12450
12439
|
Vh,
|
|
12451
12440
|
Hh,
|
|
12452
12441
|
Uh,
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12442
|
+
Kh,
|
|
12443
|
+
Jh,
|
|
12444
|
+
Xh,
|
|
12445
|
+
vh,
|
|
12456
12446
|
Zh,
|
|
12457
|
-
yh,
|
|
12458
12447
|
Qh,
|
|
12459
12448
|
$h,
|
|
12460
12449
|
eg,
|
|
12461
|
-
|
|
12450
|
+
ag,
|
|
12451
|
+
lg,
|
|
12462
12452
|
og,
|
|
12463
|
-
|
|
12464
|
-
sg,
|
|
12465
|
-
cg
|
|
12453
|
+
sg
|
|
12466
12454
|
]), n = [
|
|
12467
|
-
|
|
12455
|
+
Rh,
|
|
12456
|
+
Wh,
|
|
12468
12457
|
Gh,
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12458
|
+
qh,
|
|
12459
|
+
Yh,
|
|
12460
|
+
Zh,
|
|
12461
|
+
tg,
|
|
12473
12462
|
ng,
|
|
12474
|
-
|
|
12475
|
-
|
|
12463
|
+
ig,
|
|
12464
|
+
Dh,
|
|
12476
12465
|
Oh,
|
|
12477
|
-
|
|
12466
|
+
xh,
|
|
12478
12467
|
Sh,
|
|
12468
|
+
wh,
|
|
12479
12469
|
Ch,
|
|
12480
12470
|
Th,
|
|
12481
|
-
wh,
|
|
12482
12471
|
Eh,
|
|
12483
|
-
|
|
12472
|
+
kh,
|
|
12484
12473
|
Ah,
|
|
12485
12474
|
jh,
|
|
12486
12475
|
Mh,
|
|
12487
12476
|
Nh,
|
|
12488
12477
|
Ph,
|
|
12489
12478
|
Fh,
|
|
12490
|
-
Ih
|
|
12491
|
-
Lh
|
|
12479
|
+
Ih
|
|
12492
12480
|
], r = [
|
|
12481
|
+
Lh,
|
|
12493
12482
|
Rh,
|
|
12494
12483
|
zh,
|
|
12495
|
-
|
|
12484
|
+
Vh,
|
|
12496
12485
|
Hh,
|
|
12497
12486
|
Uh,
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12487
|
+
Kh,
|
|
12488
|
+
Jh,
|
|
12489
|
+
Xh,
|
|
12490
|
+
xh,
|
|
12502
12491
|
Sh,
|
|
12503
|
-
|
|
12492
|
+
Zh,
|
|
12504
12493
|
Qh,
|
|
12505
12494
|
$h,
|
|
12506
12495
|
eg,
|
|
12507
12496
|
tg,
|
|
12508
|
-
|
|
12497
|
+
ag,
|
|
12498
|
+
lg,
|
|
12509
12499
|
og,
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
cg
|
|
12513
|
-
], i = Rg(), a = Z(i, sg);
|
|
12500
|
+
sg
|
|
12501
|
+
], i = Lg(), a = Z(i, og);
|
|
12514
12502
|
Y(a, r, a), Y(a, e.domain, a);
|
|
12515
|
-
let o =
|
|
12503
|
+
let o = Lg(), s = Lg(), c = Lg();
|
|
12516
12504
|
Y(i, e.domain, o), Y(i, e.scheme, s), Y(i, e.slashscheme, c), Y(o, r, a), Y(o, e.domain, o);
|
|
12517
|
-
let l = Z(o,
|
|
12518
|
-
Z(a,
|
|
12519
|
-
let u = Z(a,
|
|
12505
|
+
let l = Z(o, Bh);
|
|
12506
|
+
Z(a, Bh, l), Z(s, Bh, l), Z(c, Bh, l);
|
|
12507
|
+
let u = Z(a, qh);
|
|
12520
12508
|
Y(u, r, a), Y(u, e.domain, a);
|
|
12521
|
-
let d =
|
|
12509
|
+
let d = Lg();
|
|
12522
12510
|
Y(l, e.domain, d), Y(d, e.domain, d);
|
|
12523
|
-
let f = Z(d,
|
|
12511
|
+
let f = Z(d, qh);
|
|
12524
12512
|
Y(f, e.domain, d);
|
|
12525
|
-
let p =
|
|
12526
|
-
Y(f, e.tld, p), Y(f, e.utld, p), Z(l,
|
|
12527
|
-
let m = Z(d,
|
|
12528
|
-
Z(m,
|
|
12529
|
-
let h = Z(o,
|
|
12530
|
-
Z(h,
|
|
12531
|
-
let _ =
|
|
12532
|
-
Y(g, e.tld, _), Y(g, e.utld, _), Y(_, e.domain, o), Y(_, r, a), Z(_,
|
|
12533
|
-
let v = Z(_,
|
|
12513
|
+
let p = Lg(Ng);
|
|
12514
|
+
Y(f, e.tld, p), Y(f, e.utld, p), Z(l, ph, p);
|
|
12515
|
+
let m = Z(d, Xh);
|
|
12516
|
+
Z(m, Xh, m), Y(m, e.domain, d), Y(p, e.domain, d), Z(p, qh, f), Z(p, Xh, m);
|
|
12517
|
+
let h = Z(o, Xh), g = Z(o, qh);
|
|
12518
|
+
Z(h, Xh, h), Y(h, e.domain, o), Y(g, r, a), Y(g, e.domain, o);
|
|
12519
|
+
let _ = Lg(Ig);
|
|
12520
|
+
Y(g, e.tld, _), Y(g, e.utld, _), Y(_, e.domain, o), Y(_, r, a), Z(_, qh, g), Z(_, Xh, h), Z(_, Bh, l);
|
|
12521
|
+
let v = Z(_, Wh), y = Lg(Ig);
|
|
12534
12522
|
Y(v, e.numeric, y);
|
|
12535
|
-
let b =
|
|
12536
|
-
Y(b, t, b), Y(b, n, x), Y(x, t, b), Y(x, n, x), Z(_,
|
|
12537
|
-
let S = Z(s,
|
|
12538
|
-
Y(s, e.domain, o), Z(s,
|
|
12523
|
+
let b = Lg(Ig), x = Lg();
|
|
12524
|
+
Y(b, t, b), Y(b, n, x), Y(x, t, b), Y(x, n, x), Z(_, ag, b), Z(y, ag, b);
|
|
12525
|
+
let S = Z(s, Wh), C = Z(Z(Z(c, Wh), ag), ag);
|
|
12526
|
+
Y(s, e.domain, o), Z(s, qh, g), Z(s, Xh, h), Y(c, e.domain, o), Z(c, qh, g), Z(c, Xh, h), Y(S, e.domain, b), Z(S, ag, b), Z(S, tg, b), Y(C, e.domain, b), Y(C, t, b), Z(C, ag, b);
|
|
12539
12527
|
let w = [
|
|
12540
|
-
[
|
|
12541
|
-
[
|
|
12542
|
-
[
|
|
12543
|
-
[
|
|
12544
|
-
[
|
|
12545
|
-
[
|
|
12546
|
-
[
|
|
12547
|
-
[
|
|
12528
|
+
[xh, Sh],
|
|
12529
|
+
[Ch, wh],
|
|
12530
|
+
[Th, Eh],
|
|
12531
|
+
[Dh, Oh],
|
|
12532
|
+
[kh, Ah],
|
|
12533
|
+
[jh, Mh],
|
|
12534
|
+
[Nh, Ph],
|
|
12535
|
+
[Fh, Ih]
|
|
12548
12536
|
];
|
|
12549
12537
|
for (let e = 0; e < w.length; e++) {
|
|
12550
12538
|
let [r, i] = w[e], a = Z(b, r);
|
|
12551
12539
|
Z(x, r, a);
|
|
12552
|
-
let o =
|
|
12540
|
+
let o = Lg(Ig);
|
|
12553
12541
|
Y(a, t, o);
|
|
12554
|
-
let s =
|
|
12542
|
+
let s = Lg();
|
|
12555
12543
|
Y(a, n, s), Z(a, i, b), Y(o, t, o), Y(o, n, s), Y(s, t, o), Y(s, n, s), Z(o, i, b), Z(s, i, b);
|
|
12556
12544
|
}
|
|
12557
|
-
return Z(i,
|
|
12545
|
+
return Z(i, ph, _), Z(i, bh, Fg), {
|
|
12558
12546
|
start: i,
|
|
12559
|
-
tokens:
|
|
12547
|
+
tokens: ug
|
|
12560
12548
|
};
|
|
12561
12549
|
}
|
|
12562
|
-
function
|
|
12550
|
+
function zg(e, t, n) {
|
|
12563
12551
|
let r = n.length, i = 0, a = [], o = [];
|
|
12564
12552
|
for (; i < r;) {
|
|
12565
12553
|
let s = e, c = null, l = null, u = 0, d = null, f = -1;
|
|
@@ -12567,18 +12555,18 @@ function Bg(e, t, n) {
|
|
|
12567
12555
|
for (; i < r && (l = c || s.go(n[i].t));) c = null, s = l, s.accepts() ? (f = 0, d = s) : f >= 0 && f++, i++, u++;
|
|
12568
12556
|
if (f < 0) i -= u, i < r && (o.push(n[i]), i++);
|
|
12569
12557
|
else {
|
|
12570
|
-
o.length > 0 && (a.push(
|
|
12558
|
+
o.length > 0 && (a.push(Bg(Pg, t, o)), o = []), i -= f, u -= f;
|
|
12571
12559
|
let e = d.t, r = n.slice(i - u, i);
|
|
12572
|
-
a.push(
|
|
12560
|
+
a.push(Bg(e, t, r));
|
|
12573
12561
|
}
|
|
12574
12562
|
}
|
|
12575
|
-
return o.length > 0 && a.push(
|
|
12563
|
+
return o.length > 0 && a.push(Bg(Pg, t, o)), a;
|
|
12576
12564
|
}
|
|
12577
|
-
function
|
|
12565
|
+
function Bg(e, t, n) {
|
|
12578
12566
|
let r = n[0].s, i = n[n.length - 1].e;
|
|
12579
12567
|
return new e(t.slice(r, i), n);
|
|
12580
12568
|
}
|
|
12581
|
-
var
|
|
12569
|
+
var Vg = typeof console < "u" && console && console.warn || (() => {}), Hg = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", Q = {
|
|
12582
12570
|
scanner: null,
|
|
12583
12571
|
parser: null,
|
|
12584
12572
|
tokenQueue: [],
|
|
@@ -12586,33 +12574,33 @@ var Hg = typeof console < "u" && console && console.warn || (() => {}), Ug = "un
|
|
|
12586
12574
|
customSchemes: [],
|
|
12587
12575
|
initialized: !1
|
|
12588
12576
|
};
|
|
12589
|
-
function
|
|
12590
|
-
return
|
|
12577
|
+
function Ug() {
|
|
12578
|
+
return sh.groups = {}, Q.scanner = null, Q.parser = null, Q.tokenQueue = [], Q.pluginQueue = [], Q.customSchemes = [], Q.initialized = !1, Q;
|
|
12591
12579
|
}
|
|
12592
|
-
function
|
|
12593
|
-
if (Q.initialized &&
|
|
12580
|
+
function Wg(e, t = !1) {
|
|
12581
|
+
if (Q.initialized && Vg(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Hg}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e)) throw Error("linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or \"-\"\n2. Cannot start or end with \"-\"\n3. \"-\" cannot repeat");
|
|
12594
12582
|
Q.customSchemes.push([e, t]);
|
|
12595
12583
|
}
|
|
12596
|
-
function
|
|
12597
|
-
Q.scanner =
|
|
12584
|
+
function Gg() {
|
|
12585
|
+
Q.scanner = Cg(Q.customSchemes);
|
|
12598
12586
|
for (let e = 0; e < Q.tokenQueue.length; e++) Q.tokenQueue[e][1]({ scanner: Q.scanner });
|
|
12599
|
-
Q.parser =
|
|
12587
|
+
Q.parser = Rg(Q.scanner.tokens);
|
|
12600
12588
|
for (let e = 0; e < Q.pluginQueue.length; e++) Q.pluginQueue[e][1]({
|
|
12601
12589
|
scanner: Q.scanner,
|
|
12602
12590
|
parser: Q.parser
|
|
12603
12591
|
});
|
|
12604
12592
|
return Q.initialized = !0, Q;
|
|
12605
12593
|
}
|
|
12606
|
-
function
|
|
12607
|
-
return Q.initialized ||
|
|
12594
|
+
function Kg(e) {
|
|
12595
|
+
return Q.initialized || Gg(), zg(Q.parser.start, e, wg(Q.scanner.start, e));
|
|
12608
12596
|
}
|
|
12609
|
-
|
|
12610
|
-
function
|
|
12597
|
+
Kg.scan = wg;
|
|
12598
|
+
function qg(e, t = null, n = null) {
|
|
12611
12599
|
if (t && typeof t == "object") {
|
|
12612
12600
|
if (n) throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);
|
|
12613
12601
|
n = t, t = null;
|
|
12614
12602
|
}
|
|
12615
|
-
let r = new
|
|
12603
|
+
let r = new kg(n), i = Kg(e), a = [];
|
|
12616
12604
|
for (let e = 0; e < i.length; e++) {
|
|
12617
12605
|
let n = i[e];
|
|
12618
12606
|
n.isLink && (!t || n.t === t) && r.check(n) && a.push(n.toFormattedObject(r));
|
|
@@ -12621,16 +12609,16 @@ function Jg(e, t = null, n = null) {
|
|
|
12621
12609
|
}
|
|
12622
12610
|
//#endregion
|
|
12623
12611
|
//#region ../../node_modules/.pnpm/@tiptap+extension-link@3.28.0_@tiptap+core@3.28.0_@tiptap+pm@3.28.0__@tiptap+pm@3.28.0/node_modules/@tiptap/extension-link/dist/index.js
|
|
12624
|
-
var
|
|
12625
|
-
Link: () =>
|
|
12626
|
-
default: () =>
|
|
12627
|
-
isAllowedUri: () =>
|
|
12628
|
-
pasteRegex: () =>
|
|
12629
|
-
}),
|
|
12630
|
-
function
|
|
12612
|
+
var Jg = /* @__PURE__ */ e({
|
|
12613
|
+
Link: () => a_,
|
|
12614
|
+
default: () => o_,
|
|
12615
|
+
isAllowedUri: () => i_,
|
|
12616
|
+
pasteRegex: () => r_
|
|
12617
|
+
}), Yg = "[\0- \xA0 -\u2029 ]", Xg = new RegExp(Yg), Zg = RegExp(`${Yg}$`), Qg = new RegExp(Yg, "g");
|
|
12618
|
+
function $g(e) {
|
|
12631
12619
|
return e.length === 1 ? e[0].isLink : e.length === 3 && e[1].isLink ? ["()", "[]"].includes(e[0].value + e[2].value) : !1;
|
|
12632
12620
|
}
|
|
12633
|
-
function
|
|
12621
|
+
function e_(e) {
|
|
12634
12622
|
return new N({
|
|
12635
12623
|
key: new P("autolink"),
|
|
12636
12624
|
appendTransaction: (t, n, r) => {
|
|
@@ -12642,16 +12630,16 @@ function t_(e) {
|
|
|
12642
12630
|
if (n.length > 1) i = n[0], a = r.doc.textBetween(i.pos, i.pos + i.node.nodeSize, void 0, " ");
|
|
12643
12631
|
else if (n.length) {
|
|
12644
12632
|
let e = r.doc.textBetween(t.from, t.to, " ", " ");
|
|
12645
|
-
if (!
|
|
12633
|
+
if (!Zg.test(e)) return;
|
|
12646
12634
|
i = n[0], a = r.doc.textBetween(i.pos, t.to, void 0, " ");
|
|
12647
12635
|
}
|
|
12648
12636
|
if (i && a) {
|
|
12649
|
-
let t = a.split(
|
|
12637
|
+
let t = a.split(Xg).filter(Boolean);
|
|
12650
12638
|
if (t.length <= 0) return !1;
|
|
12651
12639
|
let n = t[t.length - 1], s = i.pos + a.lastIndexOf(n);
|
|
12652
12640
|
if (!n) return !1;
|
|
12653
|
-
let c =
|
|
12654
|
-
if (
|
|
12641
|
+
let c = Kg(n).map((t) => t.toObject(e.defaultProtocol));
|
|
12642
|
+
if (!$g(c)) return !1;
|
|
12655
12643
|
c.filter((e) => e.isLink).map((e) => ({
|
|
12656
12644
|
...e,
|
|
12657
12645
|
from: s + e.start + 1,
|
|
@@ -12664,7 +12652,7 @@ function t_(e) {
|
|
|
12664
12652
|
}
|
|
12665
12653
|
});
|
|
12666
12654
|
}
|
|
12667
|
-
function
|
|
12655
|
+
function t_(e) {
|
|
12668
12656
|
return new N({
|
|
12669
12657
|
key: new P("handleClickLink"),
|
|
12670
12658
|
props: { handleClick: (t, n, r) => {
|
|
@@ -12687,7 +12675,7 @@ function n_(e) {
|
|
|
12687
12675
|
} }
|
|
12688
12676
|
});
|
|
12689
12677
|
}
|
|
12690
|
-
function
|
|
12678
|
+
function n_(e) {
|
|
12691
12679
|
return new N({
|
|
12692
12680
|
key: new P("handlePasteLink"),
|
|
12693
12681
|
props: { handlePaste: (t, n, r) => {
|
|
@@ -12697,13 +12685,13 @@ function r_(e) {
|
|
|
12697
12685
|
r.content.forEach((e) => {
|
|
12698
12686
|
c += e.textContent;
|
|
12699
12687
|
});
|
|
12700
|
-
let l =
|
|
12688
|
+
let l = qg(c, { defaultProtocol: e.defaultProtocol }).find((e) => e.isLink && e.value === c);
|
|
12701
12689
|
return !c || !l || i !== void 0 && !i(l.value) ? !1 : e.editor.commands.setMark(e.type, { href: l.href });
|
|
12702
12690
|
} }
|
|
12703
12691
|
});
|
|
12704
12692
|
}
|
|
12705
|
-
var
|
|
12706
|
-
function
|
|
12693
|
+
var r_ = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)(?:[-a-zA-Z0-9@:%._+~#=?!&/]*)/gi;
|
|
12694
|
+
function i_(e, t) {
|
|
12707
12695
|
let n = [
|
|
12708
12696
|
"http",
|
|
12709
12697
|
"https",
|
|
@@ -12719,9 +12707,9 @@ function a_(e, t) {
|
|
|
12719
12707
|
return t && t.forEach((e) => {
|
|
12720
12708
|
let t = typeof e == "string" ? e : e.scheme;
|
|
12721
12709
|
t && n.push(t);
|
|
12722
|
-
}), !e || e.replace(
|
|
12710
|
+
}), !e || e.replace(Qg, "").match(RegExp(`^(?:(?:${n.map((e) => e.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, "i"));
|
|
12723
12711
|
}
|
|
12724
|
-
var
|
|
12712
|
+
var a_ = Hd.create({
|
|
12725
12713
|
name: "link",
|
|
12726
12714
|
priority: 1e3,
|
|
12727
12715
|
keepOnSplit: !1,
|
|
@@ -12729,14 +12717,14 @@ var o_ = Hd.create({
|
|
|
12729
12717
|
onCreate() {
|
|
12730
12718
|
this.options.validate && !this.options.shouldAutoLink && (this.options.shouldAutoLink = this.options.validate, console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")), this.options.protocols.forEach((e) => {
|
|
12731
12719
|
if (typeof e == "string") {
|
|
12732
|
-
|
|
12720
|
+
Wg(e);
|
|
12733
12721
|
return;
|
|
12734
12722
|
}
|
|
12735
|
-
|
|
12723
|
+
Wg(e.scheme, e.optionalSlashes);
|
|
12736
12724
|
});
|
|
12737
12725
|
},
|
|
12738
12726
|
onDestroy() {
|
|
12739
|
-
|
|
12727
|
+
Ug();
|
|
12740
12728
|
},
|
|
12741
12729
|
inclusive() {
|
|
12742
12730
|
return this.options.autolink;
|
|
@@ -12754,7 +12742,7 @@ var o_ = Hd.create({
|
|
|
12754
12742
|
rel: "noopener noreferrer nofollow",
|
|
12755
12743
|
class: null
|
|
12756
12744
|
},
|
|
12757
|
-
isAllowedUri: (e, t) => !!
|
|
12745
|
+
isAllowedUri: (e, t) => !!i_(e, t.protocols),
|
|
12758
12746
|
validate: (e) => !!e,
|
|
12759
12747
|
shouldAutoLink: (e) => {
|
|
12760
12748
|
let t = /^[a-z][a-z0-9+.-]*:\/\//i.test(e), n = /^[a-z][a-z0-9+.-]*:/i.test(e);
|
|
@@ -12784,7 +12772,7 @@ var o_ = Hd.create({
|
|
|
12784
12772
|
getAttrs: (e) => {
|
|
12785
12773
|
let t = e.getAttribute("href");
|
|
12786
12774
|
return !t || !this.options.isAllowedUri(t, {
|
|
12787
|
-
defaultValidate: (e) => !!
|
|
12775
|
+
defaultValidate: (e) => !!i_(e, this.options.protocols),
|
|
12788
12776
|
protocols: this.options.protocols,
|
|
12789
12777
|
defaultProtocol: this.options.defaultProtocol
|
|
12790
12778
|
}) ? !1 : null;
|
|
@@ -12793,7 +12781,7 @@ var o_ = Hd.create({
|
|
|
12793
12781
|
},
|
|
12794
12782
|
renderHTML({ HTMLAttributes: e }) {
|
|
12795
12783
|
return this.options.isAllowedUri(e.href, {
|
|
12796
|
-
defaultValidate: (e) => !!
|
|
12784
|
+
defaultValidate: (e) => !!i_(e, this.options.protocols),
|
|
12797
12785
|
protocols: this.options.protocols,
|
|
12798
12786
|
defaultProtocol: this.options.defaultProtocol
|
|
12799
12787
|
}) ? [
|
|
@@ -12823,7 +12811,7 @@ var o_ = Hd.create({
|
|
|
12823
12811
|
setLink: (e) => ({ chain: t }) => {
|
|
12824
12812
|
let { href: n } = e;
|
|
12825
12813
|
return this.options.isAllowedUri(n, {
|
|
12826
|
-
defaultValidate: (e) => !!
|
|
12814
|
+
defaultValidate: (e) => !!i_(e, this.options.protocols),
|
|
12827
12815
|
protocols: this.options.protocols,
|
|
12828
12816
|
defaultProtocol: this.options.defaultProtocol
|
|
12829
12817
|
}) ? t().setMark(this.name, e).setMeta("preventAutolink", !0).run() : !1;
|
|
@@ -12831,7 +12819,7 @@ var o_ = Hd.create({
|
|
|
12831
12819
|
toggleLink: (e) => ({ chain: t }) => {
|
|
12832
12820
|
let { href: n } = e || {};
|
|
12833
12821
|
return n && !this.options.isAllowedUri(n, {
|
|
12834
|
-
defaultValidate: (e) => !!
|
|
12822
|
+
defaultValidate: (e) => !!i_(e, this.options.protocols),
|
|
12835
12823
|
protocols: this.options.protocols,
|
|
12836
12824
|
defaultProtocol: this.options.defaultProtocol
|
|
12837
12825
|
}) ? !1 : t().toggleMark(this.name, e, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
|
|
@@ -12844,8 +12832,8 @@ var o_ = Hd.create({
|
|
|
12844
12832
|
find: (e) => {
|
|
12845
12833
|
let t = [];
|
|
12846
12834
|
if (e) {
|
|
12847
|
-
let { protocols: n, defaultProtocol: r } = this.options, i =
|
|
12848
|
-
defaultValidate: (e) => !!
|
|
12835
|
+
let { protocols: n, defaultProtocol: r } = this.options, i = qg(e).filter((e) => e.isLink && this.options.isAllowedUri(e.value, {
|
|
12836
|
+
defaultValidate: (e) => !!i_(e, n),
|
|
12849
12837
|
protocols: n,
|
|
12850
12838
|
defaultProtocol: r
|
|
12851
12839
|
}));
|
|
@@ -12865,31 +12853,31 @@ var o_ = Hd.create({
|
|
|
12865
12853
|
},
|
|
12866
12854
|
addProseMirrorPlugins() {
|
|
12867
12855
|
let e = [], { protocols: t, defaultProtocol: n } = this.options;
|
|
12868
|
-
return this.options.autolink && e.push(
|
|
12856
|
+
return this.options.autolink && e.push(e_({
|
|
12869
12857
|
type: this.type,
|
|
12870
12858
|
defaultProtocol: this.options.defaultProtocol,
|
|
12871
12859
|
validate: (e) => this.options.isAllowedUri(e, {
|
|
12872
|
-
defaultValidate: (e) => !!
|
|
12860
|
+
defaultValidate: (e) => !!i_(e, t),
|
|
12873
12861
|
protocols: t,
|
|
12874
12862
|
defaultProtocol: n
|
|
12875
12863
|
}),
|
|
12876
12864
|
shouldAutoLink: this.options.shouldAutoLink
|
|
12877
|
-
})), e.push(
|
|
12865
|
+
})), e.push(t_({
|
|
12878
12866
|
type: this.type,
|
|
12879
12867
|
editor: this.editor,
|
|
12880
12868
|
openOnClick: this.options.openOnClick === "whenNotEditable" || this.options.openOnClick,
|
|
12881
12869
|
enableClickSelection: this.options.enableClickSelection
|
|
12882
|
-
})), this.options.linkOnPaste && e.push(
|
|
12870
|
+
})), this.options.linkOnPaste && e.push(n_({
|
|
12883
12871
|
editor: this.editor,
|
|
12884
12872
|
defaultProtocol: this.options.defaultProtocol,
|
|
12885
12873
|
type: this.type,
|
|
12886
12874
|
shouldAutoLink: this.options.shouldAutoLink
|
|
12887
12875
|
})), e;
|
|
12888
12876
|
}
|
|
12889
|
-
}),
|
|
12890
|
-
Subscript: () =>
|
|
12891
|
-
default: () =>
|
|
12892
|
-
}),
|
|
12877
|
+
}), o_ = a_, s_ = /* @__PURE__ */ e({
|
|
12878
|
+
Subscript: () => c_,
|
|
12879
|
+
default: () => l_
|
|
12880
|
+
}), c_ = Hd.create({
|
|
12893
12881
|
name: "subscript",
|
|
12894
12882
|
addOptions() {
|
|
12895
12883
|
return { HTMLAttributes: {} };
|
|
@@ -12919,10 +12907,10 @@ var o_ = Hd.create({
|
|
|
12919
12907
|
addKeyboardShortcuts() {
|
|
12920
12908
|
return { "Mod-,": () => this.editor.commands.toggleSubscript() };
|
|
12921
12909
|
}
|
|
12922
|
-
}),
|
|
12923
|
-
Superscript: () =>
|
|
12924
|
-
default: () =>
|
|
12925
|
-
}),
|
|
12910
|
+
}), l_ = c_, u_ = /* @__PURE__ */ e({
|
|
12911
|
+
Superscript: () => d_,
|
|
12912
|
+
default: () => f_
|
|
12913
|
+
}), d_ = Hd.create({
|
|
12926
12914
|
name: "superscript",
|
|
12927
12915
|
addOptions() {
|
|
12928
12916
|
return { HTMLAttributes: {} };
|
|
@@ -12952,10 +12940,10 @@ var o_ = Hd.create({
|
|
|
12952
12940
|
addKeyboardShortcuts() {
|
|
12953
12941
|
return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
|
|
12954
12942
|
}
|
|
12955
|
-
}),
|
|
12956
|
-
TextAlign: () =>
|
|
12957
|
-
default: () =>
|
|
12958
|
-
}),
|
|
12943
|
+
}), f_ = d_, p_ = /* @__PURE__ */ e({
|
|
12944
|
+
TextAlign: () => m_,
|
|
12945
|
+
default: () => h_
|
|
12946
|
+
}), m_ = q.create({
|
|
12959
12947
|
name: "textAlign",
|
|
12960
12948
|
addOptions() {
|
|
12961
12949
|
return {
|
|
@@ -12997,10 +12985,10 @@ var o_ = Hd.create({
|
|
|
12997
12985
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
12998
12986
|
};
|
|
12999
12987
|
}
|
|
13000
|
-
}),
|
|
13001
|
-
Underline: () =>
|
|
13002
|
-
default: () =>
|
|
13003
|
-
}),
|
|
12988
|
+
}), h_ = m_, g_ = /* @__PURE__ */ e({
|
|
12989
|
+
Underline: () => __,
|
|
12990
|
+
default: () => v_
|
|
12991
|
+
}), __ = Hd.create({
|
|
13004
12992
|
name: "underline",
|
|
13005
12993
|
addOptions() {
|
|
13006
12994
|
return { HTMLAttributes: {} };
|
|
@@ -13056,7 +13044,7 @@ var o_ = Hd.create({
|
|
|
13056
13044
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
13057
13045
|
};
|
|
13058
13046
|
}
|
|
13059
|
-
}),
|
|
13047
|
+
}), v_ = __, y_ = (e, t) => {
|
|
13060
13048
|
if (e === "slot") return 0;
|
|
13061
13049
|
if (e instanceof Function) return e(t);
|
|
13062
13050
|
let { children: n, ...r } = t ?? {};
|
|
@@ -13066,7 +13054,7 @@ var o_ = Hd.create({
|
|
|
13066
13054
|
r,
|
|
13067
13055
|
n
|
|
13068
13056
|
];
|
|
13069
|
-
},
|
|
13057
|
+
}, b_ = (e, t) => {
|
|
13070
13058
|
let { state: n, view: r } = e, { selection: i } = n;
|
|
13071
13059
|
if (!i.empty) return !1;
|
|
13072
13060
|
let { $from: a } = i;
|
|
@@ -13080,7 +13068,7 @@ var o_ = Hd.create({
|
|
|
13080
13068
|
if (l.type !== t || !l.lastChild?.isTextblock) return !1;
|
|
13081
13069
|
let u = a.before(), d = u - 1 - 1, { tr: f } = n;
|
|
13082
13070
|
return f.delete(u, a.after()).insert(d, a.parent.content), f.setSelection(j.create(f.doc, d)), r.dispatch(f.scrollIntoView()), !0;
|
|
13083
|
-
},
|
|
13071
|
+
}, x_ = /^\s*>\s$/, S_ = J.create({
|
|
13084
13072
|
name: "blockquote",
|
|
13085
13073
|
addOptions() {
|
|
13086
13074
|
return { HTMLAttributes: {} };
|
|
@@ -13092,9 +13080,9 @@ var o_ = Hd.create({
|
|
|
13092
13080
|
return [{ tag: "blockquote" }];
|
|
13093
13081
|
},
|
|
13094
13082
|
renderHTML({ HTMLAttributes: e }) {
|
|
13095
|
-
return /* @__PURE__ */
|
|
13083
|
+
return /* @__PURE__ */ y_("blockquote", {
|
|
13096
13084
|
...K(this.options.HTMLAttributes, e),
|
|
13097
|
-
children: /* @__PURE__ */
|
|
13085
|
+
children: /* @__PURE__ */ y_("slot", {})
|
|
13098
13086
|
});
|
|
13099
13087
|
},
|
|
13100
13088
|
parseMarkdown: (e, t) => t.createNode("blockquote", void 0, (t.parseBlockChildren ?? t.parseChildren)(e.tokens || [])),
|
|
@@ -13116,16 +13104,16 @@ var o_ = Hd.create({
|
|
|
13116
13104
|
addKeyboardShortcuts() {
|
|
13117
13105
|
return {
|
|
13118
13106
|
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
|
|
13119
|
-
Backspace: () =>
|
|
13107
|
+
Backspace: () => b_(this.editor, this.type)
|
|
13120
13108
|
};
|
|
13121
13109
|
},
|
|
13122
13110
|
addInputRules() {
|
|
13123
13111
|
return [gf({
|
|
13124
|
-
find:
|
|
13112
|
+
find: x_,
|
|
13125
13113
|
type: this.type
|
|
13126
13114
|
})];
|
|
13127
13115
|
}
|
|
13128
|
-
}),
|
|
13116
|
+
}), C_ = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, w_ = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, T_ = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, E_ = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, D_ = Hd.create({
|
|
13129
13117
|
name: "bold",
|
|
13130
13118
|
addOptions() {
|
|
13131
13119
|
return { HTMLAttributes: {} };
|
|
@@ -13148,9 +13136,9 @@ var o_ = Hd.create({
|
|
|
13148
13136
|
];
|
|
13149
13137
|
},
|
|
13150
13138
|
renderHTML({ HTMLAttributes: e }) {
|
|
13151
|
-
return /* @__PURE__ */
|
|
13139
|
+
return /* @__PURE__ */ y_("strong", {
|
|
13152
13140
|
...K(this.options.HTMLAttributes, e),
|
|
13153
|
-
children: /* @__PURE__ */
|
|
13141
|
+
children: /* @__PURE__ */ y_("slot", {})
|
|
13154
13142
|
});
|
|
13155
13143
|
},
|
|
13156
13144
|
markdownTokenName: "strong",
|
|
@@ -13175,30 +13163,30 @@ var o_ = Hd.create({
|
|
|
13175
13163
|
},
|
|
13176
13164
|
addInputRules() {
|
|
13177
13165
|
return [ff({
|
|
13178
|
-
find:
|
|
13166
|
+
find: C_,
|
|
13179
13167
|
type: this.type
|
|
13180
13168
|
}), ff({
|
|
13181
|
-
find:
|
|
13169
|
+
find: T_,
|
|
13182
13170
|
type: this.type
|
|
13183
13171
|
})];
|
|
13184
13172
|
},
|
|
13185
13173
|
addPasteRules() {
|
|
13186
13174
|
return [Cf({
|
|
13187
|
-
find:
|
|
13175
|
+
find: w_,
|
|
13188
13176
|
type: this.type
|
|
13189
13177
|
}), Cf({
|
|
13190
|
-
find:
|
|
13178
|
+
find: E_,
|
|
13191
13179
|
type: this.type
|
|
13192
13180
|
})];
|
|
13193
13181
|
}
|
|
13194
|
-
}),
|
|
13182
|
+
}), O_ = (e) => {
|
|
13195
13183
|
let t = /`([^`]+)`(?!`)$/.exec(e);
|
|
13196
13184
|
return !t || t.index > 0 && e[t.index - 1] === "`" ? null : {
|
|
13197
13185
|
index: t.index,
|
|
13198
13186
|
text: t[0],
|
|
13199
13187
|
replaceWith: t[1]
|
|
13200
13188
|
};
|
|
13201
|
-
},
|
|
13189
|
+
}, k_ = (e) => {
|
|
13202
13190
|
let t = /`([^`]+)`(?!`)/g, n = [], r;
|
|
13203
13191
|
for (; (r = t.exec(e)) !== null;) r.index > 0 && e[r.index - 1] === "`" || n.push({
|
|
13204
13192
|
index: r.index,
|
|
@@ -13206,7 +13194,7 @@ var o_ = Hd.create({
|
|
|
13206
13194
|
replaceWith: r[1]
|
|
13207
13195
|
});
|
|
13208
13196
|
return n;
|
|
13209
|
-
},
|
|
13197
|
+
}, A_ = Hd.create({
|
|
13210
13198
|
name: "code",
|
|
13211
13199
|
addOptions() {
|
|
13212
13200
|
return { HTMLAttributes: {} };
|
|
@@ -13242,17 +13230,17 @@ var o_ = Hd.create({
|
|
|
13242
13230
|
},
|
|
13243
13231
|
addInputRules() {
|
|
13244
13232
|
return [ff({
|
|
13245
|
-
find:
|
|
13233
|
+
find: O_,
|
|
13246
13234
|
type: this.type
|
|
13247
13235
|
})];
|
|
13248
13236
|
},
|
|
13249
13237
|
addPasteRules() {
|
|
13250
13238
|
return [Cf({
|
|
13251
|
-
find:
|
|
13239
|
+
find: k_,
|
|
13252
13240
|
type: this.type
|
|
13253
13241
|
})];
|
|
13254
13242
|
}
|
|
13255
|
-
}),
|
|
13243
|
+
}), j_ = 4, M_ = /^```([a-z]+)?[\s\n]$/, N_ = /^~~~([a-z]+)?[\s\n]$/, P_ = J.create({
|
|
13256
13244
|
name: "codeBlock",
|
|
13257
13245
|
addOptions() {
|
|
13258
13246
|
return {
|
|
@@ -13261,7 +13249,7 @@ var o_ = Hd.create({
|
|
|
13261
13249
|
exitOnArrowDown: !0,
|
|
13262
13250
|
defaultLanguage: null,
|
|
13263
13251
|
enableTabIndentation: !1,
|
|
13264
|
-
tabSize:
|
|
13252
|
+
tabSize: j_,
|
|
13265
13253
|
HTMLAttributes: {}
|
|
13266
13254
|
};
|
|
13267
13255
|
},
|
|
@@ -13324,7 +13312,7 @@ var o_ = Hd.create({
|
|
|
13324
13312
|
},
|
|
13325
13313
|
Tab: ({ editor: e }) => {
|
|
13326
13314
|
if (!this.options.enableTabIndentation) return !1;
|
|
13327
|
-
let t = this.options.tabSize ??
|
|
13315
|
+
let t = this.options.tabSize ?? j_, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
13328
13316
|
if (i.parent.type !== this.type) return !1;
|
|
13329
13317
|
let o = " ".repeat(t);
|
|
13330
13318
|
return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
|
|
@@ -13334,7 +13322,7 @@ var o_ = Hd.create({
|
|
|
13334
13322
|
},
|
|
13335
13323
|
"Shift-Tab": ({ editor: e }) => {
|
|
13336
13324
|
if (!this.options.enableTabIndentation) return !1;
|
|
13337
|
-
let t = this.options.tabSize ??
|
|
13325
|
+
let t = this.options.tabSize ?? j_, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
13338
13326
|
return i.parent.type === this.type && e.commands.command(a ? ({ tr: e }) => {
|
|
13339
13327
|
let { pos: r } = i, a = i.start(), o = i.end(), s = n.doc.textBetween(a, o, "\n", "\n").split("\n"), c = 0, l = 0, u = r - a;
|
|
13340
13328
|
for (let e = 0; e < s.length; e += 1) {
|
|
@@ -13375,11 +13363,11 @@ var o_ = Hd.create({
|
|
|
13375
13363
|
},
|
|
13376
13364
|
addInputRules() {
|
|
13377
13365
|
return [mf({
|
|
13378
|
-
find:
|
|
13366
|
+
find: M_,
|
|
13379
13367
|
type: this.type,
|
|
13380
13368
|
getAttributes: (e) => ({ language: e[1] })
|
|
13381
13369
|
}), mf({
|
|
13382
|
-
find:
|
|
13370
|
+
find: N_,
|
|
13383
13371
|
type: this.type,
|
|
13384
13372
|
getAttributes: (e) => ({ language: e[1] })
|
|
13385
13373
|
})];
|
|
@@ -13396,12 +13384,12 @@ var o_ = Hd.create({
|
|
|
13396
13384
|
} }
|
|
13397
13385
|
})];
|
|
13398
13386
|
}
|
|
13399
|
-
}),
|
|
13387
|
+
}), F_ = J.create({
|
|
13400
13388
|
name: "doc",
|
|
13401
13389
|
topNode: !0,
|
|
13402
13390
|
content: "block+",
|
|
13403
13391
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
|
|
13404
|
-
}),
|
|
13392
|
+
}), I_ = J.create({
|
|
13405
13393
|
name: "hardBreak",
|
|
13406
13394
|
markdownTokenName: "br",
|
|
13407
13395
|
addOptions() {
|
|
@@ -13445,7 +13433,7 @@ var o_ = Hd.create({
|
|
|
13445
13433
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
13446
13434
|
};
|
|
13447
13435
|
}
|
|
13448
|
-
}),
|
|
13436
|
+
}), L_ = J.create({
|
|
13449
13437
|
name: "heading",
|
|
13450
13438
|
addOptions() {
|
|
13451
13439
|
return {
|
|
@@ -13506,7 +13494,7 @@ var o_ = Hd.create({
|
|
|
13506
13494
|
getAttributes: { level: e }
|
|
13507
13495
|
}));
|
|
13508
13496
|
}
|
|
13509
|
-
}),
|
|
13497
|
+
}), R_ = J.create({
|
|
13510
13498
|
name: "horizontalRule",
|
|
13511
13499
|
addOptions() {
|
|
13512
13500
|
return {
|
|
@@ -13548,7 +13536,7 @@ var o_ = Hd.create({
|
|
|
13548
13536
|
type: this.type
|
|
13549
13537
|
})];
|
|
13550
13538
|
}
|
|
13551
|
-
}),
|
|
13539
|
+
}), z_ = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, B_ = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, V_ = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, H_ = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, U_ = Hd.create({
|
|
13552
13540
|
name: "italic",
|
|
13553
13541
|
addOptions() {
|
|
13554
13542
|
return { HTMLAttributes: {} };
|
|
@@ -13596,28 +13584,28 @@ var o_ = Hd.create({
|
|
|
13596
13584
|
},
|
|
13597
13585
|
addInputRules() {
|
|
13598
13586
|
return [ff({
|
|
13599
|
-
find:
|
|
13587
|
+
find: z_,
|
|
13600
13588
|
type: this.type
|
|
13601
13589
|
}), ff({
|
|
13602
|
-
find:
|
|
13590
|
+
find: V_,
|
|
13603
13591
|
type: this.type
|
|
13604
13592
|
})];
|
|
13605
13593
|
},
|
|
13606
13594
|
addPasteRules() {
|
|
13607
13595
|
return [Cf({
|
|
13608
|
-
find:
|
|
13596
|
+
find: B_,
|
|
13609
13597
|
type: this.type
|
|
13610
13598
|
}), Cf({
|
|
13611
|
-
find:
|
|
13599
|
+
find: H_,
|
|
13612
13600
|
type: this.type
|
|
13613
13601
|
})];
|
|
13614
13602
|
}
|
|
13615
|
-
}),
|
|
13616
|
-
for (var n in t)
|
|
13603
|
+
}), W_ = Object.defineProperty, G_ = (e, t) => {
|
|
13604
|
+
for (var n in t) W_(e, n, {
|
|
13617
13605
|
get: t[n],
|
|
13618
13606
|
enumerable: !0
|
|
13619
13607
|
});
|
|
13620
|
-
},
|
|
13608
|
+
}, K_ = "listItem", q_ = "textStyle", J_ = /^\s*([-+*])\s$/, Y_ = J.create({
|
|
13621
13609
|
name: "bulletList",
|
|
13622
13610
|
addOptions() {
|
|
13623
13611
|
return {
|
|
@@ -13649,26 +13637,26 @@ var o_ = Hd.create({
|
|
|
13649
13637
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
13650
13638
|
markdownOptions: { indentsContent: !0 },
|
|
13651
13639
|
addCommands() {
|
|
13652
|
-
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
13640
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(K_, this.editor.getAttributes(q_)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
13653
13641
|
},
|
|
13654
13642
|
addKeyboardShortcuts() {
|
|
13655
13643
|
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
13656
13644
|
},
|
|
13657
13645
|
addInputRules() {
|
|
13658
13646
|
let e = gf({
|
|
13659
|
-
find:
|
|
13647
|
+
find: J_,
|
|
13660
13648
|
type: this.type
|
|
13661
13649
|
});
|
|
13662
13650
|
return (this.options.keepMarks || this.options.keepAttributes) && (e = gf({
|
|
13663
|
-
find:
|
|
13651
|
+
find: J_,
|
|
13664
13652
|
type: this.type,
|
|
13665
13653
|
keepMarks: this.options.keepMarks,
|
|
13666
13654
|
keepAttributes: this.options.keepAttributes,
|
|
13667
|
-
getAttributes: () => this.editor.getAttributes(
|
|
13655
|
+
getAttributes: () => this.editor.getAttributes(q_),
|
|
13668
13656
|
editor: this.editor
|
|
13669
13657
|
})), [e];
|
|
13670
13658
|
}
|
|
13671
|
-
}),
|
|
13659
|
+
}), X_ = (e, t, n) => {
|
|
13672
13660
|
let { selection: r } = e;
|
|
13673
13661
|
if (!r.empty) return null;
|
|
13674
13662
|
let { $from: i } = r;
|
|
@@ -13699,24 +13687,24 @@ var o_ = Hd.create({
|
|
|
13699
13687
|
insertPos: i.after(a),
|
|
13700
13688
|
items: f
|
|
13701
13689
|
};
|
|
13702
|
-
},
|
|
13703
|
-
let i =
|
|
13690
|
+
}, Z_ = (e, t, n, r) => {
|
|
13691
|
+
let i = X_(e, n, r);
|
|
13704
13692
|
if (!i) return !1;
|
|
13705
13693
|
let { selection: a } = e, { nestedList: o, nestedListPos: s, insertPos: c, items: l } = i, u = e.tr;
|
|
13706
13694
|
u.delete(s, s + o.nodeSize);
|
|
13707
13695
|
let d = u.mapping.map(c);
|
|
13708
13696
|
return u.insert(d, S.from(l)), u.setSelection(a.map(u.doc, u.mapping)), t && t(u), !0;
|
|
13709
|
-
},
|
|
13697
|
+
}, Q_ = (e, t, n) => Z_(e.state, e.view.dispatch, t, n), $_ = (e, t) => q.create({
|
|
13710
13698
|
name: `${e}BranchingDeleteKeymap`,
|
|
13711
13699
|
priority: 101,
|
|
13712
13700
|
addKeyboardShortcuts() {
|
|
13713
|
-
let n = () =>
|
|
13701
|
+
let n = () => Q_(this.editor, e, t);
|
|
13714
13702
|
return {
|
|
13715
13703
|
Delete: n,
|
|
13716
13704
|
"Mod-Delete": n
|
|
13717
13705
|
};
|
|
13718
13706
|
}
|
|
13719
|
-
}),
|
|
13707
|
+
}), ev = [
|
|
13720
13708
|
[1e3, "m"],
|
|
13721
13709
|
[900, "cm"],
|
|
13722
13710
|
[500, "d"],
|
|
@@ -13730,20 +13718,20 @@ var o_ = Hd.create({
|
|
|
13730
13718
|
[5, "v"],
|
|
13731
13719
|
[4, "iv"],
|
|
13732
13720
|
[1, "i"]
|
|
13733
|
-
],
|
|
13734
|
-
function
|
|
13721
|
+
], tv = "abcdefghijklmnopqrstuvwxyz", nv = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
|
|
13722
|
+
function rv(e) {
|
|
13735
13723
|
let t = e, n = "";
|
|
13736
|
-
for (let [e, r] of
|
|
13724
|
+
for (let [e, r] of ev) for (; t >= e;) n += r, t -= e;
|
|
13737
13725
|
return n;
|
|
13738
13726
|
}
|
|
13739
|
-
function
|
|
13740
|
-
return
|
|
13727
|
+
function iv(e) {
|
|
13728
|
+
return rv(e).toUpperCase();
|
|
13741
13729
|
}
|
|
13742
|
-
function
|
|
13730
|
+
function av(e) {
|
|
13743
13731
|
let t = e.toLowerCase(), n = 0, r = 0;
|
|
13744
13732
|
for (; n < t.length;) {
|
|
13745
13733
|
let e = !1;
|
|
13746
|
-
for (let [i, a] of
|
|
13734
|
+
for (let [i, a] of ev) if (t.startsWith(a, n)) {
|
|
13747
13735
|
r += i, n += a.length, e = !0;
|
|
13748
13736
|
break;
|
|
13749
13737
|
}
|
|
@@ -13751,12 +13739,12 @@ function ov(e) {
|
|
|
13751
13739
|
}
|
|
13752
13740
|
return r;
|
|
13753
13741
|
}
|
|
13754
|
-
function
|
|
13742
|
+
function ov(e) {
|
|
13755
13743
|
if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
|
|
13756
|
-
let t =
|
|
13757
|
-
return t <= 0 ? !1 : (e === e.toLowerCase() ?
|
|
13744
|
+
let t = av(e);
|
|
13745
|
+
return t <= 0 ? !1 : (e === e.toLowerCase() ? rv(t) : iv(t)) === e;
|
|
13758
13746
|
}
|
|
13759
|
-
function
|
|
13747
|
+
function sv(e) {
|
|
13760
13748
|
let t = e.toLowerCase();
|
|
13761
13749
|
if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
|
|
13762
13750
|
if (t.length === 2) {
|
|
@@ -13765,82 +13753,82 @@ function cv(e) {
|
|
|
13765
13753
|
}
|
|
13766
13754
|
return 0;
|
|
13767
13755
|
}
|
|
13768
|
-
function
|
|
13769
|
-
if (e <= 26) return
|
|
13756
|
+
function cv(e) {
|
|
13757
|
+
if (e <= 26) return tv[e - 1];
|
|
13770
13758
|
let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
|
|
13771
|
-
return t < 0 ?
|
|
13759
|
+
return t < 0 ? tv[n] : tv[t] + tv[n];
|
|
13772
13760
|
}
|
|
13773
|
-
function
|
|
13761
|
+
function lv(e) {
|
|
13774
13762
|
if (!(!e || /^\d+$/.test(e))) {
|
|
13775
|
-
if (
|
|
13763
|
+
if (ov(e)) return e === e.toLowerCase() ? "i" : "I";
|
|
13776
13764
|
if (/^[a-z]{1,2}$/.test(e)) return "a";
|
|
13777
13765
|
if (/^[A-Z]{1,2}$/.test(e)) return "A";
|
|
13778
13766
|
}
|
|
13779
13767
|
}
|
|
13780
|
-
function
|
|
13768
|
+
function uv(e) {
|
|
13781
13769
|
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
13782
|
-
let t =
|
|
13783
|
-
if (t === "i" || t === "I") return
|
|
13770
|
+
let t = lv(e);
|
|
13771
|
+
if (t === "i" || t === "I") return av(e);
|
|
13784
13772
|
if (t === "a" || t === "A") {
|
|
13785
|
-
let t =
|
|
13773
|
+
let t = sv(e);
|
|
13786
13774
|
return t > 0 ? t : 1;
|
|
13787
13775
|
}
|
|
13788
13776
|
let n = parseInt(e, 10);
|
|
13789
13777
|
return Number.isNaN(n) ? 1 : n;
|
|
13790
13778
|
}
|
|
13791
|
-
function
|
|
13779
|
+
function dv(e, t) {
|
|
13792
13780
|
if (e === "numeric") return String(t);
|
|
13793
13781
|
switch (e) {
|
|
13794
|
-
case "a": return
|
|
13795
|
-
case "A": return
|
|
13796
|
-
case "i": return
|
|
13797
|
-
case "I": return
|
|
13782
|
+
case "a": return cv(t);
|
|
13783
|
+
case "A": return cv(t).toUpperCase();
|
|
13784
|
+
case "i": return rv(t);
|
|
13785
|
+
case "I": return iv(t);
|
|
13798
13786
|
default: return String(t);
|
|
13799
13787
|
}
|
|
13800
13788
|
}
|
|
13801
|
-
function
|
|
13789
|
+
function fv(e) {
|
|
13802
13790
|
if (e.length === 0) return !1;
|
|
13803
|
-
let t =
|
|
13791
|
+
let t = lv(e[0]) ?? "numeric", n = uv(e[0]);
|
|
13804
13792
|
if (n < 1) return !1;
|
|
13805
13793
|
for (let r = 0; r < e.length; r++) {
|
|
13806
|
-
let i =
|
|
13794
|
+
let i = dv(t, n + r);
|
|
13807
13795
|
if (e[r] !== i) return !1;
|
|
13808
13796
|
}
|
|
13809
13797
|
return !0;
|
|
13810
13798
|
}
|
|
13811
|
-
function
|
|
13799
|
+
function pv(e) {
|
|
13812
13800
|
return {
|
|
13813
|
-
type:
|
|
13814
|
-
start:
|
|
13801
|
+
type: lv(e),
|
|
13802
|
+
start: uv(e)
|
|
13815
13803
|
};
|
|
13816
13804
|
}
|
|
13817
|
-
function
|
|
13818
|
-
let { type: t, start: n } =
|
|
13805
|
+
function mv(e) {
|
|
13806
|
+
let { type: t, start: n } = pv(e), r = {};
|
|
13819
13807
|
return t && (r.type = t), n !== 1 && (r.start = n), r;
|
|
13820
13808
|
}
|
|
13821
|
-
function
|
|
13809
|
+
function hv(e, t, n = ". ") {
|
|
13822
13810
|
let r = t + 1;
|
|
13823
13811
|
if (!e || e === "1") return `${r}${n}`;
|
|
13824
13812
|
switch (e) {
|
|
13825
|
-
case "a": return `${
|
|
13826
|
-
case "A": return `${
|
|
13827
|
-
case "i": return `${
|
|
13828
|
-
case "I": return `${
|
|
13813
|
+
case "a": return `${cv(r)}${n}`;
|
|
13814
|
+
case "A": return `${cv(r).toUpperCase()}${n}`;
|
|
13815
|
+
case "i": return `${rv(r)}${n}`;
|
|
13816
|
+
case "I": return `${iv(r)}${n}`;
|
|
13829
13817
|
default: return `${r}${n}`;
|
|
13830
13818
|
}
|
|
13831
13819
|
}
|
|
13832
|
-
function
|
|
13820
|
+
function gv(e) {
|
|
13833
13821
|
let t = e.tokens?.[0];
|
|
13834
13822
|
return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
|
|
13835
13823
|
}
|
|
13836
|
-
function
|
|
13824
|
+
function _v(e, t) {
|
|
13837
13825
|
return t.parseInline(t.tokenizeInline ? t.tokenizeInline(e) : [{
|
|
13838
13826
|
type: "text",
|
|
13839
13827
|
raw: e,
|
|
13840
13828
|
text: e
|
|
13841
13829
|
}]);
|
|
13842
13830
|
}
|
|
13843
|
-
var
|
|
13831
|
+
var vv = J.create({
|
|
13844
13832
|
name: "listItem",
|
|
13845
13833
|
addOptions() {
|
|
13846
13834
|
return {
|
|
@@ -13866,11 +13854,11 @@ var yv = J.create({
|
|
|
13866
13854
|
if (e.type !== "list_item") return [];
|
|
13867
13855
|
let n = t.parseBlockChildren ?? t.parseChildren, r = [];
|
|
13868
13856
|
if (e.tokens && e.tokens.length > 0) {
|
|
13869
|
-
if (
|
|
13857
|
+
if (gv(e)) return {
|
|
13870
13858
|
type: "listItem",
|
|
13871
13859
|
content: [{
|
|
13872
13860
|
type: "paragraph",
|
|
13873
|
-
content:
|
|
13861
|
+
content: _v(e.text || "", t)
|
|
13874
13862
|
}]
|
|
13875
13863
|
};
|
|
13876
13864
|
if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
|
|
@@ -13895,9 +13883,9 @@ var yv = J.create({
|
|
|
13895
13883
|
content: r
|
|
13896
13884
|
};
|
|
13897
13885
|
},
|
|
13898
|
-
renderMarkdown: (e, t, n) => jd(e, t, (e) => e.parentType === "bulletList" ? "- " : e.parentType === "orderedList" ?
|
|
13886
|
+
renderMarkdown: (e, t, n) => jd(e, t, (e) => e.parentType === "bulletList" ? "- " : e.parentType === "orderedList" ? hv(e.meta?.parentAttrs?.type, (e.meta?.parentAttrs?.start || 1) - 1 + (e.index || 0), ". ") : "- ", n),
|
|
13899
13887
|
addExtensions() {
|
|
13900
|
-
return [
|
|
13888
|
+
return [$_(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
|
|
13901
13889
|
},
|
|
13902
13890
|
addKeyboardShortcuts() {
|
|
13903
13891
|
return {
|
|
@@ -13907,37 +13895,37 @@ var yv = J.create({
|
|
|
13907
13895
|
};
|
|
13908
13896
|
}
|
|
13909
13897
|
});
|
|
13910
|
-
|
|
13911
|
-
findListItemPos: () =>
|
|
13912
|
-
getNextListDepth: () =>
|
|
13913
|
-
handleBackspace: () =>
|
|
13914
|
-
handleDelete: () =>
|
|
13915
|
-
hasListBefore: () =>
|
|
13916
|
-
hasListItemAfter: () =>
|
|
13917
|
-
hasListItemBefore: () =>
|
|
13918
|
-
listItemHasSubList: () =>
|
|
13919
|
-
nextListIsDeeper: () =>
|
|
13920
|
-
nextListIsHigher: () =>
|
|
13898
|
+
G_({}, {
|
|
13899
|
+
findListItemPos: () => yv,
|
|
13900
|
+
getNextListDepth: () => bv,
|
|
13901
|
+
handleBackspace: () => Sv,
|
|
13902
|
+
handleDelete: () => Tv,
|
|
13903
|
+
hasListBefore: () => xv,
|
|
13904
|
+
hasListItemAfter: () => Ev,
|
|
13905
|
+
hasListItemBefore: () => Dv,
|
|
13906
|
+
listItemHasSubList: () => Ov,
|
|
13907
|
+
nextListIsDeeper: () => Cv,
|
|
13908
|
+
nextListIsHigher: () => wv
|
|
13921
13909
|
});
|
|
13922
|
-
var
|
|
13910
|
+
var yv = (e, t) => {
|
|
13923
13911
|
let { $from: n } = t.selection, r = U(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
13924
13912
|
for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
|
|
13925
13913
|
return s === null ? null : {
|
|
13926
13914
|
$pos: t.doc.resolve(o),
|
|
13927
13915
|
depth: s
|
|
13928
13916
|
};
|
|
13929
|
-
},
|
|
13930
|
-
let n =
|
|
13917
|
+
}, bv = (e, t) => {
|
|
13918
|
+
let n = yv(e, t);
|
|
13931
13919
|
if (!n) return !1;
|
|
13932
13920
|
let [, r] = _u(t, e, n.$pos.pos + 4);
|
|
13933
13921
|
return r;
|
|
13934
|
-
},
|
|
13922
|
+
}, xv = (e, t, n) => {
|
|
13935
13923
|
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
13936
13924
|
return !(!a || !n.includes(a.type.name));
|
|
13937
|
-
},
|
|
13925
|
+
}, Sv = (e, t, n) => {
|
|
13938
13926
|
if (e.commands.undoInputRule()) return !0;
|
|
13939
13927
|
if (e.state.selection.from !== e.state.selection.to) return !1;
|
|
13940
|
-
if (!gl(e.state, t) &&
|
|
13928
|
+
if (!gl(e.state, t) && xv(e.state, t, n)) {
|
|
13941
13929
|
let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
|
|
13942
13930
|
r.node().descendants((e, n) => {
|
|
13943
13931
|
e.type.name === t && i.push({
|
|
@@ -13954,29 +13942,29 @@ var bv = (e, t) => {
|
|
|
13954
13942
|
}, o.end()).joinForward().run();
|
|
13955
13943
|
}
|
|
13956
13944
|
return !gl(e.state, t) || !wu(e.state) ? !1 : e.chain().liftListItem(t).run();
|
|
13957
|
-
},
|
|
13958
|
-
let n =
|
|
13945
|
+
}, Cv = (e, t) => {
|
|
13946
|
+
let n = bv(e, t), r = yv(e, t);
|
|
13959
13947
|
return !r || !n ? !1 : n > r.depth;
|
|
13960
|
-
},
|
|
13961
|
-
let n =
|
|
13948
|
+
}, wv = (e, t) => {
|
|
13949
|
+
let n = bv(e, t), r = yv(e, t);
|
|
13962
13950
|
return !r || !n ? !1 : n < r.depth;
|
|
13963
|
-
},
|
|
13951
|
+
}, Tv = (e, t) => {
|
|
13964
13952
|
if (!gl(e.state, t) || !Cu(e.state, t)) return !1;
|
|
13965
13953
|
let { selection: n } = e.state, { $from: r, $to: i } = n;
|
|
13966
|
-
return !n.empty && r.sameParent(i) ? !1 :
|
|
13967
|
-
},
|
|
13954
|
+
return !n.empty && r.sameParent(i) ? !1 : Cv(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : wv(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
|
|
13955
|
+
}, Ev = (e, t) => {
|
|
13968
13956
|
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
|
|
13969
13957
|
return !(r.index() === r.parent.childCount - 1 || r.nodeAfter?.type.name !== e);
|
|
13970
|
-
},
|
|
13958
|
+
}, Dv = (e, t) => {
|
|
13971
13959
|
let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
|
|
13972
13960
|
return !(r.index() === 0 || r.nodeBefore?.type.name !== e);
|
|
13973
|
-
},
|
|
13961
|
+
}, Ov = (e, t, n) => {
|
|
13974
13962
|
if (!n) return !1;
|
|
13975
13963
|
let r = U(e, t.schema), i = !1;
|
|
13976
13964
|
return n.descendants((e) => {
|
|
13977
13965
|
e.type === r && (i = !0);
|
|
13978
13966
|
}), i;
|
|
13979
|
-
},
|
|
13967
|
+
}, kv = q.create({
|
|
13980
13968
|
name: "listKeymap",
|
|
13981
13969
|
addOptions() {
|
|
13982
13970
|
return { listTypes: [{
|
|
@@ -13992,46 +13980,46 @@ var bv = (e, t) => {
|
|
|
13992
13980
|
Delete: ({ editor: e }) => {
|
|
13993
13981
|
let t = !1;
|
|
13994
13982
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
13995
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
13983
|
+
e.state.schema.nodes[n] !== void 0 && Tv(e, n) && (t = !0);
|
|
13996
13984
|
}), t;
|
|
13997
13985
|
},
|
|
13998
13986
|
"Mod-Delete": ({ editor: e }) => {
|
|
13999
13987
|
let t = !1;
|
|
14000
13988
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
14001
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
13989
|
+
e.state.schema.nodes[n] !== void 0 && Tv(e, n) && (t = !0);
|
|
14002
13990
|
}), t;
|
|
14003
13991
|
},
|
|
14004
13992
|
Backspace: ({ editor: e }) => {
|
|
14005
13993
|
let t = !1;
|
|
14006
13994
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
14007
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
13995
|
+
e.state.schema.nodes[n] !== void 0 && Sv(e, n, r) && (t = !0);
|
|
14008
13996
|
}), t;
|
|
14009
13997
|
},
|
|
14010
13998
|
"Mod-Backspace": ({ editor: e }) => {
|
|
14011
13999
|
let t = !1;
|
|
14012
14000
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
14013
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
14001
|
+
e.state.schema.nodes[n] !== void 0 && Sv(e, n, r) && (t = !0);
|
|
14014
14002
|
}), t;
|
|
14015
14003
|
}
|
|
14016
14004
|
};
|
|
14017
14005
|
}
|
|
14018
|
-
}),
|
|
14006
|
+
}), Av = RegExp(`^(\\s*)(${nv})([.)])\\s+(.*)$`), jv = /^\s/, Mv = {
|
|
14019
14007
|
heading: /^#{1,6}(?:\s|$)/,
|
|
14020
14008
|
bulletItem: /^[-+*]\s+/,
|
|
14021
14009
|
codeFence: /^(?:```|~~~)/,
|
|
14022
14010
|
thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
|
|
14023
14011
|
};
|
|
14012
|
+
function Nv(e) {
|
|
14013
|
+
return Av.test(e.trimStart());
|
|
14014
|
+
}
|
|
14024
14015
|
function Pv(e) {
|
|
14025
|
-
|
|
14016
|
+
let t = e.trimStart();
|
|
14017
|
+
return Mv.bulletItem.test(t) || Nv(t) || Mv.heading.test(t) || Mv.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || Mv.codeFence.test(t);
|
|
14026
14018
|
}
|
|
14027
14019
|
function Fv(e) {
|
|
14028
|
-
|
|
14029
|
-
return Nv.bulletItem.test(t) || Pv(t) || Nv.heading.test(t) || Nv.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || Nv.codeFence.test(t);
|
|
14020
|
+
return Object.values(Mv).some((t) => t.test(e));
|
|
14030
14021
|
}
|
|
14031
14022
|
function Iv(e) {
|
|
14032
|
-
return Object.values(Nv).some((t) => t.test(e));
|
|
14033
|
-
}
|
|
14034
|
-
function Lv(e) {
|
|
14035
14023
|
let t = [], n = [], r = !1;
|
|
14036
14024
|
return e.forEach((e) => {
|
|
14037
14025
|
if (r) {
|
|
@@ -14042,7 +14030,7 @@ function Lv(e) {
|
|
|
14042
14030
|
r = !0, n.push(e);
|
|
14043
14031
|
return;
|
|
14044
14032
|
}
|
|
14045
|
-
if (t.length > 0 &&
|
|
14033
|
+
if (t.length > 0 && Pv(e)) {
|
|
14046
14034
|
r = !0, n.push(e);
|
|
14047
14035
|
return;
|
|
14048
14036
|
}
|
|
@@ -14052,21 +14040,21 @@ function Lv(e) {
|
|
|
14052
14040
|
blockLines: n
|
|
14053
14041
|
};
|
|
14054
14042
|
}
|
|
14055
|
-
function
|
|
14043
|
+
function Lv(e) {
|
|
14056
14044
|
let t = [], n = 0, r = 0;
|
|
14057
14045
|
for (; n < e.length;) {
|
|
14058
|
-
let i = e[n], a = i.match(
|
|
14046
|
+
let i = e[n], a = i.match(Av);
|
|
14059
14047
|
if (!a) break;
|
|
14060
|
-
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ?
|
|
14048
|
+
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? lv(s) : void 0, p = isNaN(d) ? uv(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
|
|
14061
14049
|
for (; h < e.length;) {
|
|
14062
14050
|
let t = e[h];
|
|
14063
|
-
if (t.match(
|
|
14051
|
+
if (t.match(Av)) break;
|
|
14064
14052
|
if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
|
|
14065
|
-
else if (t.match(
|
|
14053
|
+
else if (t.match(jv)) {
|
|
14066
14054
|
let e = t.length - t.trimStart().length, n = u + s.length + 1;
|
|
14067
14055
|
g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
|
|
14068
14056
|
} else {
|
|
14069
|
-
if (_ ||
|
|
14057
|
+
if (_ || Fv(t)) break;
|
|
14070
14058
|
g.push(t), m.push(t), h += 1;
|
|
14071
14059
|
}
|
|
14072
14060
|
}
|
|
@@ -14081,22 +14069,22 @@ function Rv(e) {
|
|
|
14081
14069
|
}
|
|
14082
14070
|
return [t, r];
|
|
14083
14071
|
}
|
|
14084
|
-
var
|
|
14085
|
-
function
|
|
14072
|
+
var Rv = RegExp(`^(${nv})([.)])\\s+(.+)$`);
|
|
14073
|
+
function zv(e) {
|
|
14086
14074
|
let t = e.split("\n").filter((e) => e.trim().length > 0);
|
|
14087
14075
|
if (t.length === 0) return null;
|
|
14088
14076
|
let n = [];
|
|
14089
14077
|
for (let e of t) {
|
|
14090
|
-
let t = e.trim().match(
|
|
14078
|
+
let t = e.trim().match(Rv);
|
|
14091
14079
|
if (!t) return null;
|
|
14092
14080
|
n.push({
|
|
14093
14081
|
marker: t[1],
|
|
14094
14082
|
content: t[3]
|
|
14095
14083
|
});
|
|
14096
14084
|
}
|
|
14097
|
-
return
|
|
14085
|
+
return fv(n.map((e) => e.marker)) ? {
|
|
14098
14086
|
type: "orderedList",
|
|
14099
|
-
attrs:
|
|
14087
|
+
attrs: mv(n[0].marker),
|
|
14100
14088
|
content: n.map((e) => ({
|
|
14101
14089
|
type: "listItem",
|
|
14102
14090
|
content: [{
|
|
@@ -14109,12 +14097,12 @@ function Bv(e) {
|
|
|
14109
14097
|
}))
|
|
14110
14098
|
} : null;
|
|
14111
14099
|
}
|
|
14112
|
-
function
|
|
14100
|
+
function Bv(e, t, n) {
|
|
14113
14101
|
let r = [], i = 0;
|
|
14114
14102
|
for (; i < e.length;) {
|
|
14115
14103
|
let a = e[i];
|
|
14116
14104
|
if (a.indent === t) {
|
|
14117
|
-
let { paragraphLines: o, blockLines: s } =
|
|
14105
|
+
let { paragraphLines: o, blockLines: s } = Iv(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
14118
14106
|
c && l.push({
|
|
14119
14107
|
type: "paragraph",
|
|
14120
14108
|
raw: c,
|
|
@@ -14128,7 +14116,7 @@ function Vv(e, t, n) {
|
|
|
14128
14116
|
let d = i + 1, f = [];
|
|
14129
14117
|
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
14130
14118
|
if (f.length > 0) {
|
|
14131
|
-
let e =
|
|
14119
|
+
let e = Bv(f, Math.min(...f.map((e) => e.indent)), n);
|
|
14132
14120
|
l.push({
|
|
14133
14121
|
type: "list",
|
|
14134
14122
|
ordered: !0,
|
|
@@ -14147,7 +14135,7 @@ function Vv(e, t, n) {
|
|
|
14147
14135
|
}
|
|
14148
14136
|
return r;
|
|
14149
14137
|
}
|
|
14150
|
-
function
|
|
14138
|
+
function Vv(e, t) {
|
|
14151
14139
|
return e.map((e) => {
|
|
14152
14140
|
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
14153
14141
|
let n = [];
|
|
@@ -14169,8 +14157,8 @@ function Hv(e, t) {
|
|
|
14169
14157
|
};
|
|
14170
14158
|
});
|
|
14171
14159
|
}
|
|
14172
|
-
var
|
|
14173
|
-
function
|
|
14160
|
+
var Hv = "listItem", Uv = "textStyle", Wv = /^(\d+)\.\s$/;
|
|
14161
|
+
function Gv(e) {
|
|
14174
14162
|
let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
|
|
14175
14163
|
if (!t) return null;
|
|
14176
14164
|
switch (t[1].trim().toLowerCase()) {
|
|
@@ -14183,7 +14171,7 @@ function Kv(e) {
|
|
|
14183
14171
|
default: return null;
|
|
14184
14172
|
}
|
|
14185
14173
|
}
|
|
14186
|
-
var
|
|
14174
|
+
var Kv = J.create({
|
|
14187
14175
|
name: "orderedList",
|
|
14188
14176
|
addOptions() {
|
|
14189
14177
|
return {
|
|
@@ -14210,14 +14198,14 @@ var qv = J.create({
|
|
|
14210
14198
|
if (t) return t;
|
|
14211
14199
|
let n = e.getAttribute("style");
|
|
14212
14200
|
if (n) {
|
|
14213
|
-
let e =
|
|
14201
|
+
let e = Gv(n);
|
|
14214
14202
|
if (e) return e;
|
|
14215
14203
|
}
|
|
14216
14204
|
let r = e.querySelector("li");
|
|
14217
14205
|
if (r) {
|
|
14218
14206
|
let e = r.getAttribute("style");
|
|
14219
14207
|
if (e) {
|
|
14220
|
-
let t =
|
|
14208
|
+
let t = Gv(e);
|
|
14221
14209
|
if (t) return t;
|
|
14222
14210
|
}
|
|
14223
14211
|
}
|
|
@@ -14240,7 +14228,7 @@ var qv = J.create({
|
|
|
14240
14228
|
markdownTokenName: "list",
|
|
14241
14229
|
parseMarkdown: (e, t) => {
|
|
14242
14230
|
if (e.type !== "list" || !e.ordered) return [];
|
|
14243
|
-
let n = e.start || 1, r = e.typeMarker, i = e.items ?
|
|
14231
|
+
let n = e.start || 1, r = e.typeMarker, i = e.items ? Vv(e.items, t) : [], a = {};
|
|
14244
14232
|
return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
|
|
14245
14233
|
type: "orderedList",
|
|
14246
14234
|
attrs: a,
|
|
@@ -14256,9 +14244,9 @@ var qv = J.create({
|
|
|
14256
14244
|
level: "block",
|
|
14257
14245
|
start: () => -1,
|
|
14258
14246
|
tokenize: (e, t, n) => {
|
|
14259
|
-
let r = e.split("\n"), [i, a] =
|
|
14247
|
+
let r = e.split("\n"), [i, a] = Lv(r);
|
|
14260
14248
|
if (i.length === 0) return;
|
|
14261
|
-
let o =
|
|
14249
|
+
let o = Bv(i, i[0].indent, n);
|
|
14262
14250
|
if (o.length !== 0) return {
|
|
14263
14251
|
type: "list",
|
|
14264
14252
|
ordered: !0,
|
|
@@ -14271,7 +14259,7 @@ var qv = J.create({
|
|
|
14271
14259
|
},
|
|
14272
14260
|
markdownOptions: { indentsContent: !0 },
|
|
14273
14261
|
addCommands() {
|
|
14274
|
-
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14262
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Hv, this.editor.getAttributes(Uv)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
14275
14263
|
},
|
|
14276
14264
|
addKeyboardShortcuts() {
|
|
14277
14265
|
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
@@ -14281,7 +14269,7 @@ var qv = J.create({
|
|
|
14281
14269
|
if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
|
|
14282
14270
|
let n = t.clipboardData?.getData("text/plain");
|
|
14283
14271
|
if (!n) return !1;
|
|
14284
|
-
let r =
|
|
14272
|
+
let r = zv(n);
|
|
14285
14273
|
if (!r) return !1;
|
|
14286
14274
|
try {
|
|
14287
14275
|
let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
|
|
@@ -14293,25 +14281,25 @@ var qv = J.create({
|
|
|
14293
14281
|
},
|
|
14294
14282
|
addInputRules() {
|
|
14295
14283
|
let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = gf({
|
|
14296
|
-
find:
|
|
14284
|
+
find: Wv,
|
|
14297
14285
|
type: this.type,
|
|
14298
14286
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
14299
14287
|
joinPredicate: e
|
|
14300
14288
|
});
|
|
14301
14289
|
return (this.options.keepMarks || this.options.keepAttributes) && (t = gf({
|
|
14302
|
-
find:
|
|
14290
|
+
find: Wv,
|
|
14303
14291
|
type: this.type,
|
|
14304
14292
|
keepMarks: this.options.keepMarks,
|
|
14305
14293
|
keepAttributes: this.options.keepAttributes,
|
|
14306
14294
|
getAttributes: (e) => ({
|
|
14307
14295
|
start: +e[1],
|
|
14308
|
-
...this.editor.getAttributes(
|
|
14296
|
+
...this.editor.getAttributes(Uv)
|
|
14309
14297
|
}),
|
|
14310
14298
|
joinPredicate: e,
|
|
14311
14299
|
editor: this.editor
|
|
14312
14300
|
})), [t];
|
|
14313
14301
|
}
|
|
14314
|
-
}),
|
|
14302
|
+
}), qv = /^\s*(\[([( |x])?\])\s$/, Jv = J.create({
|
|
14315
14303
|
name: "taskItem",
|
|
14316
14304
|
addOptions() {
|
|
14317
14305
|
return {
|
|
@@ -14367,7 +14355,7 @@ var qv = J.create({
|
|
|
14367
14355
|
},
|
|
14368
14356
|
renderMarkdown: (e, t) => jd(e, t, `- [${e.attrs?.checked ? "x" : " "}] `),
|
|
14369
14357
|
addExtensions() {
|
|
14370
|
-
return this.options.nested ? [
|
|
14358
|
+
return this.options.nested ? [$_(this.name, [this.options.taskListTypeName])] : [];
|
|
14371
14359
|
},
|
|
14372
14360
|
addKeyboardShortcuts() {
|
|
14373
14361
|
let e = {
|
|
@@ -14424,12 +14412,12 @@ var qv = J.create({
|
|
|
14424
14412
|
},
|
|
14425
14413
|
addInputRules() {
|
|
14426
14414
|
return [gf({
|
|
14427
|
-
find:
|
|
14415
|
+
find: qv,
|
|
14428
14416
|
type: this.type,
|
|
14429
14417
|
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
14430
14418
|
})];
|
|
14431
14419
|
}
|
|
14432
|
-
}),
|
|
14420
|
+
}), Yv = J.create({
|
|
14433
14421
|
name: "taskList",
|
|
14434
14422
|
addOptions() {
|
|
14435
14423
|
return {
|
|
@@ -14531,12 +14519,12 @@ q.create({
|
|
|
14531
14519
|
name: "listKit",
|
|
14532
14520
|
addExtensions() {
|
|
14533
14521
|
let e = [];
|
|
14534
|
-
return this.options.bulletList !== !1 && e.push(
|
|
14522
|
+
return this.options.bulletList !== !1 && e.push(Y_.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(vv.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(kv.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Kv.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Jv.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Yv.configure(this.options.taskList)), e;
|
|
14535
14523
|
}
|
|
14536
14524
|
});
|
|
14537
14525
|
//#endregion
|
|
14538
14526
|
//#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.28.0_@tiptap+core@3.28.0_@tiptap+pm@3.28.0_/node_modules/@tiptap/extension-paragraph/dist/index.js
|
|
14539
|
-
var
|
|
14527
|
+
var Xv = " ", Zv = "\xA0", Qv = J.create({
|
|
14540
14528
|
name: "paragraph",
|
|
14541
14529
|
priority: 1e3,
|
|
14542
14530
|
addOptions() {
|
|
@@ -14558,12 +14546,12 @@ var Zv = " ", Qv = "\xA0", $v = J.create({
|
|
|
14558
14546
|
let n = e.tokens || [];
|
|
14559
14547
|
if (n.length === 1 && n[0].type === "image") return t.parseChildren([n[0]]);
|
|
14560
14548
|
let r = t.parseInline(n);
|
|
14561
|
-
return n.length === 1 && n[0].type === "text" && (n[0].raw ===
|
|
14549
|
+
return n.length === 1 && n[0].type === "text" && (n[0].raw === Xv || n[0].text === Xv || n[0].raw === Zv || n[0].text === Zv) && r.length === 1 && r[0].type === "text" && (r[0].text === Xv || r[0].text === Zv) ? t.createNode("paragraph", void 0, []) : t.createNode("paragraph", void 0, r);
|
|
14562
14550
|
},
|
|
14563
14551
|
renderMarkdown: (e, t, n) => {
|
|
14564
14552
|
if (!e) return "";
|
|
14565
14553
|
let r = Array.isArray(e.content) ? e.content : [];
|
|
14566
|
-
return r.length === 0 ? n?.previousNode?.type === "paragraph" && (Array.isArray(n?.previousNode?.content) ? n.previousNode.content : []).length === 0 ?
|
|
14554
|
+
return r.length === 0 ? n?.previousNode?.type === "paragraph" && (Array.isArray(n?.previousNode?.content) ? n.previousNode.content : []).length === 0 ? Xv : "" : t.renderChildren(r);
|
|
14567
14555
|
},
|
|
14568
14556
|
addCommands() {
|
|
14569
14557
|
return { setParagraph: () => ({ commands: e }) => e.setNode(this.name) };
|
|
@@ -14571,7 +14559,7 @@ var Zv = " ", Qv = "\xA0", $v = J.create({
|
|
|
14571
14559
|
addKeyboardShortcuts() {
|
|
14572
14560
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
14573
14561
|
}
|
|
14574
|
-
}),
|
|
14562
|
+
}), $v = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, ey = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, ty = Hd.create({
|
|
14575
14563
|
name: "strike",
|
|
14576
14564
|
addOptions() {
|
|
14577
14565
|
return { HTMLAttributes: {} };
|
|
@@ -14610,17 +14598,17 @@ var Zv = " ", Qv = "\xA0", $v = J.create({
|
|
|
14610
14598
|
},
|
|
14611
14599
|
addInputRules() {
|
|
14612
14600
|
return [ff({
|
|
14613
|
-
find:
|
|
14601
|
+
find: $v,
|
|
14614
14602
|
type: this.type
|
|
14615
14603
|
})];
|
|
14616
14604
|
},
|
|
14617
14605
|
addPasteRules() {
|
|
14618
14606
|
return [Cf({
|
|
14619
|
-
find:
|
|
14607
|
+
find: ey,
|
|
14620
14608
|
type: this.type
|
|
14621
14609
|
})];
|
|
14622
14610
|
}
|
|
14623
|
-
}),
|
|
14611
|
+
}), ny = J.create({
|
|
14624
14612
|
name: "text",
|
|
14625
14613
|
group: "inline",
|
|
14626
14614
|
parseMarkdown: (e) => ({
|
|
@@ -14630,15 +14618,15 @@ var Zv = " ", Qv = "\xA0", $v = J.create({
|
|
|
14630
14618
|
renderMarkdown: (e) => e.text || ""
|
|
14631
14619
|
});
|
|
14632
14620
|
//#endregion
|
|
14633
|
-
//#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.
|
|
14634
|
-
function
|
|
14621
|
+
//#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.3/node_modules/prosemirror-dropcursor/dist/index.js
|
|
14622
|
+
function ry(e = {}) {
|
|
14635
14623
|
return new N({ view(t) {
|
|
14636
|
-
return new
|
|
14624
|
+
return new iy(t, e);
|
|
14637
14625
|
} });
|
|
14638
14626
|
}
|
|
14639
|
-
var
|
|
14627
|
+
var iy = class {
|
|
14640
14628
|
constructor(e, t) {
|
|
14641
|
-
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
|
|
14629
|
+
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.lastDragEvent = null, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
|
|
14642
14630
|
"dragover",
|
|
14643
14631
|
"dragend",
|
|
14644
14632
|
"drop",
|
|
@@ -14657,7 +14645,10 @@ var ay = class {
|
|
|
14657
14645
|
this.handlers.forEach(({ name: e, handler: t }) => this.editorView.dom.removeEventListener(e, t));
|
|
14658
14646
|
}
|
|
14659
14647
|
update(e, t) {
|
|
14660
|
-
this.cursorPos != null && t.doc != e.state.doc
|
|
14648
|
+
if (this.cursorPos != null && t.doc != e.state.doc) if (this.lastDragEvent) {
|
|
14649
|
+
let e = this.computeTarget(this.lastDragEvent);
|
|
14650
|
+
e == this.cursorPos ? this.updateOverlay() : this.setCursor(e);
|
|
14651
|
+
} else this.updateOverlay();
|
|
14661
14652
|
}
|
|
14662
14653
|
setCursor(e) {
|
|
14663
14654
|
e != this.cursorPos && (this.cursorPos = e, e == null ? (this.element.parentNode.removeChild(this.element), this.element = null) : this.updateOverlay());
|
|
@@ -14703,20 +14694,24 @@ var ay = class {
|
|
|
14703
14694
|
scheduleRemoval(e) {
|
|
14704
14695
|
clearTimeout(this.timeout), this.timeout = setTimeout(() => this.setCursor(null), e);
|
|
14705
14696
|
}
|
|
14706
|
-
|
|
14707
|
-
if (!this.editorView.editable) return;
|
|
14697
|
+
computeTarget(e) {
|
|
14708
14698
|
let t = this.editorView.posAtCoords({
|
|
14709
14699
|
left: e.clientX,
|
|
14710
14700
|
top: e.clientY
|
|
14711
14701
|
}), n = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = n && n.type.spec.disableDropCursor, i = typeof r == "function" ? r(this.editorView, t, e) : r;
|
|
14712
|
-
if (t
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
}
|
|
14718
|
-
this.setCursor(e), this.scheduleRemoval(5e3);
|
|
14702
|
+
if (!t || i) return null;
|
|
14703
|
+
let a = t.pos;
|
|
14704
|
+
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
14705
|
+
let e = sn(this.editorView.state.doc, a, this.editorView.dragging.slice);
|
|
14706
|
+
e != null && (a = e);
|
|
14719
14707
|
}
|
|
14708
|
+
return a;
|
|
14709
|
+
}
|
|
14710
|
+
dragover(e) {
|
|
14711
|
+
if (!this.editorView.editable) return;
|
|
14712
|
+
this.lastDragEvent = e;
|
|
14713
|
+
let t = this.computeTarget(e);
|
|
14714
|
+
t != null && (this.setCursor(t), this.scheduleRemoval(5e3));
|
|
14720
14715
|
}
|
|
14721
14716
|
dragend() {
|
|
14722
14717
|
this.scheduleRemoval(20);
|
|
@@ -14727,7 +14722,7 @@ var ay = class {
|
|
|
14727
14722
|
dragleave(e) {
|
|
14728
14723
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
14729
14724
|
}
|
|
14730
|
-
},
|
|
14725
|
+
}, ay = class e extends A {
|
|
14731
14726
|
constructor(e) {
|
|
14732
14727
|
super(e, e);
|
|
14733
14728
|
}
|
|
@@ -14752,11 +14747,11 @@ var ay = class {
|
|
|
14752
14747
|
return new e(t.resolve(n.pos));
|
|
14753
14748
|
}
|
|
14754
14749
|
getBookmark() {
|
|
14755
|
-
return new
|
|
14750
|
+
return new oy(this.anchor);
|
|
14756
14751
|
}
|
|
14757
14752
|
static valid(e) {
|
|
14758
14753
|
let t = e.parent;
|
|
14759
|
-
if (t.inlineContent || !
|
|
14754
|
+
if (t.inlineContent || !cy(e) || !ly(e)) return !1;
|
|
14760
14755
|
let n = t.type.spec.allowGapCursor;
|
|
14761
14756
|
if (n != null) return n;
|
|
14762
14757
|
let r = t.contentMatchAt(e.index()).defaultType;
|
|
@@ -14793,8 +14788,8 @@ var ay = class {
|
|
|
14793
14788
|
}
|
|
14794
14789
|
}
|
|
14795
14790
|
};
|
|
14796
|
-
|
|
14797
|
-
var
|
|
14791
|
+
ay.prototype.visible = !1, ay.findFrom = ay.findGapCursorFrom, A.jsonID("gapcursor", ay);
|
|
14792
|
+
var oy = class e {
|
|
14798
14793
|
constructor(e) {
|
|
14799
14794
|
this.pos = e;
|
|
14800
14795
|
}
|
|
@@ -14803,13 +14798,13 @@ var sy = class e {
|
|
|
14803
14798
|
}
|
|
14804
14799
|
resolve(e) {
|
|
14805
14800
|
let t = e.resolve(this.pos);
|
|
14806
|
-
return
|
|
14801
|
+
return ay.valid(t) ? new ay(t) : A.near(t);
|
|
14807
14802
|
}
|
|
14808
14803
|
};
|
|
14809
|
-
function
|
|
14804
|
+
function sy(e) {
|
|
14810
14805
|
return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
|
|
14811
14806
|
}
|
|
14812
|
-
function
|
|
14807
|
+
function cy(e) {
|
|
14813
14808
|
for (let t = e.depth; t >= 0; t--) {
|
|
14814
14809
|
let n = e.index(t), r = e.node(t);
|
|
14815
14810
|
if (n == 0) {
|
|
@@ -14817,13 +14812,13 @@ function ly(e) {
|
|
|
14817
14812
|
continue;
|
|
14818
14813
|
}
|
|
14819
14814
|
for (let e = r.child(n - 1);; e = e.lastChild) {
|
|
14820
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
14815
|
+
if (e.childCount == 0 && !e.inlineContent || sy(e.type)) return !0;
|
|
14821
14816
|
if (e.inlineContent) return !1;
|
|
14822
14817
|
}
|
|
14823
14818
|
}
|
|
14824
14819
|
return !0;
|
|
14825
14820
|
}
|
|
14826
|
-
function
|
|
14821
|
+
function ly(e) {
|
|
14827
14822
|
for (let t = e.depth; t >= 0; t--) {
|
|
14828
14823
|
let n = e.indexAfter(t), r = e.node(t);
|
|
14829
14824
|
if (n == r.childCount) {
|
|
@@ -14831,30 +14826,30 @@ function uy(e) {
|
|
|
14831
14826
|
continue;
|
|
14832
14827
|
}
|
|
14833
14828
|
for (let e = r.child(n);; e = e.firstChild) {
|
|
14834
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
14829
|
+
if (e.childCount == 0 && !e.inlineContent || sy(e.type)) return !0;
|
|
14835
14830
|
if (e.inlineContent) return !1;
|
|
14836
14831
|
}
|
|
14837
14832
|
}
|
|
14838
14833
|
return !0;
|
|
14839
14834
|
}
|
|
14840
|
-
function
|
|
14835
|
+
function uy() {
|
|
14841
14836
|
return new N({ props: {
|
|
14842
|
-
decorations:
|
|
14837
|
+
decorations: hy,
|
|
14843
14838
|
createSelectionBetween(e, t, n) {
|
|
14844
|
-
return t.pos == n.pos &&
|
|
14839
|
+
return t.pos == n.pos && ay.valid(n) ? new ay(n) : null;
|
|
14845
14840
|
},
|
|
14846
|
-
handleClick:
|
|
14847
|
-
handleKeyDown:
|
|
14848
|
-
handleDOMEvents: { beforeinput:
|
|
14841
|
+
handleClick: py,
|
|
14842
|
+
handleKeyDown: dy,
|
|
14843
|
+
handleDOMEvents: { beforeinput: my }
|
|
14849
14844
|
} });
|
|
14850
14845
|
}
|
|
14851
|
-
var
|
|
14852
|
-
ArrowLeft:
|
|
14853
|
-
ArrowRight:
|
|
14854
|
-
ArrowUp:
|
|
14855
|
-
ArrowDown:
|
|
14846
|
+
var dy = hc({
|
|
14847
|
+
ArrowLeft: fy("horiz", -1),
|
|
14848
|
+
ArrowRight: fy("horiz", 1),
|
|
14849
|
+
ArrowUp: fy("vert", -1),
|
|
14850
|
+
ArrowDown: fy("vert", 1)
|
|
14856
14851
|
});
|
|
14857
|
-
function
|
|
14852
|
+
function fy(e, t) {
|
|
14858
14853
|
let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
|
|
14859
14854
|
return function(e, r, i) {
|
|
14860
14855
|
let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
|
|
@@ -14862,22 +14857,22 @@ function py(e, t) {
|
|
|
14862
14857
|
if (!i.endOfTextblock(n) || o.depth == 0) return !1;
|
|
14863
14858
|
s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
|
|
14864
14859
|
}
|
|
14865
|
-
let c =
|
|
14866
|
-
return c ? (r && r(e.tr.setSelection(new
|
|
14860
|
+
let c = ay.findGapCursorFrom(o, t, s);
|
|
14861
|
+
return c ? (r && r(e.tr.setSelection(new ay(c))), !0) : !1;
|
|
14867
14862
|
};
|
|
14868
14863
|
}
|
|
14869
|
-
function
|
|
14864
|
+
function py(e, t, n) {
|
|
14870
14865
|
if (!e || !e.editable) return !1;
|
|
14871
14866
|
let r = e.state.doc.resolve(t);
|
|
14872
|
-
if (!
|
|
14867
|
+
if (!ay.valid(r)) return !1;
|
|
14873
14868
|
let i = e.posAtCoords({
|
|
14874
14869
|
left: n.clientX,
|
|
14875
14870
|
top: n.clientY
|
|
14876
14871
|
});
|
|
14877
|
-
return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new
|
|
14872
|
+
return i && i.inside > -1 && M.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new ay(r))), !0);
|
|
14878
14873
|
}
|
|
14879
|
-
function
|
|
14880
|
-
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof
|
|
14874
|
+
function my(e, t) {
|
|
14875
|
+
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof ay)) return !1;
|
|
14881
14876
|
let { $from: n } = e.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
|
|
14882
14877
|
if (!r) return !1;
|
|
14883
14878
|
let i = S.empty;
|
|
@@ -14885,20 +14880,20 @@ function hy(e, t) {
|
|
|
14885
14880
|
let a = e.state.tr.replace(n.pos, n.pos, new D(i, 0, 0));
|
|
14886
14881
|
return a.setSelection(j.near(a.doc.resolve(n.pos + 1))), e.dispatch(a), !1;
|
|
14887
14882
|
}
|
|
14888
|
-
function
|
|
14889
|
-
if (!(e.selection instanceof
|
|
14883
|
+
function hy(e) {
|
|
14884
|
+
if (!(e.selection instanceof ay)) return null;
|
|
14890
14885
|
let t = document.createElement("div");
|
|
14891
14886
|
return t.className = "ProseMirror-gapcursor", B.create(e.doc, [hs.widget(e.selection.head, t, { key: "gapcursor" })]);
|
|
14892
14887
|
}
|
|
14893
14888
|
//#endregion
|
|
14894
14889
|
//#region ../../node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js
|
|
14895
|
-
var
|
|
14890
|
+
var gy = 200, $ = function() {};
|
|
14896
14891
|
$.prototype.append = function(e) {
|
|
14897
|
-
return e.length ? (e = $.from(e), !this.length && e || e.length <
|
|
14892
|
+
return e.length ? (e = $.from(e), !this.length && e || e.length < gy && this.leafAppend(e) || this.length < gy && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
14898
14893
|
}, $.prototype.prepend = function(e) {
|
|
14899
14894
|
return e.length ? $.from(e).append(this) : this;
|
|
14900
14895
|
}, $.prototype.appendInner = function(e) {
|
|
14901
|
-
return new
|
|
14896
|
+
return new vy(this, e);
|
|
14902
14897
|
}, $.prototype.slice = function(e, t) {
|
|
14903
14898
|
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? $.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
14904
14899
|
}, $.prototype.get = function(e) {
|
|
@@ -14912,9 +14907,9 @@ $.prototype.append = function(e) {
|
|
|
14912
14907
|
return r.push(e(t, n));
|
|
14913
14908
|
}, t, n), r;
|
|
14914
14909
|
}, $.from = function(e) {
|
|
14915
|
-
return e instanceof $ ? e : e && e.length ? new
|
|
14910
|
+
return e instanceof $ ? e : e && e.length ? new _y(e) : $.empty;
|
|
14916
14911
|
};
|
|
14917
|
-
var
|
|
14912
|
+
var _y = /* @__PURE__ */ function(e) {
|
|
14918
14913
|
function t(t) {
|
|
14919
14914
|
e.call(this), this.values = t;
|
|
14920
14915
|
}
|
|
@@ -14934,17 +14929,17 @@ var vy = /* @__PURE__ */ function(e) {
|
|
|
14934
14929
|
}, t.prototype.forEachInvertedInner = function(e, t, n, r) {
|
|
14935
14930
|
for (var i = t - 1; i >= n; i--) if (e(this.values[i], r + i) === !1) return !1;
|
|
14936
14931
|
}, t.prototype.leafAppend = function(e) {
|
|
14937
|
-
if (this.length + e.length <=
|
|
14932
|
+
if (this.length + e.length <= gy) return new t(this.values.concat(e.flatten()));
|
|
14938
14933
|
}, t.prototype.leafPrepend = function(e) {
|
|
14939
|
-
if (this.length + e.length <=
|
|
14934
|
+
if (this.length + e.length <= gy) return new t(e.flatten().concat(this.values));
|
|
14940
14935
|
}, n.length.get = function() {
|
|
14941
14936
|
return this.values.length;
|
|
14942
14937
|
}, n.depth.get = function() {
|
|
14943
14938
|
return 0;
|
|
14944
14939
|
}, Object.defineProperties(t.prototype, n), t;
|
|
14945
14940
|
}($);
|
|
14946
|
-
$.empty = new
|
|
14947
|
-
var
|
|
14941
|
+
$.empty = new _y([]);
|
|
14942
|
+
var vy = /* @__PURE__ */ function(e) {
|
|
14948
14943
|
function t(t, n) {
|
|
14949
14944
|
e.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
|
|
14950
14945
|
}
|
|
@@ -14971,7 +14966,7 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
14971
14966
|
}, t.prototype.appendInner = function(e) {
|
|
14972
14967
|
return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
|
|
14973
14968
|
}, t;
|
|
14974
|
-
}($),
|
|
14969
|
+
}($), yy = 500, by = class e {
|
|
14975
14970
|
constructor(e, t) {
|
|
14976
14971
|
this.items = e, this.eventCount = t;
|
|
14977
14972
|
}
|
|
@@ -14991,9 +14986,9 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
14991
14986
|
return;
|
|
14992
14987
|
}
|
|
14993
14988
|
if (i) {
|
|
14994
|
-
u.push(new
|
|
14989
|
+
u.push(new Sy(t.map));
|
|
14995
14990
|
let e = t.step.map(i.slice(a)), n;
|
|
14996
|
-
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new
|
|
14991
|
+
e && o.maybeStep(e).doc && (n = o.mapping.maps[o.mapping.maps.length - 1], l.push(new Sy(n, void 0, void 0, l.length + u.length))), a--, n && i.appendMap(n, a);
|
|
14997
14992
|
} else o.maybeStep(t.step);
|
|
14998
14993
|
if (t.selection) return s = i ? t.selection.map(i.slice(a)) : t.selection, c = new e(this.items.slice(0, r).append(u.reverse().concat(l)), this.eventCount - 1), !1;
|
|
14999
14994
|
}, this.items.length, 0), {
|
|
@@ -15005,11 +15000,11 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
15005
15000
|
addTransform(t, n, r, i) {
|
|
15006
15001
|
let a = [], o = this.eventCount, s = this.items, c = !i && s.length ? s.get(s.length - 1) : null;
|
|
15007
15002
|
for (let e = 0; e < t.steps.length; e++) {
|
|
15008
|
-
let r = t.steps[e].invert(t.docs[e]), l = new
|
|
15003
|
+
let r = t.steps[e].invert(t.docs[e]), l = new Sy(t.mapping.maps[e], r, n), u;
|
|
15009
15004
|
(u = c && c.merge(l)) && (l = u, e ? a.pop() : s = s.slice(0, s.length - 1)), a.push(l), n &&= (o++, void 0), i || (c = l);
|
|
15010
15005
|
}
|
|
15011
15006
|
let l = o - r.depth;
|
|
15012
|
-
return l >
|
|
15007
|
+
return l > wy && (s = xy(s, l), o -= l), new e(s.append(a), o);
|
|
15013
15008
|
}
|
|
15014
15009
|
remapping(e, t) {
|
|
15015
15010
|
let n = new Et();
|
|
@@ -15019,7 +15014,7 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
15019
15014
|
}, e, t), n;
|
|
15020
15015
|
}
|
|
15021
15016
|
addMaps(t) {
|
|
15022
|
-
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new
|
|
15017
|
+
return this.eventCount == 0 ? this : new e(this.items.append(t.map((e) => new Sy(e))), this.eventCount);
|
|
15023
15018
|
}
|
|
15024
15019
|
rebased(t, n) {
|
|
15025
15020
|
if (!this.eventCount) return this;
|
|
@@ -15035,13 +15030,13 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
15035
15030
|
let i = a.maps[n];
|
|
15036
15031
|
if (e.step) {
|
|
15037
15032
|
let o = t.steps[n].invert(t.docs[n]), l = e.selection && e.selection.map(a.slice(c + 1, n));
|
|
15038
|
-
l && s++, r.push(new
|
|
15039
|
-
} else r.push(new
|
|
15033
|
+
l && s++, r.push(new Sy(i, o, l));
|
|
15034
|
+
} else r.push(new Sy(i));
|
|
15040
15035
|
}, i);
|
|
15041
15036
|
let l = [];
|
|
15042
|
-
for (let e = n; e < o; e++) l.push(new
|
|
15037
|
+
for (let e = n; e < o; e++) l.push(new Sy(a.maps[e]));
|
|
15043
15038
|
let u = this.items.slice(0, i).append(l).append(r), d = new e(u, s);
|
|
15044
|
-
return d.emptyItemCount() >
|
|
15039
|
+
return d.emptyItemCount() > yy && (d = d.compress(this.items.length - r.length)), d;
|
|
15045
15040
|
}
|
|
15046
15041
|
emptyItemCount() {
|
|
15047
15042
|
let e = 0;
|
|
@@ -15058,21 +15053,21 @@ var yy = /* @__PURE__ */ function(e) {
|
|
|
15058
15053
|
if (r--, o && n.appendMap(o, r), t) {
|
|
15059
15054
|
let s = e.selection && e.selection.map(n.slice(r));
|
|
15060
15055
|
s && a++;
|
|
15061
|
-
let c = new
|
|
15056
|
+
let c = new Sy(o.invert(), t, s), l, u = i.length - 1;
|
|
15062
15057
|
(l = i.length && i[u].merge(c)) ? i[u] = l : i.push(c);
|
|
15063
15058
|
}
|
|
15064
15059
|
} else e.map && r--;
|
|
15065
15060
|
}, this.items.length, 0), new e($.from(i.reverse()), a);
|
|
15066
15061
|
}
|
|
15067
15062
|
};
|
|
15068
|
-
|
|
15069
|
-
function
|
|
15063
|
+
by.empty = new by($.empty, 0);
|
|
15064
|
+
function xy(e, t) {
|
|
15070
15065
|
let n;
|
|
15071
15066
|
return e.forEach((e, r) => {
|
|
15072
15067
|
if (e.selection && t-- == 0) return n = r, !1;
|
|
15073
15068
|
}), e.slice(n);
|
|
15074
15069
|
}
|
|
15075
|
-
var
|
|
15070
|
+
var Sy = class e {
|
|
15076
15071
|
constructor(e, t, n, r) {
|
|
15077
15072
|
this.map = e, this.step = t, this.selection = n, this.mirrorOffset = r;
|
|
15078
15073
|
}
|
|
@@ -15082,25 +15077,25 @@ var Cy = class e {
|
|
|
15082
15077
|
if (n) return new e(n.getMap().invert(), n, this.selection);
|
|
15083
15078
|
}
|
|
15084
15079
|
}
|
|
15085
|
-
},
|
|
15080
|
+
}, Cy = class {
|
|
15086
15081
|
constructor(e, t, n, r, i) {
|
|
15087
15082
|
this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = i;
|
|
15088
15083
|
}
|
|
15089
|
-
},
|
|
15090
|
-
function
|
|
15091
|
-
let i = n.getMeta(
|
|
15084
|
+
}, wy = 20;
|
|
15085
|
+
function Ty(e, t, n, r) {
|
|
15086
|
+
let i = n.getMeta(Ny), a;
|
|
15092
15087
|
if (i) return i.historyState;
|
|
15093
|
-
n.getMeta(
|
|
15088
|
+
n.getMeta(Py) && (e = new Cy(e.done, e.undone, null, 0, -1));
|
|
15094
15089
|
let o = n.getMeta("appendedTransaction");
|
|
15095
15090
|
if (n.steps.length == 0) return e;
|
|
15096
|
-
if (o && o.getMeta(
|
|
15091
|
+
if (o && o.getMeta(Ny)) return o.getMeta(Ny).redo ? new Cy(e.done.addTransform(n, void 0, r, My(t)), e.undone, Dy(n.mapping.maps), e.prevTime, e.prevComposition) : new Cy(e.done, e.undone.addTransform(n, void 0, r, My(t)), null, e.prevTime, e.prevComposition);
|
|
15097
15092
|
if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
15098
|
-
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !
|
|
15099
|
-
return new
|
|
15100
|
-
} else if (a = n.getMeta("rebased")) return new
|
|
15101
|
-
else return new
|
|
15093
|
+
let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !Ey(n, e.prevRanges)), s = o ? Oy(e.prevRanges, n.mapping) : Dy(n.mapping.maps);
|
|
15094
|
+
return new Cy(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, My(t)), by.empty, s, n.time, i ?? e.prevComposition);
|
|
15095
|
+
} else if (a = n.getMeta("rebased")) return new Cy(e.done.rebased(n, a), e.undone.rebased(n, a), Oy(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
15096
|
+
else return new Cy(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), Oy(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
|
|
15102
15097
|
}
|
|
15103
|
-
function
|
|
15098
|
+
function Ey(e, t) {
|
|
15104
15099
|
if (!t) return !1;
|
|
15105
15100
|
if (!e.docChanged) return !0;
|
|
15106
15101
|
let n = !1;
|
|
@@ -15108,12 +15103,12 @@ function Dy(e, t) {
|
|
|
15108
15103
|
for (let i = 0; i < t.length; i += 2) e <= t[i + 1] && r >= t[i] && (n = !0);
|
|
15109
15104
|
}), n;
|
|
15110
15105
|
}
|
|
15111
|
-
function
|
|
15106
|
+
function Dy(e) {
|
|
15112
15107
|
let t = [];
|
|
15113
15108
|
for (let n = e.length - 1; n >= 0 && t.length == 0; n--) e[n].forEach((e, n, r, i) => t.push(r, i));
|
|
15114
15109
|
return t;
|
|
15115
15110
|
}
|
|
15116
|
-
function
|
|
15111
|
+
function Oy(e, t) {
|
|
15117
15112
|
if (!e) return null;
|
|
15118
15113
|
let n = [];
|
|
15119
15114
|
for (let r = 0; r < e.length; r += 2) {
|
|
@@ -15122,61 +15117,61 @@ function ky(e, t) {
|
|
|
15122
15117
|
}
|
|
15123
15118
|
return n;
|
|
15124
15119
|
}
|
|
15125
|
-
function
|
|
15126
|
-
let r =
|
|
15120
|
+
function ky(e, t, n) {
|
|
15121
|
+
let r = My(t), i = Ny.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
|
|
15127
15122
|
if (!a) return null;
|
|
15128
|
-
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new
|
|
15129
|
-
return a.transform.setSelection(o).setMeta(
|
|
15123
|
+
let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new Cy(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
|
|
15124
|
+
return a.transform.setSelection(o).setMeta(Ny, {
|
|
15130
15125
|
redo: n,
|
|
15131
15126
|
historyState: c
|
|
15132
15127
|
});
|
|
15133
15128
|
}
|
|
15134
|
-
var
|
|
15135
|
-
function
|
|
15129
|
+
var Ay = !1, jy = null;
|
|
15130
|
+
function My(e) {
|
|
15136
15131
|
let t = e.plugins;
|
|
15137
|
-
if (
|
|
15138
|
-
|
|
15132
|
+
if (jy != t) {
|
|
15133
|
+
Ay = !1, jy = t;
|
|
15139
15134
|
for (let e = 0; e < t.length; e++) if (t[e].spec.historyPreserveItems) {
|
|
15140
|
-
|
|
15135
|
+
Ay = !0;
|
|
15141
15136
|
break;
|
|
15142
15137
|
}
|
|
15143
15138
|
}
|
|
15144
|
-
return
|
|
15139
|
+
return Ay;
|
|
15145
15140
|
}
|
|
15146
|
-
var
|
|
15147
|
-
function
|
|
15141
|
+
var Ny = new P("history"), Py = new P("closeHistory");
|
|
15142
|
+
function Fy(e = {}) {
|
|
15148
15143
|
return e = {
|
|
15149
15144
|
depth: e.depth || 100,
|
|
15150
15145
|
newGroupDelay: e.newGroupDelay || 500
|
|
15151
15146
|
}, new N({
|
|
15152
|
-
key:
|
|
15147
|
+
key: Ny,
|
|
15153
15148
|
state: {
|
|
15154
15149
|
init() {
|
|
15155
|
-
return new
|
|
15150
|
+
return new Cy(by.empty, by.empty, null, 0, -1);
|
|
15156
15151
|
},
|
|
15157
15152
|
apply(t, n, r) {
|
|
15158
|
-
return
|
|
15153
|
+
return Ty(n, r, t, e);
|
|
15159
15154
|
}
|
|
15160
15155
|
},
|
|
15161
15156
|
config: e,
|
|
15162
15157
|
props: { handleDOMEvents: { beforeinput(e, t) {
|
|
15163
|
-
let n = t.inputType, r = n == "historyUndo" ?
|
|
15158
|
+
let n = t.inputType, r = n == "historyUndo" ? Ly : n == "historyRedo" ? Ry : null;
|
|
15164
15159
|
return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
|
|
15165
15160
|
} } }
|
|
15166
15161
|
});
|
|
15167
15162
|
}
|
|
15168
|
-
function
|
|
15163
|
+
function Iy(e, t) {
|
|
15169
15164
|
return (n, r) => {
|
|
15170
|
-
let i =
|
|
15165
|
+
let i = Ny.getState(n);
|
|
15171
15166
|
if (!i || (e ? i.undone : i.done).eventCount == 0) return !1;
|
|
15172
15167
|
if (r) {
|
|
15173
|
-
let a =
|
|
15168
|
+
let a = ky(i, n, e);
|
|
15174
15169
|
a && r(t ? a.scrollIntoView() : a);
|
|
15175
15170
|
}
|
|
15176
15171
|
return !0;
|
|
15177
15172
|
};
|
|
15178
15173
|
}
|
|
15179
|
-
var
|
|
15174
|
+
var Ly = Iy(!1, !0), Ry = Iy(!0, !0);
|
|
15180
15175
|
q.create({
|
|
15181
15176
|
name: "characterCount",
|
|
15182
15177
|
addOptions() {
|
|
@@ -15239,7 +15234,7 @@ q.create({
|
|
|
15239
15234
|
})];
|
|
15240
15235
|
}
|
|
15241
15236
|
});
|
|
15242
|
-
var
|
|
15237
|
+
var zy = q.create({
|
|
15243
15238
|
name: "dropCursor",
|
|
15244
15239
|
addOptions() {
|
|
15245
15240
|
return {
|
|
@@ -15249,7 +15244,7 @@ var By = q.create({
|
|
|
15249
15244
|
};
|
|
15250
15245
|
},
|
|
15251
15246
|
addProseMirrorPlugins() {
|
|
15252
|
-
return [
|
|
15247
|
+
return [ry(this.options)];
|
|
15253
15248
|
}
|
|
15254
15249
|
});
|
|
15255
15250
|
q.create({
|
|
@@ -15283,10 +15278,10 @@ q.create({
|
|
|
15283
15278
|
})];
|
|
15284
15279
|
}
|
|
15285
15280
|
});
|
|
15286
|
-
var
|
|
15281
|
+
var By = q.create({
|
|
15287
15282
|
name: "gapCursor",
|
|
15288
15283
|
addProseMirrorPlugins() {
|
|
15289
|
-
return [
|
|
15284
|
+
return [uy()];
|
|
15290
15285
|
},
|
|
15291
15286
|
extendNodeSchema(e) {
|
|
15292
15287
|
return { allowGapCursor: G(W(e, "allowGapCursor", {
|
|
@@ -15295,8 +15290,8 @@ var Vy = q.create({
|
|
|
15295
15290
|
storage: e.storage
|
|
15296
15291
|
})) ?? null };
|
|
15297
15292
|
}
|
|
15298
|
-
}),
|
|
15299
|
-
function
|
|
15293
|
+
}), Vy = "placeholder", Hy = new P("tiptap__placeholder");
|
|
15294
|
+
function Uy(e) {
|
|
15300
15295
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
15301
15296
|
return o && u.push(l), hs.node(i, i + a.nodeSize, {
|
|
15302
15297
|
class: u.join(" "),
|
|
@@ -15308,14 +15303,14 @@ function Wy(e) {
|
|
|
15308
15303
|
}) : n
|
|
15309
15304
|
});
|
|
15310
15305
|
}
|
|
15311
|
-
function
|
|
15306
|
+
function Wy(e, t) {
|
|
15312
15307
|
return typeof e == "function" ? e(t) : e;
|
|
15313
15308
|
}
|
|
15314
|
-
function
|
|
15309
|
+
function Gy({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
15315
15310
|
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
15316
15311
|
return r.nodesBetween(a, o, (r, i) => {
|
|
15317
15312
|
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && Du(r);
|
|
15318
|
-
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(
|
|
15313
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(Uy({
|
|
15319
15314
|
editor: e,
|
|
15320
15315
|
isEmptyDoc: l,
|
|
15321
15316
|
dataAttribute: n,
|
|
@@ -15323,7 +15318,7 @@ function Ky({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
15323
15318
|
placeholder: t.placeholder,
|
|
15324
15319
|
classes: {
|
|
15325
15320
|
emptyEditor: t.emptyEditorClass,
|
|
15326
|
-
emptyNode:
|
|
15321
|
+
emptyNode: Wy(t.emptyNodeClass, {
|
|
15327
15322
|
editor: e,
|
|
15328
15323
|
node: r,
|
|
15329
15324
|
pos: i,
|
|
@@ -15335,14 +15330,14 @@ function Ky({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
15335
15330
|
})), t.includeChildren;
|
|
15336
15331
|
}), c;
|
|
15337
15332
|
}
|
|
15338
|
-
function
|
|
15333
|
+
function Ky({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
15339
15334
|
if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
|
|
15340
15335
|
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
15341
15336
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
15342
15337
|
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
15343
15338
|
if (c && c.type.isTextblock && Du(c)) {
|
|
15344
15339
|
let r = a >= l && a <= l + c.nodeSize;
|
|
15345
|
-
o.push(
|
|
15340
|
+
o.push(Uy({
|
|
15346
15341
|
editor: e,
|
|
15347
15342
|
isEmptyDoc: s,
|
|
15348
15343
|
dataAttribute: n,
|
|
@@ -15350,7 +15345,7 @@ function qy({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
15350
15345
|
placeholder: t.placeholder,
|
|
15351
15346
|
classes: {
|
|
15352
15347
|
emptyEditor: t.emptyEditorClass,
|
|
15353
|
-
emptyNode:
|
|
15348
|
+
emptyNode: Wy(t.emptyNodeClass, {
|
|
15354
15349
|
editor: e,
|
|
15355
15350
|
node: c,
|
|
15356
15351
|
pos: l,
|
|
@@ -15361,7 +15356,7 @@ function qy({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
15361
15356
|
pos: l
|
|
15362
15357
|
}));
|
|
15363
15358
|
}
|
|
15364
|
-
} else o.push(...
|
|
15359
|
+
} else o.push(...Gy({
|
|
15365
15360
|
editor: e,
|
|
15366
15361
|
options: t,
|
|
15367
15362
|
dataAttribute: n,
|
|
@@ -15372,7 +15367,7 @@ function qy({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
15372
15367
|
}));
|
|
15373
15368
|
return B.create(r, o);
|
|
15374
15369
|
}
|
|
15375
|
-
function
|
|
15370
|
+
function qy(e, t) {
|
|
15376
15371
|
let n = e.resolve(t);
|
|
15377
15372
|
if (n.depth === 0) {
|
|
15378
15373
|
let e = n.nodeAfter ?? n.nodeBefore;
|
|
@@ -15392,13 +15387,13 @@ function Jy(e, t) {
|
|
|
15392
15387
|
to: r + n.node(1).nodeSize
|
|
15393
15388
|
};
|
|
15394
15389
|
}
|
|
15395
|
-
function
|
|
15390
|
+
function Jy(e, t) {
|
|
15396
15391
|
return {
|
|
15397
15392
|
from: Math.max(0, t.from - 1),
|
|
15398
15393
|
to: Math.min(e.content.size, t.to - 1)
|
|
15399
15394
|
};
|
|
15400
15395
|
}
|
|
15401
|
-
function
|
|
15396
|
+
function Yy(e, t, n) {
|
|
15402
15397
|
let r = [];
|
|
15403
15398
|
return e.forEach((e, i) => {
|
|
15404
15399
|
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
@@ -15408,7 +15403,7 @@ function Xy(e, t, n) {
|
|
|
15408
15403
|
});
|
|
15409
15404
|
}), r;
|
|
15410
15405
|
}
|
|
15411
|
-
function
|
|
15406
|
+
function Xy(e) {
|
|
15412
15407
|
if (e.length === 0) return [];
|
|
15413
15408
|
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
15414
15409
|
for (let e = 1; e < t.length; e += 1) {
|
|
@@ -15417,31 +15412,31 @@ function Zy(e) {
|
|
|
15417
15412
|
}
|
|
15418
15413
|
return n;
|
|
15419
15414
|
}
|
|
15420
|
-
function
|
|
15421
|
-
let n =
|
|
15422
|
-
return n.push(
|
|
15415
|
+
function Zy(e, t) {
|
|
15416
|
+
let n = Yy(e, t.from, t.to);
|
|
15417
|
+
return n.push(Jy(e, qy(e, t.from))), t.to > t.from ? n.push(Jy(e, qy(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(Jy(e, qy(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
15423
15418
|
}
|
|
15424
|
-
function
|
|
15419
|
+
function Qy(e, t, n) {
|
|
15425
15420
|
let r = [];
|
|
15426
15421
|
if (e.docChanged) {
|
|
15427
15422
|
let t = mu(e);
|
|
15428
|
-
for (let e of t) r.push(...
|
|
15423
|
+
for (let e of t) r.push(...Zy(n.doc, e.newRange));
|
|
15429
15424
|
}
|
|
15430
|
-
return e.selectionSet && (r.push(
|
|
15425
|
+
return e.selectionSet && (r.push(Jy(n.doc, qy(n.doc, e.mapping.map(t.selection.anchor)))), r.push(Jy(n.doc, qy(n.doc, n.selection.anchor)))), Xy(r);
|
|
15431
15426
|
}
|
|
15432
|
-
function
|
|
15427
|
+
function $y(e, t, n) {
|
|
15433
15428
|
let r = Math.max(0, Math.min(e, n.content.size));
|
|
15434
15429
|
return {
|
|
15435
15430
|
from: r,
|
|
15436
15431
|
to: Math.max(r, Math.min(t, n.content.size))
|
|
15437
15432
|
};
|
|
15438
15433
|
}
|
|
15439
|
-
function
|
|
15434
|
+
function eb({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
15440
15435
|
let s = e;
|
|
15441
15436
|
for (let e of t) {
|
|
15442
|
-
let { from: t, to: c } =
|
|
15437
|
+
let { from: t, to: c } = $y(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
15443
15438
|
l.length && (s = s.remove(l));
|
|
15444
|
-
let u =
|
|
15439
|
+
let u = Gy({
|
|
15445
15440
|
editor: n,
|
|
15446
15441
|
options: r,
|
|
15447
15442
|
dataAttribute: i,
|
|
@@ -15454,10 +15449,10 @@ function tb({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i
|
|
|
15454
15449
|
}
|
|
15455
15450
|
return s;
|
|
15456
15451
|
}
|
|
15457
|
-
function
|
|
15452
|
+
function tb({ editor: e, options: t, dataAttribute: n }) {
|
|
15458
15453
|
return {
|
|
15459
15454
|
init(r, i) {
|
|
15460
|
-
return
|
|
15455
|
+
return Ky({
|
|
15461
15456
|
editor: e,
|
|
15462
15457
|
options: t,
|
|
15463
15458
|
dataAttribute: n,
|
|
@@ -15466,9 +15461,9 @@ function nb({ editor: e, options: t, dataAttribute: n }) {
|
|
|
15466
15461
|
}) ?? B.empty;
|
|
15467
15462
|
},
|
|
15468
15463
|
apply(r, i, a, o) {
|
|
15469
|
-
return !r.docChanged && !r.selectionSet ? i :
|
|
15464
|
+
return !r.docChanged && !r.selectionSet ? i : eb({
|
|
15470
15465
|
decorations: i.map(r.mapping, r.doc),
|
|
15471
|
-
ranges:
|
|
15466
|
+
ranges: Qy(r, a, o),
|
|
15472
15467
|
editor: e,
|
|
15473
15468
|
options: t,
|
|
15474
15469
|
dataAttribute: n,
|
|
@@ -15478,25 +15473,25 @@ function nb({ editor: e, options: t, dataAttribute: n }) {
|
|
|
15478
15473
|
}
|
|
15479
15474
|
};
|
|
15480
15475
|
}
|
|
15481
|
-
function
|
|
15476
|
+
function nb(e) {
|
|
15482
15477
|
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
15483
15478
|
}
|
|
15484
|
-
function
|
|
15485
|
-
let n = t.dataAttribute ? `data-${
|
|
15479
|
+
function rb({ editor: e, options: t }) {
|
|
15480
|
+
let n = t.dataAttribute ? `data-${nb(t.dataAttribute)}` : `data-${Vy}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
15486
15481
|
return new N({
|
|
15487
|
-
key:
|
|
15488
|
-
...r ? {} : { state:
|
|
15482
|
+
key: Hy,
|
|
15483
|
+
...r ? {} : { state: tb({
|
|
15489
15484
|
editor: e,
|
|
15490
15485
|
options: t,
|
|
15491
15486
|
dataAttribute: n
|
|
15492
15487
|
}) },
|
|
15493
|
-
props: { decorations: r ? ({ doc: r, selection: i }) =>
|
|
15488
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => Ky({
|
|
15494
15489
|
editor: e,
|
|
15495
15490
|
options: t,
|
|
15496
15491
|
dataAttribute: n,
|
|
15497
15492
|
doc: r,
|
|
15498
15493
|
selection: i
|
|
15499
|
-
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? B.empty :
|
|
15494
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? B.empty : Hy.getState(n) ?? B.empty }
|
|
15500
15495
|
});
|
|
15501
15496
|
}
|
|
15502
15497
|
q.create({
|
|
@@ -15505,7 +15500,7 @@ q.create({
|
|
|
15505
15500
|
return {
|
|
15506
15501
|
emptyEditorClass: "is-editor-empty",
|
|
15507
15502
|
emptyNodeClass: "is-empty",
|
|
15508
|
-
dataAttribute:
|
|
15503
|
+
dataAttribute: Vy,
|
|
15509
15504
|
placeholder: "Write something …",
|
|
15510
15505
|
showOnlyWhenEditable: !0,
|
|
15511
15506
|
showOnlyCurrent: !0,
|
|
@@ -15513,23 +15508,23 @@ q.create({
|
|
|
15513
15508
|
};
|
|
15514
15509
|
},
|
|
15515
15510
|
addProseMirrorPlugins() {
|
|
15516
|
-
return [
|
|
15511
|
+
return [rb({
|
|
15517
15512
|
editor: this.editor,
|
|
15518
15513
|
options: this.options
|
|
15519
15514
|
})];
|
|
15520
15515
|
}
|
|
15521
15516
|
});
|
|
15522
|
-
function
|
|
15517
|
+
function ib(e, t) {
|
|
15523
15518
|
return !e.selection.empty && !Ou(e.selection) && t.isEditable;
|
|
15524
15519
|
}
|
|
15525
|
-
function
|
|
15526
|
-
return
|
|
15520
|
+
function ab(e, t) {
|
|
15521
|
+
return ib(e, t) && !t.isFocused && !t.view.dragging;
|
|
15527
15522
|
}
|
|
15528
|
-
function
|
|
15523
|
+
function ob() {
|
|
15529
15524
|
var e;
|
|
15530
15525
|
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
15531
15526
|
}
|
|
15532
|
-
function
|
|
15527
|
+
function sb(e) {
|
|
15533
15528
|
e.focus();
|
|
15534
15529
|
}
|
|
15535
15530
|
q.create({
|
|
@@ -15543,15 +15538,15 @@ q.create({
|
|
|
15543
15538
|
key: new P("selection"),
|
|
15544
15539
|
props: {
|
|
15545
15540
|
decorations(n) {
|
|
15546
|
-
return
|
|
15541
|
+
return ab(n, e) ? B.create(n.doc, [hs.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
15547
15542
|
},
|
|
15548
15543
|
handleDOMEvents: {
|
|
15549
15544
|
blur(t) {
|
|
15550
|
-
return
|
|
15545
|
+
return ib(t.state, e) && ob(), !1;
|
|
15551
15546
|
},
|
|
15552
15547
|
focus(t) {
|
|
15553
|
-
return
|
|
15554
|
-
!e.isDestroyed && t.hasFocus() &&
|
|
15548
|
+
return ib(t.state, e) && requestAnimationFrame(() => {
|
|
15549
|
+
!e.isDestroyed && t.hasFocus() && sb(t);
|
|
15555
15550
|
}), !1;
|
|
15556
15551
|
}
|
|
15557
15552
|
}
|
|
@@ -15559,10 +15554,10 @@ q.create({
|
|
|
15559
15554
|
})];
|
|
15560
15555
|
}
|
|
15561
15556
|
});
|
|
15562
|
-
function
|
|
15557
|
+
function cb({ types: e, node: t }) {
|
|
15563
15558
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
15564
15559
|
}
|
|
15565
|
-
var
|
|
15560
|
+
var lb = q.create({
|
|
15566
15561
|
name: "trailingNode",
|
|
15567
15562
|
addOptions() {
|
|
15568
15563
|
return {
|
|
@@ -15581,7 +15576,7 @@ var ub = q.create({
|
|
|
15581
15576
|
state: {
|
|
15582
15577
|
init: (e, t) => {
|
|
15583
15578
|
let r = t.tr.doc.lastChild;
|
|
15584
|
-
return !
|
|
15579
|
+
return !cb({
|
|
15585
15580
|
node: r,
|
|
15586
15581
|
types: n
|
|
15587
15582
|
});
|
|
@@ -15589,7 +15584,7 @@ var ub = q.create({
|
|
|
15589
15584
|
apply: (e, t) => {
|
|
15590
15585
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
15591
15586
|
let r = e.doc.lastChild;
|
|
15592
|
-
return !
|
|
15587
|
+
return !cb({
|
|
15593
15588
|
node: r,
|
|
15594
15589
|
types: n
|
|
15595
15590
|
});
|
|
@@ -15597,7 +15592,7 @@ var ub = q.create({
|
|
|
15597
15592
|
}
|
|
15598
15593
|
})];
|
|
15599
15594
|
}
|
|
15600
|
-
}),
|
|
15595
|
+
}), ub = q.create({
|
|
15601
15596
|
name: "undoRedo",
|
|
15602
15597
|
addOptions() {
|
|
15603
15598
|
return {
|
|
@@ -15607,12 +15602,12 @@ var ub = q.create({
|
|
|
15607
15602
|
},
|
|
15608
15603
|
addCommands() {
|
|
15609
15604
|
return {
|
|
15610
|
-
undo: () => ({ state: e, dispatch: t }) =>
|
|
15611
|
-
redo: () => ({ state: e, dispatch: t }) =>
|
|
15605
|
+
undo: () => ({ state: e, dispatch: t }) => Ly(e, t),
|
|
15606
|
+
redo: () => ({ state: e, dispatch: t }) => Ry(e, t)
|
|
15612
15607
|
};
|
|
15613
15608
|
},
|
|
15614
15609
|
addProseMirrorPlugins() {
|
|
15615
|
-
return [
|
|
15610
|
+
return [Fy(this.options)];
|
|
15616
15611
|
},
|
|
15617
15612
|
addKeyboardShortcuts() {
|
|
15618
15613
|
return {
|
|
@@ -15623,19 +15618,19 @@ var ub = q.create({
|
|
|
15623
15618
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
15624
15619
|
};
|
|
15625
15620
|
}
|
|
15626
|
-
}),
|
|
15627
|
-
StarterKit: () =>
|
|
15628
|
-
default: () =>
|
|
15629
|
-
}),
|
|
15621
|
+
}), db = /* @__PURE__ */ e({
|
|
15622
|
+
StarterKit: () => fb,
|
|
15623
|
+
default: () => pb
|
|
15624
|
+
}), fb = q.create({
|
|
15630
15625
|
name: "starterKit",
|
|
15631
15626
|
addExtensions() {
|
|
15632
15627
|
let e = [];
|
|
15633
|
-
return this.options.bold !== !1 && e.push(
|
|
15628
|
+
return this.options.bold !== !1 && e.push(D_.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(S_.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(Y_.configure(this.options.bulletList)), this.options.code !== !1 && e.push(A_.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(P_.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(F_.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(zy.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(By.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(I_.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(L_.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(ub.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(R_.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(U_.configure(this.options.italic)), this.options.listItem !== !1 && e.push(vv.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(kv.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(a_.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Kv.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(Qv.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(ty.configure(this.options.strike)), this.options.text !== !1 && e.push(ny.configure(this.options.text)), this.options.underline !== !1 && e.push(__.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(lb.configure(this.options?.trailingNode)), e;
|
|
15634
15629
|
}
|
|
15635
|
-
}),
|
|
15630
|
+
}), pb = fb, mb = /* @__PURE__ */ e({
|
|
15636
15631
|
CommandManager: () => yc,
|
|
15637
|
-
Editor: () =>
|
|
15638
|
-
EditorContent: () =>
|
|
15632
|
+
Editor: () => gb,
|
|
15633
|
+
EditorContent: () => _b,
|
|
15639
15634
|
Extendable: () => Vd,
|
|
15640
15635
|
Extension: () => q,
|
|
15641
15636
|
Fragment: () => _f,
|
|
@@ -15643,20 +15638,20 @@ var ub = q.create({
|
|
|
15643
15638
|
MappablePosition: () => Au,
|
|
15644
15639
|
Mark: () => Hd,
|
|
15645
15640
|
MarkView: () => Id,
|
|
15646
|
-
MarkViewContent: () =>
|
|
15641
|
+
MarkViewContent: () => Cb,
|
|
15647
15642
|
Node: () => J,
|
|
15648
15643
|
NodePos: () => lf,
|
|
15649
15644
|
NodeView: () => Sf,
|
|
15650
|
-
NodeViewContent: () =>
|
|
15651
|
-
NodeViewWrapper: () =>
|
|
15645
|
+
NodeViewContent: () => vb,
|
|
15646
|
+
NodeViewWrapper: () => yb,
|
|
15652
15647
|
PasteRule: () => Ud,
|
|
15653
15648
|
ResizableNodeView: () => bf,
|
|
15654
15649
|
ResizableNodeview: () => xf,
|
|
15655
15650
|
Tracker: () => Ef,
|
|
15656
|
-
VueMarkView: () =>
|
|
15657
|
-
VueMarkViewRenderer: () =>
|
|
15658
|
-
VueNodeViewRenderer: () =>
|
|
15659
|
-
VueRenderer: () =>
|
|
15651
|
+
VueMarkView: () => wb,
|
|
15652
|
+
VueMarkViewRenderer: () => Tb,
|
|
15653
|
+
VueNodeViewRenderer: () => Ob,
|
|
15654
|
+
VueRenderer: () => xb,
|
|
15660
15655
|
attrsEqual: () => ud,
|
|
15661
15656
|
callOrReturn: () => G,
|
|
15662
15657
|
canInsertNode: () => dd,
|
|
@@ -15740,7 +15735,7 @@ var ub = q.create({
|
|
|
15740
15735
|
isiOS: () => Jc,
|
|
15741
15736
|
markInputRule: () => ff,
|
|
15742
15737
|
markPasteRule: () => Cf,
|
|
15743
|
-
markViewProps: () =>
|
|
15738
|
+
markViewProps: () => Sb,
|
|
15744
15739
|
markdown: () => Sd,
|
|
15745
15740
|
marksEqual: () => Nd,
|
|
15746
15741
|
mergeAttributes: () => K,
|
|
@@ -15748,7 +15743,7 @@ var ub = q.create({
|
|
|
15748
15743
|
minMax: () => Gc,
|
|
15749
15744
|
nodeInputRule: () => pf,
|
|
15750
15745
|
nodePasteRule: () => wf,
|
|
15751
|
-
nodeViewProps: () =>
|
|
15746
|
+
nodeViewProps: () => Eb,
|
|
15752
15747
|
objectIncludes: () => Lc,
|
|
15753
15748
|
parseAttributes: () => Cd,
|
|
15754
15749
|
parseIndentedBlocks: () => Ad,
|
|
@@ -15767,10 +15762,10 @@ var ub = q.create({
|
|
|
15767
15762
|
textPasteRule: () => Tf,
|
|
15768
15763
|
textblockTypeInputRule: () => mf,
|
|
15769
15764
|
updateMarkViewAttributes: () => Fd,
|
|
15770
|
-
useEditor: () =>
|
|
15765
|
+
useEditor: () => bb,
|
|
15771
15766
|
wrappingInputRule: () => gf
|
|
15772
15767
|
});
|
|
15773
|
-
function
|
|
15768
|
+
function hb(e) {
|
|
15774
15769
|
return c((t, n) => ({
|
|
15775
15770
|
get() {
|
|
15776
15771
|
return t(), e;
|
|
@@ -15784,9 +15779,9 @@ function gb(e) {
|
|
|
15784
15779
|
}
|
|
15785
15780
|
}));
|
|
15786
15781
|
}
|
|
15787
|
-
var
|
|
15782
|
+
var gb = class extends df {
|
|
15788
15783
|
constructor(e = {}) {
|
|
15789
|
-
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState =
|
|
15784
|
+
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = hb(this.view.state), this.reactiveExtensionStorage = hb(this.extensionStorage), this.on("beforeTransaction", ({ nextState: e }) => {
|
|
15790
15785
|
this.reactiveState.value = e, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
15791
15786
|
}), h(this);
|
|
15792
15787
|
}
|
|
@@ -15804,7 +15799,7 @@ var _b = class extends df {
|
|
|
15804
15799
|
let t = super.unregisterPlugin(e);
|
|
15805
15800
|
return this.reactiveState && t && (this.reactiveState.value = t), t;
|
|
15806
15801
|
}
|
|
15807
|
-
},
|
|
15802
|
+
}, _b = g({
|
|
15808
15803
|
name: "EditorContent",
|
|
15809
15804
|
props: { editor: {
|
|
15810
15805
|
default: null,
|
|
@@ -15832,7 +15827,7 @@ var _b = class extends df {
|
|
|
15832
15827
|
this.rootEl = e;
|
|
15833
15828
|
} });
|
|
15834
15829
|
}
|
|
15835
|
-
}),
|
|
15830
|
+
}), vb = g({
|
|
15836
15831
|
name: "NodeViewContent",
|
|
15837
15832
|
props: { as: {
|
|
15838
15833
|
type: String,
|
|
@@ -15853,7 +15848,7 @@ var _b = class extends df {
|
|
|
15853
15848
|
"data-node-view-content": ""
|
|
15854
15849
|
});
|
|
15855
15850
|
}
|
|
15856
|
-
}),
|
|
15851
|
+
}), yb = g({
|
|
15857
15852
|
name: "NodeViewWrapper",
|
|
15858
15853
|
props: { as: {
|
|
15859
15854
|
type: String,
|
|
@@ -15869,15 +15864,15 @@ var _b = class extends df {
|
|
|
15869
15864
|
onDragstart: this.onDragStart
|
|
15870
15865
|
}, (e = this.$slots).default?.call(e));
|
|
15871
15866
|
}
|
|
15872
|
-
}),
|
|
15867
|
+
}), bb = (e = {}) => {
|
|
15873
15868
|
let r = t();
|
|
15874
15869
|
return n(() => {
|
|
15875
|
-
r.value = new
|
|
15870
|
+
r.value = new gb(e);
|
|
15876
15871
|
}), m(() => {
|
|
15877
15872
|
var e;
|
|
15878
15873
|
(e = r.value) == null || e.destroy();
|
|
15879
15874
|
}), r;
|
|
15880
|
-
},
|
|
15875
|
+
}, xb = class {
|
|
15881
15876
|
constructor(e, { props: t = {}, editor: n }) {
|
|
15882
15877
|
this.destroyed = !1, this.editor = n, this.component = h(e), this.el = document.createElement("div"), this.props = l(t), this.renderedComponent = this.renderComponent();
|
|
15883
15878
|
}
|
|
@@ -15906,7 +15901,7 @@ var _b = class extends df {
|
|
|
15906
15901
|
destroy() {
|
|
15907
15902
|
this.destroyed || (this.destroyed = !0, this.renderedComponent.destroy());
|
|
15908
15903
|
}
|
|
15909
|
-
},
|
|
15904
|
+
}, Sb = {
|
|
15910
15905
|
editor: {
|
|
15911
15906
|
type: Object,
|
|
15912
15907
|
required: !0
|
|
@@ -15935,7 +15930,7 @@ var _b = class extends df {
|
|
|
15935
15930
|
type: Object,
|
|
15936
15931
|
required: !0
|
|
15937
15932
|
}
|
|
15938
|
-
},
|
|
15933
|
+
}, Cb = g({
|
|
15939
15934
|
name: "MarkViewContent",
|
|
15940
15935
|
props: { as: {
|
|
15941
15936
|
type: String,
|
|
@@ -15947,7 +15942,7 @@ var _b = class extends df {
|
|
|
15947
15942
|
"data-mark-view-content": ""
|
|
15948
15943
|
});
|
|
15949
15944
|
}
|
|
15950
|
-
}),
|
|
15945
|
+
}), wb = class extends Id {
|
|
15951
15946
|
constructor(e, t, n) {
|
|
15952
15947
|
super(e, t, n);
|
|
15953
15948
|
let r = {
|
|
@@ -15963,7 +15958,7 @@ var _b = class extends df {
|
|
|
15963
15958
|
__name: e.__name,
|
|
15964
15959
|
__file: e.__file
|
|
15965
15960
|
});
|
|
15966
|
-
this.renderer = new
|
|
15961
|
+
this.renderer = new xb(i, {
|
|
15967
15962
|
editor: this.editor,
|
|
15968
15963
|
props: r
|
|
15969
15964
|
});
|
|
@@ -15982,10 +15977,10 @@ var _b = class extends df {
|
|
|
15982
15977
|
this.renderer.destroy();
|
|
15983
15978
|
}
|
|
15984
15979
|
};
|
|
15985
|
-
function
|
|
15986
|
-
return (n) => n.editor.contentComponent ? new
|
|
15980
|
+
function Tb(e, t = {}) {
|
|
15981
|
+
return (n) => n.editor.contentComponent ? new wb(e, n, t) : {};
|
|
15987
15982
|
}
|
|
15988
|
-
var
|
|
15983
|
+
var Eb = {
|
|
15989
15984
|
editor: {
|
|
15990
15985
|
type: Object,
|
|
15991
15986
|
required: !0
|
|
@@ -16030,7 +16025,7 @@ var Db = {
|
|
|
16030
16025
|
type: Object,
|
|
16031
16026
|
required: !0
|
|
16032
16027
|
}
|
|
16033
|
-
},
|
|
16028
|
+
}, Db = class extends Sf {
|
|
16034
16029
|
constructor(e, t, n) {
|
|
16035
16030
|
super(e, t, n), this.cachedExtensionWithSyncedStorage = null, this.handlePositionUpdate = () => {
|
|
16036
16031
|
let e = this.getPos();
|
|
@@ -16076,7 +16071,7 @@ var Db = {
|
|
|
16076
16071
|
__name: this.component.__name,
|
|
16077
16072
|
__file: this.component.__file
|
|
16078
16073
|
});
|
|
16079
|
-
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this), this.editor.on("selectionUpdate", this.handleSelectionUpdate), this.currentPos = this.getPos(), this.node.isLeaf || (this.options.contentDOMElementTag ? this.contentDOMElement = document.createElement(this.options.contentDOMElementTag) : this.contentDOMElement = document.createElement(this.node.isInline ? "span" : "div"), this.contentDOMElement.style.whiteSpace = "inherit", this.contentDOMElement.dataset.nodeViewContentVue = ""), this.renderer = new
|
|
16074
|
+
this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this), this.editor.on("selectionUpdate", this.handleSelectionUpdate), this.currentPos = this.getPos(), this.node.isLeaf || (this.options.contentDOMElementTag ? this.contentDOMElement = document.createElement(this.options.contentDOMElementTag) : this.contentDOMElement = document.createElement(this.node.isInline ? "span" : "div"), this.contentDOMElement.style.whiteSpace = "inherit", this.contentDOMElement.dataset.nodeViewContentVue = ""), this.renderer = new xb(r, {
|
|
16080
16075
|
editor: this.editor,
|
|
16081
16076
|
props: t
|
|
16082
16077
|
});
|
|
@@ -16148,10 +16143,10 @@ var Db = {
|
|
|
16148
16143
|
this.renderer.destroy(), this.editor.off("selectionUpdate", this.handleSelectionUpdate), this.options.trackNodeViewPosition && this.editor.off("update", this.handlePositionUpdate), this.contentDOMElement = null;
|
|
16149
16144
|
}
|
|
16150
16145
|
};
|
|
16151
|
-
function
|
|
16152
|
-
return (n) => n.editor.contentComponent ? new
|
|
16146
|
+
function Ob(e, t) {
|
|
16147
|
+
return (n) => n.editor.contentComponent ? new Db(typeof e == "function" && "__vccOpts" in e ? e.__vccOpts : e, n, t) : {};
|
|
16153
16148
|
}
|
|
16154
16149
|
//#endregion
|
|
16155
|
-
export { J as _,
|
|
16150
|
+
export { J as _, g_ as a, s_ as c, zm as d, Lm as f, Ld as g, q as h, db as i, Jg as l, Tm as m, Ob as n, p_ as o, Em as p, mb as r, u_ as s, yb as t, Vm as u, Ud as v, K as y };
|
|
16156
16151
|
|
|
16157
|
-
//# sourceMappingURL=tiptap-
|
|
16152
|
+
//# sourceMappingURL=tiptap-C2indasq.js.map
|