@dialpad/dialtone-vue 3.94.2 → 3.95.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/CHANGELOG.json +1 -1
- package/CHANGELOG.md +40 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +966 -990
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/{emoji-eca45193.js → emoji-bI5MJWZH.js} +2 -3
- package/dist/emoji-ujF0T0kZ.cjs +1 -0
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +3 -3
- package/dist/{message_input-adace257.js → message_input-KktXM8gs.js} +944 -882
- package/dist/{message_input-cd4bb4eb.cjs → message_input-r_-Jg43r.cjs} +10 -10
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +3 -3
- package/dist/style.css +1 -1
- package/dist/{tooltip-4736031b.cjs → tooltip_constants-mcMQGvF_.cjs} +4 -4
- package/dist/{tooltip-e2013b2a.js → tooltip_constants-pAtd8bjI.js} +191 -192
- package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/types/components/notice/index.d.ts +3 -0
- package/dist/types/components/toast/index.d.ts +1 -1
- package/dist/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +64 -1
- package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/package.json +16 -16
- package/dist/emoji-36138d23.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as q, g as tr, p as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import { D as nt, y as xl, b as yn, L as wl, j as Cl, g as
|
|
1
|
+
import { _ as q, g as tr, p as rl, h as fn, u as il, q as sl, a as ol, r as ll, t as al, v as cl, w as pn, x as dl, y as ul, D as hl } from "./tooltip_constants-pAtd8bjI.js";
|
|
2
|
+
import { openBlock as w, createElementBlock as B, toDisplayString as ue, createCommentVNode as _, createElementVNode as G, normalizeClass as $, resolveComponent as A, createBlock as L, resolveDynamicComponent as Xe, withCtx as O, mergeProps as St, renderSlot as z, createVNode as F, createTextVNode as $t, withKeys as Ve, withModifiers as dt, toHandlers as as, createSlots as cs, renderList as ds, Teleport as us, defineComponent as xt, ref as mn, onMounted as hs, onBeforeUnmount as xr, h as Ke, getCurrentInstance as fl, watchEffect as pl, nextTick as ml, unref as gl, markRaw as gn, reactive as fs, provide as qr, customRef as yl, withDirectives as bl, Fragment as ps, vShow as kl, normalizeStyle as Sl } from "vue";
|
|
3
|
+
import { D as nt, y as xl, b as yn, L as wl, j as Cl, g as ms, a5 as vl, a0 as El, a3 as gs, _ as Ml, f as Ol } from "./emoji-bI5MJWZH.js";
|
|
4
4
|
const Ot = {
|
|
5
5
|
BUSY: "busy",
|
|
6
6
|
AWAY: "away",
|
|
@@ -40,13 +40,13 @@ const Ot = {
|
|
|
40
40
|
class: "sr-only"
|
|
41
41
|
};
|
|
42
42
|
function Il(n, e, t, r, i, s) {
|
|
43
|
-
return
|
|
43
|
+
return w(), B("div", {
|
|
44
44
|
class: "d-presence",
|
|
45
45
|
"data-qa": "dt-presence",
|
|
46
46
|
role: "status",
|
|
47
47
|
"aria-live": n.$attrs.ariaLive || "off"
|
|
48
48
|
}, [
|
|
49
|
-
t.srText ? (
|
|
49
|
+
t.srText ? (w(), B("span", Dl, ue(t.srText), 1)) : _("", !0),
|
|
50
50
|
G("div", {
|
|
51
51
|
class: $(["d-presence__inner", {
|
|
52
52
|
"d-presence__inner--active": t.presence === "active",
|
|
@@ -643,8 +643,7 @@ const Vl = (n) => {
|
|
|
643
643
|
return "";
|
|
644
644
|
const e = n.trim().split(/\s+/g);
|
|
645
645
|
return e.length === 1 ? e.join("").substring(0, 2) : e.filter((t, r) => r === 0 || r === e.length - 1).map((t) => t.slice(0, 1).toUpperCase()).join("");
|
|
646
|
-
}
|
|
647
|
-
const jl = zl(), Hl = {
|
|
646
|
+
}, jl = zl(), Hl = {
|
|
648
647
|
name: "DtAvatar",
|
|
649
648
|
components: { DtPresence: Pl, DtIcon: nt },
|
|
650
649
|
inheritAttrs: !1,
|
|
@@ -885,7 +884,7 @@ const jl = zl(), Hl = {
|
|
|
885
884
|
this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = e[0] : this.formattedInitials = e;
|
|
886
885
|
},
|
|
887
886
|
getColor() {
|
|
888
|
-
return this.color ??
|
|
887
|
+
return this.color ?? rl(Ll, this.seed);
|
|
889
888
|
},
|
|
890
889
|
_loadedImageEventHandler(n) {
|
|
891
890
|
this.imageLoadedSuccessfully = !0, n.classList.remove("d-d-none");
|
|
@@ -910,15 +909,15 @@ const jl = zl(), Hl = {
|
|
|
910
909
|
"data-qa": "dt-avatar-count"
|
|
911
910
|
};
|
|
912
911
|
function Wl(n, e, t, r, i, s) {
|
|
913
|
-
const o =
|
|
914
|
-
return
|
|
912
|
+
const o = A("dt-icon"), l = A("dt-presence");
|
|
913
|
+
return w(), L(Xe(t.clickable ? "button" : "div"), {
|
|
915
914
|
id: t.id,
|
|
916
915
|
class: $(s.avatarClasses),
|
|
917
916
|
"data-qa": "dt-avatar",
|
|
918
917
|
"aria-label": s.buttonAriaLabel,
|
|
919
918
|
onClick: s.handleClick
|
|
920
919
|
}, {
|
|
921
|
-
default:
|
|
920
|
+
default: O(() => [
|
|
922
921
|
G("div", {
|
|
923
922
|
ref: "canvas",
|
|
924
923
|
class: $([
|
|
@@ -927,43 +926,43 @@ function Wl(n, e, t, r, i, s) {
|
|
|
927
926
|
{ "d-avatar--image-loaded": i.imageLoadedSuccessfully }
|
|
928
927
|
])
|
|
929
928
|
}, [
|
|
930
|
-
s.showImage ? (
|
|
929
|
+
s.showImage ? (w(), B("img", {
|
|
931
930
|
key: 0,
|
|
932
931
|
ref: "avatarImage",
|
|
933
932
|
class: "d-avatar__image",
|
|
934
933
|
"data-qa": "dt-avatar-image",
|
|
935
934
|
src: t.imageSrc,
|
|
936
935
|
alt: t.imageAlt || t.fullName
|
|
937
|
-
}, null, 8, $l)) : t.iconName ? (
|
|
936
|
+
}, null, 8, $l)) : t.iconName ? (w(), L(o, {
|
|
938
937
|
key: 1,
|
|
939
938
|
name: t.iconName,
|
|
940
939
|
size: t.iconSize || i.AVATAR_ICON_SIZES[t.size],
|
|
941
940
|
class: $([t.iconClass, i.AVATAR_KIND_MODIFIERS.icon]),
|
|
942
941
|
"data-qa": "dt-avatar-icon"
|
|
943
|
-
}, null, 8, ["name", "size", "class"])) : (
|
|
942
|
+
}, null, 8, ["name", "size", "class"])) : (w(), B("span", {
|
|
944
943
|
key: 2,
|
|
945
944
|
class: $([i.AVATAR_KIND_MODIFIERS.initials, "d-ps-absolute d-zi-base d-us-none"])
|
|
946
|
-
},
|
|
945
|
+
}, ue(i.formattedInitials), 3))
|
|
947
946
|
], 2),
|
|
948
|
-
t.overlayIcon || t.overlayText ? (
|
|
947
|
+
t.overlayIcon || t.overlayText ? (w(), B("div", {
|
|
949
948
|
key: 0,
|
|
950
949
|
class: $(s.overlayClasses)
|
|
951
950
|
}, [
|
|
952
|
-
t.overlayIcon ? (
|
|
951
|
+
t.overlayIcon ? (w(), L(o, {
|
|
953
952
|
key: 0,
|
|
954
953
|
class: "d-avatar__overlay-icon",
|
|
955
954
|
name: t.overlayIcon
|
|
956
|
-
}, null, 8, ["name"])) : t.overlayText ? (
|
|
957
|
-
], 2)) :
|
|
958
|
-
s.showGroup ? (
|
|
959
|
-
t.presence && !s.showGroup ? (
|
|
955
|
+
}, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, ue(t.overlayText), 1)) : _("", !0)
|
|
956
|
+
], 2)) : _("", !0),
|
|
957
|
+
s.showGroup ? (w(), B("span", Kl, ue(s.formattedGroup), 1)) : _("", !0),
|
|
958
|
+
t.presence && !s.showGroup ? (w(), L(l, St({
|
|
960
959
|
key: 2,
|
|
961
960
|
presence: t.presence,
|
|
962
961
|
class: [
|
|
963
962
|
"d-avatar__presence",
|
|
964
963
|
i.AVATAR_PRESENCE_SIZE_MODIFIERS[t.size]
|
|
965
964
|
]
|
|
966
|
-
}, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) :
|
|
965
|
+
}, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) : _("", !0)
|
|
967
966
|
]),
|
|
968
967
|
_: 1
|
|
969
968
|
}, 8, ["id", "class", "aria-label", "onClick"]);
|
|
@@ -1008,15 +1007,15 @@ const Jl = /* @__PURE__ */ q(Hl, [["render", Wl]]), wr = ["base", "error", "info
|
|
|
1008
1007
|
class: "d-notice__icon"
|
|
1009
1008
|
};
|
|
1010
1009
|
function Zl(n, e, t, r, i, s) {
|
|
1011
|
-
const o =
|
|
1012
|
-
return s.defaultIcon || i.hasSlotContent(n.$slots.default) ? (
|
|
1013
|
-
|
|
1014
|
-
|
|
1010
|
+
const o = A("dt-icon");
|
|
1011
|
+
return s.defaultIcon || i.hasSlotContent(n.$slots.default) ? (w(), B("div", Xl, [
|
|
1012
|
+
z(n.$slots, "default", {}, () => [
|
|
1013
|
+
F(o, {
|
|
1015
1014
|
name: s.defaultIcon,
|
|
1016
1015
|
size: "400"
|
|
1017
1016
|
}, null, 8, ["name"])
|
|
1018
1017
|
])
|
|
1019
|
-
])) :
|
|
1018
|
+
])) : _("", !0);
|
|
1020
1019
|
}
|
|
1021
1020
|
const Ql = /* @__PURE__ */ q(Yl, [["render", Zl]]), ea = {
|
|
1022
1021
|
name: "DtNoticeContent",
|
|
@@ -1055,23 +1054,23 @@ const Ql = /* @__PURE__ */ q(Yl, [["render", Zl]]), ea = {
|
|
|
1055
1054
|
"data-qa": "notice-content"
|
|
1056
1055
|
}, na = ["id"], ra = ["id"];
|
|
1057
1056
|
function ia(n, e, t, r, i, s) {
|
|
1058
|
-
return
|
|
1059
|
-
t.title || i.hasSlotContent(n.$slots.titleOverride) ? (
|
|
1057
|
+
return w(), B("div", ta, [
|
|
1058
|
+
t.title || i.hasSlotContent(n.$slots.titleOverride) ? (w(), B("p", {
|
|
1060
1059
|
key: 0,
|
|
1061
1060
|
id: t.titleId,
|
|
1062
1061
|
class: "d-notice__title",
|
|
1063
1062
|
"data-qa": "notice-content-title"
|
|
1064
1063
|
}, [
|
|
1065
|
-
|
|
1066
|
-
$t(
|
|
1064
|
+
z(n.$slots, "titleOverride", {}, () => [
|
|
1065
|
+
$t(ue(t.title), 1)
|
|
1067
1066
|
])
|
|
1068
|
-
], 8, na)) :
|
|
1067
|
+
], 8, na)) : _("", !0),
|
|
1069
1068
|
G("p", {
|
|
1070
1069
|
id: t.contentId,
|
|
1071
1070
|
class: "d-notice__message",
|
|
1072
1071
|
"data-qa": "notice-content-message"
|
|
1073
1072
|
}, [
|
|
1074
|
-
|
|
1073
|
+
z(n.$slots, "default")
|
|
1075
1074
|
], 8, ra)
|
|
1076
1075
|
]);
|
|
1077
1076
|
}
|
|
@@ -1138,8 +1137,8 @@ const sa = /* @__PURE__ */ q(ea, [["render", ia]]), Cr = {
|
|
|
1138
1137
|
}
|
|
1139
1138
|
};
|
|
1140
1139
|
function la(n, e, t, r, i, s) {
|
|
1141
|
-
const o =
|
|
1142
|
-
return
|
|
1140
|
+
const o = A("dt-icon"), l = A("dt-button");
|
|
1141
|
+
return w(), L(l, {
|
|
1143
1142
|
id: "sr-only-close-button",
|
|
1144
1143
|
"data-qa": "dt-sr-only-close-button",
|
|
1145
1144
|
class: "d-vi-visible-sr",
|
|
@@ -1147,18 +1146,18 @@ function la(n, e, t, r, i, s) {
|
|
|
1147
1146
|
onClick: s.close,
|
|
1148
1147
|
onKeydown: Ve(dt(s.close, ["prevent", "stop"]), ["space"])
|
|
1149
1148
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
|
|
1149
|
+
default: O(() => [
|
|
1150
|
+
F(o, { name: "close" })
|
|
1152
1151
|
]),
|
|
1153
1152
|
_: 1
|
|
1154
1153
|
}, 8, ["aria-label", "onClick", "onKeydown"]);
|
|
1155
1154
|
}
|
|
1156
|
-
const
|
|
1155
|
+
const ys = /* @__PURE__ */ q(oa, [["render", la]]), aa = {
|
|
1157
1156
|
name: "DtNoticeAction",
|
|
1158
1157
|
components: {
|
|
1159
1158
|
DtIcon: nt,
|
|
1160
1159
|
DtButton: yn,
|
|
1161
|
-
SrOnlyCloseButton:
|
|
1160
|
+
SrOnlyCloseButton: ys
|
|
1162
1161
|
},
|
|
1163
1162
|
mixins: [Cr],
|
|
1164
1163
|
props: {
|
|
@@ -1206,10 +1205,10 @@ const gs = /* @__PURE__ */ q(oa, [["render", la]]), aa = {
|
|
|
1206
1205
|
"data-qa": "notice-content-actions"
|
|
1207
1206
|
};
|
|
1208
1207
|
function da(n, e, t, r, i, s) {
|
|
1209
|
-
const o =
|
|
1210
|
-
return
|
|
1211
|
-
|
|
1212
|
-
t.hideClose ?
|
|
1208
|
+
const o = A("dt-icon"), l = A("dt-button"), a = A("sr-only-close-button");
|
|
1209
|
+
return w(), B("div", ca, [
|
|
1210
|
+
z(n.$slots, "default"),
|
|
1211
|
+
t.hideClose ? _("", !0) : (w(), L(l, St({
|
|
1213
1212
|
key: 0,
|
|
1214
1213
|
ref: "closeButton",
|
|
1215
1214
|
"data-qa": "dt-notice-action-close-button",
|
|
@@ -1218,22 +1217,174 @@ function da(n, e, t, r, i, s) {
|
|
|
1218
1217
|
circle: "",
|
|
1219
1218
|
"aria-label": t.closeButtonProps.ariaLabel ? t.closeButtonProps.ariaLabel : "Close"
|
|
1220
1219
|
}, t.closeButtonProps, { onClick: s.close }), {
|
|
1221
|
-
icon:
|
|
1222
|
-
|
|
1220
|
+
icon: O(() => [
|
|
1221
|
+
F(o, {
|
|
1223
1222
|
name: "close",
|
|
1224
1223
|
size: "200"
|
|
1225
1224
|
})
|
|
1226
1225
|
]),
|
|
1227
1226
|
_: 1
|
|
1228
1227
|
}, 16, ["aria-label", "onClick"])),
|
|
1229
|
-
n.showVisuallyHiddenClose ? (
|
|
1228
|
+
n.showVisuallyHiddenClose ? (w(), L(a, {
|
|
1230
1229
|
key: 1,
|
|
1231
1230
|
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
1232
1231
|
onClose: s.close
|
|
1233
|
-
}, null, 8, ["visually-hidden-close-label", "onClose"])) :
|
|
1232
|
+
}, null, 8, ["visually-hidden-close-label", "onClose"])) : _("", !0)
|
|
1234
1233
|
]);
|
|
1235
1234
|
}
|
|
1236
|
-
const ua = /* @__PURE__ */ q(aa, [["render", da]]),
|
|
1235
|
+
const ua = /* @__PURE__ */ q(aa, [["render", da]]), ha = {
|
|
1236
|
+
name: "DtNotice",
|
|
1237
|
+
components: {
|
|
1238
|
+
DtNoticeIcon: Ql,
|
|
1239
|
+
DtNoticeContent: sa,
|
|
1240
|
+
DtNoticeAction: ua
|
|
1241
|
+
},
|
|
1242
|
+
mixins: [Cr],
|
|
1243
|
+
props: {
|
|
1244
|
+
/**
|
|
1245
|
+
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
1246
|
+
* or aria-labelledby or any other reason you may need an id to refer to the title.
|
|
1247
|
+
*/
|
|
1248
|
+
titleId: {
|
|
1249
|
+
type: String,
|
|
1250
|
+
default: void 0
|
|
1251
|
+
},
|
|
1252
|
+
/**
|
|
1253
|
+
* Sets an ID on the content element of the component. Useful for aria-describedby
|
|
1254
|
+
* or aria-labelledby or any other reason you may need an id to refer to the content.
|
|
1255
|
+
*/
|
|
1256
|
+
contentId: {
|
|
1257
|
+
type: String,
|
|
1258
|
+
default: void 0
|
|
1259
|
+
},
|
|
1260
|
+
/**
|
|
1261
|
+
* Title header of the notice. This can be left blank to remove the title from the notice entirely.
|
|
1262
|
+
*/
|
|
1263
|
+
title: {
|
|
1264
|
+
type: String,
|
|
1265
|
+
default: ""
|
|
1266
|
+
},
|
|
1267
|
+
/**
|
|
1268
|
+
* Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an
|
|
1269
|
+
* important message that does not contain any interactive elements. 'alertdialog' is used to communicate an
|
|
1270
|
+
* important message that does contain interactive elements.
|
|
1271
|
+
* @values alert, alertdialog, status
|
|
1272
|
+
*/
|
|
1273
|
+
role: {
|
|
1274
|
+
type: String,
|
|
1275
|
+
default: "status",
|
|
1276
|
+
validate(n) {
|
|
1277
|
+
return Ul.includes(n);
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
/**
|
|
1281
|
+
* Used in scenarios where the message needs to visually dominate the screen.
|
|
1282
|
+
* This will also change the aria role from status to alert.
|
|
1283
|
+
* @values true, false
|
|
1284
|
+
*/
|
|
1285
|
+
important: {
|
|
1286
|
+
type: Boolean,
|
|
1287
|
+
default: !1
|
|
1288
|
+
},
|
|
1289
|
+
/**
|
|
1290
|
+
* Severity level of the notice, sets the icon and background
|
|
1291
|
+
* @values base, error, info, success, warning
|
|
1292
|
+
*/
|
|
1293
|
+
kind: {
|
|
1294
|
+
type: String,
|
|
1295
|
+
default: "base",
|
|
1296
|
+
validate(n) {
|
|
1297
|
+
return wr.includes(n);
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
/**
|
|
1301
|
+
* Props for the notice close button.
|
|
1302
|
+
*/
|
|
1303
|
+
closeButtonProps: {
|
|
1304
|
+
type: Object,
|
|
1305
|
+
default: () => ({})
|
|
1306
|
+
},
|
|
1307
|
+
/**
|
|
1308
|
+
* Hides the close button from the notice
|
|
1309
|
+
* @values true, false
|
|
1310
|
+
*/
|
|
1311
|
+
hideClose: {
|
|
1312
|
+
type: Boolean,
|
|
1313
|
+
default: !1
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
emits: [
|
|
1317
|
+
/**
|
|
1318
|
+
* Close button click event
|
|
1319
|
+
*
|
|
1320
|
+
* @event close
|
|
1321
|
+
*/
|
|
1322
|
+
"close",
|
|
1323
|
+
/**
|
|
1324
|
+
* Native button click event
|
|
1325
|
+
*
|
|
1326
|
+
* @event click
|
|
1327
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
1328
|
+
*/
|
|
1329
|
+
"click"
|
|
1330
|
+
],
|
|
1331
|
+
computed: {
|
|
1332
|
+
noticeClass() {
|
|
1333
|
+
return [
|
|
1334
|
+
"d-notice",
|
|
1335
|
+
{
|
|
1336
|
+
error: "d-notice--error",
|
|
1337
|
+
info: "d-notice--info",
|
|
1338
|
+
success: "d-notice--success",
|
|
1339
|
+
warning: "d-notice--warning",
|
|
1340
|
+
base: "d-notice--base"
|
|
1341
|
+
}[this.kind],
|
|
1342
|
+
{ "d-notice--important": this.important }
|
|
1343
|
+
];
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
function fa(n, e, t, r, i, s) {
|
|
1348
|
+
const o = A("dt-notice-icon"), l = A("dt-notice-content"), a = A("dt-notice-action");
|
|
1349
|
+
return w(), B("aside", {
|
|
1350
|
+
class: $(s.noticeClass),
|
|
1351
|
+
"data-qa": "notice"
|
|
1352
|
+
}, [
|
|
1353
|
+
F(o, { kind: t.kind }, {
|
|
1354
|
+
default: O(() => [
|
|
1355
|
+
z(n.$slots, "icon")
|
|
1356
|
+
]),
|
|
1357
|
+
_: 3
|
|
1358
|
+
}, 8, ["kind"]),
|
|
1359
|
+
F(l, {
|
|
1360
|
+
"title-id": t.titleId,
|
|
1361
|
+
"content-id": t.contentId,
|
|
1362
|
+
title: t.title,
|
|
1363
|
+
role: t.role
|
|
1364
|
+
}, {
|
|
1365
|
+
titleOverride: O(() => [
|
|
1366
|
+
z(n.$slots, "titleOverride")
|
|
1367
|
+
]),
|
|
1368
|
+
default: O(() => [
|
|
1369
|
+
z(n.$slots, "default")
|
|
1370
|
+
]),
|
|
1371
|
+
_: 3
|
|
1372
|
+
}, 8, ["title-id", "content-id", "title", "role"]),
|
|
1373
|
+
F(a, {
|
|
1374
|
+
"hide-close": t.hideClose,
|
|
1375
|
+
"close-button-props": t.closeButtonProps,
|
|
1376
|
+
"visually-hidden-close": n.visuallyHiddenClose,
|
|
1377
|
+
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
1378
|
+
onClose: e[0] || (e[0] = (c) => n.$emit("close"))
|
|
1379
|
+
}, {
|
|
1380
|
+
default: O(() => [
|
|
1381
|
+
z(n.$slots, "action")
|
|
1382
|
+
]),
|
|
1383
|
+
_: 3
|
|
1384
|
+
}, 8, ["hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label"])
|
|
1385
|
+
], 2);
|
|
1386
|
+
}
|
|
1387
|
+
const pa = /* @__PURE__ */ q(ha, [["render", fa]]), bs = ':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])', ma = `${bs}:not([tabindex="-1"])`, ga = "button,[href],input,select,textarea,details,[tabindex]", ya = {
|
|
1237
1388
|
methods: {
|
|
1238
1389
|
/**
|
|
1239
1390
|
* get the first focusable element in your component, includes tabindex="-1".
|
|
@@ -1277,9 +1428,9 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
|
|
|
1277
1428
|
* @param {bool} includeNegativeTabIndex - will include tabindex="-1" in the list of focusable elements.
|
|
1278
1429
|
*/
|
|
1279
1430
|
_getFocusableElements(n = this.$el, e = !1) {
|
|
1280
|
-
return n ? [...n.querySelectorAll(
|
|
1431
|
+
return n ? [...n.querySelectorAll(ga)].filter((r) => {
|
|
1281
1432
|
const i = window.getComputedStyle(r);
|
|
1282
|
-
return i.getPropertyValue("display") !== "none" && i.getPropertyValue("visibility") !== "hidden" && r.matches(e ?
|
|
1433
|
+
return i.getPropertyValue("display") !== "none" && i.getPropertyValue("visibility") !== "hidden" && r.matches(e ? bs : ma);
|
|
1283
1434
|
}) : [];
|
|
1284
1435
|
},
|
|
1285
1436
|
/**
|
|
@@ -1300,7 +1451,7 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
|
|
|
1300
1451
|
n.shiftKey ? document.activeElement === i && (s.focus(), n.preventDefault()) : document.activeElement === s && (i.focus(), n.preventDefault());
|
|
1301
1452
|
}
|
|
1302
1453
|
}
|
|
1303
|
-
},
|
|
1454
|
+
}, ba = {
|
|
1304
1455
|
name: "DtLink",
|
|
1305
1456
|
props: {
|
|
1306
1457
|
/**
|
|
@@ -1320,9 +1471,9 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
|
|
|
1320
1471
|
LINK_KIND_MODIFIERS: Cl
|
|
1321
1472
|
};
|
|
1322
1473
|
}
|
|
1323
|
-
},
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1474
|
+
}, ka = ["href"];
|
|
1475
|
+
function Sa(n, e, t, r, i, s) {
|
|
1476
|
+
return w(), B("a", {
|
|
1326
1477
|
class: $([
|
|
1327
1478
|
"d-link",
|
|
1328
1479
|
i.LINK_KIND_MODIFIERS[t.kind]
|
|
@@ -1330,18 +1481,17 @@ function ya(n, e, t, r, i, s) {
|
|
|
1330
1481
|
"data-qa": "dt-link",
|
|
1331
1482
|
href: "href" in n.$attrs ? n.$attrs.href : "javascript:void(0)"
|
|
1332
1483
|
}, [
|
|
1333
|
-
|
|
1334
|
-
], 10,
|
|
1484
|
+
z(n.$slots, "default")
|
|
1485
|
+
], 10, ka);
|
|
1335
1486
|
}
|
|
1336
|
-
const
|
|
1487
|
+
const xa = /* @__PURE__ */ q(ba, [["render", Sa]]), Pn = {
|
|
1337
1488
|
DEFAULT: "default",
|
|
1338
1489
|
CUSTOM: "custom"
|
|
1339
1490
|
}, Jt = {
|
|
1340
1491
|
ARROW_KEYS: "arrow-keys",
|
|
1341
1492
|
TAB: "tab",
|
|
1342
1493
|
NONE: "none"
|
|
1343
|
-
}
|
|
1344
|
-
const ka = {
|
|
1494
|
+
}, wa = {
|
|
1345
1495
|
name: "DtItemLayout",
|
|
1346
1496
|
props: {
|
|
1347
1497
|
/**
|
|
@@ -1352,63 +1502,62 @@ const ka = {
|
|
|
1352
1502
|
default: "div"
|
|
1353
1503
|
}
|
|
1354
1504
|
}
|
|
1355
|
-
},
|
|
1505
|
+
}, Ca = {
|
|
1356
1506
|
key: 0,
|
|
1357
1507
|
"data-qa": "dt-item-layout-left-wrapper",
|
|
1358
1508
|
class: "dt-item-layout--left"
|
|
1359
|
-
},
|
|
1509
|
+
}, va = {
|
|
1360
1510
|
"data-qa": "dt-item-layout-content-wrapper",
|
|
1361
1511
|
class: "dt-item-layout--content"
|
|
1362
|
-
},
|
|
1512
|
+
}, Ea = {
|
|
1363
1513
|
key: 0,
|
|
1364
1514
|
"data-qa": "dt-item-layout-title-wrapper",
|
|
1365
1515
|
class: "dt-item-layout--title"
|
|
1366
|
-
},
|
|
1516
|
+
}, Ma = {
|
|
1367
1517
|
key: 2,
|
|
1368
1518
|
"data-qa": "dt-item-layout-bottom-wrapper",
|
|
1369
1519
|
class: "dt-item-layout--bottom"
|
|
1370
|
-
},
|
|
1520
|
+
}, Oa = {
|
|
1371
1521
|
key: 1,
|
|
1372
1522
|
"data-qa": "dt-item-layout-right-wrapper",
|
|
1373
1523
|
class: "dt-item-layout--right"
|
|
1374
|
-
},
|
|
1524
|
+
}, Ta = {
|
|
1375
1525
|
key: 2,
|
|
1376
1526
|
"data-qa": "dt-item-layout-selected-wrapper",
|
|
1377
1527
|
class: "dt-item-layout--selected"
|
|
1378
1528
|
};
|
|
1379
|
-
function
|
|
1380
|
-
return
|
|
1381
|
-
default:
|
|
1382
|
-
n.$slots.left ? (
|
|
1383
|
-
|
|
1384
|
-
])) :
|
|
1385
|
-
G("section",
|
|
1386
|
-
n.$slots.default ? (
|
|
1387
|
-
|
|
1388
|
-
])) :
|
|
1389
|
-
n.$slots.subtitle ? (
|
|
1529
|
+
function Na(n, e, t, r, i, s) {
|
|
1530
|
+
return w(), L(Xe(t.as), { class: "dt-item-layout" }, {
|
|
1531
|
+
default: O(() => [
|
|
1532
|
+
n.$slots.left ? (w(), B("section", Ca, [
|
|
1533
|
+
z(n.$slots, "left", {}, void 0, !0)
|
|
1534
|
+
])) : _("", !0),
|
|
1535
|
+
G("section", va, [
|
|
1536
|
+
n.$slots.default ? (w(), B("div", Ea, [
|
|
1537
|
+
z(n.$slots, "default", {}, void 0, !0)
|
|
1538
|
+
])) : _("", !0),
|
|
1539
|
+
n.$slots.subtitle ? (w(), B("div", {
|
|
1390
1540
|
key: 1,
|
|
1391
1541
|
"data-qa": "dt-item-layout-subtitle-wrapper",
|
|
1392
1542
|
class: $(["dt-item-layout--subtitle", { "d-mtn2": n.$slots.default }])
|
|
1393
1543
|
}, [
|
|
1394
|
-
|
|
1395
|
-
], 2)) :
|
|
1396
|
-
n.$slots.bottom ? (
|
|
1397
|
-
|
|
1398
|
-
])) :
|
|
1544
|
+
z(n.$slots, "subtitle", {}, void 0, !0)
|
|
1545
|
+
], 2)) : _("", !0),
|
|
1546
|
+
n.$slots.bottom ? (w(), B("div", Ma, [
|
|
1547
|
+
z(n.$slots, "bottom", {}, void 0, !0)
|
|
1548
|
+
])) : _("", !0)
|
|
1399
1549
|
]),
|
|
1400
|
-
n.$slots.right ? (
|
|
1401
|
-
|
|
1402
|
-
])) :
|
|
1403
|
-
n.$slots.selected ? (
|
|
1404
|
-
|
|
1405
|
-
])) :
|
|
1550
|
+
n.$slots.right ? (w(), B("section", Oa, [
|
|
1551
|
+
z(n.$slots, "right", {}, void 0, !0)
|
|
1552
|
+
])) : _("", !0),
|
|
1553
|
+
n.$slots.selected ? (w(), B("section", Ta, [
|
|
1554
|
+
z(n.$slots, "selected", {}, void 0, !0)
|
|
1555
|
+
])) : _("", !0)
|
|
1406
1556
|
]),
|
|
1407
1557
|
_: 3
|
|
1408
1558
|
});
|
|
1409
1559
|
}
|
|
1410
|
-
const Jr = /* @__PURE__ */ q(
|
|
1411
|
-
const Oa = {
|
|
1560
|
+
const Jr = /* @__PURE__ */ q(wa, [["render", Na], ["__scopeId", "data-v-9afad3c4"]]), Aa = {
|
|
1412
1561
|
name: "DtListItem",
|
|
1413
1562
|
components: {
|
|
1414
1563
|
DtItemLayout: Jr,
|
|
@@ -1427,7 +1576,7 @@ const Oa = {
|
|
|
1427
1576
|
id: {
|
|
1428
1577
|
type: String,
|
|
1429
1578
|
default() {
|
|
1430
|
-
return
|
|
1579
|
+
return il.getUniqueString();
|
|
1431
1580
|
}
|
|
1432
1581
|
},
|
|
1433
1582
|
/**
|
|
@@ -1559,9 +1708,9 @@ const Oa = {
|
|
|
1559
1708
|
}
|
|
1560
1709
|
}
|
|
1561
1710
|
};
|
|
1562
|
-
function
|
|
1563
|
-
const o =
|
|
1564
|
-
return
|
|
1711
|
+
function Da(n, e, t, r, i, s) {
|
|
1712
|
+
const o = A("dt-icon");
|
|
1713
|
+
return w(), L(Xe(t.elementType), St({
|
|
1565
1714
|
id: t.id,
|
|
1566
1715
|
class: ["dt-list-item", {
|
|
1567
1716
|
"dt-list-item--focusable": s.isFocusable,
|
|
@@ -1572,18 +1721,18 @@ function Ta(n, e, t, r, i, s) {
|
|
|
1572
1721
|
role: t.role,
|
|
1573
1722
|
"aria-selected": s.isHighlighted
|
|
1574
1723
|
}, as(s.listItemListeners)), {
|
|
1575
|
-
default:
|
|
1576
|
-
s.listItemType ? (
|
|
1577
|
-
|
|
1724
|
+
default: O(() => [
|
|
1725
|
+
s.listItemType ? (w(), L(Xe(s.listItemType), { key: 0 }, cs({ _: 2 }, [
|
|
1726
|
+
ds(n.$slots, (l, a) => ({
|
|
1578
1727
|
name: a,
|
|
1579
|
-
fn:
|
|
1580
|
-
|
|
1728
|
+
fn: O(() => [
|
|
1729
|
+
z(n.$slots, a)
|
|
1581
1730
|
])
|
|
1582
1731
|
})),
|
|
1583
1732
|
t.selected ? {
|
|
1584
1733
|
name: "selected",
|
|
1585
|
-
fn:
|
|
1586
|
-
|
|
1734
|
+
fn: O(() => [
|
|
1735
|
+
F(o, {
|
|
1587
1736
|
name: "check",
|
|
1588
1737
|
size: "400",
|
|
1589
1738
|
class: "dt-list-item--selected-icon"
|
|
@@ -1591,30 +1740,30 @@ function Ta(n, e, t, r, i, s) {
|
|
|
1591
1740
|
]),
|
|
1592
1741
|
key: "0"
|
|
1593
1742
|
} : void 0
|
|
1594
|
-
]), 1024)) :
|
|
1743
|
+
]), 1024)) : z(n.$slots, "default", { key: 1 })
|
|
1595
1744
|
]),
|
|
1596
1745
|
_: 3
|
|
1597
1746
|
}, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
|
|
1598
1747
|
}
|
|
1599
|
-
const
|
|
1748
|
+
const Ia = /* @__PURE__ */ q(Aa, [["render", Da]]), Ze = {
|
|
1600
1749
|
default: "column",
|
|
1601
1750
|
column: "column",
|
|
1602
1751
|
row: "row",
|
|
1603
1752
|
"row-reverse": "row-reverse",
|
|
1604
1753
|
"column-reverse": "column-reverse"
|
|
1605
|
-
},
|
|
1754
|
+
}, ks = ["sm", "md", "lg", "xl"], vr = ["0", "100", "200", "300", "400", "500", "600"], Ur = {
|
|
1606
1755
|
none: void 0,
|
|
1607
1756
|
small: "d-p4",
|
|
1608
1757
|
medium: "d-p8",
|
|
1609
1758
|
large: "d-p16"
|
|
1610
|
-
},
|
|
1759
|
+
}, Pa = {
|
|
1611
1760
|
none: void 0,
|
|
1612
1761
|
small: "d-pl4",
|
|
1613
1762
|
medium: "d-pl8",
|
|
1614
1763
|
large: "d-pl16"
|
|
1615
|
-
},
|
|
1616
|
-
...
|
|
1617
|
-
],
|
|
1764
|
+
}, Ra = ["dialog", "menu", "listbox", "tree", "grid"], _a = ["", "anchor"], Ba = ["none", "dialog", "first"], La = ["parent", "body"], Fa = [
|
|
1765
|
+
...sl
|
|
1766
|
+
], za = {
|
|
1618
1767
|
name: "PopoverHeaderFooter",
|
|
1619
1768
|
components: {
|
|
1620
1769
|
DtButton: yn,
|
|
@@ -1675,23 +1824,23 @@ const Na = /* @__PURE__ */ q(Oa, [["render", Ta]]), Ze = {
|
|
|
1675
1824
|
}
|
|
1676
1825
|
}
|
|
1677
1826
|
};
|
|
1678
|
-
function
|
|
1679
|
-
const o =
|
|
1680
|
-
return
|
|
1827
|
+
function Va(n, e, t, r, i, s) {
|
|
1828
|
+
const o = A("dt-icon"), l = A("dt-button");
|
|
1829
|
+
return w(), B("div", {
|
|
1681
1830
|
"data-qa": "dt-popover-header-footer",
|
|
1682
1831
|
class: $({
|
|
1683
1832
|
"d-popover__header": t.type === "header",
|
|
1684
1833
|
"d-popover__footer": t.type === "footer"
|
|
1685
1834
|
})
|
|
1686
1835
|
}, [
|
|
1687
|
-
i.hasSlotContent(n.$slots.content) ? (
|
|
1836
|
+
i.hasSlotContent(n.$slots.content) ? (w(), B("div", {
|
|
1688
1837
|
key: 0,
|
|
1689
1838
|
"data-qa": "dt-popover-header-footer-content",
|
|
1690
1839
|
class: $(["d-to-ellipsis", "d-w100p", t.contentClass])
|
|
1691
1840
|
}, [
|
|
1692
|
-
|
|
1693
|
-
], 2)) :
|
|
1694
|
-
t.showCloseButton ? (
|
|
1841
|
+
z(n.$slots, "content")
|
|
1842
|
+
], 2)) : _("", !0),
|
|
1843
|
+
t.showCloseButton ? (w(), L(l, St({
|
|
1695
1844
|
key: 1,
|
|
1696
1845
|
ref: "popover__close-button",
|
|
1697
1846
|
"data-qa": "dt-popover-close",
|
|
@@ -1702,28 +1851,27 @@ function La(n, e, t, r, i, s) {
|
|
|
1702
1851
|
}, t.closeButtonProps, {
|
|
1703
1852
|
onClick: e[0] || (e[0] = (a) => n.$emit("close"))
|
|
1704
1853
|
}), {
|
|
1705
|
-
icon:
|
|
1706
|
-
|
|
1854
|
+
icon: O(() => [
|
|
1855
|
+
F(o, {
|
|
1707
1856
|
name: "close",
|
|
1708
1857
|
size: "300"
|
|
1709
1858
|
})
|
|
1710
1859
|
]),
|
|
1711
1860
|
_: 1
|
|
1712
|
-
}, 16)) :
|
|
1861
|
+
}, 16)) : _("", !0)
|
|
1713
1862
|
], 2);
|
|
1714
1863
|
}
|
|
1715
|
-
const
|
|
1716
|
-
const za = {
|
|
1864
|
+
const ja = /* @__PURE__ */ q(za, [["render", Va]]), Ha = {
|
|
1717
1865
|
name: "DtPopover",
|
|
1718
1866
|
/********************
|
|
1719
1867
|
* CHILD COMPONENTS *
|
|
1720
1868
|
********************/
|
|
1721
1869
|
components: {
|
|
1722
|
-
SrOnlyCloseButton:
|
|
1723
|
-
DtLazyShow:
|
|
1724
|
-
PopoverHeaderFooter:
|
|
1870
|
+
SrOnlyCloseButton: ys,
|
|
1871
|
+
DtLazyShow: ol,
|
|
1872
|
+
PopoverHeaderFooter: ja
|
|
1725
1873
|
},
|
|
1726
|
-
mixins: [
|
|
1874
|
+
mixins: [ya, Cr],
|
|
1727
1875
|
props: {
|
|
1728
1876
|
/**
|
|
1729
1877
|
* Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.
|
|
@@ -1766,7 +1914,7 @@ const za = {
|
|
|
1766
1914
|
role: {
|
|
1767
1915
|
type: String,
|
|
1768
1916
|
default: "dialog",
|
|
1769
|
-
validator: (n) =>
|
|
1917
|
+
validator: (n) => Ra.includes(n)
|
|
1770
1918
|
},
|
|
1771
1919
|
/**
|
|
1772
1920
|
* ID of the element that serves as the label for the popover content.
|
|
@@ -1819,7 +1967,7 @@ const za = {
|
|
|
1819
1967
|
contentWidth: {
|
|
1820
1968
|
type: String,
|
|
1821
1969
|
default: "",
|
|
1822
|
-
validator: (n) =>
|
|
1970
|
+
validator: (n) => _a.includes(n)
|
|
1823
1971
|
},
|
|
1824
1972
|
/**
|
|
1825
1973
|
* Whether to apply transition on initial render in the content lazy show component.
|
|
@@ -1953,7 +2101,7 @@ const za = {
|
|
|
1953
2101
|
sticky: {
|
|
1954
2102
|
type: [Boolean, String],
|
|
1955
2103
|
default: !1,
|
|
1956
|
-
validator: (n) =>
|
|
2104
|
+
validator: (n) => Fa.includes(n)
|
|
1957
2105
|
},
|
|
1958
2106
|
/**
|
|
1959
2107
|
* Determines maximum height for the popover before overflow.
|
|
@@ -2011,7 +2159,7 @@ const za = {
|
|
|
2011
2159
|
initialFocusElement: {
|
|
2012
2160
|
type: [String, HTMLElement],
|
|
2013
2161
|
default: "first",
|
|
2014
|
-
validator: (n) =>
|
|
2162
|
+
validator: (n) => Ba.includes(n) || n instanceof HTMLElement || n.startsWith("#")
|
|
2015
2163
|
},
|
|
2016
2164
|
/**
|
|
2017
2165
|
* If the popover should open pressing up or down arrow key on the anchor element.
|
|
@@ -2030,7 +2178,7 @@ const za = {
|
|
|
2030
2178
|
appendTo: {
|
|
2031
2179
|
type: [HTMLElement, String],
|
|
2032
2180
|
default: "body",
|
|
2033
|
-
validator: (n) =>
|
|
2181
|
+
validator: (n) => La.includes(n) || n instanceof HTMLElement
|
|
2034
2182
|
}
|
|
2035
2183
|
},
|
|
2036
2184
|
emits: [
|
|
@@ -2057,7 +2205,7 @@ const za = {
|
|
|
2057
2205
|
data() {
|
|
2058
2206
|
return {
|
|
2059
2207
|
POPOVER_PADDING_CLASSES: Ur,
|
|
2060
|
-
POPOVER_HEADER_FOOTER_PADDING_CLASSES:
|
|
2208
|
+
POPOVER_HEADER_FOOTER_PADDING_CLASSES: Pa,
|
|
2061
2209
|
intersectionObserver: null,
|
|
2062
2210
|
isOutsideViewport: !1,
|
|
2063
2211
|
isOpen: !1,
|
|
@@ -2164,11 +2312,11 @@ const za = {
|
|
|
2164
2312
|
const e = (r = n == null ? void 0 : n[0]) == null ? void 0 : r.target;
|
|
2165
2313
|
if (!e)
|
|
2166
2314
|
return;
|
|
2167
|
-
const t =
|
|
2315
|
+
const t = ll(e);
|
|
2168
2316
|
this.isOutsideViewport = t.bottom || t.top;
|
|
2169
2317
|
},
|
|
2170
2318
|
popperOptions() {
|
|
2171
|
-
return
|
|
2319
|
+
return al({
|
|
2172
2320
|
fallbackPlacements: this.fallbackPlacements,
|
|
2173
2321
|
tether: this.tether,
|
|
2174
2322
|
hasHideModifierEnabled: !0
|
|
@@ -2283,7 +2431,7 @@ const za = {
|
|
|
2283
2431
|
},
|
|
2284
2432
|
initTippyInstance() {
|
|
2285
2433
|
var n, e;
|
|
2286
|
-
this.tip =
|
|
2434
|
+
this.tip = cl(this.anchorEl, {
|
|
2287
2435
|
popperOptions: this.popperOptions(),
|
|
2288
2436
|
contentElement: this.popoverContentEl,
|
|
2289
2437
|
placement: this.placement,
|
|
@@ -2301,11 +2449,11 @@ const za = {
|
|
|
2301
2449
|
});
|
|
2302
2450
|
}
|
|
2303
2451
|
}
|
|
2304
|
-
},
|
|
2305
|
-
function
|
|
2306
|
-
const o =
|
|
2307
|
-
return
|
|
2308
|
-
t.modal && i.isOpen ? (
|
|
2452
|
+
}, $a = ["aria-hidden"], qa = ["id", "tabindex"];
|
|
2453
|
+
function Ka(n, e, t, r, i, s) {
|
|
2454
|
+
const o = A("popover-header-footer"), l = A("sr-only-close-button"), a = A("dt-lazy-show");
|
|
2455
|
+
return w(), B("div", null, [
|
|
2456
|
+
t.modal && i.isOpen ? (w(), L(us, {
|
|
2309
2457
|
key: 0,
|
|
2310
2458
|
to: "body"
|
|
2311
2459
|
}, [
|
|
@@ -2314,14 +2462,14 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2314
2462
|
"aria-hidden": t.modal && i.isOpen ? "false" : "true",
|
|
2315
2463
|
onClick: e[0] || (e[0] = dt(() => {
|
|
2316
2464
|
}, ["prevent", "stop"]))
|
|
2317
|
-
}, null, 8,
|
|
2318
|
-
])) :
|
|
2319
|
-
(
|
|
2465
|
+
}, null, 8, $a)
|
|
2466
|
+
])) : _("", !0),
|
|
2467
|
+
(w(), L(Xe(t.elementType), {
|
|
2320
2468
|
ref: "popover",
|
|
2321
2469
|
class: $(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
|
|
2322
2470
|
"data-qa": "dt-popover-container"
|
|
2323
2471
|
}, {
|
|
2324
|
-
default:
|
|
2472
|
+
default: O(() => [
|
|
2325
2473
|
G("div", {
|
|
2326
2474
|
id: !t.ariaLabelledby && s.labelledBy,
|
|
2327
2475
|
ref: "anchor",
|
|
@@ -2337,15 +2485,15 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2337
2485
|
],
|
|
2338
2486
|
onKeydownCapture: e[5] || (e[5] = Ve((...c) => s.closePopover && s.closePopover(...c), ["escape"]))
|
|
2339
2487
|
}, [
|
|
2340
|
-
|
|
2488
|
+
z(n.$slots, "anchor", {
|
|
2341
2489
|
attrs: {
|
|
2342
2490
|
"aria-expanded": i.isOpen.toString(),
|
|
2343
2491
|
"aria-controls": t.id,
|
|
2344
2492
|
"aria-haspopup": t.role
|
|
2345
2493
|
}
|
|
2346
2494
|
})
|
|
2347
|
-
], 40,
|
|
2348
|
-
|
|
2495
|
+
], 40, qa),
|
|
2496
|
+
F(a, St({
|
|
2349
2497
|
id: t.id,
|
|
2350
2498
|
ref: "content",
|
|
2351
2499
|
role: t.role,
|
|
@@ -2365,8 +2513,8 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2365
2513
|
css: n.$attrs.css,
|
|
2366
2514
|
tabindex: t.contentTabindex
|
|
2367
2515
|
}, as(s.popoverListeners)), {
|
|
2368
|
-
default:
|
|
2369
|
-
i.hasSlotContent(n.$slots.headerContent) || t.showCloseButton ? (
|
|
2516
|
+
default: O(() => [
|
|
2517
|
+
i.hasSlotContent(n.$slots.headerContent) || t.showCloseButton ? (w(), L(o, {
|
|
2370
2518
|
key: 0,
|
|
2371
2519
|
ref: "popover__header",
|
|
2372
2520
|
class: $(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
|
|
@@ -2376,11 +2524,11 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2376
2524
|
"close-button-props": t.closeButtonProps,
|
|
2377
2525
|
onClose: s.closePopover
|
|
2378
2526
|
}, {
|
|
2379
|
-
content:
|
|
2380
|
-
|
|
2527
|
+
content: O(() => [
|
|
2528
|
+
z(n.$slots, "headerContent", { close: s.closePopover })
|
|
2381
2529
|
]),
|
|
2382
2530
|
_: 3
|
|
2383
|
-
}, 8, ["class", "content-class", "show-close-button", "close-button-props", "onClose"])) :
|
|
2531
|
+
}, 8, ["class", "content-class", "show-close-button", "close-button-props", "onClose"])) : _("", !0),
|
|
2384
2532
|
G("div", {
|
|
2385
2533
|
ref: "popover__content",
|
|
2386
2534
|
"data-qa": "dt-popover-content",
|
|
@@ -2390,25 +2538,25 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2390
2538
|
t.contentClass
|
|
2391
2539
|
])
|
|
2392
2540
|
}, [
|
|
2393
|
-
|
|
2541
|
+
z(n.$slots, "content", { close: s.closePopover })
|
|
2394
2542
|
], 2),
|
|
2395
|
-
i.hasSlotContent(n.$slots.footerContent) ? (
|
|
2543
|
+
i.hasSlotContent(n.$slots.footerContent) ? (w(), L(o, {
|
|
2396
2544
|
key: 1,
|
|
2397
2545
|
ref: "popover__footer",
|
|
2398
2546
|
type: "footer",
|
|
2399
2547
|
class: $(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
|
|
2400
2548
|
"content-class": t.footerClass
|
|
2401
2549
|
}, {
|
|
2402
|
-
content:
|
|
2403
|
-
|
|
2550
|
+
content: O(() => [
|
|
2551
|
+
z(n.$slots, "footerContent", { close: s.closePopover })
|
|
2404
2552
|
]),
|
|
2405
2553
|
_: 3
|
|
2406
|
-
}, 8, ["class", "content-class"])) :
|
|
2407
|
-
n.showVisuallyHiddenClose ? (
|
|
2554
|
+
}, 8, ["class", "content-class"])) : _("", !0),
|
|
2555
|
+
n.showVisuallyHiddenClose ? (w(), L(l, {
|
|
2408
2556
|
key: 2,
|
|
2409
2557
|
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
2410
2558
|
onClose: s.closePopover
|
|
2411
|
-
}, null, 8, ["visually-hidden-close-label", "onClose"])) :
|
|
2559
|
+
}, null, 8, ["visually-hidden-close-label", "onClose"])) : _("", !0)
|
|
2412
2560
|
]),
|
|
2413
2561
|
_: 3
|
|
2414
2562
|
}, 16, ["id", "role", "aria-hidden", "aria-labelledby", "aria-label", "aria-modal", "transition", "show", "appear", "class", "style", "css", "tabindex"])
|
|
@@ -2417,159 +2565,7 @@ function Ha(n, e, t, r, i, s) {
|
|
|
2417
2565
|
}, 8, ["class"]))
|
|
2418
2566
|
]);
|
|
2419
2567
|
}
|
|
2420
|
-
const
|
|
2421
|
-
name: "DtNotice",
|
|
2422
|
-
components: {
|
|
2423
|
-
DtNoticeIcon: Ql,
|
|
2424
|
-
DtNoticeContent: sa,
|
|
2425
|
-
DtNoticeAction: ua
|
|
2426
|
-
},
|
|
2427
|
-
mixins: [Cr],
|
|
2428
|
-
props: {
|
|
2429
|
-
/**
|
|
2430
|
-
* Sets an ID on the title element of the component. Useful for aria-describedby
|
|
2431
|
-
* or aria-labelledby or any other reason you may need an id to refer to the title.
|
|
2432
|
-
*/
|
|
2433
|
-
titleId: {
|
|
2434
|
-
type: String,
|
|
2435
|
-
default: void 0
|
|
2436
|
-
},
|
|
2437
|
-
/**
|
|
2438
|
-
* Sets an ID on the content element of the component. Useful for aria-describedby
|
|
2439
|
-
* or aria-labelledby or any other reason you may need an id to refer to the content.
|
|
2440
|
-
*/
|
|
2441
|
-
contentId: {
|
|
2442
|
-
type: String,
|
|
2443
|
-
default: void 0
|
|
2444
|
-
},
|
|
2445
|
-
/**
|
|
2446
|
-
* Title header of the notice. This can be left blank to remove the title from the notice entirely.
|
|
2447
|
-
*/
|
|
2448
|
-
title: {
|
|
2449
|
-
type: String,
|
|
2450
|
-
default: ""
|
|
2451
|
-
},
|
|
2452
|
-
/**
|
|
2453
|
-
* Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an
|
|
2454
|
-
* important message that does not contain any interactive elements. 'alertdialog' is used to communicate an
|
|
2455
|
-
* important message that does contain interactive elements.
|
|
2456
|
-
* @values alert, alertdialog, status
|
|
2457
|
-
*/
|
|
2458
|
-
role: {
|
|
2459
|
-
type: String,
|
|
2460
|
-
default: "status",
|
|
2461
|
-
validate(n) {
|
|
2462
|
-
return Ul.includes(n);
|
|
2463
|
-
}
|
|
2464
|
-
},
|
|
2465
|
-
/**
|
|
2466
|
-
* Used in scenarios where the message needs to visually dominate the screen.
|
|
2467
|
-
* This will also change the aria role from status to alert.
|
|
2468
|
-
* @values true, false
|
|
2469
|
-
*/
|
|
2470
|
-
important: {
|
|
2471
|
-
type: Boolean,
|
|
2472
|
-
default: !1
|
|
2473
|
-
},
|
|
2474
|
-
/**
|
|
2475
|
-
* Severity level of the notice, sets the icon and background
|
|
2476
|
-
* @values base, error, info, success, warning
|
|
2477
|
-
*/
|
|
2478
|
-
kind: {
|
|
2479
|
-
type: String,
|
|
2480
|
-
default: "base",
|
|
2481
|
-
validate(n) {
|
|
2482
|
-
return wr.includes(n);
|
|
2483
|
-
}
|
|
2484
|
-
},
|
|
2485
|
-
/**
|
|
2486
|
-
* Props for the notice close button.
|
|
2487
|
-
*/
|
|
2488
|
-
closeButtonProps: {
|
|
2489
|
-
type: Object,
|
|
2490
|
-
default: () => ({})
|
|
2491
|
-
},
|
|
2492
|
-
/**
|
|
2493
|
-
* Hides the close button from the notice
|
|
2494
|
-
* @values true, false
|
|
2495
|
-
*/
|
|
2496
|
-
hideClose: {
|
|
2497
|
-
type: Boolean,
|
|
2498
|
-
default: !1
|
|
2499
|
-
}
|
|
2500
|
-
},
|
|
2501
|
-
emits: [
|
|
2502
|
-
/**
|
|
2503
|
-
* Close button click event
|
|
2504
|
-
*
|
|
2505
|
-
* @event close
|
|
2506
|
-
*/
|
|
2507
|
-
"close",
|
|
2508
|
-
/**
|
|
2509
|
-
* Native button click event
|
|
2510
|
-
*
|
|
2511
|
-
* @event click
|
|
2512
|
-
* @type {PointerEvent | KeyboardEvent}
|
|
2513
|
-
*/
|
|
2514
|
-
"click"
|
|
2515
|
-
],
|
|
2516
|
-
computed: {
|
|
2517
|
-
noticeClass() {
|
|
2518
|
-
return [
|
|
2519
|
-
"d-notice",
|
|
2520
|
-
{
|
|
2521
|
-
error: "d-notice--error",
|
|
2522
|
-
info: "d-notice--info",
|
|
2523
|
-
success: "d-notice--success",
|
|
2524
|
-
warning: "d-notice--warning",
|
|
2525
|
-
base: "d-notice--base"
|
|
2526
|
-
}[this.kind],
|
|
2527
|
-
{ "d-notice--important": this.important }
|
|
2528
|
-
];
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
};
|
|
2532
|
-
function Ka(n, e, t, r, i, s) {
|
|
2533
|
-
const o = N("dt-notice-icon"), l = N("dt-notice-content"), a = N("dt-notice-action");
|
|
2534
|
-
return C(), B("aside", {
|
|
2535
|
-
class: $(s.noticeClass),
|
|
2536
|
-
"data-qa": "notice"
|
|
2537
|
-
}, [
|
|
2538
|
-
_(o, { kind: t.kind }, {
|
|
2539
|
-
default: D(() => [
|
|
2540
|
-
L(n.$slots, "icon")
|
|
2541
|
-
]),
|
|
2542
|
-
_: 3
|
|
2543
|
-
}, 8, ["kind"]),
|
|
2544
|
-
_(l, {
|
|
2545
|
-
"title-id": t.titleId,
|
|
2546
|
-
"content-id": t.contentId,
|
|
2547
|
-
title: t.title,
|
|
2548
|
-
role: t.role
|
|
2549
|
-
}, {
|
|
2550
|
-
titleOverride: D(() => [
|
|
2551
|
-
L(n.$slots, "titleOverride")
|
|
2552
|
-
]),
|
|
2553
|
-
default: D(() => [
|
|
2554
|
-
L(n.$slots, "default")
|
|
2555
|
-
]),
|
|
2556
|
-
_: 3
|
|
2557
|
-
}, 8, ["title-id", "content-id", "title", "role"]),
|
|
2558
|
-
_(a, {
|
|
2559
|
-
"hide-close": t.hideClose,
|
|
2560
|
-
"close-button-props": t.closeButtonProps,
|
|
2561
|
-
"visually-hidden-close": n.visuallyHiddenClose,
|
|
2562
|
-
"visually-hidden-close-label": n.visuallyHiddenCloseLabel,
|
|
2563
|
-
onClose: e[0] || (e[0] = (c) => n.$emit("close"))
|
|
2564
|
-
}, {
|
|
2565
|
-
default: D(() => [
|
|
2566
|
-
L(n.$slots, "action")
|
|
2567
|
-
]),
|
|
2568
|
-
_: 3
|
|
2569
|
-
}, 8, ["hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label"])
|
|
2570
|
-
], 2);
|
|
2571
|
-
}
|
|
2572
|
-
const Wa = /* @__PURE__ */ q(qa, [["render", Ka]]);
|
|
2568
|
+
const Wa = /* @__PURE__ */ q(Ha, [["render", Ka]]);
|
|
2573
2569
|
function Gr(n) {
|
|
2574
2570
|
return n === Ze.default;
|
|
2575
2571
|
}
|
|
@@ -2590,7 +2586,7 @@ function Ja(n) {
|
|
|
2590
2586
|
}
|
|
2591
2587
|
function Ua(n) {
|
|
2592
2588
|
return Bt(n) === "object" ? [
|
|
2593
|
-
...
|
|
2589
|
+
...ks.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
|
|
2594
2590
|
] : null;
|
|
2595
2591
|
}
|
|
2596
2592
|
function Ga(n) {
|
|
@@ -2645,7 +2641,7 @@ const Za = {
|
|
|
2645
2641
|
return {
|
|
2646
2642
|
DT_STACK_DIRECTION: Ze,
|
|
2647
2643
|
DT_STACK_GAP: vr,
|
|
2648
|
-
DT_STACK_RESPONSIVE_BREAKPOINTS:
|
|
2644
|
+
DT_STACK_RESPONSIVE_BREAKPOINTS: ks
|
|
2649
2645
|
};
|
|
2650
2646
|
},
|
|
2651
2647
|
computed: {
|
|
@@ -2661,7 +2657,7 @@ const Za = {
|
|
|
2661
2657
|
}
|
|
2662
2658
|
};
|
|
2663
2659
|
function Qa(n, e, t, r, i, s) {
|
|
2664
|
-
return
|
|
2660
|
+
return w(), L(Xe(t.as), {
|
|
2665
2661
|
class: $([
|
|
2666
2662
|
"d-stack",
|
|
2667
2663
|
s.defaultDirection,
|
|
@@ -2669,13 +2665,13 @@ function Qa(n, e, t, r, i, s) {
|
|
|
2669
2665
|
s.stackGap
|
|
2670
2666
|
])
|
|
2671
2667
|
}, {
|
|
2672
|
-
default:
|
|
2673
|
-
|
|
2668
|
+
default: O(() => [
|
|
2669
|
+
z(n.$slots, "default")
|
|
2674
2670
|
]),
|
|
2675
2671
|
_: 3
|
|
2676
2672
|
}, 8, ["class"]);
|
|
2677
2673
|
}
|
|
2678
|
-
const
|
|
2674
|
+
const Ss = /* @__PURE__ */ q(Za, [["render", Qa]]);
|
|
2679
2675
|
function U(n) {
|
|
2680
2676
|
this.content = n;
|
|
2681
2677
|
}
|
|
@@ -2781,7 +2777,7 @@ U.from = function(n) {
|
|
|
2781
2777
|
e.push(t, n[t]);
|
|
2782
2778
|
return new U(e);
|
|
2783
2779
|
};
|
|
2784
|
-
function
|
|
2780
|
+
function xs(n, e, t) {
|
|
2785
2781
|
for (let r = 0; ; r++) {
|
|
2786
2782
|
if (r == n.childCount || r == e.childCount)
|
|
2787
2783
|
return n.childCount == e.childCount ? null : t;
|
|
@@ -2798,14 +2794,14 @@ function Ss(n, e, t) {
|
|
|
2798
2794
|
return t;
|
|
2799
2795
|
}
|
|
2800
2796
|
if (i.content.size || s.content.size) {
|
|
2801
|
-
let o =
|
|
2797
|
+
let o = xs(i.content, s.content, t + 1);
|
|
2802
2798
|
if (o != null)
|
|
2803
2799
|
return o;
|
|
2804
2800
|
}
|
|
2805
2801
|
t += i.nodeSize;
|
|
2806
2802
|
}
|
|
2807
2803
|
}
|
|
2808
|
-
function
|
|
2804
|
+
function ws(n, e, t, r) {
|
|
2809
2805
|
for (let i = n.childCount, s = e.childCount; ; ) {
|
|
2810
2806
|
if (i == 0 || s == 0)
|
|
2811
2807
|
return i == s ? null : { a: t, b: r };
|
|
@@ -2823,7 +2819,7 @@ function xs(n, e, t, r) {
|
|
|
2823
2819
|
return { a: t, b: r };
|
|
2824
2820
|
}
|
|
2825
2821
|
if (o.content.size || l.content.size) {
|
|
2826
|
-
let c =
|
|
2822
|
+
let c = ws(o.content, l.content, t - 1, r - 1);
|
|
2827
2823
|
if (c)
|
|
2828
2824
|
return c;
|
|
2829
2825
|
}
|
|
@@ -2991,7 +2987,7 @@ class b {
|
|
|
2991
2987
|
fragment differ, or `null` if they are the same.
|
|
2992
2988
|
*/
|
|
2993
2989
|
findDiffStart(e, t = 0) {
|
|
2994
|
-
return
|
|
2990
|
+
return xs(this, e, t);
|
|
2995
2991
|
}
|
|
2996
2992
|
/**
|
|
2997
2993
|
Find the first position, searching from the end, at which this
|
|
@@ -3000,7 +2996,7 @@ class b {
|
|
|
3000
2996
|
nodes, an object with two separate positions is returned.
|
|
3001
2997
|
*/
|
|
3002
2998
|
findDiffEnd(e, t = this.size, r = e.size) {
|
|
3003
|
-
return
|
|
2999
|
+
return ws(this, e, t, r);
|
|
3004
3000
|
}
|
|
3005
3001
|
/**
|
|
3006
3002
|
Find the index and inner offset corresponding to a given relative
|
|
@@ -3243,14 +3239,14 @@ class k {
|
|
|
3243
3239
|
@internal
|
|
3244
3240
|
*/
|
|
3245
3241
|
insertAt(e, t) {
|
|
3246
|
-
let r =
|
|
3242
|
+
let r = vs(this.content, e + this.openStart, t);
|
|
3247
3243
|
return r && new k(r, this.openStart, this.openEnd);
|
|
3248
3244
|
}
|
|
3249
3245
|
/**
|
|
3250
3246
|
@internal
|
|
3251
3247
|
*/
|
|
3252
3248
|
removeBetween(e, t) {
|
|
3253
|
-
return new k(
|
|
3249
|
+
return new k(Cs(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
|
|
3254
3250
|
}
|
|
3255
3251
|
/**
|
|
3256
3252
|
Tests whether this slice is equal to another slice.
|
|
@@ -3298,7 +3294,7 @@ class k {
|
|
|
3298
3294
|
}
|
|
3299
3295
|
}
|
|
3300
3296
|
k.empty = new k(b.empty, 0, 0);
|
|
3301
|
-
function
|
|
3297
|
+
function Cs(n, e, t) {
|
|
3302
3298
|
let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: l } = n.findIndex(t);
|
|
3303
3299
|
if (i == e || s.isText) {
|
|
3304
3300
|
if (l != t && !n.child(o).isText)
|
|
@@ -3307,13 +3303,13 @@ function ws(n, e, t) {
|
|
|
3307
3303
|
}
|
|
3308
3304
|
if (r != o)
|
|
3309
3305
|
throw new RangeError("Removing non-flat range");
|
|
3310
|
-
return n.replaceChild(r, s.copy(
|
|
3306
|
+
return n.replaceChild(r, s.copy(Cs(s.content, e - i - 1, t - i - 1)));
|
|
3311
3307
|
}
|
|
3312
|
-
function
|
|
3308
|
+
function vs(n, e, t, r) {
|
|
3313
3309
|
let { index: i, offset: s } = n.findIndex(e), o = n.maybeChild(i);
|
|
3314
3310
|
if (s == e || o.isText)
|
|
3315
3311
|
return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
|
|
3316
|
-
let l =
|
|
3312
|
+
let l = vs(o.content, e - s - 1, t);
|
|
3317
3313
|
return l && n.replaceChild(i, o.copy(l));
|
|
3318
3314
|
}
|
|
3319
3315
|
function ec(n, e, t) {
|
|
@@ -3321,12 +3317,12 @@ function ec(n, e, t) {
|
|
|
3321
3317
|
throw new en("Inserted content deeper than insertion position");
|
|
3322
3318
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
3323
3319
|
throw new en("Inconsistent open depths");
|
|
3324
|
-
return
|
|
3320
|
+
return Es(n, e, t, 0);
|
|
3325
3321
|
}
|
|
3326
|
-
function
|
|
3322
|
+
function Es(n, e, t, r) {
|
|
3327
3323
|
let i = n.index(r), s = n.node(r);
|
|
3328
3324
|
if (i == e.index(r) && r < n.depth - t.openStart) {
|
|
3329
|
-
let o =
|
|
3325
|
+
let o = Es(n, e, t, r + 1);
|
|
3330
3326
|
return s.copy(s.content.replaceChild(i, o));
|
|
3331
3327
|
} else if (t.content.size)
|
|
3332
3328
|
if (!t.openStart && !t.openEnd && n.depth == r && e.depth == r) {
|
|
@@ -3334,18 +3330,18 @@ function vs(n, e, t, r) {
|
|
|
3334
3330
|
return Je(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
|
|
3335
3331
|
} else {
|
|
3336
3332
|
let { start: o, end: l } = tc(t, n);
|
|
3337
|
-
return Je(s,
|
|
3333
|
+
return Je(s, Os(n, o, l, e, r));
|
|
3338
3334
|
}
|
|
3339
3335
|
else
|
|
3340
3336
|
return Je(s, tn(n, e, r));
|
|
3341
3337
|
}
|
|
3342
|
-
function
|
|
3338
|
+
function Ms(n, e) {
|
|
3343
3339
|
if (!e.type.compatibleContent(n.type))
|
|
3344
3340
|
throw new en("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
3345
3341
|
}
|
|
3346
3342
|
function rr(n, e, t) {
|
|
3347
3343
|
let r = n.node(t);
|
|
3348
|
-
return
|
|
3344
|
+
return Ms(r, e.node(t)), r;
|
|
3349
3345
|
}
|
|
3350
3346
|
function We(n, e) {
|
|
3351
3347
|
let t = e.length - 1;
|
|
@@ -3361,9 +3357,9 @@ function Dt(n, e, t, r) {
|
|
|
3361
3357
|
function Je(n, e) {
|
|
3362
3358
|
return n.type.checkContent(e), n.copy(e);
|
|
3363
3359
|
}
|
|
3364
|
-
function
|
|
3360
|
+
function Os(n, e, t, r, i) {
|
|
3365
3361
|
let s = n.depth > i && rr(n, e, i + 1), o = r.depth > i && rr(t, r, i + 1), l = [];
|
|
3366
|
-
return Dt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (
|
|
3362
|
+
return Dt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Ms(s, o), We(Je(s, Os(n, e, t, r, i + 1)), l)) : (s && We(Je(s, tn(n, e, i + 1)), l), Dt(e, t, i, l), o && We(Je(o, tn(t, r, i + 1)), l)), Dt(r, null, i, l), new b(l);
|
|
3367
3363
|
}
|
|
3368
3364
|
function tn(n, e, t) {
|
|
3369
3365
|
let r = [];
|
|
@@ -3936,7 +3932,7 @@ let Ue = class ir {
|
|
|
3936
3932
|
if (this.type.spec.toDebugString)
|
|
3937
3933
|
return this.type.spec.toDebugString(this);
|
|
3938
3934
|
let e = this.type.name;
|
|
3939
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
3935
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), Ts(this.marks, e);
|
|
3940
3936
|
}
|
|
3941
3937
|
/**
|
|
3942
3938
|
Get the content match in this node at the given index.
|
|
@@ -4038,7 +4034,7 @@ class rn extends Ue {
|
|
|
4038
4034
|
this.text = r;
|
|
4039
4035
|
}
|
|
4040
4036
|
toString() {
|
|
4041
|
-
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) :
|
|
4037
|
+
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : Ts(this.marks, JSON.stringify(this.text));
|
|
4042
4038
|
}
|
|
4043
4039
|
get textContent() {
|
|
4044
4040
|
return this.text;
|
|
@@ -4066,7 +4062,7 @@ class rn extends Ue {
|
|
|
4066
4062
|
return e.text = this.text, e;
|
|
4067
4063
|
}
|
|
4068
4064
|
}
|
|
4069
|
-
function
|
|
4065
|
+
function Ts(n, e) {
|
|
4070
4066
|
for (let t = n.length - 1; t >= 0; t--)
|
|
4071
4067
|
e = n[t].type.name + "(" + e + ")";
|
|
4072
4068
|
return e;
|
|
@@ -4085,7 +4081,7 @@ class Qe {
|
|
|
4085
4081
|
let r = new ic(e, t);
|
|
4086
4082
|
if (r.next == null)
|
|
4087
4083
|
return Qe.empty;
|
|
4088
|
-
let i =
|
|
4084
|
+
let i = Ns(r);
|
|
4089
4085
|
r.next && r.err("Unexpected trailing text");
|
|
4090
4086
|
let s = uc(dc(i));
|
|
4091
4087
|
return hc(s, r), s;
|
|
@@ -4248,7 +4244,7 @@ class ic {
|
|
|
4248
4244
|
throw new SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
4249
4245
|
}
|
|
4250
4246
|
}
|
|
4251
|
-
function
|
|
4247
|
+
function Ns(n) {
|
|
4252
4248
|
let e = [];
|
|
4253
4249
|
do
|
|
4254
4250
|
e.push(sc(n));
|
|
@@ -4299,7 +4295,7 @@ function ac(n, e) {
|
|
|
4299
4295
|
}
|
|
4300
4296
|
function cc(n) {
|
|
4301
4297
|
if (n.eat("(")) {
|
|
4302
|
-
let e =
|
|
4298
|
+
let e = Ns(n);
|
|
4303
4299
|
return n.eat(")") || n.err("Missing closing paren"), e;
|
|
4304
4300
|
} else if (/\W/.test(n.next))
|
|
4305
4301
|
n.err("Unexpected token '" + n.next + "'");
|
|
@@ -4362,12 +4358,12 @@ function dc(n) {
|
|
|
4362
4358
|
}
|
|
4363
4359
|
}
|
|
4364
4360
|
}
|
|
4365
|
-
function
|
|
4361
|
+
function As(n, e) {
|
|
4366
4362
|
return e - n;
|
|
4367
4363
|
}
|
|
4368
4364
|
function Zr(n, e) {
|
|
4369
4365
|
let t = [];
|
|
4370
|
-
return r(e), t.sort(
|
|
4366
|
+
return r(e), t.sort(As);
|
|
4371
4367
|
function r(i) {
|
|
4372
4368
|
let s = n[i];
|
|
4373
4369
|
if (s.length == 1 && !s[0].term)
|
|
@@ -4398,7 +4394,7 @@ function uc(n) {
|
|
|
4398
4394
|
});
|
|
4399
4395
|
let s = e[r.join(",")] = new Qe(r.indexOf(n.length - 1) > -1);
|
|
4400
4396
|
for (let o = 0; o < i.length; o++) {
|
|
4401
|
-
let l = i[o][1].sort(
|
|
4397
|
+
let l = i[o][1].sort(As);
|
|
4402
4398
|
s.next.push({ type: i[o][0], next: e[l.join(",")] || t(l) });
|
|
4403
4399
|
}
|
|
4404
4400
|
return s;
|
|
@@ -4414,7 +4410,7 @@ function hc(n, e) {
|
|
|
4414
4410
|
s && e.err("Only non-generatable nodes (" + o.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
|
|
4415
4411
|
}
|
|
4416
4412
|
}
|
|
4417
|
-
function
|
|
4413
|
+
function Ds(n) {
|
|
4418
4414
|
let e = /* @__PURE__ */ Object.create(null);
|
|
4419
4415
|
for (let t in n) {
|
|
4420
4416
|
let r = n[t];
|
|
@@ -4424,7 +4420,7 @@ function As(n) {
|
|
|
4424
4420
|
}
|
|
4425
4421
|
return e;
|
|
4426
4422
|
}
|
|
4427
|
-
function
|
|
4423
|
+
function Is(n, e) {
|
|
4428
4424
|
let t = /* @__PURE__ */ Object.create(null);
|
|
4429
4425
|
for (let r in n) {
|
|
4430
4426
|
let i = e && e[r];
|
|
@@ -4439,19 +4435,19 @@ function Ds(n, e) {
|
|
|
4439
4435
|
}
|
|
4440
4436
|
return t;
|
|
4441
4437
|
}
|
|
4442
|
-
function
|
|
4438
|
+
function Ps(n) {
|
|
4443
4439
|
let e = /* @__PURE__ */ Object.create(null);
|
|
4444
4440
|
if (n)
|
|
4445
4441
|
for (let t in n)
|
|
4446
4442
|
e[t] = new fc(n[t]);
|
|
4447
4443
|
return e;
|
|
4448
4444
|
}
|
|
4449
|
-
let Qr = class
|
|
4445
|
+
let Qr = class Rs {
|
|
4450
4446
|
/**
|
|
4451
4447
|
@internal
|
|
4452
4448
|
*/
|
|
4453
4449
|
constructor(e, t, r) {
|
|
4454
|
-
this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs =
|
|
4450
|
+
this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = Ps(r.attrs), this.defaultAttrs = Ds(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
|
|
4455
4451
|
}
|
|
4456
4452
|
/**
|
|
4457
4453
|
True if this is an inline type.
|
|
@@ -4505,7 +4501,7 @@ let Qr = class Ps {
|
|
|
4505
4501
|
@internal
|
|
4506
4502
|
*/
|
|
4507
4503
|
computeAttrs(e) {
|
|
4508
|
-
return !e && this.defaultAttrs ? this.defaultAttrs :
|
|
4504
|
+
return !e && this.defaultAttrs ? this.defaultAttrs : Is(this.attrs, e);
|
|
4509
4505
|
}
|
|
4510
4506
|
/**
|
|
4511
4507
|
Create a `Node` of this type. The given attributes are
|
|
@@ -4601,7 +4597,7 @@ let Qr = class Ps {
|
|
|
4601
4597
|
*/
|
|
4602
4598
|
static compile(e, t) {
|
|
4603
4599
|
let r = /* @__PURE__ */ Object.create(null);
|
|
4604
|
-
e.forEach((s, o) => r[s] = new
|
|
4600
|
+
e.forEach((s, o) => r[s] = new Rs(s, t, o));
|
|
4605
4601
|
let i = t.spec.topNode || "doc";
|
|
4606
4602
|
if (!r[i])
|
|
4607
4603
|
throw new RangeError("Schema is missing its top node type ('" + i + "')");
|
|
@@ -4625,8 +4621,8 @@ class bn {
|
|
|
4625
4621
|
@internal
|
|
4626
4622
|
*/
|
|
4627
4623
|
constructor(e, t, r, i) {
|
|
4628
|
-
this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs =
|
|
4629
|
-
let s =
|
|
4624
|
+
this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs = Ps(i.attrs), this.excluded = null;
|
|
4625
|
+
let s = Ds(this.attrs);
|
|
4630
4626
|
this.instance = s ? new R(this, s) : null;
|
|
4631
4627
|
}
|
|
4632
4628
|
/**
|
|
@@ -4635,7 +4631,7 @@ class bn {
|
|
|
4635
4631
|
they have defaults, will be added.
|
|
4636
4632
|
*/
|
|
4637
4633
|
create(e = null) {
|
|
4638
|
-
return !e && this.instance ? this.instance : new R(this,
|
|
4634
|
+
return !e && this.instance ? this.instance : new R(this, Is(this.attrs, e));
|
|
4639
4635
|
}
|
|
4640
4636
|
/**
|
|
4641
4637
|
@internal
|
|
@@ -4870,7 +4866,7 @@ class pt {
|
|
|
4870
4866
|
return e.cached.domParser || (e.cached.domParser = new pt(e, pt.schemaRules(e)));
|
|
4871
4867
|
}
|
|
4872
4868
|
}
|
|
4873
|
-
const
|
|
4869
|
+
const _s = {
|
|
4874
4870
|
address: !0,
|
|
4875
4871
|
article: !0,
|
|
4876
4872
|
aside: !0,
|
|
@@ -4910,7 +4906,7 @@ const Rs = {
|
|
|
4910
4906
|
script: !0,
|
|
4911
4907
|
style: !0,
|
|
4912
4908
|
title: !0
|
|
4913
|
-
},
|
|
4909
|
+
}, Bs = { ol: !0, ul: !0 }, sn = 1, on = 2, It = 4;
|
|
4914
4910
|
function ti(n, e, t) {
|
|
4915
4911
|
return e != null ? (e ? sn : 0) | (e === "full" ? on : 0) : n && n.whitespace == "pre" ? sn | on : t & ~It;
|
|
4916
4912
|
}
|
|
@@ -4955,7 +4951,7 @@ class Gt {
|
|
|
4955
4951
|
}
|
|
4956
4952
|
}
|
|
4957
4953
|
inlineContext(e) {
|
|
4958
|
-
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !
|
|
4954
|
+
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !_s.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
4959
4955
|
}
|
|
4960
4956
|
}
|
|
4961
4957
|
class ni {
|
|
@@ -5012,14 +5008,14 @@ class ni {
|
|
|
5012
5008
|
// none is found, the element's content nodes are added directly.
|
|
5013
5009
|
addElement(e, t) {
|
|
5014
5010
|
let r = e.nodeName.toLowerCase(), i;
|
|
5015
|
-
|
|
5011
|
+
Bs.hasOwnProperty(r) && this.parser.normalizeLists && gc(e);
|
|
5016
5012
|
let s = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, t));
|
|
5017
5013
|
if (s ? s.ignore : mc.hasOwnProperty(r))
|
|
5018
5014
|
this.findInside(e), this.ignoreFallback(e);
|
|
5019
5015
|
else if (!s || s.skip || s.closeParent) {
|
|
5020
5016
|
s && s.closeParent ? this.open = Math.max(0, this.open - 1) : s && s.skip.nodeType && (e = s.skip);
|
|
5021
5017
|
let o, l = this.top, a = this.needsBlock;
|
|
5022
|
-
if (
|
|
5018
|
+
if (_s.hasOwnProperty(r))
|
|
5023
5019
|
l.content.length && l.content[0].isInline && this.open && (this.open--, l = this.top), o = !0, l.type || (this.needsBlock = !0);
|
|
5024
5020
|
else if (!e.firstChild) {
|
|
5025
5021
|
this.leafFallback(e);
|
|
@@ -5247,7 +5243,7 @@ class ni {
|
|
|
5247
5243
|
function gc(n) {
|
|
5248
5244
|
for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
|
|
5249
5245
|
let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
5250
|
-
r &&
|
|
5246
|
+
r && Bs.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
|
|
5251
5247
|
}
|
|
5252
5248
|
}
|
|
5253
5249
|
function yc(n, e) {
|
|
@@ -5288,7 +5284,7 @@ function Sc(n, e) {
|
|
|
5288
5284
|
if (n.eq(e[t]))
|
|
5289
5285
|
return e[t];
|
|
5290
5286
|
}
|
|
5291
|
-
class
|
|
5287
|
+
class ke {
|
|
5292
5288
|
/**
|
|
5293
5289
|
Create a serializer. `nodes` should map node names to functions
|
|
5294
5290
|
that take a node and return a description of the corresponding
|
|
@@ -5337,7 +5333,7 @@ class be {
|
|
|
5337
5333
|
@internal
|
|
5338
5334
|
*/
|
|
5339
5335
|
serializeNodeInner(e, t) {
|
|
5340
|
-
let { dom: r, contentDOM: i } =
|
|
5336
|
+
let { dom: r, contentDOM: i } = ke.renderSpec(Ln(t), this.nodes[e.type.name](e));
|
|
5341
5337
|
if (i) {
|
|
5342
5338
|
if (e.isLeaf)
|
|
5343
5339
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -5365,7 +5361,7 @@ class be {
|
|
|
5365
5361
|
*/
|
|
5366
5362
|
serializeMark(e, t, r = {}) {
|
|
5367
5363
|
let i = this.marks[e.type.name];
|
|
5368
|
-
return i &&
|
|
5364
|
+
return i && ke.renderSpec(Ln(r), i(e, t));
|
|
5369
5365
|
}
|
|
5370
5366
|
/**
|
|
5371
5367
|
Render an [output spec](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) to a DOM node. If
|
|
@@ -5397,7 +5393,7 @@ class be {
|
|
|
5397
5393
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
5398
5394
|
return { dom: l, contentDOM: l };
|
|
5399
5395
|
} else {
|
|
5400
|
-
let { dom: h, contentDOM: f } =
|
|
5396
|
+
let { dom: h, contentDOM: f } = ke.renderSpec(e, u, r);
|
|
5401
5397
|
if (l.appendChild(h), f) {
|
|
5402
5398
|
if (o)
|
|
5403
5399
|
throw new RangeError("Multiple content holes");
|
|
@@ -5412,7 +5408,7 @@ class be {
|
|
|
5412
5408
|
properties in a schema's node and mark specs.
|
|
5413
5409
|
*/
|
|
5414
5410
|
static fromSchema(e) {
|
|
5415
|
-
return e.cached.domSerializer || (e.cached.domSerializer = new
|
|
5411
|
+
return e.cached.domSerializer || (e.cached.domSerializer = new ke(this.nodesFromSchema(e), this.marksFromSchema(e)));
|
|
5416
5412
|
}
|
|
5417
5413
|
/**
|
|
5418
5414
|
Gather the serializers in a schema's node specs into an object.
|
|
@@ -5440,17 +5436,17 @@ function ii(n) {
|
|
|
5440
5436
|
function Ln(n) {
|
|
5441
5437
|
return n.document || window.document;
|
|
5442
5438
|
}
|
|
5443
|
-
const
|
|
5439
|
+
const Ls = 65535, Fs = Math.pow(2, 16);
|
|
5444
5440
|
function xc(n, e) {
|
|
5445
|
-
return n + e *
|
|
5441
|
+
return n + e * Fs;
|
|
5446
5442
|
}
|
|
5447
5443
|
function si(n) {
|
|
5448
|
-
return n &
|
|
5444
|
+
return n & Ls;
|
|
5449
5445
|
}
|
|
5450
5446
|
function wc(n) {
|
|
5451
|
-
return (n - (n &
|
|
5447
|
+
return (n - (n & Ls)) / Fs;
|
|
5452
5448
|
}
|
|
5453
|
-
const
|
|
5449
|
+
const zs = 1, Vs = 2, Xt = 4, js = 8;
|
|
5454
5450
|
class sr {
|
|
5455
5451
|
/**
|
|
5456
5452
|
@internal
|
|
@@ -5464,19 +5460,19 @@ class sr {
|
|
|
5464
5460
|
argument from the document.
|
|
5465
5461
|
*/
|
|
5466
5462
|
get deleted() {
|
|
5467
|
-
return (this.delInfo &
|
|
5463
|
+
return (this.delInfo & js) > 0;
|
|
5468
5464
|
}
|
|
5469
5465
|
/**
|
|
5470
5466
|
Tells you whether the token before the mapped position was deleted.
|
|
5471
5467
|
*/
|
|
5472
5468
|
get deletedBefore() {
|
|
5473
|
-
return (this.delInfo & (
|
|
5469
|
+
return (this.delInfo & (zs | Xt)) > 0;
|
|
5474
5470
|
}
|
|
5475
5471
|
/**
|
|
5476
5472
|
True when the token after the mapped position was deleted.
|
|
5477
5473
|
*/
|
|
5478
5474
|
get deletedAfter() {
|
|
5479
|
-
return (this.delInfo & (
|
|
5475
|
+
return (this.delInfo & (Vs | Xt)) > 0;
|
|
5480
5476
|
}
|
|
5481
5477
|
/**
|
|
5482
5478
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -5527,8 +5523,8 @@ class de {
|
|
|
5527
5523
|
let h = c ? e == a ? -1 : e == u ? 1 : t : t, f = a + i + (h < 0 ? 0 : d);
|
|
5528
5524
|
if (r)
|
|
5529
5525
|
return f;
|
|
5530
|
-
let p = e == (t < 0 ? a : u) ? null : xc(l / 3, e - a), m = e == a ?
|
|
5531
|
-
return (t < 0 ? e != a : e != u) && (m |=
|
|
5526
|
+
let p = e == (t < 0 ? a : u) ? null : xc(l / 3, e - a), m = e == a ? Vs : e == u ? zs : Xt;
|
|
5527
|
+
return (t < 0 ? e != a : e != u) && (m |= js), new sr(f, m, p);
|
|
5532
5528
|
}
|
|
5533
5529
|
i += d - c;
|
|
5534
5530
|
}
|
|
@@ -5787,7 +5783,7 @@ class Ae extends ie {
|
|
|
5787
5783
|
return K.fromReplace(e, this.from, this.to, s);
|
|
5788
5784
|
}
|
|
5789
5785
|
invert() {
|
|
5790
|
-
return new
|
|
5786
|
+
return new Se(this.from, this.to, this.mark);
|
|
5791
5787
|
}
|
|
5792
5788
|
map(e) {
|
|
5793
5789
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
@@ -5814,7 +5810,7 @@ class Ae extends ie {
|
|
|
5814
5810
|
}
|
|
5815
5811
|
}
|
|
5816
5812
|
ie.jsonID("addMark", Ae);
|
|
5817
|
-
class
|
|
5813
|
+
class Se extends ie {
|
|
5818
5814
|
/**
|
|
5819
5815
|
Create a mark-removing step.
|
|
5820
5816
|
*/
|
|
@@ -5830,10 +5826,10 @@ class ke extends ie {
|
|
|
5830
5826
|
}
|
|
5831
5827
|
map(e) {
|
|
5832
5828
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
5833
|
-
return t.deleted && r.deleted || t.pos >= r.pos ? null : new
|
|
5829
|
+
return t.deleted && r.deleted || t.pos >= r.pos ? null : new Se(t.pos, r.pos, this.mark);
|
|
5834
5830
|
}
|
|
5835
5831
|
merge(e) {
|
|
5836
|
-
return e instanceof
|
|
5832
|
+
return e instanceof Se && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Se(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
5837
5833
|
}
|
|
5838
5834
|
toJSON() {
|
|
5839
5835
|
return {
|
|
@@ -5849,10 +5845,10 @@ class ke extends ie {
|
|
|
5849
5845
|
static fromJSON(e, t) {
|
|
5850
5846
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
5851
5847
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
5852
|
-
return new
|
|
5848
|
+
return new Se(t.from, t.to, e.markFromJSON(t.mark));
|
|
5853
5849
|
}
|
|
5854
5850
|
}
|
|
5855
|
-
ie.jsonID("removeMark",
|
|
5851
|
+
ie.jsonID("removeMark", Se);
|
|
5856
5852
|
class De extends ie {
|
|
5857
5853
|
/**
|
|
5858
5854
|
Create a node mark step.
|
|
@@ -6065,7 +6061,7 @@ function Cc(n, e, t, r) {
|
|
|
6065
6061
|
if (!r.isInSet(u) && d.type.allowsMarkType(r.type)) {
|
|
6066
6062
|
let h = Math.max(c, e), f = Math.min(c + a.nodeSize, t), p = r.addToSet(u);
|
|
6067
6063
|
for (let m = 0; m < u.length; m++)
|
|
6068
|
-
u[m].isInSet(p) || (o && o.to == h && o.mark.eq(u[m]) ? o.to = f : i.push(o = new
|
|
6064
|
+
u[m].isInSet(p) || (o && o.to == h && o.mark.eq(u[m]) ? o.to = f : i.push(o = new Se(h, f, u[m])));
|
|
6069
6065
|
l && l.to == h ? l.to = f : s.push(l = new Ae(h, f, r));
|
|
6070
6066
|
}
|
|
6071
6067
|
}), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
|
|
@@ -6094,7 +6090,7 @@ function vc(n, e, t, r) {
|
|
|
6094
6090
|
h ? (h.to = c, h.step = s) : i.push({ style: u, from: Math.max(l, e), to: c, step: s });
|
|
6095
6091
|
}
|
|
6096
6092
|
}
|
|
6097
|
-
}), i.forEach((o) => n.step(new
|
|
6093
|
+
}), i.forEach((o) => n.step(new Se(o.from, o.to, o.style)));
|
|
6098
6094
|
}
|
|
6099
6095
|
function Ec(n, e, t, r = t.contentMatch) {
|
|
6100
6096
|
let i = n.doc.nodeAt(e), s = [], o = e + 1;
|
|
@@ -6105,7 +6101,7 @@ function Ec(n, e, t, r = t.contentMatch) {
|
|
|
6105
6101
|
else {
|
|
6106
6102
|
r = d;
|
|
6107
6103
|
for (let u = 0; u < a.marks.length; u++)
|
|
6108
|
-
t.allowsMarkType(a.marks[u].type) || n.step(new
|
|
6104
|
+
t.allowsMarkType(a.marks[u].type) || n.step(new Se(o, c, a.marks[u]));
|
|
6109
6105
|
}
|
|
6110
6106
|
o = c;
|
|
6111
6107
|
}
|
|
@@ -6139,7 +6135,7 @@ function Oc(n, e, t) {
|
|
|
6139
6135
|
m || i.after(p + 1) < i.end(p) ? (m = !0, h = b.from(i.node(p).copy(h)), f++) : c++;
|
|
6140
6136
|
n.step(new W(a, c, o, l, new k(d.append(h), u, f), d.size - u, !0));
|
|
6141
6137
|
}
|
|
6142
|
-
function
|
|
6138
|
+
function Hs(n, e, t = null, r = n) {
|
|
6143
6139
|
let i = Tc(n, e), s = i && Nc(r, e);
|
|
6144
6140
|
return s ? i.map(oi).concat({ type: e, attrs: t }).concat(s.map(oi)) : null;
|
|
6145
6141
|
}
|
|
@@ -6229,16 +6225,16 @@ function Rc(n, e, t = 1, r) {
|
|
|
6229
6225
|
}
|
|
6230
6226
|
function rt(n, e) {
|
|
6231
6227
|
let t = n.resolve(e), r = t.index();
|
|
6232
|
-
return
|
|
6228
|
+
return $s(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
6233
6229
|
}
|
|
6234
|
-
function
|
|
6230
|
+
function $s(n, e) {
|
|
6235
6231
|
return !!(n && e && !n.isLeaf && n.canAppend(e));
|
|
6236
6232
|
}
|
|
6237
|
-
function
|
|
6233
|
+
function qs(n, e, t = -1) {
|
|
6238
6234
|
let r = n.resolve(e);
|
|
6239
6235
|
for (let i = r.depth; ; i--) {
|
|
6240
6236
|
let s, o, l = r.index(i);
|
|
6241
|
-
if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock &&
|
|
6237
|
+
if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock && $s(s, o) && r.node(i).canReplace(l, l + 1))
|
|
6242
6238
|
return e;
|
|
6243
6239
|
if (i == 0)
|
|
6244
6240
|
break;
|
|
@@ -6296,9 +6292,9 @@ function Mr(n, e, t = e, r = k.empty) {
|
|
|
6296
6292
|
if (e == t && !r.size)
|
|
6297
6293
|
return null;
|
|
6298
6294
|
let i = n.resolve(e), s = n.resolve(t);
|
|
6299
|
-
return
|
|
6295
|
+
return Ks(i, s, r) ? new Z(e, t, r) : new Fc(i, s, r).fit();
|
|
6300
6296
|
}
|
|
6301
|
-
function
|
|
6297
|
+
function Ks(n, e, t) {
|
|
6302
6298
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
6303
6299
|
}
|
|
6304
6300
|
class Fc {
|
|
@@ -6392,7 +6388,7 @@ class Fc {
|
|
|
6392
6388
|
let m = l.child(c), g = u.matchType(m.type);
|
|
6393
6389
|
if (!g)
|
|
6394
6390
|
break;
|
|
6395
|
-
c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(
|
|
6391
|
+
c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(Ws(m.mark(h.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? f : -1)));
|
|
6396
6392
|
}
|
|
6397
6393
|
let p = c == l.childCount;
|
|
6398
6394
|
p || (f = -1), this.placed = Nt(this.placed, t, b.from(d)), this.frontier[t].match = u, p && f < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
@@ -6460,11 +6456,11 @@ function zn(n, e) {
|
|
|
6460
6456
|
n = n.firstChild.content;
|
|
6461
6457
|
return n;
|
|
6462
6458
|
}
|
|
6463
|
-
function
|
|
6459
|
+
function Ws(n, e, t) {
|
|
6464
6460
|
if (e <= 0)
|
|
6465
6461
|
return n;
|
|
6466
6462
|
let r = n.content;
|
|
6467
|
-
return e > 1 && (r = r.replaceChild(0,
|
|
6463
|
+
return e > 1 && (r = r.replaceChild(0, Ws(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty, !0)))), n.copy(r);
|
|
6468
6464
|
}
|
|
6469
6465
|
function Vn(n, e, t, r, i) {
|
|
6470
6466
|
let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
|
|
@@ -6486,9 +6482,9 @@ function jc(n, e, t, r) {
|
|
|
6486
6482
|
if (!r.size)
|
|
6487
6483
|
return n.deleteRange(e, t);
|
|
6488
6484
|
let i = n.doc.resolve(e), s = n.doc.resolve(t);
|
|
6489
|
-
if (
|
|
6485
|
+
if (Ks(i, s, r))
|
|
6490
6486
|
return n.step(new Z(e, t, r));
|
|
6491
|
-
let o =
|
|
6487
|
+
let o = Us(i, n.doc.resolve(t));
|
|
6492
6488
|
o[o.length - 1] == 0 && o.pop();
|
|
6493
6489
|
let l = -(i.depth + 1);
|
|
6494
6490
|
o.unshift(l);
|
|
@@ -6518,9 +6514,9 @@ function jc(n, e, t, r) {
|
|
|
6518
6514
|
for (let m = 0; m < o.length; m++) {
|
|
6519
6515
|
let g = o[(m + a) % o.length], y = !0;
|
|
6520
6516
|
g < 0 && (y = !1, g = -g);
|
|
6521
|
-
let
|
|
6522
|
-
if (
|
|
6523
|
-
return n.replace(i.before(g), y ? s.after(g) : t, new k(
|
|
6517
|
+
let C = i.node(g - 1), E = i.index(g - 1);
|
|
6518
|
+
if (C.canReplaceWith(E, E, p.type, p.marks))
|
|
6519
|
+
return n.replace(i.before(g), y ? s.after(g) : t, new k(Js(r.content, 0, r.openStart, f), f, r.openEnd));
|
|
6524
6520
|
}
|
|
6525
6521
|
}
|
|
6526
6522
|
let u = n.steps.length;
|
|
@@ -6529,10 +6525,10 @@ function jc(n, e, t, r) {
|
|
|
6529
6525
|
f < 0 || (e = i.before(f), t = s.after(f));
|
|
6530
6526
|
}
|
|
6531
6527
|
}
|
|
6532
|
-
function
|
|
6528
|
+
function Js(n, e, t, r, i) {
|
|
6533
6529
|
if (e < t) {
|
|
6534
6530
|
let s = n.firstChild;
|
|
6535
|
-
n = n.replaceChild(0, s.copy(
|
|
6531
|
+
n = n.replaceChild(0, s.copy(Js(s.content, e + 1, t, r, s)));
|
|
6536
6532
|
}
|
|
6537
6533
|
if (e > r) {
|
|
6538
6534
|
let s = i.contentMatchAt(0), o = s.fillBefore(n).append(n);
|
|
@@ -6548,7 +6544,7 @@ function Hc(n, e, t, r) {
|
|
|
6548
6544
|
n.replaceRange(e, t, new k(b.from(r), 0, 0));
|
|
6549
6545
|
}
|
|
6550
6546
|
function $c(n, e, t) {
|
|
6551
|
-
let r = n.doc.resolve(e), i = n.doc.resolve(t), s =
|
|
6547
|
+
let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Us(r, i);
|
|
6552
6548
|
for (let o = 0; o < s.length; o++) {
|
|
6553
6549
|
let l = s[o], a = o == s.length - 1;
|
|
6554
6550
|
if (a && l == 0 || r.node(l).type.contentMatch.validEnd)
|
|
@@ -6561,7 +6557,7 @@ function $c(n, e, t) {
|
|
|
6561
6557
|
return n.delete(r.before(o), t);
|
|
6562
6558
|
n.delete(e, t);
|
|
6563
6559
|
}
|
|
6564
|
-
function
|
|
6560
|
+
function Us(n, e) {
|
|
6565
6561
|
let t = [], r = Math.min(n.depth, e.depth);
|
|
6566
6562
|
for (let i = r; i >= 0; i--) {
|
|
6567
6563
|
let s = n.start(i);
|
|
@@ -6618,7 +6614,7 @@ gt = function n(e) {
|
|
|
6618
6614
|
gt.prototype = Object.create(Error.prototype);
|
|
6619
6615
|
gt.prototype.constructor = gt;
|
|
6620
6616
|
gt.prototype.name = "TransformError";
|
|
6621
|
-
class
|
|
6617
|
+
class Gs {
|
|
6622
6618
|
/**
|
|
6623
6619
|
Create a transform that starts with the given document.
|
|
6624
6620
|
*/
|
|
@@ -6831,7 +6827,7 @@ class Us {
|
|
|
6831
6827
|
}
|
|
6832
6828
|
}
|
|
6833
6829
|
const jn = /* @__PURE__ */ Object.create(null);
|
|
6834
|
-
class
|
|
6830
|
+
class T {
|
|
6835
6831
|
/**
|
|
6836
6832
|
Initialize a selection with the head and anchor and ranges. If no
|
|
6837
6833
|
ranges are given, constructs a single range across `$anchor` and
|
|
@@ -6925,7 +6921,7 @@ class O {
|
|
|
6925
6921
|
found.
|
|
6926
6922
|
*/
|
|
6927
6923
|
static findFrom(e, t, r = !1) {
|
|
6928
|
-
let i = e.parent.inlineContent ? new
|
|
6924
|
+
let i = e.parent.inlineContent ? new D(e) : ot(e.node(0), e.parent, e.pos, e.index(), t, r);
|
|
6929
6925
|
if (i)
|
|
6930
6926
|
return i;
|
|
6931
6927
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -6941,7 +6937,7 @@ class O {
|
|
|
6941
6937
|
negative, it will search backwards first.
|
|
6942
6938
|
*/
|
|
6943
6939
|
static near(e, t = 1) {
|
|
6944
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
6940
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new me(e.node(0));
|
|
6945
6941
|
}
|
|
6946
6942
|
/**
|
|
6947
6943
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -6950,14 +6946,14 @@ class O {
|
|
|
6950
6946
|
exists.
|
|
6951
6947
|
*/
|
|
6952
6948
|
static atStart(e) {
|
|
6953
|
-
return ot(e, e, 0, 0, 1) || new
|
|
6949
|
+
return ot(e, e, 0, 0, 1) || new me(e);
|
|
6954
6950
|
}
|
|
6955
6951
|
/**
|
|
6956
6952
|
Find the cursor or leaf node selection closest to the end of the
|
|
6957
6953
|
given document.
|
|
6958
6954
|
*/
|
|
6959
6955
|
static atEnd(e) {
|
|
6960
|
-
return ot(e, e, e.content.size, e.childCount, -1) || new
|
|
6956
|
+
return ot(e, e, e.content.size, e.childCount, -1) || new me(e);
|
|
6961
6957
|
}
|
|
6962
6958
|
/**
|
|
6963
6959
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -6992,10 +6988,10 @@ class O {
|
|
|
6992
6988
|
returns the bookmark for that.
|
|
6993
6989
|
*/
|
|
6994
6990
|
getBookmark() {
|
|
6995
|
-
return
|
|
6991
|
+
return D.between(this.$anchor, this.$head).getBookmark();
|
|
6996
6992
|
}
|
|
6997
6993
|
}
|
|
6998
|
-
|
|
6994
|
+
T.prototype.visible = !0;
|
|
6999
6995
|
class qc {
|
|
7000
6996
|
/**
|
|
7001
6997
|
Create a range.
|
|
@@ -7008,7 +7004,7 @@ let li = !1;
|
|
|
7008
7004
|
function ai(n) {
|
|
7009
7005
|
!li && !n.parent.inlineContent && (li = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
|
|
7010
7006
|
}
|
|
7011
|
-
class
|
|
7007
|
+
class D extends T {
|
|
7012
7008
|
/**
|
|
7013
7009
|
Construct a text selection between the given points.
|
|
7014
7010
|
*/
|
|
@@ -7025,9 +7021,9 @@ class A extends O {
|
|
|
7025
7021
|
map(e, t) {
|
|
7026
7022
|
let r = e.resolve(t.map(this.head));
|
|
7027
7023
|
if (!r.parent.inlineContent)
|
|
7028
|
-
return
|
|
7024
|
+
return T.near(r);
|
|
7029
7025
|
let i = e.resolve(t.map(this.anchor));
|
|
7030
|
-
return new
|
|
7026
|
+
return new D(i.parent.inlineContent ? i : r, r);
|
|
7031
7027
|
}
|
|
7032
7028
|
replace(e, t = k.empty) {
|
|
7033
7029
|
if (super.replace(e, t), t == k.empty) {
|
|
@@ -7036,7 +7032,7 @@ class A extends O {
|
|
|
7036
7032
|
}
|
|
7037
7033
|
}
|
|
7038
7034
|
eq(e) {
|
|
7039
|
-
return e instanceof
|
|
7035
|
+
return e instanceof D && e.anchor == this.anchor && e.head == this.head;
|
|
7040
7036
|
}
|
|
7041
7037
|
getBookmark() {
|
|
7042
7038
|
return new kn(this.anchor, this.head);
|
|
@@ -7050,7 +7046,7 @@ class A extends O {
|
|
|
7050
7046
|
static fromJSON(e, t) {
|
|
7051
7047
|
if (typeof t.anchor != "number" || typeof t.head != "number")
|
|
7052
7048
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
7053
|
-
return new
|
|
7049
|
+
return new D(e.resolve(t.anchor), e.resolve(t.head));
|
|
7054
7050
|
}
|
|
7055
7051
|
/**
|
|
7056
7052
|
Create a text selection from non-resolved positions.
|
|
@@ -7070,16 +7066,16 @@ class A extends O {
|
|
|
7070
7066
|
static between(e, t, r) {
|
|
7071
7067
|
let i = e.pos - t.pos;
|
|
7072
7068
|
if ((!r || i) && (r = i >= 0 ? 1 : -1), !t.parent.inlineContent) {
|
|
7073
|
-
let s =
|
|
7069
|
+
let s = T.findFrom(t, r, !0) || T.findFrom(t, -r, !0);
|
|
7074
7070
|
if (s)
|
|
7075
7071
|
t = s.$head;
|
|
7076
7072
|
else
|
|
7077
|
-
return
|
|
7073
|
+
return T.near(t, r);
|
|
7078
7074
|
}
|
|
7079
|
-
return e.parent.inlineContent || (i == 0 ? e = t : (e = (
|
|
7075
|
+
return e.parent.inlineContent || (i == 0 ? e = t : (e = (T.findFrom(e, -r, !0) || T.findFrom(e, r, !0)).$anchor, e.pos < t.pos != i < 0 && (e = t))), new D(e, t);
|
|
7080
7076
|
}
|
|
7081
7077
|
}
|
|
7082
|
-
|
|
7078
|
+
T.jsonID("text", D);
|
|
7083
7079
|
class kn {
|
|
7084
7080
|
constructor(e, t) {
|
|
7085
7081
|
this.anchor = e, this.head = t;
|
|
@@ -7088,10 +7084,10 @@ class kn {
|
|
|
7088
7084
|
return new kn(e.map(this.anchor), e.map(this.head));
|
|
7089
7085
|
}
|
|
7090
7086
|
resolve(e) {
|
|
7091
|
-
return
|
|
7087
|
+
return D.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
7092
7088
|
}
|
|
7093
7089
|
}
|
|
7094
|
-
class v extends
|
|
7090
|
+
class v extends T {
|
|
7095
7091
|
/**
|
|
7096
7092
|
Create a node selection. Does not verify the validity of its
|
|
7097
7093
|
argument.
|
|
@@ -7102,7 +7098,7 @@ class v extends O {
|
|
|
7102
7098
|
}
|
|
7103
7099
|
map(e, t) {
|
|
7104
7100
|
let { deleted: r, pos: i } = t.mapResult(this.anchor), s = e.resolve(i);
|
|
7105
|
-
return r ?
|
|
7101
|
+
return r ? T.near(s) : new v(s);
|
|
7106
7102
|
}
|
|
7107
7103
|
content() {
|
|
7108
7104
|
return new k(b.from(this.node), 0, 0);
|
|
@@ -7139,7 +7135,7 @@ class v extends O {
|
|
|
7139
7135
|
}
|
|
7140
7136
|
}
|
|
7141
7137
|
v.prototype.visible = !1;
|
|
7142
|
-
|
|
7138
|
+
T.jsonID("node", v);
|
|
7143
7139
|
class Or {
|
|
7144
7140
|
constructor(e) {
|
|
7145
7141
|
this.anchor = e;
|
|
@@ -7150,10 +7146,10 @@ class Or {
|
|
|
7150
7146
|
}
|
|
7151
7147
|
resolve(e) {
|
|
7152
7148
|
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
7153
|
-
return r && v.isSelectable(r) ? new v(t) :
|
|
7149
|
+
return r && v.isSelectable(r) ? new v(t) : T.near(t);
|
|
7154
7150
|
}
|
|
7155
7151
|
}
|
|
7156
|
-
class
|
|
7152
|
+
class me extends T {
|
|
7157
7153
|
/**
|
|
7158
7154
|
Create an all-selection over the given document.
|
|
7159
7155
|
*/
|
|
@@ -7163,7 +7159,7 @@ class pe extends O {
|
|
|
7163
7159
|
replace(e, t = k.empty) {
|
|
7164
7160
|
if (t == k.empty) {
|
|
7165
7161
|
e.delete(0, e.doc.content.size);
|
|
7166
|
-
let r =
|
|
7162
|
+
let r = T.atStart(e.doc);
|
|
7167
7163
|
r.eq(e.selection) || e.setSelection(r);
|
|
7168
7164
|
} else
|
|
7169
7165
|
super.replace(e, t);
|
|
@@ -7175,30 +7171,30 @@ class pe extends O {
|
|
|
7175
7171
|
@internal
|
|
7176
7172
|
*/
|
|
7177
7173
|
static fromJSON(e) {
|
|
7178
|
-
return new
|
|
7174
|
+
return new me(e);
|
|
7179
7175
|
}
|
|
7180
7176
|
map(e) {
|
|
7181
|
-
return new
|
|
7177
|
+
return new me(e);
|
|
7182
7178
|
}
|
|
7183
7179
|
eq(e) {
|
|
7184
|
-
return e instanceof
|
|
7180
|
+
return e instanceof me;
|
|
7185
7181
|
}
|
|
7186
7182
|
getBookmark() {
|
|
7187
7183
|
return Kc;
|
|
7188
7184
|
}
|
|
7189
7185
|
}
|
|
7190
|
-
|
|
7186
|
+
T.jsonID("all", me);
|
|
7191
7187
|
const Kc = {
|
|
7192
7188
|
map() {
|
|
7193
7189
|
return this;
|
|
7194
7190
|
},
|
|
7195
7191
|
resolve(n) {
|
|
7196
|
-
return new
|
|
7192
|
+
return new me(n);
|
|
7197
7193
|
}
|
|
7198
7194
|
};
|
|
7199
7195
|
function ot(n, e, t, r, i, s = !1) {
|
|
7200
7196
|
if (e.inlineContent)
|
|
7201
|
-
return
|
|
7197
|
+
return D.create(n, t);
|
|
7202
7198
|
for (let o = r - (i > 0 ? 0 : 1); i > 0 ? o < e.childCount : o >= 0; o += i) {
|
|
7203
7199
|
let l = e.child(o);
|
|
7204
7200
|
if (l.isAtom) {
|
|
@@ -7223,10 +7219,10 @@ function ci(n, e, t) {
|
|
|
7223
7219
|
let s = n.mapping.maps[r], o;
|
|
7224
7220
|
s.forEach((l, a, c, d) => {
|
|
7225
7221
|
o == null && (o = d);
|
|
7226
|
-
}), n.setSelection(
|
|
7222
|
+
}), n.setSelection(T.near(n.doc.resolve(o), t));
|
|
7227
7223
|
}
|
|
7228
7224
|
const di = 1, Yt = 2, ui = 4;
|
|
7229
|
-
class Wc extends
|
|
7225
|
+
class Wc extends Gs {
|
|
7230
7226
|
/**
|
|
7231
7227
|
@internal
|
|
7232
7228
|
*/
|
|
@@ -7338,7 +7334,7 @@ class Wc extends Us {
|
|
|
7338
7334
|
let o = this.doc.resolve(t);
|
|
7339
7335
|
s = r == t ? o.marks() : o.marksAcross(this.doc.resolve(r));
|
|
7340
7336
|
}
|
|
7341
|
-
return this.replaceRangeWith(t, r, i.text(e, s)), this.selection.empty || this.setSelection(
|
|
7337
|
+
return this.replaceRangeWith(t, r, i.text(e, s)), this.selection.empty || this.setSelection(T.near(this.selection.$to)), this;
|
|
7342
7338
|
}
|
|
7343
7339
|
}
|
|
7344
7340
|
/**
|
|
@@ -7396,7 +7392,7 @@ const Jc = [
|
|
|
7396
7392
|
}),
|
|
7397
7393
|
new At("selection", {
|
|
7398
7394
|
init(n, e) {
|
|
7399
|
-
return n.selection ||
|
|
7395
|
+
return n.selection || T.atStart(e.doc);
|
|
7400
7396
|
},
|
|
7401
7397
|
apply(n) {
|
|
7402
7398
|
return n.selection;
|
|
@@ -7576,7 +7572,7 @@ class at {
|
|
|
7576
7572
|
if (o.name == "doc")
|
|
7577
7573
|
s.doc = Ue.fromJSON(e.schema, t.doc);
|
|
7578
7574
|
else if (o.name == "selection")
|
|
7579
|
-
s.selection =
|
|
7575
|
+
s.selection = T.fromJSON(s.doc, t.selection);
|
|
7580
7576
|
else if (o.name == "storedMarks")
|
|
7581
7577
|
t.storedMarks && (s.storedMarks = t.storedMarks.map(e.schema.markFromJSON));
|
|
7582
7578
|
else {
|
|
@@ -7593,10 +7589,10 @@ class at {
|
|
|
7593
7589
|
}), s;
|
|
7594
7590
|
}
|
|
7595
7591
|
}
|
|
7596
|
-
function
|
|
7592
|
+
function Ys(n, e, t) {
|
|
7597
7593
|
for (let r in n) {
|
|
7598
7594
|
let i = n[r];
|
|
7599
|
-
i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i =
|
|
7595
|
+
i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Ys(i, e, {})), t[r] = i;
|
|
7600
7596
|
}
|
|
7601
7597
|
return t;
|
|
7602
7598
|
}
|
|
@@ -7605,7 +7601,7 @@ class se {
|
|
|
7605
7601
|
Create a plugin.
|
|
7606
7602
|
*/
|
|
7607
7603
|
constructor(e) {
|
|
7608
|
-
this.spec = e, this.props = {}, e.props &&
|
|
7604
|
+
this.spec = e, this.props = {}, e.props && Ys(e.props, this, this.props), this.key = e.key ? e.key.key : Xs("plugin");
|
|
7609
7605
|
}
|
|
7610
7606
|
/**
|
|
7611
7607
|
Extract the plugin's state field from an editor state.
|
|
@@ -7615,7 +7611,7 @@ class se {
|
|
|
7615
7611
|
}
|
|
7616
7612
|
}
|
|
7617
7613
|
const $n = /* @__PURE__ */ Object.create(null);
|
|
7618
|
-
function
|
|
7614
|
+
function Xs(n) {
|
|
7619
7615
|
return n in $n ? n + "$" + ++$n[n] : ($n[n] = 0, n + "$");
|
|
7620
7616
|
}
|
|
7621
7617
|
class ae {
|
|
@@ -7623,7 +7619,7 @@ class ae {
|
|
|
7623
7619
|
Create a plugin key.
|
|
7624
7620
|
*/
|
|
7625
7621
|
constructor(e = "key") {
|
|
7626
|
-
this.key =
|
|
7622
|
+
this.key = Xs(e);
|
|
7627
7623
|
}
|
|
7628
7624
|
/**
|
|
7629
7625
|
Get the active plugin with this key, if any, from an editor
|
|
@@ -7658,7 +7654,7 @@ function pi(n, e, t, r, i) {
|
|
|
7658
7654
|
for (; ; ) {
|
|
7659
7655
|
if (n == t && e == r)
|
|
7660
7656
|
return !0;
|
|
7661
|
-
if (e == (i < 0 ? 0 :
|
|
7657
|
+
if (e == (i < 0 ? 0 : be(n))) {
|
|
7662
7658
|
let s = n.parentNode;
|
|
7663
7659
|
if (!s || s.nodeType != 1 || Yc(n) || Uc.test(n.nodeName) || n.contentEditable == "false")
|
|
7664
7660
|
return !1;
|
|
@@ -7666,22 +7662,22 @@ function pi(n, e, t, r, i) {
|
|
|
7666
7662
|
} else if (n.nodeType == 1) {
|
|
7667
7663
|
if (n = n.childNodes[e + (i < 0 ? -1 : 0)], n.contentEditable == "false")
|
|
7668
7664
|
return !1;
|
|
7669
|
-
e = i < 0 ?
|
|
7665
|
+
e = i < 0 ? be(n) : 0;
|
|
7670
7666
|
} else
|
|
7671
7667
|
return !1;
|
|
7672
7668
|
}
|
|
7673
7669
|
}
|
|
7674
|
-
function
|
|
7670
|
+
function be(n) {
|
|
7675
7671
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
7676
7672
|
}
|
|
7677
7673
|
function Gc(n, e, t) {
|
|
7678
|
-
for (let r = e == 0, i = e ==
|
|
7674
|
+
for (let r = e == 0, i = e == be(n); r || i; ) {
|
|
7679
7675
|
if (n == t)
|
|
7680
7676
|
return !0;
|
|
7681
7677
|
let s = oe(n);
|
|
7682
7678
|
if (n = n.parentNode, !n)
|
|
7683
7679
|
return !1;
|
|
7684
|
-
r = r && s == 0, i = i && s ==
|
|
7680
|
+
r = r && s == 0, i = i && s == be(n);
|
|
7685
7681
|
}
|
|
7686
7682
|
}
|
|
7687
7683
|
function Yc(n) {
|
|
@@ -7717,9 +7713,9 @@ function Zc(n, e, t) {
|
|
|
7717
7713
|
return { node: r.startContainer, offset: r.startOffset };
|
|
7718
7714
|
}
|
|
7719
7715
|
}
|
|
7720
|
-
const xe = typeof navigator < "u" ? navigator : null, mi = typeof document < "u" ? document : null, Le = xe && xe.userAgent || "", lr = /Edge\/(\d+)/.exec(Le),
|
|
7721
|
-
|
|
7722
|
-
const cr = !re && /Chrome\/(\d+)/.exec(Le), Q = !!cr, Qc = cr ? +cr[1] : 0, ee = !re && !!xe && /Apple Computer/.test(xe.vendor), yt = ee && (/Mobile\/\w+/.test(Le) || !!xe && xe.maxTouchPoints > 2), ce = yt || (xe ? /Mac/.test(xe.platform) : !1), ed = xe ? /Win/.test(xe.platform) : !1,
|
|
7716
|
+
const xe = typeof navigator < "u" ? navigator : null, mi = typeof document < "u" ? document : null, Le = xe && xe.userAgent || "", lr = /Edge\/(\d+)/.exec(Le), Zs = /MSIE \d/.exec(Le), ar = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Le), re = !!(Zs || ar || lr), Pe = Zs ? document.documentMode : ar ? +ar[1] : lr ? +lr[1] : 0, ge = !re && /gecko\/(\d+)/i.test(Le);
|
|
7717
|
+
ge && +(/Firefox\/(\d+)/.exec(Le) || [0, 0])[1];
|
|
7718
|
+
const cr = !re && /Chrome\/(\d+)/.exec(Le), Q = !!cr, Qc = cr ? +cr[1] : 0, ee = !re && !!xe && /Apple Computer/.test(xe.vendor), yt = ee && (/Mobile\/\w+/.test(Le) || !!xe && xe.maxTouchPoints > 2), ce = yt || (xe ? /Mac/.test(xe.platform) : !1), ed = xe ? /Win/.test(xe.platform) : !1, pe = /Android \d/.test(Le), xn = !!mi && "webkitFontSmoothing" in mi.documentElement.style, td = xn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
7723
7719
|
function nd(n) {
|
|
7724
7720
|
return {
|
|
7725
7721
|
left: 0,
|
|
@@ -7771,9 +7767,9 @@ function id(n) {
|
|
|
7771
7767
|
break;
|
|
7772
7768
|
}
|
|
7773
7769
|
}
|
|
7774
|
-
return { refDOM: r, refTop: i, stack:
|
|
7770
|
+
return { refDOM: r, refTop: i, stack: Qs(n.dom) };
|
|
7775
7771
|
}
|
|
7776
|
-
function
|
|
7772
|
+
function Qs(n) {
|
|
7777
7773
|
let e = [], t = n.ownerDocument;
|
|
7778
7774
|
for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = Ft(r))
|
|
7779
7775
|
;
|
|
@@ -7781,9 +7777,9 @@ function Zs(n) {
|
|
|
7781
7777
|
}
|
|
7782
7778
|
function sd({ refDOM: n, refTop: e, stack: t }) {
|
|
7783
7779
|
let r = n ? n.getBoundingClientRect().top : 0;
|
|
7784
|
-
|
|
7780
|
+
eo(t, r == 0 ? 0 : r - e);
|
|
7785
7781
|
}
|
|
7786
|
-
function
|
|
7782
|
+
function eo(n, e) {
|
|
7787
7783
|
for (let t = 0; t < n.length; t++) {
|
|
7788
7784
|
let { dom: r, top: i, left: s } = n[t];
|
|
7789
7785
|
r.scrollTop != i + e && (r.scrollTop = i + e), r.scrollLeft != s && (r.scrollLeft = s);
|
|
@@ -7795,14 +7791,14 @@ function od(n) {
|
|
|
7795
7791
|
return n.setActive();
|
|
7796
7792
|
if (st)
|
|
7797
7793
|
return n.focus(st);
|
|
7798
|
-
let e =
|
|
7794
|
+
let e = Qs(n);
|
|
7799
7795
|
n.focus(st == null ? {
|
|
7800
7796
|
get preventScroll() {
|
|
7801
7797
|
return st = { preventScroll: !0 }, !0;
|
|
7802
7798
|
}
|
|
7803
|
-
} : void 0), st || (st = !1,
|
|
7799
|
+
} : void 0), st || (st = !1, eo(e, 0));
|
|
7804
7800
|
}
|
|
7805
|
-
function
|
|
7801
|
+
function to(n, e) {
|
|
7806
7802
|
let t, r = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
|
|
7807
7803
|
for (let d = n.firstChild, u = 0; d; d = d.nextSibling, u++) {
|
|
7808
7804
|
let h;
|
|
@@ -7829,7 +7825,7 @@ function eo(n, e) {
|
|
|
7829
7825
|
!t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
|
|
7830
7826
|
}
|
|
7831
7827
|
}
|
|
7832
|
-
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? ld(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } :
|
|
7828
|
+
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? ld(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : to(t, i);
|
|
7833
7829
|
}
|
|
7834
7830
|
function ld(n, e) {
|
|
7835
7831
|
let t = n.nodeValue.length, r = document.createRange();
|
|
@@ -7849,7 +7845,7 @@ function ad(n, e) {
|
|
|
7849
7845
|
return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
|
|
7850
7846
|
}
|
|
7851
7847
|
function cd(n, e, t) {
|
|
7852
|
-
let { node: r, offset: i } =
|
|
7848
|
+
let { node: r, offset: i } = to(e, t), s = -1;
|
|
7853
7849
|
if (r.nodeType == 1 && !r.firstChild) {
|
|
7854
7850
|
let o = r.getBoundingClientRect();
|
|
7855
7851
|
s = o.left != o.right && t.left > (o.left + o.right) / 2 ? 1 : -1;
|
|
@@ -7871,7 +7867,7 @@ function dd(n, e, t, r) {
|
|
|
7871
7867
|
}
|
|
7872
7868
|
return i > -1 ? i : n.docView.posFromDOM(e, t, -1);
|
|
7873
7869
|
}
|
|
7874
|
-
function
|
|
7870
|
+
function no(n, e, t) {
|
|
7875
7871
|
let r = n.childNodes.length;
|
|
7876
7872
|
if (r && t.top < t.bottom)
|
|
7877
7873
|
for (let i = Math.max(0, Math.min(r - 1, Math.floor(r * (e.top - t.top) / (t.bottom - t.top)) - 2)), s = i; ; ) {
|
|
@@ -7881,7 +7877,7 @@ function to(n, e, t) {
|
|
|
7881
7877
|
for (let a = 0; a < l.length; a++) {
|
|
7882
7878
|
let c = l[a];
|
|
7883
7879
|
if (Tr(e, c))
|
|
7884
|
-
return
|
|
7880
|
+
return no(o, e, c);
|
|
7885
7881
|
}
|
|
7886
7882
|
}
|
|
7887
7883
|
if ((s = (s + 1) % r) == i)
|
|
@@ -7895,14 +7891,14 @@ function ud(n, e) {
|
|
|
7895
7891
|
let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
7896
7892
|
if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
|
|
7897
7893
|
let c = n.dom.getBoundingClientRect();
|
|
7898
|
-
if (!Tr(e, c) || (o =
|
|
7894
|
+
if (!Tr(e, c) || (o = no(n.dom, e, c), !o))
|
|
7899
7895
|
return null;
|
|
7900
7896
|
}
|
|
7901
7897
|
if (ee)
|
|
7902
7898
|
for (let c = o; r && c; c = Ft(c))
|
|
7903
7899
|
c.draggable && (r = void 0);
|
|
7904
7900
|
if (o = ad(o, e), r) {
|
|
7905
|
-
if (
|
|
7901
|
+
if (ge && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
7906
7902
|
let c = r.childNodes[i], d;
|
|
7907
7903
|
c.nodeName == "IMG" && (d = c.getBoundingClientRect()).right <= e.left && d.bottom > e.top && i++;
|
|
7908
7904
|
}
|
|
@@ -7925,12 +7921,12 @@ function Te(n, e) {
|
|
|
7925
7921
|
return Array.prototype.find.call(t, yi) || n.getBoundingClientRect();
|
|
7926
7922
|
}
|
|
7927
7923
|
const hd = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
7928
|
-
function
|
|
7929
|
-
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = xn ||
|
|
7924
|
+
function ro(n, e, t) {
|
|
7925
|
+
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = xn || ge;
|
|
7930
7926
|
if (r.nodeType == 3)
|
|
7931
7927
|
if (o && (hd.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
|
|
7932
7928
|
let a = Te(ve(r, i, i), t);
|
|
7933
|
-
if (
|
|
7929
|
+
if (ge && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
|
|
7934
7930
|
let c = Te(ve(r, i - 1, i - 1), -1);
|
|
7935
7931
|
if (c.top == a.top) {
|
|
7936
7932
|
let d = Te(ve(r, i, i + 1), -1);
|
|
@@ -7944,24 +7940,24 @@ function no(n, e, t) {
|
|
|
7944
7940
|
return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Et(Te(ve(r, a, c), d), d < 0);
|
|
7945
7941
|
}
|
|
7946
7942
|
if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
7947
|
-
if (s == null && i && (t < 0 || i ==
|
|
7943
|
+
if (s == null && i && (t < 0 || i == be(r))) {
|
|
7948
7944
|
let a = r.childNodes[i - 1];
|
|
7949
7945
|
if (a.nodeType == 1)
|
|
7950
7946
|
return qn(a.getBoundingClientRect(), !1);
|
|
7951
7947
|
}
|
|
7952
|
-
if (s == null && i <
|
|
7948
|
+
if (s == null && i < be(r)) {
|
|
7953
7949
|
let a = r.childNodes[i];
|
|
7954
7950
|
if (a.nodeType == 1)
|
|
7955
7951
|
return qn(a.getBoundingClientRect(), !0);
|
|
7956
7952
|
}
|
|
7957
7953
|
return qn(r.getBoundingClientRect(), t >= 0);
|
|
7958
7954
|
}
|
|
7959
|
-
if (s == null && i && (t < 0 || i ==
|
|
7960
|
-
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? ve(a,
|
|
7955
|
+
if (s == null && i && (t < 0 || i == be(r))) {
|
|
7956
|
+
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? ve(a, be(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
7961
7957
|
if (c)
|
|
7962
7958
|
return Et(Te(c, 1), !1);
|
|
7963
7959
|
}
|
|
7964
|
-
if (s == null && i <
|
|
7960
|
+
if (s == null && i < be(r)) {
|
|
7965
7961
|
let a = r.childNodes[i];
|
|
7966
7962
|
for (; a.pmViewDesc && a.pmViewDesc.ignoreForCoords; )
|
|
7967
7963
|
a = a.nextSibling;
|
|
@@ -7983,7 +7979,7 @@ function qn(n, e) {
|
|
|
7983
7979
|
let t = e ? n.top : n.bottom;
|
|
7984
7980
|
return { top: t, bottom: t, left: n.left, right: n.right };
|
|
7985
7981
|
}
|
|
7986
|
-
function
|
|
7982
|
+
function io(n, e, t) {
|
|
7987
7983
|
let r = n.state, i = n.root.activeElement;
|
|
7988
7984
|
r != e && n.updateState(e), i != n.dom && n.focus();
|
|
7989
7985
|
try {
|
|
@@ -7994,7 +7990,7 @@ function ro(n, e, t) {
|
|
|
7994
7990
|
}
|
|
7995
7991
|
function fd(n, e, t) {
|
|
7996
7992
|
let r = e.selection, i = t == "up" ? r.$from : r.$to;
|
|
7997
|
-
return
|
|
7993
|
+
return io(n, e, () => {
|
|
7998
7994
|
let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
|
|
7999
7995
|
for (; ; ) {
|
|
8000
7996
|
let l = n.docView.nearestDesc(s, !0);
|
|
@@ -8006,7 +8002,7 @@ function fd(n, e, t) {
|
|
|
8006
8002
|
}
|
|
8007
8003
|
s = l.dom.parentNode;
|
|
8008
8004
|
}
|
|
8009
|
-
let o =
|
|
8005
|
+
let o = ro(n, i.pos, 1);
|
|
8010
8006
|
for (let l = s.firstChild; l; l = l.nextSibling) {
|
|
8011
8007
|
let a;
|
|
8012
8008
|
if (l.nodeType == 1)
|
|
@@ -8030,7 +8026,7 @@ function md(n, e, t) {
|
|
|
8030
8026
|
if (!r.parent.isTextblock)
|
|
8031
8027
|
return !1;
|
|
8032
8028
|
let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
|
|
8033
|
-
return !pd.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o :
|
|
8029
|
+
return !pd.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : io(n, e, () => {
|
|
8034
8030
|
let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), h = l.caretBidiLevel;
|
|
8035
8031
|
l.modify("move", t, "character");
|
|
8036
8032
|
let f = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !f.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
|
|
@@ -8045,10 +8041,10 @@ let bi = null, ki = null, Si = !1;
|
|
|
8045
8041
|
function gd(n, e, t) {
|
|
8046
8042
|
return bi == e && ki == t ? Si : (bi = e, ki = t, Si = t == "up" || t == "down" ? fd(n, e, t) : md(n, e, t));
|
|
8047
8043
|
}
|
|
8048
|
-
const
|
|
8044
|
+
const he = 0, xi = 1, $e = 2, we = 3;
|
|
8049
8045
|
class qt {
|
|
8050
8046
|
constructor(e, t, r, i) {
|
|
8051
|
-
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty =
|
|
8047
|
+
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = he, r.pmViewDesc = this;
|
|
8052
8048
|
}
|
|
8053
8049
|
// Used to check whether a given description corresponds to a
|
|
8054
8050
|
// widget/mark/node.
|
|
@@ -8211,7 +8207,7 @@ class qt {
|
|
|
8211
8207
|
let r = 0, i = 0;
|
|
8212
8208
|
for (let s = 0; r < this.children.length; r++) {
|
|
8213
8209
|
let o = this.children[r], l = s + o.size;
|
|
8214
|
-
if (l > e || o instanceof
|
|
8210
|
+
if (l > e || o instanceof oo) {
|
|
8215
8211
|
i = e - s;
|
|
8216
8212
|
break;
|
|
8217
8213
|
}
|
|
@@ -8219,7 +8215,7 @@ class qt {
|
|
|
8219
8215
|
}
|
|
8220
8216
|
if (i)
|
|
8221
8217
|
return this.children[r].domFromPos(i - this.children[r].border, t);
|
|
8222
|
-
for (let s; r && !(s = this.children[r - 1]).size && s instanceof
|
|
8218
|
+
for (let s; r && !(s = this.children[r - 1]).size && s instanceof so && s.side >= 0; r--)
|
|
8223
8219
|
;
|
|
8224
8220
|
if (t <= 0) {
|
|
8225
8221
|
let s, o = !0;
|
|
@@ -8299,7 +8295,7 @@ class qt {
|
|
|
8299
8295
|
f = m;
|
|
8300
8296
|
}
|
|
8301
8297
|
let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), d = !1;
|
|
8302
|
-
if ((
|
|
8298
|
+
if ((ge || ee) && e == t) {
|
|
8303
8299
|
let { node: h, offset: f } = l;
|
|
8304
8300
|
if (h.nodeType == 3) {
|
|
8305
8301
|
if (d = !!(f && h.nodeValue[f - 1] == `
|
|
@@ -8318,7 +8314,7 @@ class qt {
|
|
|
8318
8314
|
d = p && (p.nodeName == "BR" || p.contentEditable == "false");
|
|
8319
8315
|
}
|
|
8320
8316
|
}
|
|
8321
|
-
if (
|
|
8317
|
+
if (ge && c.focusNode && c.focusNode != a.node && c.focusNode.nodeType == 1) {
|
|
8322
8318
|
let h = c.focusNode.childNodes[c.focusOffset];
|
|
8323
8319
|
h && h.contentEditable == "false" && (i = !0);
|
|
8324
8320
|
}
|
|
@@ -8378,7 +8374,7 @@ class qt {
|
|
|
8378
8374
|
return !1;
|
|
8379
8375
|
}
|
|
8380
8376
|
}
|
|
8381
|
-
class
|
|
8377
|
+
class so extends qt {
|
|
8382
8378
|
constructor(e, t, r, i) {
|
|
8383
8379
|
let s, o = t.type.toDOM;
|
|
8384
8380
|
if (typeof o == "function" && (o = o(r, () => {
|
|
@@ -8396,7 +8392,7 @@ class io extends qt {
|
|
|
8396
8392
|
super(e, [], o, null), this.widget = t, this.widget = t, s = this;
|
|
8397
8393
|
}
|
|
8398
8394
|
matchesWidget(e) {
|
|
8399
|
-
return this.dirty ==
|
|
8395
|
+
return this.dirty == he && e.type.eq(this.widget.type);
|
|
8400
8396
|
}
|
|
8401
8397
|
parseRule() {
|
|
8402
8398
|
return { ignore: !0 };
|
|
@@ -8441,7 +8437,7 @@ class tt extends qt {
|
|
|
8441
8437
|
}
|
|
8442
8438
|
static create(e, t, r, i) {
|
|
8443
8439
|
let s = i.nodeViews[t.type.name], o = s && s(t, i, r);
|
|
8444
|
-
return (!o || !o.dom) && (o =
|
|
8440
|
+
return (!o || !o.dom) && (o = ke.renderSpec(document, t.type.spec.toDOM(t, r))), new tt(e, t, o.dom, o.contentDOM || o.dom);
|
|
8445
8441
|
}
|
|
8446
8442
|
parseRule() {
|
|
8447
8443
|
return this.dirty & we || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM || void 0 };
|
|
@@ -8450,11 +8446,11 @@ class tt extends qt {
|
|
|
8450
8446
|
return this.dirty != we && this.mark.eq(e);
|
|
8451
8447
|
}
|
|
8452
8448
|
markDirty(e, t) {
|
|
8453
|
-
if (super.markDirty(e, t), this.dirty !=
|
|
8449
|
+
if (super.markDirty(e, t), this.dirty != he) {
|
|
8454
8450
|
let r = this.parent;
|
|
8455
8451
|
for (; !r.node; )
|
|
8456
8452
|
r = r.parent;
|
|
8457
|
-
r.dirty < this.dirty && (r.dirty = this.dirty), this.dirty =
|
|
8453
|
+
r.dirty < this.dirty && (r.dirty = this.dirty), this.dirty = he;
|
|
8458
8454
|
}
|
|
8459
8455
|
}
|
|
8460
8456
|
slice(e, t, r) {
|
|
@@ -8491,10 +8487,10 @@ class Re extends qt {
|
|
|
8491
8487
|
else if (d.nodeType != 3)
|
|
8492
8488
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
8493
8489
|
} else
|
|
8494
|
-
d || ({ dom: d, contentDOM: u } =
|
|
8490
|
+
d || ({ dom: d, contentDOM: u } = ke.renderSpec(document, t.type.spec.toDOM(t)));
|
|
8495
8491
|
!u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
|
|
8496
8492
|
let h = d;
|
|
8497
|
-
return d =
|
|
8493
|
+
return d = co(d, r, t), c ? a = new bd(e, t, r, i, d, u || null, h, c, s, o + 1) : t.isText ? new wn(e, t, r, i, d, h, s) : new Re(e, t, r, i, d, u || null, h, s, o + 1);
|
|
8498
8494
|
}
|
|
8499
8495
|
parseRule() {
|
|
8500
8496
|
if (this.node.type.spec.reparseInView)
|
|
@@ -8517,7 +8513,7 @@ class Re extends qt {
|
|
|
8517
8513
|
return e;
|
|
8518
8514
|
}
|
|
8519
8515
|
matchesNode(e, t, r) {
|
|
8520
|
-
return this.dirty ==
|
|
8516
|
+
return this.dirty == he && e.eq(this.node) && ur(t, this.outerDeco) && r.eq(this.innerDeco);
|
|
8521
8517
|
}
|
|
8522
8518
|
get size() {
|
|
8523
8519
|
return this.node.nodeSize;
|
|
@@ -8537,11 +8533,11 @@ class Re extends qt {
|
|
|
8537
8533
|
a.syncToMarks(c.marks, r, e);
|
|
8538
8534
|
let f;
|
|
8539
8535
|
a.findNodeMatch(c, d, u, h) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (f = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, f, e) || a.updateNextNode(c, d, u, e, h, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
|
|
8540
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == $e) && (o && this.protectLocalComposition(e, o),
|
|
8536
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == $e) && (o && this.protectLocalComposition(e, o), lo(this.contentDOM, this.children, e), yt && vd(this.dom));
|
|
8541
8537
|
}
|
|
8542
8538
|
localCompositionInfo(e, t) {
|
|
8543
8539
|
let { from: r, to: i } = e.state.selection;
|
|
8544
|
-
if (!(e.state.selection instanceof
|
|
8540
|
+
if (!(e.state.selection instanceof D) || r < t || i > t + this.node.content.size)
|
|
8545
8541
|
return null;
|
|
8546
8542
|
let s = e.domSelectionRange(), o = Ed(s.focusNode, s.focusOffset);
|
|
8547
8543
|
if (!o || !this.dom.contains(o.parentNode))
|
|
@@ -8572,13 +8568,13 @@ class Re extends qt {
|
|
|
8572
8568
|
return this.dirty == we || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, r, i), !0);
|
|
8573
8569
|
}
|
|
8574
8570
|
updateInner(e, t, r, i) {
|
|
8575
|
-
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty =
|
|
8571
|
+
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = he;
|
|
8576
8572
|
}
|
|
8577
8573
|
updateOuterDeco(e) {
|
|
8578
8574
|
if (ur(e, this.outerDeco))
|
|
8579
8575
|
return;
|
|
8580
8576
|
let t = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
8581
|
-
this.dom =
|
|
8577
|
+
this.dom = ao(this.dom, this.nodeDOM, dr(this.outerDeco, this.node, t), dr(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
8582
8578
|
}
|
|
8583
8579
|
// Mark this node as being the selected node.
|
|
8584
8580
|
selectNode() {
|
|
@@ -8593,7 +8589,7 @@ class Re extends qt {
|
|
|
8593
8589
|
}
|
|
8594
8590
|
}
|
|
8595
8591
|
function wi(n, e, t, r, i) {
|
|
8596
|
-
|
|
8592
|
+
co(r, e, n);
|
|
8597
8593
|
let s = new Re(void 0, n, e, t, r, r, r, i, 0);
|
|
8598
8594
|
return s.contentDOM && s.updateChildren(i, 0), s;
|
|
8599
8595
|
}
|
|
@@ -8608,7 +8604,7 @@ class wn extends Re {
|
|
|
8608
8604
|
return { skip: e || !0 };
|
|
8609
8605
|
}
|
|
8610
8606
|
update(e, t, r, i) {
|
|
8611
|
-
return this.dirty == we || this.dirty !=
|
|
8607
|
+
return this.dirty == we || this.dirty != he && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != he || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, i.trackWrites == this.nodeDOM && (i.trackWrites = null)), this.node = e, this.dirty = he, !0);
|
|
8612
8608
|
}
|
|
8613
8609
|
inParent() {
|
|
8614
8610
|
let e = this.parent.contentDOM;
|
|
@@ -8637,12 +8633,12 @@ class wn extends Re {
|
|
|
8637
8633
|
return !1;
|
|
8638
8634
|
}
|
|
8639
8635
|
}
|
|
8640
|
-
class
|
|
8636
|
+
class oo extends qt {
|
|
8641
8637
|
parseRule() {
|
|
8642
8638
|
return { ignore: !0 };
|
|
8643
8639
|
}
|
|
8644
8640
|
matchesHack(e) {
|
|
8645
|
-
return this.dirty ==
|
|
8641
|
+
return this.dirty == he && this.dom.nodeName == e;
|
|
8646
8642
|
}
|
|
8647
8643
|
get domAtom() {
|
|
8648
8644
|
return !0;
|
|
@@ -8686,7 +8682,7 @@ class bd extends Re {
|
|
|
8686
8682
|
return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
|
|
8687
8683
|
}
|
|
8688
8684
|
}
|
|
8689
|
-
function
|
|
8685
|
+
function lo(n, e, t) {
|
|
8690
8686
|
let r = n.firstChild, i = !1;
|
|
8691
8687
|
for (let s = 0; s < e.length; s++) {
|
|
8692
8688
|
let o = e[s], l = o.dom;
|
|
@@ -8698,7 +8694,7 @@ function oo(n, e, t) {
|
|
|
8698
8694
|
i = !0, n.insertBefore(l, r);
|
|
8699
8695
|
if (o instanceof tt) {
|
|
8700
8696
|
let a = r ? r.previousSibling : n.lastChild;
|
|
8701
|
-
|
|
8697
|
+
lo(o.contentDOM, o.children, t), r = a ? a.nextSibling : n.firstChild;
|
|
8702
8698
|
}
|
|
8703
8699
|
}
|
|
8704
8700
|
for (; r; )
|
|
@@ -8726,7 +8722,7 @@ function dr(n, e, t) {
|
|
|
8726
8722
|
}
|
|
8727
8723
|
return i;
|
|
8728
8724
|
}
|
|
8729
|
-
function
|
|
8725
|
+
function ao(n, e, t, r) {
|
|
8730
8726
|
if (t == qe && r == qe)
|
|
8731
8727
|
return e;
|
|
8732
8728
|
let i = e;
|
|
@@ -8762,8 +8758,8 @@ function kd(n, e, t) {
|
|
|
8762
8758
|
t.style && (n.style.cssText += t.style);
|
|
8763
8759
|
}
|
|
8764
8760
|
}
|
|
8765
|
-
function
|
|
8766
|
-
return
|
|
8761
|
+
function co(n, e, t) {
|
|
8762
|
+
return ao(n, n, qe, dr(e, t, n.nodeType != 1));
|
|
8767
8763
|
}
|
|
8768
8764
|
function ur(n, e) {
|
|
8769
8765
|
if (n.length != e.length)
|
|
@@ -8801,7 +8797,7 @@ class Sd {
|
|
|
8801
8797
|
for (; i < o && (i == s - 1 ? this.top : this.stack[i + 1 << 1]).matchesMark(e[i]) && e[i].type.spec.spanning !== !1; )
|
|
8802
8798
|
i++;
|
|
8803
8799
|
for (; i < s; )
|
|
8804
|
-
this.destroyRest(), this.top.dirty =
|
|
8800
|
+
this.destroyRest(), this.top.dirty = he, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
|
|
8805
8801
|
for (; s < e.length; ) {
|
|
8806
8802
|
this.stack.push(this.top, this.index + 1);
|
|
8807
8803
|
let l = -1;
|
|
@@ -8871,7 +8867,7 @@ class Sd {
|
|
|
8871
8867
|
if (!h && a.update(e, t, r, i))
|
|
8872
8868
|
return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
|
|
8873
8869
|
if (!h && (u = this.recreateWrapper(a, e, t, r, i, o)))
|
|
8874
|
-
return this.top.children[this.index] = u, u.dirty = $e, u.updateChildren(i, o + 1), u.dirty =
|
|
8870
|
+
return this.top.children[this.index] = u, u.dirty = $e, u.updateChildren(i, o + 1), u.dirty = he, this.changed = !0, this.index++, !0;
|
|
8875
8871
|
break;
|
|
8876
8872
|
}
|
|
8877
8873
|
}
|
|
@@ -8900,7 +8896,7 @@ class Sd {
|
|
|
8900
8896
|
if (i && i.matchesWidget(e) && (e == i.widget || !i.widget.type.toDOM.parentNode))
|
|
8901
8897
|
this.index++;
|
|
8902
8898
|
else {
|
|
8903
|
-
let s = new
|
|
8899
|
+
let s = new so(this.top, e, t, r);
|
|
8904
8900
|
this.top.children.splice(this.index++, 0, s), this.changed = !0;
|
|
8905
8901
|
}
|
|
8906
8902
|
}
|
|
@@ -8919,7 +8915,7 @@ class Sd {
|
|
|
8919
8915
|
else {
|
|
8920
8916
|
let r = document.createElement(e);
|
|
8921
8917
|
e == "IMG" && (r.className = "ProseMirror-separator", r.alt = ""), e == "BR" && (r.className = "ProseMirror-trailingBreak");
|
|
8922
|
-
let i = new
|
|
8918
|
+
let i = new oo(this.top, [], r, null);
|
|
8923
8919
|
t != this.top ? t.children.push(i) : t.children.splice(this.index++, 0, i), this.changed = !0;
|
|
8924
8920
|
}
|
|
8925
8921
|
}
|
|
@@ -9016,7 +9012,7 @@ function Ed(n, e) {
|
|
|
9016
9012
|
if (n.nodeType == 1 && e > 0) {
|
|
9017
9013
|
if (n.childNodes.length > e && n.childNodes[e].nodeType == 3)
|
|
9018
9014
|
return n.childNodes[e];
|
|
9019
|
-
n = n.childNodes[e - 1], e =
|
|
9015
|
+
n = n.childNodes[e - 1], e = be(n);
|
|
9020
9016
|
} else if (n.nodeType == 1 && e < n.childNodes.length)
|
|
9021
9017
|
n = n.childNodes[e], e = 0;
|
|
9022
9018
|
else
|
|
@@ -9081,12 +9077,12 @@ function Nr(n, e = null) {
|
|
|
9081
9077
|
}
|
|
9082
9078
|
return c;
|
|
9083
9079
|
}
|
|
9084
|
-
function
|
|
9085
|
-
return n.editable ? n.hasFocus() :
|
|
9080
|
+
function uo(n) {
|
|
9081
|
+
return n.editable ? n.hasFocus() : fo(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
9086
9082
|
}
|
|
9087
9083
|
function Me(n, e = !1) {
|
|
9088
9084
|
let t = n.state.selection;
|
|
9089
|
-
if (
|
|
9085
|
+
if (ho(n, t), !!uo(n)) {
|
|
9090
9086
|
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && Q) {
|
|
9091
9087
|
let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
|
|
9092
9088
|
if (r.anchorNode && i.anchorNode && et(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
@@ -9098,7 +9094,7 @@ function Me(n, e = !1) {
|
|
|
9098
9094
|
Td(n);
|
|
9099
9095
|
else {
|
|
9100
9096
|
let { anchor: r, head: i } = t, s, o;
|
|
9101
|
-
vi && !(t instanceof
|
|
9097
|
+
vi && !(t instanceof D) && (t.$from.parent.inlineContent || (s = Ei(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Ei(n, t.to))), n.docView.setSelection(r, i, n.root, e), vi && (s && Mi(s), o && Mi(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Od(n));
|
|
9102
9098
|
}
|
|
9103
9099
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
9104
9100
|
}
|
|
@@ -9127,7 +9123,7 @@ function Od(n) {
|
|
|
9127
9123
|
let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
|
|
9128
9124
|
e.addEventListener("selectionchange", n.input.hideSelectionGuard = () => {
|
|
9129
9125
|
(t.anchorNode != r || t.anchorOffset != i) && (e.removeEventListener("selectionchange", n.input.hideSelectionGuard), setTimeout(() => {
|
|
9130
|
-
(!
|
|
9126
|
+
(!uo(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
|
|
9131
9127
|
}, 20));
|
|
9132
9128
|
});
|
|
9133
9129
|
}
|
|
@@ -9135,7 +9131,7 @@ function Td(n) {
|
|
|
9135
9131
|
let e = n.domSelection(), t = document.createRange(), r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
|
|
9136
9132
|
i ? t.setEnd(r.parentNode, oe(r) + 1) : t.setEnd(r, 0), t.collapse(!1), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && re && Pe <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
9137
9133
|
}
|
|
9138
|
-
function
|
|
9134
|
+
function ho(n, e) {
|
|
9139
9135
|
if (e instanceof v) {
|
|
9140
9136
|
let t = n.docView.descAt(e.from);
|
|
9141
9137
|
t != n.lastSelectedViewDesc && (Oi(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
@@ -9146,12 +9142,12 @@ function Oi(n) {
|
|
|
9146
9142
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
9147
9143
|
}
|
|
9148
9144
|
function Ar(n, e, t, r) {
|
|
9149
|
-
return n.someProp("createSelectionBetween", (i) => i(n, e, t)) ||
|
|
9145
|
+
return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || D.between(e, t, r);
|
|
9150
9146
|
}
|
|
9151
9147
|
function Ti(n) {
|
|
9152
|
-
return n.editable && !n.hasFocus() ? !1 :
|
|
9148
|
+
return n.editable && !n.hasFocus() ? !1 : fo(n);
|
|
9153
9149
|
}
|
|
9154
|
-
function
|
|
9150
|
+
function fo(n) {
|
|
9155
9151
|
let e = n.domSelectionRange();
|
|
9156
9152
|
if (!e.anchorNode)
|
|
9157
9153
|
return !1;
|
|
@@ -9167,14 +9163,14 @@ function Nd(n) {
|
|
|
9167
9163
|
}
|
|
9168
9164
|
function fr(n, e) {
|
|
9169
9165
|
let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
|
|
9170
|
-
return s &&
|
|
9166
|
+
return s && T.findFrom(s, e);
|
|
9171
9167
|
}
|
|
9172
9168
|
function He(n, e) {
|
|
9173
9169
|
return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
9174
9170
|
}
|
|
9175
9171
|
function Ni(n, e, t) {
|
|
9176
9172
|
let r = n.state.selection;
|
|
9177
|
-
if (r instanceof
|
|
9173
|
+
if (r instanceof D) {
|
|
9178
9174
|
if (!r.empty || t.indexOf("s") > -1)
|
|
9179
9175
|
return !1;
|
|
9180
9176
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
@@ -9185,11 +9181,11 @@ function Ni(n, e, t) {
|
|
|
9185
9181
|
if (!s || s.isText)
|
|
9186
9182
|
return !1;
|
|
9187
9183
|
let l = e < 0 ? i.pos - s.nodeSize : i.pos;
|
|
9188
|
-
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? v.isSelectable(s) ? He(n, new v(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : xn ? He(n, new
|
|
9184
|
+
return s.isAtom || (o = n.docView.descAt(l)) && !o.contentDOM ? v.isSelectable(s) ? He(n, new v(e < 0 ? n.state.doc.resolve(i.pos - s.nodeSize) : i)) : xn ? He(n, new D(n.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
9189
9185
|
}
|
|
9190
9186
|
} else {
|
|
9191
9187
|
if (r instanceof v && r.node.isInline)
|
|
9192
|
-
return He(n, new
|
|
9188
|
+
return He(n, new D(e > 0 ? r.$to : r.$from));
|
|
9193
9189
|
{
|
|
9194
9190
|
let i = fr(n.state, e);
|
|
9195
9191
|
return i ? He(n, i) : !1;
|
|
@@ -9204,14 +9200,14 @@ function _t(n) {
|
|
|
9204
9200
|
return e && e.size == 0 && (n.nextSibling || n.nodeName != "BR");
|
|
9205
9201
|
}
|
|
9206
9202
|
function Mt(n, e) {
|
|
9207
|
-
return e < 0 ? Ad(n) :
|
|
9203
|
+
return e < 0 ? Ad(n) : po(n);
|
|
9208
9204
|
}
|
|
9209
9205
|
function Ad(n) {
|
|
9210
9206
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
9211
9207
|
if (!t)
|
|
9212
9208
|
return;
|
|
9213
9209
|
let i, s, o = !1;
|
|
9214
|
-
for (
|
|
9210
|
+
for (ge && t.nodeType == 1 && r < ln(t) && _t(t.childNodes[r]) && (o = !0); ; )
|
|
9215
9211
|
if (r > 0) {
|
|
9216
9212
|
if (t.nodeType != 1)
|
|
9217
9213
|
break;
|
|
@@ -9225,7 +9221,7 @@ function Ad(n) {
|
|
|
9225
9221
|
break;
|
|
9226
9222
|
}
|
|
9227
9223
|
} else {
|
|
9228
|
-
if (
|
|
9224
|
+
if (mo(t))
|
|
9229
9225
|
break;
|
|
9230
9226
|
{
|
|
9231
9227
|
let l = t.previousSibling;
|
|
@@ -9242,7 +9238,7 @@ function Ad(n) {
|
|
|
9242
9238
|
}
|
|
9243
9239
|
o ? pr(n, t, r) : i && pr(n, i, s);
|
|
9244
9240
|
}
|
|
9245
|
-
function
|
|
9241
|
+
function po(n) {
|
|
9246
9242
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
9247
9243
|
if (!t)
|
|
9248
9244
|
return;
|
|
@@ -9257,7 +9253,7 @@ function fo(n) {
|
|
|
9257
9253
|
else
|
|
9258
9254
|
break;
|
|
9259
9255
|
} else {
|
|
9260
|
-
if (
|
|
9256
|
+
if (mo(t))
|
|
9261
9257
|
break;
|
|
9262
9258
|
{
|
|
9263
9259
|
let l = t.nextSibling;
|
|
@@ -9274,7 +9270,7 @@ function fo(n) {
|
|
|
9274
9270
|
}
|
|
9275
9271
|
s && pr(n, s, o);
|
|
9276
9272
|
}
|
|
9277
|
-
function
|
|
9273
|
+
function mo(n) {
|
|
9278
9274
|
let e = n.pmViewDesc;
|
|
9279
9275
|
return e && e.node && e.node.isBlock;
|
|
9280
9276
|
}
|
|
@@ -9310,7 +9306,7 @@ function Ai(n, e) {
|
|
|
9310
9306
|
}
|
|
9311
9307
|
function Di(n, e, t) {
|
|
9312
9308
|
let r = n.state.selection;
|
|
9313
|
-
if (r instanceof
|
|
9309
|
+
if (r instanceof D && !r.empty || t.indexOf("s") > -1 || ce && t.indexOf("m") > -1)
|
|
9314
9310
|
return !1;
|
|
9315
9311
|
let { $from: i, $to: s } = r;
|
|
9316
9312
|
if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -9319,13 +9315,13 @@ function Di(n, e, t) {
|
|
|
9319
9315
|
return He(n, o);
|
|
9320
9316
|
}
|
|
9321
9317
|
if (!i.parent.inlineContent) {
|
|
9322
|
-
let o = e < 0 ? i : s, l = r instanceof
|
|
9318
|
+
let o = e < 0 ? i : s, l = r instanceof me ? T.near(o, e) : T.findFrom(o, e);
|
|
9323
9319
|
return l ? He(n, l) : !1;
|
|
9324
9320
|
}
|
|
9325
9321
|
return !1;
|
|
9326
9322
|
}
|
|
9327
9323
|
function Ii(n, e) {
|
|
9328
|
-
if (!(n.state.selection instanceof
|
|
9324
|
+
if (!(n.state.selection instanceof D))
|
|
9329
9325
|
return !0;
|
|
9330
9326
|
let { $head: t, $anchor: r, empty: i } = n.state.selection;
|
|
9331
9327
|
if (!t.sameParent(r))
|
|
@@ -9376,13 +9372,13 @@ function Pd(n, e) {
|
|
|
9376
9372
|
if (t == 38 || ce && t == 80 && r == "c")
|
|
9377
9373
|
return Di(n, -1, r) || Mt(n, -1);
|
|
9378
9374
|
if (t == 40 || ce && t == 78 && r == "c")
|
|
9379
|
-
return Dd(n) || Di(n, 1, r) ||
|
|
9375
|
+
return Dd(n) || Di(n, 1, r) || po(n);
|
|
9380
9376
|
if (r == (ce ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
9381
9377
|
return !0;
|
|
9382
9378
|
}
|
|
9383
9379
|
return !1;
|
|
9384
9380
|
}
|
|
9385
|
-
function
|
|
9381
|
+
function go(n, e) {
|
|
9386
9382
|
n.someProp("transformCopied", (f) => {
|
|
9387
9383
|
e = f(e, n);
|
|
9388
9384
|
});
|
|
@@ -9392,10 +9388,10 @@ function mo(n, e) {
|
|
|
9392
9388
|
let f = r.firstChild;
|
|
9393
9389
|
t.push(f.type.name, f.attrs != f.type.defaultAttrs ? f.attrs : null), r = f.content;
|
|
9394
9390
|
}
|
|
9395
|
-
let o = n.someProp("clipboardSerializer") ||
|
|
9391
|
+
let o = n.someProp("clipboardSerializer") || ke.fromSchema(n.state.schema), l = wo(), a = l.createElement("div");
|
|
9396
9392
|
a.appendChild(o.serializeFragment(r, { document: l }));
|
|
9397
9393
|
let c = a.firstChild, d, u = 0;
|
|
9398
|
-
for (; c && c.nodeType == 1 && (d =
|
|
9394
|
+
for (; c && c.nodeType == 1 && (d = xo[c.nodeName.toLowerCase()]); ) {
|
|
9399
9395
|
for (let f = d.length - 1; f >= 0; f--) {
|
|
9400
9396
|
let p = l.createElement(d[f]);
|
|
9401
9397
|
for (; a.firstChild; )
|
|
@@ -9410,7 +9406,7 @@ function mo(n, e) {
|
|
|
9410
9406
|
`);
|
|
9411
9407
|
return { dom: a, text: h };
|
|
9412
9408
|
}
|
|
9413
|
-
function
|
|
9409
|
+
function yo(n, e, t, r, i) {
|
|
9414
9410
|
let s = i.parent.type.spec.code, o, l;
|
|
9415
9411
|
if (!t && !e)
|
|
9416
9412
|
return null;
|
|
@@ -9425,7 +9421,7 @@ function go(n, e, t, r, i) {
|
|
|
9425
9421
|
if (u)
|
|
9426
9422
|
l = u;
|
|
9427
9423
|
else {
|
|
9428
|
-
let h = i.marks(), { schema: f } = n.state, p =
|
|
9424
|
+
let h = i.marks(), { schema: f } = n.state, p = ke.fromSchema(f);
|
|
9429
9425
|
o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
9430
9426
|
let g = o.appendChild(document.createElement("p"));
|
|
9431
9427
|
m && g.appendChild(p.serializeNode(f.text(m, h)));
|
|
@@ -9477,11 +9473,11 @@ function _d(n, e) {
|
|
|
9477
9473
|
let a = i.findWrapping(l.type), c;
|
|
9478
9474
|
if (!a)
|
|
9479
9475
|
return o = null;
|
|
9480
|
-
if (c = o.length && s.length &&
|
|
9476
|
+
if (c = o.length && s.length && ko(a, s, l, o[o.length - 1], 0))
|
|
9481
9477
|
o[o.length - 1] = c;
|
|
9482
9478
|
else {
|
|
9483
|
-
o.length && (o[o.length - 1] =
|
|
9484
|
-
let d =
|
|
9479
|
+
o.length && (o[o.length - 1] = So(o[o.length - 1], s.length));
|
|
9480
|
+
let d = bo(l, a);
|
|
9485
9481
|
o.push(d), i = i.matchType(d.type), s = a;
|
|
9486
9482
|
}
|
|
9487
9483
|
}), o)
|
|
@@ -9489,24 +9485,24 @@ function _d(n, e) {
|
|
|
9489
9485
|
}
|
|
9490
9486
|
return n;
|
|
9491
9487
|
}
|
|
9492
|
-
function
|
|
9488
|
+
function bo(n, e, t = 0) {
|
|
9493
9489
|
for (let r = e.length - 1; r >= t; r--)
|
|
9494
9490
|
n = e[r].create(null, b.from(n));
|
|
9495
9491
|
return n;
|
|
9496
9492
|
}
|
|
9497
|
-
function
|
|
9493
|
+
function ko(n, e, t, r, i) {
|
|
9498
9494
|
if (i < n.length && i < e.length && n[i] == e[i]) {
|
|
9499
|
-
let s =
|
|
9495
|
+
let s = ko(n, e, t, r.lastChild, i + 1);
|
|
9500
9496
|
if (s)
|
|
9501
9497
|
return r.copy(r.content.replaceChild(r.childCount - 1, s));
|
|
9502
9498
|
if (r.contentMatchAt(r.childCount).matchType(i == n.length - 1 ? t.type : n[i + 1]))
|
|
9503
|
-
return r.copy(r.content.append(b.from(
|
|
9499
|
+
return r.copy(r.content.append(b.from(bo(t, n, i + 1))));
|
|
9504
9500
|
}
|
|
9505
9501
|
}
|
|
9506
|
-
function
|
|
9502
|
+
function So(n, e) {
|
|
9507
9503
|
if (e == 0)
|
|
9508
9504
|
return n;
|
|
9509
|
-
let t = n.content.replaceChild(n.childCount - 1,
|
|
9505
|
+
let t = n.content.replaceChild(n.childCount - 1, So(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
|
|
9510
9506
|
return n.copy(t.append(r));
|
|
9511
9507
|
}
|
|
9512
9508
|
function mr(n, e, t, r, i, s) {
|
|
@@ -9516,7 +9512,7 @@ function mr(n, e, t, r, i, s) {
|
|
|
9516
9512
|
function Ri(n, e, t) {
|
|
9517
9513
|
return e < n.openStart && (n = new k(mr(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new k(mr(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
9518
9514
|
}
|
|
9519
|
-
const
|
|
9515
|
+
const xo = {
|
|
9520
9516
|
thead: ["table"],
|
|
9521
9517
|
tbody: ["table"],
|
|
9522
9518
|
tfoot: ["table"],
|
|
@@ -9528,14 +9524,14 @@ const So = {
|
|
|
9528
9524
|
th: ["table", "tbody", "tr"]
|
|
9529
9525
|
};
|
|
9530
9526
|
let _i = null;
|
|
9531
|
-
function
|
|
9527
|
+
function wo() {
|
|
9532
9528
|
return _i || (_i = document.implementation.createHTMLDocument("title"));
|
|
9533
9529
|
}
|
|
9534
9530
|
function Bd(n) {
|
|
9535
9531
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
9536
9532
|
e && (n = n.slice(e[0].length));
|
|
9537
|
-
let t =
|
|
9538
|
-
if ((i = r &&
|
|
9533
|
+
let t = wo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
|
|
9534
|
+
if ((i = r && xo[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
|
|
9539
9535
|
for (let s = 0; s < i.length; s++)
|
|
9540
9536
|
t = t.querySelector(i[s]) || t;
|
|
9541
9537
|
return t;
|
|
@@ -9616,7 +9612,7 @@ function qd(n, e) {
|
|
|
9616
9612
|
}
|
|
9617
9613
|
ne.keydown = (n, e) => {
|
|
9618
9614
|
let t = e;
|
|
9619
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !
|
|
9615
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !vo(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(pe && Q && t.keyCode == 13)))
|
|
9620
9616
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), yt && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
9621
9617
|
let r = Date.now();
|
|
9622
9618
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -9630,14 +9626,14 @@ ne.keyup = (n, e) => {
|
|
|
9630
9626
|
};
|
|
9631
9627
|
ne.keypress = (n, e) => {
|
|
9632
9628
|
let t = e;
|
|
9633
|
-
if (
|
|
9629
|
+
if (vo(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ce && t.metaKey)
|
|
9634
9630
|
return;
|
|
9635
9631
|
if (n.someProp("handleKeyPress", (i) => i(n, t))) {
|
|
9636
9632
|
t.preventDefault();
|
|
9637
9633
|
return;
|
|
9638
9634
|
}
|
|
9639
9635
|
let r = n.state.selection;
|
|
9640
|
-
if (!(r instanceof
|
|
9636
|
+
if (!(r instanceof D) || !r.$from.sameParent(r.$to)) {
|
|
9641
9637
|
let i = String.fromCharCode(t.charCode);
|
|
9642
9638
|
!/[\r\n]/.test(i) && !n.someProp("handleTextInput", (s) => s(n, r.$from.pos, r.$to.pos, i)) && n.dispatch(n.state.tr.insertText(i).scrollIntoView()), t.preventDefault();
|
|
9643
9639
|
}
|
|
@@ -9698,12 +9694,12 @@ function Xd(n, e, t) {
|
|
|
9698
9694
|
return !1;
|
|
9699
9695
|
let r = n.state.doc;
|
|
9700
9696
|
if (e == -1)
|
|
9701
|
-
return r.inlineContent ? (ft(n,
|
|
9697
|
+
return r.inlineContent ? (ft(n, D.create(r, 0, r.content.size), "pointer"), !0) : !1;
|
|
9702
9698
|
let i = r.resolve(e);
|
|
9703
9699
|
for (let s = i.depth + 1; s > 0; s--) {
|
|
9704
9700
|
let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
9705
9701
|
if (o.inlineContent)
|
|
9706
|
-
ft(n,
|
|
9702
|
+
ft(n, D.create(r, l + 1, l + 1 + o.content.size), "pointer");
|
|
9707
9703
|
else if (v.isSelectable(o))
|
|
9708
9704
|
ft(n, v.create(r, l), "pointer");
|
|
9709
9705
|
else
|
|
@@ -9714,18 +9710,18 @@ function Xd(n, e, t) {
|
|
|
9714
9710
|
function Pr(n) {
|
|
9715
9711
|
return an(n);
|
|
9716
9712
|
}
|
|
9717
|
-
const
|
|
9713
|
+
const Co = ce ? "metaKey" : "ctrlKey";
|
|
9718
9714
|
te.mousedown = (n, e) => {
|
|
9719
9715
|
let t = e;
|
|
9720
9716
|
n.input.shiftKey = t.shiftKey;
|
|
9721
9717
|
let r = Pr(n), i = Date.now(), s = "singleClick";
|
|
9722
|
-
i - n.input.lastClick.time < 500 && Kd(t, n.input.lastClick) && !t[
|
|
9718
|
+
i - n.input.lastClick.time < 500 && Kd(t, n.input.lastClick) && !t[Co] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
|
|
9723
9719
|
let o = n.posAtCoords(Cn(t));
|
|
9724
9720
|
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Zd(n, o, t, !!r)) : (s == "doubleClick" ? Gd : Yd)(n, o.pos, o.inside, t) ? t.preventDefault() : Ie(n, "pointer"));
|
|
9725
9721
|
};
|
|
9726
9722
|
class Zd {
|
|
9727
9723
|
constructor(e, t, r, i) {
|
|
9728
|
-
this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[
|
|
9724
|
+
this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Co], this.allowDefault = r.shiftKey;
|
|
9729
9725
|
let s, o;
|
|
9730
9726
|
if (t.inside > -1)
|
|
9731
9727
|
s = e.state.doc.nodeAt(t.inside), o = t.inside;
|
|
@@ -9740,7 +9736,7 @@ class Zd {
|
|
|
9740
9736
|
node: s,
|
|
9741
9737
|
pos: o,
|
|
9742
9738
|
addAttr: !!(this.target && !this.target.draggable),
|
|
9743
|
-
setUneditable: !!(this.target &&
|
|
9739
|
+
setUneditable: !!(this.target && ge && !this.target.hasAttribute("contentEditable"))
|
|
9744
9740
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
9745
9741
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
9746
9742
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Ie(e, "pointer");
|
|
@@ -9760,7 +9756,7 @@ class Zd {
|
|
|
9760
9756
|
// (hidden) cursor is doesn't change the selection, and
|
|
9761
9757
|
// thus doesn't get a reaction from ProseMirror. This
|
|
9762
9758
|
// works around that.
|
|
9763
|
-
Q && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (ft(this.view,
|
|
9759
|
+
Q && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (ft(this.view, T.near(this.view.state.doc.resolve(t.pos)), "pointer"), e.preventDefault()) : Ie(this.view, "pointer");
|
|
9764
9760
|
}
|
|
9765
9761
|
move(e) {
|
|
9766
9762
|
this.updateAllowDefault(e), Ie(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -9776,17 +9772,17 @@ te.touchmove = (n) => {
|
|
|
9776
9772
|
n.input.lastTouch = Date.now(), Ie(n, "pointer");
|
|
9777
9773
|
};
|
|
9778
9774
|
te.contextmenu = (n) => Pr(n);
|
|
9779
|
-
function
|
|
9775
|
+
function vo(n, e) {
|
|
9780
9776
|
return n.composing ? !0 : ee && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
9781
9777
|
}
|
|
9782
|
-
const Qd =
|
|
9778
|
+
const Qd = pe ? 5e3 : -1;
|
|
9783
9779
|
ne.compositionstart = ne.compositionupdate = (n) => {
|
|
9784
9780
|
if (!n.composing) {
|
|
9785
9781
|
n.domObserver.flush();
|
|
9786
9782
|
let { state: e } = n, t = e.selection.$from;
|
|
9787
9783
|
if (e.selection.empty && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
9788
9784
|
n.markCursor = n.state.storedMarks || t.marks(), an(n, !0), n.markCursor = null;
|
|
9789
|
-
else if (an(n),
|
|
9785
|
+
else if (an(n), ge && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
9790
9786
|
let r = n.domSelectionRange();
|
|
9791
9787
|
for (let i = r.focusNode, s = r.focusOffset; i && i.nodeType == 1 && s != 0; ) {
|
|
9792
9788
|
let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
|
|
@@ -9801,15 +9797,15 @@ ne.compositionstart = ne.compositionupdate = (n) => {
|
|
|
9801
9797
|
}
|
|
9802
9798
|
n.input.composing = !0;
|
|
9803
9799
|
}
|
|
9804
|
-
|
|
9800
|
+
Eo(n, Qd);
|
|
9805
9801
|
};
|
|
9806
9802
|
ne.compositionend = (n, e) => {
|
|
9807
|
-
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionID++,
|
|
9803
|
+
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionID++, Eo(n, 20));
|
|
9808
9804
|
};
|
|
9809
|
-
function
|
|
9805
|
+
function Eo(n, e) {
|
|
9810
9806
|
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => an(n), e));
|
|
9811
9807
|
}
|
|
9812
|
-
function
|
|
9808
|
+
function Mo(n) {
|
|
9813
9809
|
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = eu()); n.input.compositionNodes.length > 0; )
|
|
9814
9810
|
n.input.compositionNodes.pop().markParentsDirty();
|
|
9815
9811
|
}
|
|
@@ -9818,8 +9814,8 @@ function eu() {
|
|
|
9818
9814
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
9819
9815
|
}
|
|
9820
9816
|
function an(n, e = !1) {
|
|
9821
|
-
if (!(
|
|
9822
|
-
if (n.domObserver.forceFlush(),
|
|
9817
|
+
if (!(pe && n.domObserver.flushingSoon >= 0)) {
|
|
9818
|
+
if (n.domObserver.forceFlush(), Mo(n), e || n.docView && n.docView.dirty) {
|
|
9823
9819
|
let t = Nr(n);
|
|
9824
9820
|
return t && !t.eq(n.state.selection) ? n.dispatch(n.state.tr.setSelection(t)) : n.updateState(n.state), !0;
|
|
9825
9821
|
}
|
|
@@ -9841,7 +9837,7 @@ te.copy = ne.cut = (n, e) => {
|
|
|
9841
9837
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
9842
9838
|
if (r.empty)
|
|
9843
9839
|
return;
|
|
9844
|
-
let s = bt ? null : t.clipboardData, o = r.content(), { dom: l, text: a } =
|
|
9840
|
+
let s = bt ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = go(n, o);
|
|
9845
9841
|
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : tu(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
9846
9842
|
};
|
|
9847
9843
|
function nu(n) {
|
|
@@ -9856,7 +9852,7 @@ function ru(n, e) {
|
|
|
9856
9852
|
}, 50);
|
|
9857
9853
|
}
|
|
9858
9854
|
function zt(n, e, t, r, i) {
|
|
9859
|
-
let s =
|
|
9855
|
+
let s = yo(n, e, t, r, n.state.selection.$from);
|
|
9860
9856
|
if (n.someProp("handlePaste", (a) => a(n, i, s || k.empty)))
|
|
9861
9857
|
return !0;
|
|
9862
9858
|
if (!s)
|
|
@@ -9866,7 +9862,7 @@ function zt(n, e, t, r, i) {
|
|
|
9866
9862
|
}
|
|
9867
9863
|
ne.paste = (n, e) => {
|
|
9868
9864
|
let t = e;
|
|
9869
|
-
if (n.composing && !
|
|
9865
|
+
if (n.composing && !pe)
|
|
9870
9866
|
return;
|
|
9871
9867
|
let r = bt ? null : t.clipboardData;
|
|
9872
9868
|
r && zt(n, r.getData("text/plain"), r.getData("text/html"), n.input.shiftKey, t) ? t.preventDefault() : ru(n, t);
|
|
@@ -9876,7 +9872,7 @@ class iu {
|
|
|
9876
9872
|
this.slice = e, this.move = t;
|
|
9877
9873
|
}
|
|
9878
9874
|
}
|
|
9879
|
-
const
|
|
9875
|
+
const Oo = ce ? "altKey" : "ctrlKey";
|
|
9880
9876
|
te.dragstart = (n, e) => {
|
|
9881
9877
|
let t = e, r = n.input.mouseDown;
|
|
9882
9878
|
if (r && r.done(), !t.dataTransfer)
|
|
@@ -9890,8 +9886,8 @@ te.dragstart = (n, e) => {
|
|
|
9890
9886
|
c && c.node.type.spec.draggable && c != n.docView && n.dispatch(n.state.tr.setSelection(v.create(n.state.doc, c.posBefore)));
|
|
9891
9887
|
}
|
|
9892
9888
|
}
|
|
9893
|
-
let o = n.state.selection.content(), { dom: l, text: a } =
|
|
9894
|
-
t.dataTransfer.clearData(), t.dataTransfer.setData(bt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", bt || t.dataTransfer.setData("text/plain", a), n.dragging = new iu(o, !t[
|
|
9889
|
+
let o = n.state.selection.content(), { dom: l, text: a } = go(n, o);
|
|
9890
|
+
t.dataTransfer.clearData(), t.dataTransfer.setData(bt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", bt || t.dataTransfer.setData("text/plain", a), n.dragging = new iu(o, !t[Oo]);
|
|
9895
9891
|
};
|
|
9896
9892
|
te.dragend = (n) => {
|
|
9897
9893
|
let e = n.dragging;
|
|
@@ -9910,8 +9906,8 @@ ne.drop = (n, e) => {
|
|
|
9910
9906
|
let s = n.state.doc.resolve(i.pos), o = r && r.slice;
|
|
9911
9907
|
o ? n.someProp("transformPasted", (p) => {
|
|
9912
9908
|
o = p(o, n);
|
|
9913
|
-
}) : o =
|
|
9914
|
-
let l = !!(r && !t[
|
|
9909
|
+
}) : o = yo(n, t.dataTransfer.getData(bt ? "Text" : "text/plain"), bt ? null : t.dataTransfer.getData("text/html"), !1, s);
|
|
9910
|
+
let l = !!(r && !t[Oo]);
|
|
9915
9911
|
if (n.someProp("handleDrop", (p) => p(n, t, o || k.empty, l))) {
|
|
9916
9912
|
t.preventDefault();
|
|
9917
9913
|
return;
|
|
@@ -9931,7 +9927,7 @@ ne.drop = (n, e) => {
|
|
|
9931
9927
|
c.setSelection(new v(f));
|
|
9932
9928
|
else {
|
|
9933
9929
|
let p = c.mapping.map(a);
|
|
9934
|
-
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y,
|
|
9930
|
+
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, C) => p = C), c.setSelection(Ar(n, f, c.doc.resolve(p)));
|
|
9935
9931
|
}
|
|
9936
9932
|
n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
|
|
9937
9933
|
};
|
|
@@ -9945,7 +9941,7 @@ te.blur = (n, e) => {
|
|
|
9945
9941
|
n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
|
|
9946
9942
|
};
|
|
9947
9943
|
te.beforeinput = (n, e) => {
|
|
9948
|
-
if (Q &&
|
|
9944
|
+
if (Q && pe && e.inputType == "deleteContentBackward") {
|
|
9949
9945
|
n.domObserver.flushSoon();
|
|
9950
9946
|
let { domChangeCount: r } = n.input;
|
|
9951
9947
|
setTimeout(() => {
|
|
@@ -10161,13 +10157,13 @@ class H {
|
|
|
10161
10157
|
let i, s = 0;
|
|
10162
10158
|
e.forEach((l, a) => {
|
|
10163
10159
|
let c = a + r, d;
|
|
10164
|
-
if (d =
|
|
10160
|
+
if (d = No(t, l, c)) {
|
|
10165
10161
|
for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
|
|
10166
10162
|
s += 3;
|
|
10167
10163
|
i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, cn(d, l, c + 1, Ge)), s += 3;
|
|
10168
10164
|
}
|
|
10169
10165
|
});
|
|
10170
|
-
let o =
|
|
10166
|
+
let o = To(s ? Ao(t) : t, -r);
|
|
10171
10167
|
for (let l = 0; l < o.length; l++)
|
|
10172
10168
|
o[l].type.valid(e, o[l]) || o.splice(l--, 1);
|
|
10173
10169
|
return new H(o.length ? this.local.concat(o).sort(Ye) : this.local, i || this.children);
|
|
@@ -10327,8 +10323,8 @@ function su(n, e, t, r, i, s, o) {
|
|
|
10327
10323
|
t.maps[c].forEach((h, f, p, m) => {
|
|
10328
10324
|
let g = m - p - (f - h);
|
|
10329
10325
|
for (let y = 0; y < l.length; y += 3) {
|
|
10330
|
-
let
|
|
10331
|
-
if (
|
|
10326
|
+
let C = l[y + 1];
|
|
10327
|
+
if (C < 0 || h > C + d - u)
|
|
10332
10328
|
continue;
|
|
10333
10329
|
let E = l[y] + d - u;
|
|
10334
10330
|
f >= E ? l[y + 1] = h <= E ? -2 : -1 : p >= i && g && (l[y] += g, l[y + 1] += g);
|
|
@@ -10369,7 +10365,7 @@ function su(n, e, t, r, i, s, o) {
|
|
|
10369
10365
|
}
|
|
10370
10366
|
return new H(e.sort(Ye), l);
|
|
10371
10367
|
}
|
|
10372
|
-
function
|
|
10368
|
+
function To(n, e) {
|
|
10373
10369
|
if (!e || !n.length)
|
|
10374
10370
|
return n;
|
|
10375
10371
|
let t = [];
|
|
@@ -10392,7 +10388,7 @@ function ou(n, e, t, r, i, s, o) {
|
|
|
10392
10388
|
n[a + 1] == -1 && l(n[a + 2], e[a] + s + 1);
|
|
10393
10389
|
return t;
|
|
10394
10390
|
}
|
|
10395
|
-
function
|
|
10391
|
+
function No(n, e, t) {
|
|
10396
10392
|
if (e.isLeaf)
|
|
10397
10393
|
return null;
|
|
10398
10394
|
let r = t + e.nodeSize, i = null;
|
|
@@ -10400,7 +10396,7 @@ function To(n, e, t) {
|
|
|
10400
10396
|
(o = n[s]) && o.from > t && o.to < r && ((i || (i = [])).push(o), n[s] = null);
|
|
10401
10397
|
return i;
|
|
10402
10398
|
}
|
|
10403
|
-
function
|
|
10399
|
+
function Ao(n) {
|
|
10404
10400
|
let e = [];
|
|
10405
10401
|
for (let t = 0; t < n.length; t++)
|
|
10406
10402
|
n[t] != null && e.push(n[t]);
|
|
@@ -10409,14 +10405,14 @@ function No(n) {
|
|
|
10409
10405
|
function cn(n, e, t, r) {
|
|
10410
10406
|
let i = [], s = !1;
|
|
10411
10407
|
e.forEach((l, a) => {
|
|
10412
|
-
let c =
|
|
10408
|
+
let c = No(n, l, a + t);
|
|
10413
10409
|
if (c) {
|
|
10414
10410
|
s = !0;
|
|
10415
10411
|
let d = cn(c, l, t + a + 1, r);
|
|
10416
10412
|
d != X && i.push(a, a + l.nodeSize, d);
|
|
10417
10413
|
}
|
|
10418
10414
|
});
|
|
10419
|
-
let o =
|
|
10415
|
+
let o = To(s ? Ao(n) : n, -t).sort(Ye);
|
|
10420
10416
|
for (let l = 0; l < o.length; l++)
|
|
10421
10417
|
o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
|
|
10422
10418
|
return o.length || i.length ? new H(o, i) : X;
|
|
@@ -10563,7 +10559,7 @@ class du {
|
|
|
10563
10559
|
let u = this.registerMutation(t[d], a);
|
|
10564
10560
|
u && (s = s < 0 ? u.from : Math.min(u.from, s), o = o < 0 ? u.to : Math.max(u.to, o), u.typeOver && (l = !0));
|
|
10565
10561
|
}
|
|
10566
|
-
if (
|
|
10562
|
+
if (ge && a.length > 1) {
|
|
10567
10563
|
let d = a.filter((u) => u.nodeName == "BR");
|
|
10568
10564
|
if (d.length == 2) {
|
|
10569
10565
|
let u = d[0], h = d[1];
|
|
@@ -10571,7 +10567,7 @@ class du {
|
|
|
10571
10567
|
}
|
|
10572
10568
|
}
|
|
10573
10569
|
let c = null;
|
|
10574
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Sn(r) && (c = Nr(e)) && c.eq(
|
|
10570
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Sn(r) && (c = Nr(e)) && c.eq(T.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Me(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), uu(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Me(e), this.currentSelection.set(r));
|
|
10575
10571
|
}
|
|
10576
10572
|
registerMutation(e, t) {
|
|
10577
10573
|
if (t.indexOf(e.target) > -1)
|
|
@@ -10608,7 +10604,7 @@ class du {
|
|
|
10608
10604
|
let Li = /* @__PURE__ */ new WeakMap(), Fi = !1;
|
|
10609
10605
|
function uu(n) {
|
|
10610
10606
|
if (!Li.has(n) && (Li.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
10611
|
-
if (n.requiresGeckoHackNode =
|
|
10607
|
+
if (n.requiresGeckoHackNode = ge, Fi)
|
|
10612
10608
|
return;
|
|
10613
10609
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Fi = !0;
|
|
10614
10610
|
}
|
|
@@ -10626,12 +10622,12 @@ function fu(n, e, t) {
|
|
|
10626
10622
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
10627
10623
|
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Sn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), Q && n.input.lastKeyCode === 8)
|
|
10628
10624
|
for (let g = s; g > i; g--) {
|
|
10629
|
-
let y = r.childNodes[g - 1],
|
|
10630
|
-
if (y.nodeName == "BR" && !
|
|
10625
|
+
let y = r.childNodes[g - 1], C = y.pmViewDesc;
|
|
10626
|
+
if (y.nodeName == "BR" && !C) {
|
|
10631
10627
|
s = g;
|
|
10632
10628
|
break;
|
|
10633
10629
|
}
|
|
10634
|
-
if (!
|
|
10630
|
+
if (!C || C.size)
|
|
10635
10631
|
break;
|
|
10636
10632
|
}
|
|
10637
10633
|
let u = n.state.doc, h = n.someProp("domParser") || pt.fromSchema(n.state.schema), f = u.resolve(o), p = null, m = h.parse(r, {
|
|
@@ -10670,10 +10666,10 @@ function gu(n, e, t, r, i) {
|
|
|
10670
10666
|
if (e < 0) {
|
|
10671
10667
|
let S = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, j = Nr(n, S);
|
|
10672
10668
|
if (j && !n.state.selection.eq(j)) {
|
|
10673
|
-
if (Q &&
|
|
10669
|
+
if (Q && pe && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (Kt) => Kt(n, je(13, "Enter"))))
|
|
10674
10670
|
return;
|
|
10675
|
-
let
|
|
10676
|
-
S == "pointer" ?
|
|
10671
|
+
let ye = n.state.tr.setSelection(j);
|
|
10672
|
+
S == "pointer" ? ye.setMeta("pointer", !0) : S == "key" && ye.scrollIntoView(), n.composing && ye.setMeta("composition", n.input.compositionID), n.dispatch(ye);
|
|
10677
10673
|
}
|
|
10678
10674
|
return;
|
|
10679
10675
|
}
|
|
@@ -10682,12 +10678,12 @@ function gu(n, e, t, r, i) {
|
|
|
10682
10678
|
let l = n.state.selection, a = fu(n, e, t), c = n.state.doc, d = c.slice(a.from, a.to), u, h;
|
|
10683
10679
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (u = n.state.selection.to, h = "end") : (u = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
10684
10680
|
let f = ku(d.content, a.doc.content, a.from, u, h);
|
|
10685
|
-
if ((yt && n.input.lastIOSEnter > Date.now() - 225 ||
|
|
10681
|
+
if ((yt && n.input.lastIOSEnter > Date.now() - 225 || pe) && i.some((S) => S.nodeType == 1 && !mu.test(S.nodeName)) && (!f || f.endA >= f.endB) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
|
|
10686
10682
|
n.input.lastIOSEnter = 0;
|
|
10687
10683
|
return;
|
|
10688
10684
|
}
|
|
10689
10685
|
if (!f)
|
|
10690
|
-
if (r && l instanceof
|
|
10686
|
+
if (r && l instanceof D && !l.empty && l.$head.sameParent(l.$anchor) && !n.composing && !(a.sel && a.sel.anchor != a.sel.head))
|
|
10691
10687
|
f = { start: l.from, endA: l.to, endB: l.to };
|
|
10692
10688
|
else {
|
|
10693
10689
|
if (a.sel) {
|
|
@@ -10703,42 +10699,42 @@ function gu(n, e, t, r, i) {
|
|
|
10703
10699
|
let S = f.endB - f.start;
|
|
10704
10700
|
a.sel = { anchor: a.sel.anchor + S, head: a.sel.anchor + S };
|
|
10705
10701
|
}
|
|
10706
|
-
n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && f.start == f.endB && n.state.selection instanceof
|
|
10707
|
-
let p = a.doc.resolveNoCache(f.start - a.from), m = a.doc.resolveNoCache(f.endB - a.from), g = c.resolve(f.start), y = p.sameParent(m) && p.parent.inlineContent && g.end() >= f.endA,
|
|
10708
|
-
if ((yt && n.input.lastIOSEnter > Date.now() - 225 && (!y || i.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !y && p.pos < a.doc.content.size && (
|
|
10702
|
+
n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && f.start == f.endB && n.state.selection instanceof D && (f.start > n.state.selection.from && f.start <= n.state.selection.from + 2 && n.state.selection.from >= a.from ? f.start = n.state.selection.from : f.endA < n.state.selection.to && f.endA >= n.state.selection.to - 2 && n.state.selection.to <= a.to && (f.endB += n.state.selection.to - f.endA, f.endA = n.state.selection.to)), re && Pe <= 11 && f.endB == f.start + 1 && f.endA == f.start && f.start > a.from && a.doc.textBetween(f.start - a.from - 1, f.start - a.from + 1) == " " && (f.start--, f.endA--, f.endB--);
|
|
10703
|
+
let p = a.doc.resolveNoCache(f.start - a.from), m = a.doc.resolveNoCache(f.endB - a.from), g = c.resolve(f.start), y = p.sameParent(m) && p.parent.inlineContent && g.end() >= f.endA, C;
|
|
10704
|
+
if ((yt && n.input.lastIOSEnter > Date.now() - 225 && (!y || i.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !y && p.pos < a.doc.content.size && (C = T.findFrom(a.doc.resolve(p.pos + 1), 1, !0)) && C.head == m.pos) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
|
|
10709
10705
|
n.input.lastIOSEnter = 0;
|
|
10710
10706
|
return;
|
|
10711
10707
|
}
|
|
10712
10708
|
if (n.state.selection.anchor > f.start && bu(c, f.start, f.endA, p, m) && n.someProp("handleKeyDown", (S) => S(n, je(8, "Backspace")))) {
|
|
10713
|
-
|
|
10709
|
+
pe && Q && n.domObserver.suppressSelectionUpdates();
|
|
10714
10710
|
return;
|
|
10715
10711
|
}
|
|
10716
|
-
Q &&
|
|
10712
|
+
Q && pe && f.endB == f.start && (n.input.lastAndroidDelete = Date.now()), pe && !y && p.start() != m.start() && m.parentOffset == 0 && p.depth == m.depth && a.sel && a.sel.anchor == a.sel.head && a.sel.head == f.endA && (f.endB -= 2, m = a.doc.resolveNoCache(f.endB - a.from), setTimeout(() => {
|
|
10717
10713
|
n.someProp("handleKeyDown", function(S) {
|
|
10718
10714
|
return S(n, je(13, "Enter"));
|
|
10719
10715
|
});
|
|
10720
10716
|
}, 20));
|
|
10721
|
-
let E = f.start, P = f.endA,
|
|
10717
|
+
let E = f.start, P = f.endA, N, I, V;
|
|
10722
10718
|
if (y) {
|
|
10723
10719
|
if (p.pos == m.pos)
|
|
10724
|
-
re && Pe <= 11 && p.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Me(n), 20)),
|
|
10720
|
+
re && Pe <= 11 && p.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Me(n), 20)), N = n.state.tr.delete(E, P), I = c.resolve(f.start).marksAcross(c.resolve(f.endA));
|
|
10725
10721
|
else if (
|
|
10726
10722
|
// Adding or removing a mark
|
|
10727
10723
|
f.endA == f.endB && (V = yu(p.parent.content.cut(p.parentOffset, m.parentOffset), g.parent.content.cut(g.parentOffset, f.endA - g.start())))
|
|
10728
10724
|
)
|
|
10729
|
-
|
|
10725
|
+
N = n.state.tr, V.type == "add" ? N.addMark(E, P, V.mark) : N.removeMark(E, P, V.mark);
|
|
10730
10726
|
else if (p.parent.child(p.index()).isText && p.index() == m.index() - (m.textOffset ? 0 : 1)) {
|
|
10731
10727
|
let S = p.parent.textBetween(p.parentOffset, m.parentOffset);
|
|
10732
10728
|
if (n.someProp("handleTextInput", (j) => j(n, E, P, S)))
|
|
10733
10729
|
return;
|
|
10734
|
-
|
|
10730
|
+
N = n.state.tr.insertText(S, E, P);
|
|
10735
10731
|
}
|
|
10736
10732
|
}
|
|
10737
|
-
if (
|
|
10738
|
-
let S = zi(n,
|
|
10739
|
-
S && !(Q &&
|
|
10733
|
+
if (N || (N = n.state.tr.replace(E, P, a.doc.slice(f.start - a.from, f.endB - a.from))), a.sel) {
|
|
10734
|
+
let S = zi(n, N.doc, a.sel);
|
|
10735
|
+
S && !(Q && pe && n.composing && S.empty && (f.start != f.endB || n.input.lastAndroidDelete < Date.now() - 100) && (S.head == E || S.head == N.mapping.map(P) - 1) || re && S.empty && S.head == E) && N.setSelection(S);
|
|
10740
10736
|
}
|
|
10741
|
-
I &&
|
|
10737
|
+
I && N.ensureMarks(I), n.composing && N.setMeta("composition", n.input.compositionID), n.dispatch(N.scrollIntoView());
|
|
10742
10738
|
}
|
|
10743
10739
|
function zi(n, e, t) {
|
|
10744
10740
|
return Math.max(t.anchor, t.head) > e.content.size ? null : Ar(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
@@ -10865,7 +10861,7 @@ class Su {
|
|
|
10865
10861
|
}
|
|
10866
10862
|
updateStateInner(e, t) {
|
|
10867
10863
|
let r = this.state, i = !1, s = !1;
|
|
10868
|
-
e.storedMarks && this.composing && (
|
|
10864
|
+
e.storedMarks && this.composing && (Mo(this), s = !0), this.state = e;
|
|
10869
10865
|
let o = r.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
10870
10866
|
if (o || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
10871
10867
|
let h = $i(this);
|
|
@@ -10882,7 +10878,7 @@ class Su {
|
|
|
10882
10878
|
let f = Q ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
10883
10879
|
(i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = wi(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
|
|
10884
10880
|
}
|
|
10885
|
-
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Nd(this)) ? Me(this, h) : (
|
|
10881
|
+
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Nd(this)) ? Me(this, h) : (ho(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
10886
10882
|
}
|
|
10887
10883
|
this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && sd(u);
|
|
10888
10884
|
}
|
|
@@ -10998,7 +10994,7 @@ class Su {
|
|
|
10998
10994
|
otherwise the element after.
|
|
10999
10995
|
*/
|
|
11000
10996
|
coordsAtPos(e, t = 1) {
|
|
11001
|
-
return
|
|
10997
|
+
return ro(this, e, t);
|
|
11002
10998
|
}
|
|
11003
10999
|
/**
|
|
11004
11000
|
Find the DOM position that corresponds to the given document
|
|
@@ -11315,20 +11311,20 @@ const Ru = (n, e, t) => {
|
|
|
11315
11311
|
let r = Pu(n, t);
|
|
11316
11312
|
if (!r)
|
|
11317
11313
|
return !1;
|
|
11318
|
-
let i =
|
|
11314
|
+
let i = Do(r);
|
|
11319
11315
|
if (!i) {
|
|
11320
11316
|
let o = r.blockRange(), l = o && wt(o);
|
|
11321
11317
|
return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
|
|
11322
11318
|
}
|
|
11323
11319
|
let s = i.nodeBefore;
|
|
11324
|
-
if (!s.type.spec.isolating &&
|
|
11320
|
+
if (!s.type.spec.isolating && Ro(n, i, e))
|
|
11325
11321
|
return !0;
|
|
11326
11322
|
if (r.parent.content.size == 0 && (kt(s, "end") || v.isSelectable(s))) {
|
|
11327
11323
|
let o = Mr(n.doc, r.before(), r.after(), k.empty);
|
|
11328
11324
|
if (o && o.slice.size < o.to - o.from) {
|
|
11329
11325
|
if (e) {
|
|
11330
11326
|
let l = n.tr.step(o);
|
|
11331
|
-
l.setSelection(kt(s, "end") ?
|
|
11327
|
+
l.setSelection(kt(s, "end") ? T.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) : v.create(l.doc, i.pos - s.nodeSize)), e(l.scrollIntoView());
|
|
11332
11328
|
}
|
|
11333
11329
|
return !0;
|
|
11334
11330
|
}
|
|
@@ -11351,12 +11347,12 @@ const _u = (n, e, t) => {
|
|
|
11351
11347
|
if (r.parent.isTextblock) {
|
|
11352
11348
|
if (t ? !t.endOfTextblock("backward", n) : r.parentOffset > 0)
|
|
11353
11349
|
return !1;
|
|
11354
|
-
s =
|
|
11350
|
+
s = Do(r);
|
|
11355
11351
|
}
|
|
11356
11352
|
let o = s && s.nodeBefore;
|
|
11357
11353
|
return !o || !v.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(v.create(n.doc, s.pos - o.nodeSize)).scrollIntoView()), !0);
|
|
11358
11354
|
};
|
|
11359
|
-
function
|
|
11355
|
+
function Do(n) {
|
|
11360
11356
|
if (!n.parent.type.spec.isolating)
|
|
11361
11357
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
11362
11358
|
if (n.index(e) > 0)
|
|
@@ -11374,18 +11370,18 @@ const Lu = (n, e, t) => {
|
|
|
11374
11370
|
let r = Bu(n, t);
|
|
11375
11371
|
if (!r)
|
|
11376
11372
|
return !1;
|
|
11377
|
-
let i =
|
|
11373
|
+
let i = Io(r);
|
|
11378
11374
|
if (!i)
|
|
11379
11375
|
return !1;
|
|
11380
11376
|
let s = i.nodeAfter;
|
|
11381
|
-
if (
|
|
11377
|
+
if (Ro(n, i, e))
|
|
11382
11378
|
return !0;
|
|
11383
11379
|
if (r.parent.content.size == 0 && (kt(s, "start") || v.isSelectable(s))) {
|
|
11384
11380
|
let o = Mr(n.doc, r.before(), r.after(), k.empty);
|
|
11385
11381
|
if (o && o.slice.size < o.to - o.from) {
|
|
11386
11382
|
if (e) {
|
|
11387
11383
|
let l = n.tr.step(o);
|
|
11388
|
-
l.setSelection(kt(s, "start") ?
|
|
11384
|
+
l.setSelection(kt(s, "start") ? T.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : v.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
|
|
11389
11385
|
}
|
|
11390
11386
|
return !0;
|
|
11391
11387
|
}
|
|
@@ -11398,12 +11394,12 @@ const Lu = (n, e, t) => {
|
|
|
11398
11394
|
if (r.parent.isTextblock) {
|
|
11399
11395
|
if (t ? !t.endOfTextblock("forward", n) : r.parentOffset < r.parent.content.size)
|
|
11400
11396
|
return !1;
|
|
11401
|
-
s =
|
|
11397
|
+
s = Io(r);
|
|
11402
11398
|
}
|
|
11403
11399
|
let o = s && s.nodeAfter;
|
|
11404
11400
|
return !o || !v.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(v.create(n.doc, s.pos)).scrollIntoView()), !0);
|
|
11405
11401
|
};
|
|
11406
|
-
function
|
|
11402
|
+
function Io(n) {
|
|
11407
11403
|
if (!n.parent.type.spec.isolating)
|
|
11408
11404
|
for (let e = n.depth - 1; e >= 0; e--) {
|
|
11409
11405
|
let t = n.node(e);
|
|
@@ -11420,7 +11416,7 @@ const zu = (n, e) => {
|
|
|
11420
11416
|
if (t.node.isTextblock || !rt(n.doc, t.from))
|
|
11421
11417
|
return !1;
|
|
11422
11418
|
i = t.from;
|
|
11423
|
-
} else if (i =
|
|
11419
|
+
} else if (i = qs(n.doc, t.from, -1), i == null)
|
|
11424
11420
|
return !1;
|
|
11425
11421
|
if (e) {
|
|
11426
11422
|
let s = n.tr.join(i);
|
|
@@ -11433,7 +11429,7 @@ const zu = (n, e) => {
|
|
|
11433
11429
|
if (t.node.isTextblock || !rt(n.doc, t.to))
|
|
11434
11430
|
return !1;
|
|
11435
11431
|
r = t.to;
|
|
11436
|
-
} else if (r =
|
|
11432
|
+
} else if (r = qs(n.doc, t.to, 1), r == null)
|
|
11437
11433
|
return !1;
|
|
11438
11434
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
11439
11435
|
}, ju = (n, e) => {
|
|
@@ -11444,7 +11440,7 @@ const zu = (n, e) => {
|
|
|
11444
11440
|
return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
|
|
11445
11441
|
`).scrollIntoView()), !0);
|
|
11446
11442
|
};
|
|
11447
|
-
function
|
|
11443
|
+
function Po(n) {
|
|
11448
11444
|
for (let e = 0; e < n.edgeCount; e++) {
|
|
11449
11445
|
let { type: t } = n.edge(e);
|
|
11450
11446
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -11456,24 +11452,24 @@ const $u = (n, e) => {
|
|
|
11456
11452
|
let { $head: t, $anchor: r } = n.selection;
|
|
11457
11453
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
11458
11454
|
return !1;
|
|
11459
|
-
let i = t.node(-1), s = t.indexAfter(-1), o =
|
|
11455
|
+
let i = t.node(-1), s = t.indexAfter(-1), o = Po(i.contentMatchAt(s));
|
|
11460
11456
|
if (!o || !i.canReplaceWith(s, s, o))
|
|
11461
11457
|
return !1;
|
|
11462
11458
|
if (e) {
|
|
11463
11459
|
let l = t.after(), a = n.tr.replaceWith(l, l, o.createAndFill());
|
|
11464
|
-
a.setSelection(
|
|
11460
|
+
a.setSelection(T.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
|
|
11465
11461
|
}
|
|
11466
11462
|
return !0;
|
|
11467
11463
|
}, qu = (n, e) => {
|
|
11468
11464
|
let t = n.selection, { $from: r, $to: i } = t;
|
|
11469
|
-
if (t instanceof
|
|
11465
|
+
if (t instanceof me || r.parent.inlineContent || i.parent.inlineContent)
|
|
11470
11466
|
return !1;
|
|
11471
|
-
let s =
|
|
11467
|
+
let s = Po(i.parent.contentMatchAt(i.indexAfter()));
|
|
11472
11468
|
if (!s || !s.isTextblock)
|
|
11473
11469
|
return !1;
|
|
11474
11470
|
if (e) {
|
|
11475
11471
|
let o = (!r.parentOffset && i.index() < i.parent.childCount ? r : i).pos, l = n.tr.insert(o, s.createAndFill());
|
|
11476
|
-
l.setSelection(
|
|
11472
|
+
l.setSelection(D.create(l.doc, o + 1)), e(l.scrollIntoView());
|
|
11477
11473
|
}
|
|
11478
11474
|
return !0;
|
|
11479
11475
|
}, Ku = (n, e) => {
|
|
@@ -11495,7 +11491,7 @@ function Ju(n, e, t) {
|
|
|
11495
11491
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
11496
11492
|
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || rt(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
|
|
11497
11493
|
}
|
|
11498
|
-
function
|
|
11494
|
+
function Ro(n, e, t) {
|
|
11499
11495
|
let r = e.nodeBefore, i = e.nodeAfter, s, o;
|
|
11500
11496
|
if (r.type.spec.isolating || i.type.spec.isolating)
|
|
11501
11497
|
return !1;
|
|
@@ -11513,7 +11509,7 @@ function Po(n, e, t) {
|
|
|
11513
11509
|
}
|
|
11514
11510
|
return !0;
|
|
11515
11511
|
}
|
|
11516
|
-
let a =
|
|
11512
|
+
let a = T.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), d = c && wt(c);
|
|
11517
11513
|
if (d != null && d >= e.depth)
|
|
11518
11514
|
return t && t(n.tr.lift(c, d).scrollIntoView()), !0;
|
|
11519
11515
|
if (l && kt(i, "start", !0) && kt(r, "end")) {
|
|
@@ -11536,7 +11532,7 @@ function Po(n, e, t) {
|
|
|
11536
11532
|
}
|
|
11537
11533
|
return !1;
|
|
11538
11534
|
}
|
|
11539
|
-
function
|
|
11535
|
+
function _o(n) {
|
|
11540
11536
|
return function(e, t) {
|
|
11541
11537
|
let r = e.selection, i = n < 0 ? r.$from : r.$to, s = i.depth;
|
|
11542
11538
|
for (; i.node(s).isInline; ) {
|
|
@@ -11544,13 +11540,13 @@ function Ro(n) {
|
|
|
11544
11540
|
return !1;
|
|
11545
11541
|
s--;
|
|
11546
11542
|
}
|
|
11547
|
-
return i.node(s).isTextblock ? (t && t(e.tr.setSelection(
|
|
11543
|
+
return i.node(s).isTextblock ? (t && t(e.tr.setSelection(D.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
|
|
11548
11544
|
};
|
|
11549
11545
|
}
|
|
11550
|
-
const Uu =
|
|
11546
|
+
const Uu = _o(-1), Gu = _o(1);
|
|
11551
11547
|
function Yu(n, e = null) {
|
|
11552
11548
|
return function(t, r) {
|
|
11553
|
-
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o &&
|
|
11549
|
+
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Hs(o, n, e);
|
|
11554
11550
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
11555
11551
|
};
|
|
11556
11552
|
}
|
|
@@ -11596,7 +11592,7 @@ function Xu(n, e = null) {
|
|
|
11596
11592
|
let d = t.doc.resolve(o.start - 2);
|
|
11597
11593
|
a = new nn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new nn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
|
|
11598
11594
|
}
|
|
11599
|
-
let c =
|
|
11595
|
+
let c = Hs(a, n, e, o);
|
|
11600
11596
|
return c ? (r && r(Zu(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
|
|
11601
11597
|
};
|
|
11602
11598
|
}
|
|
@@ -11781,7 +11777,7 @@ function Mn(n) {
|
|
|
11781
11777
|
markExtensions: r
|
|
11782
11778
|
};
|
|
11783
11779
|
}
|
|
11784
|
-
function
|
|
11780
|
+
function Bo(n) {
|
|
11785
11781
|
const e = [], { nodeExtensions: t, markExtensions: r } = Mn(n), i = [...t, ...r], s = {
|
|
11786
11782
|
default: null,
|
|
11787
11783
|
rendered: !0,
|
|
@@ -11859,11 +11855,11 @@ function yr(n, e) {
|
|
|
11859
11855
|
[t.name]: n.attrs[t.name]
|
|
11860
11856
|
}).reduce((t, r) => Fe(t, r), {});
|
|
11861
11857
|
}
|
|
11862
|
-
function
|
|
11858
|
+
function Lo(n) {
|
|
11863
11859
|
return typeof n == "function";
|
|
11864
11860
|
}
|
|
11865
11861
|
function M(n, e = void 0, ...t) {
|
|
11866
|
-
return
|
|
11862
|
+
return Lo(n) ? e ? n.bind(e)(...t) : n(...t) : n;
|
|
11867
11863
|
}
|
|
11868
11864
|
function ih(n = {}) {
|
|
11869
11865
|
return Object.keys(n).length === 0 && n.constructor === Object;
|
|
@@ -11897,14 +11893,14 @@ function Ui(n) {
|
|
|
11897
11893
|
}
|
|
11898
11894
|
function oh(n, e) {
|
|
11899
11895
|
var t;
|
|
11900
|
-
const r =
|
|
11896
|
+
const r = Bo(n), { nodeExtensions: i, markExtensions: s } = Mn(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
|
|
11901
11897
|
const d = r.filter((y) => y.type === c.name), u = {
|
|
11902
11898
|
name: c.name,
|
|
11903
11899
|
options: c.options,
|
|
11904
11900
|
storage: c.storage,
|
|
11905
11901
|
editor: e
|
|
11906
|
-
}, h = n.reduce((y,
|
|
11907
|
-
const E = x(
|
|
11902
|
+
}, h = n.reduce((y, C) => {
|
|
11903
|
+
const E = x(C, "extendNodeSchema", u);
|
|
11908
11904
|
return {
|
|
11909
11905
|
...y,
|
|
11910
11906
|
...E ? E(c) : {}
|
|
@@ -11922,8 +11918,8 @@ function oh(n, e) {
|
|
|
11922
11918
|
defining: M(x(c, "defining", u)),
|
|
11923
11919
|
isolating: M(x(c, "isolating", u)),
|
|
11924
11920
|
attrs: Object.fromEntries(d.map((y) => {
|
|
11925
|
-
var
|
|
11926
|
-
return [y.name, { default: (
|
|
11921
|
+
var C;
|
|
11922
|
+
return [y.name, { default: (C = y == null ? void 0 : y.attribute) === null || C === void 0 ? void 0 : C.default }];
|
|
11927
11923
|
}))
|
|
11928
11924
|
}), p = M(x(c, "parseHTML", u));
|
|
11929
11925
|
p && (f.parseDOM = p.map((y) => Ji(y, d)));
|
|
@@ -11941,10 +11937,10 @@ function oh(n, e) {
|
|
|
11941
11937
|
storage: c.storage,
|
|
11942
11938
|
editor: e
|
|
11943
11939
|
}, h = n.reduce((g, y) => {
|
|
11944
|
-
const
|
|
11940
|
+
const C = x(y, "extendMarkSchema", u);
|
|
11945
11941
|
return {
|
|
11946
11942
|
...g,
|
|
11947
|
-
...
|
|
11943
|
+
...C ? C(c) : {}
|
|
11948
11944
|
};
|
|
11949
11945
|
}, {}), f = Ui({
|
|
11950
11946
|
...h,
|
|
@@ -11994,7 +11990,7 @@ const lh = (n, e = 500) => {
|
|
|
11994
11990
|
function Lr(n) {
|
|
11995
11991
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
11996
11992
|
}
|
|
11997
|
-
class
|
|
11993
|
+
class Fo {
|
|
11998
11994
|
constructor(e) {
|
|
11999
11995
|
this.find = e.find, this.handler = e.handler;
|
|
12000
11996
|
}
|
|
@@ -12033,7 +12029,7 @@ function Xn(n) {
|
|
|
12033
12029
|
}), g = {
|
|
12034
12030
|
from: r - (f[0].length - s.length),
|
|
12035
12031
|
to: i
|
|
12036
|
-
}, { commands: y, chain:
|
|
12032
|
+
}, { commands: y, chain: C, can: E } = new En({
|
|
12037
12033
|
editor: t,
|
|
12038
12034
|
state: m
|
|
12039
12035
|
});
|
|
@@ -12042,7 +12038,7 @@ function Xn(n) {
|
|
|
12042
12038
|
range: g,
|
|
12043
12039
|
match: f,
|
|
12044
12040
|
commands: y,
|
|
12045
|
-
chain:
|
|
12041
|
+
chain: C,
|
|
12046
12042
|
can: E
|
|
12047
12043
|
}) === null || !p.steps.length || (p.setMeta(l, {
|
|
12048
12044
|
transform: p,
|
|
@@ -12138,10 +12134,10 @@ function fh(n) {
|
|
|
12138
12134
|
hh(m, s.find).forEach((y) => {
|
|
12139
12135
|
if (y.index === void 0)
|
|
12140
12136
|
return;
|
|
12141
|
-
const
|
|
12142
|
-
from: t.tr.mapping.map(
|
|
12137
|
+
const C = f + y.index + 1, E = C + y[0].length, P = {
|
|
12138
|
+
from: t.tr.mapping.map(C),
|
|
12143
12139
|
to: t.tr.mapping.map(E)
|
|
12144
|
-
},
|
|
12140
|
+
}, N = s.handler({
|
|
12145
12141
|
state: t,
|
|
12146
12142
|
range: P,
|
|
12147
12143
|
match: y,
|
|
@@ -12149,7 +12145,7 @@ function fh(n) {
|
|
|
12149
12145
|
chain: l,
|
|
12150
12146
|
can: a
|
|
12151
12147
|
});
|
|
12152
|
-
c.push(
|
|
12148
|
+
c.push(N);
|
|
12153
12149
|
});
|
|
12154
12150
|
}), c.every((u) => u !== null);
|
|
12155
12151
|
}
|
|
@@ -12311,7 +12307,7 @@ class ct {
|
|
|
12311
12307
|
];
|
|
12312
12308
|
}
|
|
12313
12309
|
get attributes() {
|
|
12314
|
-
return
|
|
12310
|
+
return Bo(this.extensions);
|
|
12315
12311
|
}
|
|
12316
12312
|
get nodeViews() {
|
|
12317
12313
|
const { editor: e } = this, { nodeExtensions: t } = Mn(this.extensions);
|
|
@@ -12352,7 +12348,7 @@ function On(n, e) {
|
|
|
12352
12348
|
Zn(e[r]) ? r in n ? t[r] = On(n[r], e[r]) : Object.assign(t, { [r]: e[r] }) : Object.assign(t, { [r]: e[r] });
|
|
12353
12349
|
}), t;
|
|
12354
12350
|
}
|
|
12355
|
-
class
|
|
12351
|
+
class fe {
|
|
12356
12352
|
constructor(e = {}) {
|
|
12357
12353
|
this.type = "extension", this.name = "extension", this.parent = null, this.child = null, this.config = {
|
|
12358
12354
|
name: this.name,
|
|
@@ -12368,7 +12364,7 @@ class he {
|
|
|
12368
12364
|
})) || {};
|
|
12369
12365
|
}
|
|
12370
12366
|
static create(e = {}) {
|
|
12371
|
-
return new
|
|
12367
|
+
return new fe(e);
|
|
12372
12368
|
}
|
|
12373
12369
|
configure(e = {}) {
|
|
12374
12370
|
const t = this.extend();
|
|
@@ -12378,7 +12374,7 @@ class he {
|
|
|
12378
12374
|
})), t;
|
|
12379
12375
|
}
|
|
12380
12376
|
extend(e = {}) {
|
|
12381
|
-
const t = new
|
|
12377
|
+
const t = new fe(e);
|
|
12382
12378
|
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = M(x(t, "addOptions", {
|
|
12383
12379
|
name: t.name
|
|
12384
12380
|
})), t.storage = M(x(t, "addStorage", {
|
|
@@ -12387,7 +12383,7 @@ class he {
|
|
|
12387
12383
|
})), t;
|
|
12388
12384
|
}
|
|
12389
12385
|
}
|
|
12390
|
-
function
|
|
12386
|
+
function zo(n, e, t) {
|
|
12391
12387
|
const { from: r, to: i } = e, { blockSeparator: s = `
|
|
12392
12388
|
|
|
12393
12389
|
`, textSerializers: o = {} } = t || {};
|
|
@@ -12404,10 +12400,10 @@ function Fo(n, e, t) {
|
|
|
12404
12400
|
}))) : c.isText ? (l += (f = c == null ? void 0 : c.text) === null || f === void 0 ? void 0 : f.slice(Math.max(r, d) - d, i - d), a = !1) : c.isBlock && !a && (l += s, a = !0);
|
|
12405
12401
|
}), l;
|
|
12406
12402
|
}
|
|
12407
|
-
function
|
|
12403
|
+
function Vo(n) {
|
|
12408
12404
|
return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
12409
12405
|
}
|
|
12410
|
-
const yh =
|
|
12406
|
+
const yh = fe.create({
|
|
12411
12407
|
name: "clipboardTextSerializer",
|
|
12412
12408
|
addProseMirrorPlugins() {
|
|
12413
12409
|
return [
|
|
@@ -12415,8 +12411,8 @@ const yh = he.create({
|
|
|
12415
12411
|
key: new ae("clipboardTextSerializer"),
|
|
12416
12412
|
props: {
|
|
12417
12413
|
clipboardTextSerializer: () => {
|
|
12418
|
-
const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a =
|
|
12419
|
-
return
|
|
12414
|
+
const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = Vo(t);
|
|
12415
|
+
return zo(r, { from: o, to: l }, {
|
|
12420
12416
|
textSerializers: a
|
|
12421
12417
|
});
|
|
12422
12418
|
}
|
|
@@ -12515,7 +12511,7 @@ const Ah = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12515
12511
|
if (i) {
|
|
12516
12512
|
const u = Fr(a, s, e);
|
|
12517
12513
|
if (u && u.from <= c && u.to >= d) {
|
|
12518
|
-
const h =
|
|
12514
|
+
const h = D.create(o, u.from, u.to);
|
|
12519
12515
|
t.setSelection(h);
|
|
12520
12516
|
}
|
|
12521
12517
|
}
|
|
@@ -12528,21 +12524,21 @@ const Ah = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12528
12524
|
return !1;
|
|
12529
12525
|
};
|
|
12530
12526
|
function zr(n) {
|
|
12531
|
-
return n instanceof
|
|
12527
|
+
return n instanceof D;
|
|
12532
12528
|
}
|
|
12533
12529
|
function Ee(n = 0, e = 0, t = 0) {
|
|
12534
12530
|
return Math.min(Math.max(n, e), t);
|
|
12535
12531
|
}
|
|
12536
|
-
function
|
|
12532
|
+
function jo(n, e = null) {
|
|
12537
12533
|
if (!e)
|
|
12538
12534
|
return null;
|
|
12539
|
-
const t =
|
|
12535
|
+
const t = T.atStart(n), r = T.atEnd(n);
|
|
12540
12536
|
if (e === "start" || e === !0)
|
|
12541
12537
|
return t;
|
|
12542
12538
|
if (e === "end")
|
|
12543
12539
|
return r;
|
|
12544
12540
|
const i = t.from, s = r.to;
|
|
12545
|
-
return e === "all" ?
|
|
12541
|
+
return e === "all" ? D.create(n, Ee(0, i, s), Ee(n.content.size, i, s)) : D.create(n, Ee(e, i, s), Ee(e, i, s));
|
|
12546
12542
|
}
|
|
12547
12543
|
function Tn() {
|
|
12548
12544
|
return [
|
|
@@ -12568,7 +12564,7 @@ const Ih = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
12568
12564
|
return !0;
|
|
12569
12565
|
if (s && n === null && !zr(t.state.selection))
|
|
12570
12566
|
return o(), !0;
|
|
12571
|
-
const l =
|
|
12567
|
+
const l = jo(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
12572
12568
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
12573
12569
|
}, Ph = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), Rh = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e);
|
|
12574
12570
|
function Yi(n) {
|
|
@@ -12603,7 +12599,7 @@ function _h(n, e, t) {
|
|
|
12603
12599
|
let o = 0;
|
|
12604
12600
|
s.forEach((l, a, c, d) => {
|
|
12605
12601
|
o === 0 && (o = d);
|
|
12606
|
-
}), n.setSelection(
|
|
12602
|
+
}), n.setSelection(T.near(n.doc.resolve(o), t));
|
|
12607
12603
|
}
|
|
12608
12604
|
const Bh = (n) => n.toString().startsWith("<"), Lh = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
|
|
12609
12605
|
if (i) {
|
|
@@ -12631,7 +12627,7 @@ const Bh = (n) => n.toString().startsWith("<"), Lh = (n, e, t) => ({ tr: r, disp
|
|
|
12631
12627
|
}
|
|
12632
12628
|
return !0;
|
|
12633
12629
|
}, Fh = () => ({ state: n, dispatch: e }) => zu(n, e), zh = () => ({ state: n, dispatch: e }) => Vu(n, e), Vh = () => ({ state: n, dispatch: e }) => Ru(n, e), jh = () => ({ state: n, dispatch: e }) => Lu(n, e);
|
|
12634
|
-
function
|
|
12630
|
+
function Ho() {
|
|
12635
12631
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
12636
12632
|
}
|
|
12637
12633
|
function Hh(n) {
|
|
@@ -12650,7 +12646,7 @@ function Hh(n) {
|
|
|
12650
12646
|
else if (/^s(hift)?$/i.test(a))
|
|
12651
12647
|
s = !0;
|
|
12652
12648
|
else if (/^mod$/i.test(a))
|
|
12653
|
-
Tn() ||
|
|
12649
|
+
Tn() || Ho() ? o = !0 : i = !0;
|
|
12654
12650
|
else
|
|
12655
12651
|
throw new Error(`Unrecognized modifier name: ${a}`);
|
|
12656
12652
|
}
|
|
@@ -12716,15 +12712,15 @@ const Uh = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12716
12712
|
from: 0,
|
|
12717
12713
|
to: n.doc.content.size
|
|
12718
12714
|
}), Xh = () => ({ state: n, dispatch: e }) => _u(n, e), Zh = () => ({ state: n, dispatch: e }) => Fu(n, e), Qh = () => ({ state: n, dispatch: e }) => Wu(n, e), ef = () => ({ state: n, dispatch: e }) => Gu(n, e), tf = () => ({ state: n, dispatch: e }) => Uu(n, e);
|
|
12719
|
-
function
|
|
12715
|
+
function $o(n, e, t = {}) {
|
|
12720
12716
|
return hn(n, e, { slice: !1, parseOptions: t });
|
|
12721
12717
|
}
|
|
12722
12718
|
const nf = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
|
|
12723
|
-
const { doc: o } = r, l =
|
|
12719
|
+
const { doc: o } = r, l = $o(n, i.schema, t);
|
|
12724
12720
|
return s && r.replaceWith(0, o.content.size, l).setMeta("preventUpdate", !e), !0;
|
|
12725
12721
|
};
|
|
12726
12722
|
function rf(n, e) {
|
|
12727
|
-
const t = new
|
|
12723
|
+
const t = new Gs(n);
|
|
12728
12724
|
return e.forEach((r) => {
|
|
12729
12725
|
r.steps.forEach((i) => {
|
|
12730
12726
|
t.step(i);
|
|
@@ -12764,7 +12760,7 @@ function Vr(n) {
|
|
|
12764
12760
|
return (e) => lf(e.$from, n);
|
|
12765
12761
|
}
|
|
12766
12762
|
function af(n, e) {
|
|
12767
|
-
const t =
|
|
12763
|
+
const t = ke.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
|
|
12768
12764
|
return i.appendChild(t), i.innerHTML;
|
|
12769
12765
|
}
|
|
12770
12766
|
function cf(n, e) {
|
|
@@ -12772,9 +12768,9 @@ function cf(n, e) {
|
|
|
12772
12768
|
from: 0,
|
|
12773
12769
|
to: n.content.size
|
|
12774
12770
|
};
|
|
12775
|
-
return
|
|
12771
|
+
return zo(n, t, e);
|
|
12776
12772
|
}
|
|
12777
|
-
function
|
|
12773
|
+
function qo(n, e) {
|
|
12778
12774
|
const t = ze(e, n.schema), { from: r, to: i, empty: s } = n.selection, o = [];
|
|
12779
12775
|
s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (a) => {
|
|
12780
12776
|
o.push(...a.marks);
|
|
@@ -12792,7 +12788,7 @@ function df(n, e) {
|
|
|
12792
12788
|
}
|
|
12793
12789
|
function uf(n, e) {
|
|
12794
12790
|
const t = Nn(typeof e == "string" ? e : e.name, n.schema);
|
|
12795
|
-
return t === "node" ? df(n, e) : t === "mark" ?
|
|
12791
|
+
return t === "node" ? df(n, e) : t === "mark" ? qo(n, e) : {};
|
|
12796
12792
|
}
|
|
12797
12793
|
function hf(n, e = JSON.stringify) {
|
|
12798
12794
|
const t = {};
|
|
@@ -12867,11 +12863,11 @@ function kr(n, e, t = {}) {
|
|
|
12867
12863
|
n.doc.nodesBetween(f, p, (m, g) => {
|
|
12868
12864
|
if (!m.isText && !m.marks.length)
|
|
12869
12865
|
return;
|
|
12870
|
-
const y = Math.max(f, g),
|
|
12866
|
+
const y = Math.max(f, g), C = Math.min(p, g + m.nodeSize), E = C - y;
|
|
12871
12867
|
o += E, l.push(...m.marks.map((P) => ({
|
|
12872
12868
|
mark: P,
|
|
12873
12869
|
from: y,
|
|
12874
|
-
to:
|
|
12870
|
+
to: C
|
|
12875
12871
|
})));
|
|
12876
12872
|
});
|
|
12877
12873
|
}), o === 0)
|
|
@@ -12904,7 +12900,7 @@ function yf(n) {
|
|
|
12904
12900
|
function bf(n) {
|
|
12905
12901
|
return n instanceof v;
|
|
12906
12902
|
}
|
|
12907
|
-
function
|
|
12903
|
+
function Ko(n, e, t) {
|
|
12908
12904
|
const i = n.state.doc.content.size, s = Ee(e, 0, i), o = Ee(t, 0, i), l = n.coordsAtPos(s), a = n.coordsAtPos(o, -1), c = Math.min(l.top, a.top), d = Math.max(l.bottom, a.bottom), u = Math.min(l.left, a.left), h = Math.max(l.right, a.right), f = h - u, p = d - c, y = {
|
|
12909
12905
|
top: c,
|
|
12910
12906
|
bottom: d,
|
|
@@ -12946,7 +12942,7 @@ const Sf = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12946
12942
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = ze(n, r.schema);
|
|
12947
12943
|
if (i)
|
|
12948
12944
|
if (o) {
|
|
12949
|
-
const c =
|
|
12945
|
+
const c = qo(r, a);
|
|
12950
12946
|
t.addStoredMark(a.create({
|
|
12951
12947
|
...c,
|
|
12952
12948
|
...e
|
|
@@ -12976,7 +12972,7 @@ const Sf = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12976
12972
|
return !0;
|
|
12977
12973
|
}, vf = (n) => ({ tr: e, dispatch: t }) => {
|
|
12978
12974
|
if (t) {
|
|
12979
|
-
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o =
|
|
12975
|
+
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = D.atStart(r).from, l = D.atEnd(r).to, a = Ee(i, o, l), c = Ee(s, o, l), d = D.create(r, a, c);
|
|
12980
12976
|
e.setSelection(d);
|
|
12981
12977
|
}
|
|
12982
12978
|
return !0;
|
|
@@ -12999,7 +12995,7 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12999
12995
|
return !1;
|
|
13000
12996
|
if (r) {
|
|
13001
12997
|
const u = a.parentOffset === a.parent.content.size;
|
|
13002
|
-
s instanceof
|
|
12998
|
+
s instanceof D && e.deleteSelection();
|
|
13003
12999
|
const h = l.depth === 0 ? void 0 : sf(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
13004
13000
|
let f = u && h ? [
|
|
13005
13001
|
{
|
|
@@ -13036,16 +13032,16 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13036
13032
|
const y = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
|
|
13037
13033
|
for (let V = l.depth - y; V >= l.depth - 3; V -= 1)
|
|
13038
13034
|
g = b.from(l.node(V).copy(g));
|
|
13039
|
-
const
|
|
13035
|
+
const C = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = Zt(u, l.node().type.name, l.node().attrs), P = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
|
|
13040
13036
|
g = g.append(b.from(o.createAndFill(null, P) || void 0));
|
|
13041
|
-
const
|
|
13042
|
-
e.replace(
|
|
13037
|
+
const N = l.before(l.depth - (y - 1));
|
|
13038
|
+
e.replace(N, l.after(-C), new k(g, 4 - y, 0));
|
|
13043
13039
|
let I = -1;
|
|
13044
|
-
e.doc.nodesBetween(
|
|
13040
|
+
e.doc.nodesBetween(N, e.doc.content.size, (V, S) => {
|
|
13045
13041
|
if (I > -1)
|
|
13046
13042
|
return !1;
|
|
13047
13043
|
V.isTextblock && V.content.size === 0 && (I = S + 1);
|
|
13048
|
-
}), I > -1 && e.setSelection(
|
|
13044
|
+
}), I > -1 && e.setSelection(D.near(e.doc.resolve(I))), e.scrollIntoView();
|
|
13049
13045
|
}
|
|
13050
13046
|
return !0;
|
|
13051
13047
|
}
|
|
@@ -13058,10 +13054,10 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13058
13054
|
if (!ut(e.doc, l.pos, 2))
|
|
13059
13055
|
return !1;
|
|
13060
13056
|
if (r) {
|
|
13061
|
-
const { selection: g, storedMarks: y } = t, { splittableMarks:
|
|
13057
|
+
const { selection: g, storedMarks: y } = t, { splittableMarks: C } = i.extensionManager, E = y || g.$to.parentOffset && g.$from.marks();
|
|
13062
13058
|
if (e.split(l.pos, 2, m).scrollIntoView(), !E || !r)
|
|
13063
13059
|
return !0;
|
|
13064
|
-
const P = E.filter((
|
|
13060
|
+
const P = E.filter((N) => C.includes(N.type.name));
|
|
13065
13061
|
e.ensureMarks(P);
|
|
13066
13062
|
}
|
|
13067
13063
|
return !0;
|
|
@@ -13084,15 +13080,15 @@ const Mf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
13084
13080
|
const i = n.doc.nodeAt(r);
|
|
13085
13081
|
return t.node.type === (i == null ? void 0 : i.type) && rt(n.doc, r) && n.join(r), !0;
|
|
13086
13082
|
}, Tf = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
|
|
13087
|
-
const { extensions: u, splittableMarks: h } = i.extensionManager, f = J(n, o.schema), p = J(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to:
|
|
13083
|
+
const { extensions: u, splittableMarks: h } = i.extensionManager, f = J(n, o.schema), p = J(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: C } = m, E = y.blockRange(C), P = g || m.$to.parentOffset && m.$from.marks();
|
|
13088
13084
|
if (!E)
|
|
13089
13085
|
return !1;
|
|
13090
|
-
const
|
|
13091
|
-
if (E.depth >= 1 &&
|
|
13092
|
-
if (
|
|
13086
|
+
const N = Vr((I) => Zi(I.type.name, u))(m);
|
|
13087
|
+
if (E.depth >= 1 && N && E.depth - N.depth <= 1) {
|
|
13088
|
+
if (N.node.type === f)
|
|
13093
13089
|
return c.liftListItem(p);
|
|
13094
|
-
if (Zi(
|
|
13095
|
-
return a().command(() => (s.setNodeMarkup(
|
|
13090
|
+
if (Zi(N.node.type.name, u) && f.validContent(N.node.content) && l)
|
|
13091
|
+
return a().command(() => (s.setNodeMarkup(N.pos, f), !0)).command(() => Qn(s, f)).command(() => er(s, f)).run();
|
|
13096
13092
|
}
|
|
13097
13093
|
return !t || !P || !l ? a().command(() => d().wrapInList(f, r) ? !0 : c.clearNodes()).wrapInList(f, r).command(() => Qn(s, f)).command(() => er(s, f)).run() : a().command(() => {
|
|
13098
13094
|
const I = d().wrapInList(f, r), V = P.filter((S) => h.includes(S.type.name));
|
|
@@ -13229,14 +13225,14 @@ var Ff = /* @__PURE__ */ Object.freeze({
|
|
|
13229
13225
|
wrapIn: Bf,
|
|
13230
13226
|
wrapInList: Lf
|
|
13231
13227
|
});
|
|
13232
|
-
const zf =
|
|
13228
|
+
const zf = fe.create({
|
|
13233
13229
|
name: "commands",
|
|
13234
13230
|
addCommands() {
|
|
13235
13231
|
return {
|
|
13236
13232
|
...Ff
|
|
13237
13233
|
};
|
|
13238
13234
|
}
|
|
13239
|
-
}), Vf =
|
|
13235
|
+
}), Vf = fe.create({
|
|
13240
13236
|
name: "editable",
|
|
13241
13237
|
addProseMirrorPlugins() {
|
|
13242
13238
|
return [
|
|
@@ -13248,7 +13244,7 @@ const zf = he.create({
|
|
|
13248
13244
|
})
|
|
13249
13245
|
];
|
|
13250
13246
|
}
|
|
13251
|
-
}), jf =
|
|
13247
|
+
}), jf = fe.create({
|
|
13252
13248
|
name: "focusEvents",
|
|
13253
13249
|
addProseMirrorPlugins() {
|
|
13254
13250
|
const { editor: n } = this;
|
|
@@ -13272,14 +13268,14 @@ const zf = he.create({
|
|
|
13272
13268
|
})
|
|
13273
13269
|
];
|
|
13274
13270
|
}
|
|
13275
|
-
}), Hf =
|
|
13271
|
+
}), Hf = fe.create({
|
|
13276
13272
|
name: "keymap",
|
|
13277
13273
|
addKeyboardShortcuts() {
|
|
13278
13274
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
13279
13275
|
() => o.undoInputRule(),
|
|
13280
13276
|
// maybe convert first text block node to default node
|
|
13281
13277
|
() => o.command(({ tr: l }) => {
|
|
13282
|
-
const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: h, parent: f } = u, p =
|
|
13278
|
+
const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: h, parent: f } = u, p = T.atStart(c).from === h;
|
|
13283
13279
|
return !d || !p || !f.type.isTextblock || f.textContent.length ? !1 : o.clearNodes();
|
|
13284
13280
|
}),
|
|
13285
13281
|
() => o.deleteSelection(),
|
|
@@ -13317,7 +13313,7 @@ const zf = he.create({
|
|
|
13317
13313
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
13318
13314
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
13319
13315
|
};
|
|
13320
|
-
return Tn() ||
|
|
13316
|
+
return Tn() || Ho() ? s : i;
|
|
13321
13317
|
},
|
|
13322
13318
|
addProseMirrorPlugins() {
|
|
13323
13319
|
return [
|
|
@@ -13331,7 +13327,7 @@ const zf = he.create({
|
|
|
13331
13327
|
appendTransaction: (n, e, t) => {
|
|
13332
13328
|
if (!(n.some((p) => p.docChanged) && !e.doc.eq(t.doc)))
|
|
13333
13329
|
return;
|
|
13334
|
-
const { empty: i, from: s, to: o } = e.selection, l =
|
|
13330
|
+
const { empty: i, from: s, to: o } = e.selection, l = T.atStart(e.doc).from, a = T.atEnd(e.doc).to;
|
|
13335
13331
|
if (i || !(s === l && o === a) || !(t.doc.textBetween(0, t.doc.content.size, " ", " ").length === 0))
|
|
13336
13332
|
return;
|
|
13337
13333
|
const u = t.tr, h = vn({
|
|
@@ -13347,7 +13343,7 @@ const zf = he.create({
|
|
|
13347
13343
|
})
|
|
13348
13344
|
];
|
|
13349
13345
|
}
|
|
13350
|
-
}), $f =
|
|
13346
|
+
}), $f = fe.create({
|
|
13351
13347
|
name: "tabindex",
|
|
13352
13348
|
addProseMirrorPlugins() {
|
|
13353
13349
|
return [
|
|
@@ -13544,7 +13540,7 @@ let Jf = class extends rh {
|
|
|
13544
13540
|
* @param handlePlugins Control how to merge the plugin into the existing plugins.
|
|
13545
13541
|
*/
|
|
13546
13542
|
registerPlugin(e, t) {
|
|
13547
|
-
const r =
|
|
13543
|
+
const r = Lo(t) ? t(e, [...this.state.plugins]) : [...this.state.plugins, e], i = this.state.reconfigure({ plugins: r });
|
|
13548
13544
|
this.view.updateState(i);
|
|
13549
13545
|
}
|
|
13550
13546
|
/**
|
|
@@ -13586,7 +13582,7 @@ let Jf = class extends rh {
|
|
|
13586
13582
|
* Creates a ProseMirror view.
|
|
13587
13583
|
*/
|
|
13588
13584
|
createView() {
|
|
13589
|
-
const e =
|
|
13585
|
+
const e = $o(this.options.content, this.schema, this.options.parseOptions), t = jo(e, this.options.autofocus);
|
|
13590
13586
|
this.view = new Su(this.options.element, {
|
|
13591
13587
|
...this.options.editorProps,
|
|
13592
13588
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
@@ -13688,7 +13684,7 @@ let Jf = class extends rh {
|
|
|
13688
13684
|
return cf(this.state.doc, {
|
|
13689
13685
|
blockSeparator: t,
|
|
13690
13686
|
textSerializers: {
|
|
13691
|
-
...
|
|
13687
|
+
...Vo(this.schema),
|
|
13692
13688
|
...r
|
|
13693
13689
|
}
|
|
13694
13690
|
});
|
|
@@ -13722,7 +13718,7 @@ let Jf = class extends rh {
|
|
|
13722
13718
|
}
|
|
13723
13719
|
};
|
|
13724
13720
|
function es(n) {
|
|
13725
|
-
return new
|
|
13721
|
+
return new Fo({
|
|
13726
13722
|
find: n.find,
|
|
13727
13723
|
handler: ({ state: e, range: t, match: r }) => {
|
|
13728
13724
|
const i = M(n.getAttributes, void 0, r) || {}, { tr: s } = e, o = t.from;
|
|
@@ -13739,7 +13735,7 @@ function es(n) {
|
|
|
13739
13735
|
});
|
|
13740
13736
|
}
|
|
13741
13737
|
function ts(n) {
|
|
13742
|
-
return new
|
|
13738
|
+
return new Fo({
|
|
13743
13739
|
find: n.find,
|
|
13744
13740
|
handler: ({ state: e, range: t, match: r }) => {
|
|
13745
13741
|
const i = e.doc.resolve(t.from), s = M(n.getAttributes, void 0, r) || {};
|
|
@@ -13853,8 +13849,8 @@ class Uf {
|
|
|
13853
13849
|
return;
|
|
13854
13850
|
let h = 0, f = 0;
|
|
13855
13851
|
if (this.dom !== u) {
|
|
13856
|
-
const g = this.dom.getBoundingClientRect(), y = u.getBoundingClientRect(),
|
|
13857
|
-
h = y.x - g.x +
|
|
13852
|
+
const g = this.dom.getBoundingClientRect(), y = u.getBoundingClientRect(), C = (i = e.offsetX) !== null && i !== void 0 ? i : (s = e.nativeEvent) === null || s === void 0 ? void 0 : s.offsetX, E = (o = e.offsetY) !== null && o !== void 0 ? o : (l = e.nativeEvent) === null || l === void 0 ? void 0 : l.offsetY;
|
|
13853
|
+
h = y.x - g.x + C, f = y.y - g.y + E;
|
|
13858
13854
|
}
|
|
13859
13855
|
(a = e.dataTransfer) === null || a === void 0 || a.setDragImage(this.dom, h, f);
|
|
13860
13856
|
const p = v.create(c.state.doc, this.getPos()), m = c.state.tr.setSelection(p);
|
|
@@ -13955,7 +13951,7 @@ class Yf {
|
|
|
13955
13951
|
if (m || !a && !c)
|
|
13956
13952
|
return;
|
|
13957
13953
|
this.createTooltip();
|
|
13958
|
-
const { ranges:
|
|
13954
|
+
const { ranges: C } = g, E = Math.min(...C.map((I) => I.$from.pos)), P = Math.max(...C.map((I) => I.$to.pos));
|
|
13959
13955
|
if (!((u = this.shouldShow) === null || u === void 0 ? void 0 : u.call(this, {
|
|
13960
13956
|
editor: this.editor,
|
|
13961
13957
|
view: l,
|
|
@@ -13975,7 +13971,7 @@ class Yf {
|
|
|
13975
13971
|
if (V && (I = V.firstChild), I)
|
|
13976
13972
|
return I.getBoundingClientRect();
|
|
13977
13973
|
}
|
|
13978
|
-
return
|
|
13974
|
+
return Ko(l, E, P);
|
|
13979
13975
|
})
|
|
13980
13976
|
}), this.show();
|
|
13981
13977
|
}, this.editor = e, this.element = t, this.view = r, this.updateDelay = s, o && (this.shouldShow = o), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = i, this.element.remove(), this.element.style.visibility = "visible";
|
|
@@ -14015,11 +14011,11 @@ class Yf {
|
|
|
14015
14011
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
14016
14012
|
}
|
|
14017
14013
|
}
|
|
14018
|
-
const
|
|
14014
|
+
const Wo = (n) => new se({
|
|
14019
14015
|
key: typeof n.pluginKey == "string" ? new ae(n.pluginKey) : n.pluginKey,
|
|
14020
14016
|
view: (e) => new Yf({ view: e, ...n })
|
|
14021
14017
|
});
|
|
14022
|
-
|
|
14018
|
+
fe.create({
|
|
14023
14019
|
name: "bubbleMenu",
|
|
14024
14020
|
addOptions() {
|
|
14025
14021
|
return {
|
|
@@ -14032,7 +14028,7 @@ he.create({
|
|
|
14032
14028
|
},
|
|
14033
14029
|
addProseMirrorPlugins() {
|
|
14034
14030
|
return this.options.element ? [
|
|
14035
|
-
|
|
14031
|
+
Wo({
|
|
14036
14032
|
pluginKey: this.options.pluginKey,
|
|
14037
14033
|
editor: this.editor,
|
|
14038
14034
|
element: this.options.element,
|
|
@@ -14091,7 +14087,7 @@ class Xf {
|
|
|
14091
14087
|
return;
|
|
14092
14088
|
}
|
|
14093
14089
|
(i = this.tippy) === null || i === void 0 || i.setProps({
|
|
14094
|
-
getReferenceClientRect: ((s = this.tippyOptions) === null || s === void 0 ? void 0 : s.getReferenceClientRect) || (() =>
|
|
14090
|
+
getReferenceClientRect: ((s = this.tippyOptions) === null || s === void 0 ? void 0 : s.getReferenceClientRect) || (() => Ko(e, c, d))
|
|
14095
14091
|
}), this.show();
|
|
14096
14092
|
}
|
|
14097
14093
|
show() {
|
|
@@ -14107,11 +14103,11 @@ class Xf {
|
|
|
14107
14103
|
!((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
14108
14104
|
}
|
|
14109
14105
|
}
|
|
14110
|
-
const
|
|
14106
|
+
const Jo = (n) => new se({
|
|
14111
14107
|
key: typeof n.pluginKey == "string" ? new ae(n.pluginKey) : n.pluginKey,
|
|
14112
14108
|
view: (e) => new Xf({ view: e, ...n })
|
|
14113
14109
|
});
|
|
14114
|
-
|
|
14110
|
+
fe.create({
|
|
14115
14111
|
name: "floatingMenu",
|
|
14116
14112
|
addOptions() {
|
|
14117
14113
|
return {
|
|
@@ -14123,7 +14119,7 @@ he.create({
|
|
|
14123
14119
|
},
|
|
14124
14120
|
addProseMirrorPlugins() {
|
|
14125
14121
|
return this.options.element ? [
|
|
14126
|
-
|
|
14122
|
+
Jo({
|
|
14127
14123
|
pluginKey: this.options.pluginKey,
|
|
14128
14124
|
editor: this.editor,
|
|
14129
14125
|
element: this.options.element,
|
|
@@ -14159,9 +14155,9 @@ xt({
|
|
|
14159
14155
|
},
|
|
14160
14156
|
setup(n, { slots: e }) {
|
|
14161
14157
|
const t = mn(null);
|
|
14162
|
-
return
|
|
14158
|
+
return hs(() => {
|
|
14163
14159
|
const { updateDelay: r, editor: i, pluginKey: s, shouldShow: o, tippyOptions: l } = n;
|
|
14164
|
-
i.registerPlugin(
|
|
14160
|
+
i.registerPlugin(Wo({
|
|
14165
14161
|
updateDelay: r,
|
|
14166
14162
|
editor: i,
|
|
14167
14163
|
element: t.value,
|
|
@@ -14194,7 +14190,7 @@ function rs(n) {
|
|
|
14194
14190
|
}
|
|
14195
14191
|
class Zf extends Jf {
|
|
14196
14192
|
constructor(e = {}) {
|
|
14197
|
-
return super(e), this.vueRenderers =
|
|
14193
|
+
return super(e), this.vueRenderers = fs(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = rs(this.view.state), this.reactiveExtensionStorage = rs(this.extensionStorage), this.on("transaction", () => {
|
|
14198
14194
|
this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
14199
14195
|
}), gn(this);
|
|
14200
14196
|
}
|
|
@@ -14252,7 +14248,7 @@ const Qf = xt({
|
|
|
14252
14248
|
render() {
|
|
14253
14249
|
const n = [];
|
|
14254
14250
|
return this.editor && this.editor.vueRenderers.forEach((e) => {
|
|
14255
|
-
const t = Ke(
|
|
14251
|
+
const t = Ke(us, {
|
|
14256
14252
|
to: e.teleportElement,
|
|
14257
14253
|
key: e.id
|
|
14258
14254
|
}, Ke(e.component, {
|
|
@@ -14291,9 +14287,9 @@ xt({
|
|
|
14291
14287
|
},
|
|
14292
14288
|
setup(n, { slots: e }) {
|
|
14293
14289
|
const t = mn(null);
|
|
14294
|
-
return
|
|
14290
|
+
return hs(() => {
|
|
14295
14291
|
const { pluginKey: r, editor: i, tippyOptions: s, shouldShow: o } = n;
|
|
14296
|
-
i.registerPlugin(
|
|
14292
|
+
i.registerPlugin(Jo({
|
|
14297
14293
|
pluginKey: r,
|
|
14298
14294
|
editor: i,
|
|
14299
14295
|
element: t.value,
|
|
@@ -14325,7 +14321,7 @@ xt({
|
|
|
14325
14321
|
});
|
|
14326
14322
|
}
|
|
14327
14323
|
});
|
|
14328
|
-
const
|
|
14324
|
+
const Uo = xt({
|
|
14329
14325
|
props: {
|
|
14330
14326
|
as: {
|
|
14331
14327
|
type: String,
|
|
@@ -14349,7 +14345,7 @@ const Jo = xt({
|
|
|
14349
14345
|
});
|
|
14350
14346
|
class jr {
|
|
14351
14347
|
constructor(e, { props: t = {}, editor: r }) {
|
|
14352
|
-
if (this.id = Math.floor(Math.random() * 4294967295).toString(), this.editor = r, this.component = gn(e), this.teleportElement = document.createElement("div"), this.element = this.teleportElement, this.props =
|
|
14348
|
+
if (this.id = Math.floor(Math.random() * 4294967295).toString(), this.editor = r, this.component = gn(e), this.teleportElement = document.createElement("div"), this.element = this.teleportElement, this.props = fs(t), this.editor.vueRenderers.set(this.id, this), this.editor.contentComponent) {
|
|
14353
14349
|
if (this.editor.contentComponent.update(), this.teleportElement.children.length !== 1)
|
|
14354
14350
|
throw Error("VueRenderer doesn’t support multiple child elements.");
|
|
14355
14351
|
this.element = this.teleportElement.firstElementChild;
|
|
@@ -14368,7 +14364,7 @@ class jr {
|
|
|
14368
14364
|
this.editor.vueRenderers.delete(this.id);
|
|
14369
14365
|
}
|
|
14370
14366
|
}
|
|
14371
|
-
const
|
|
14367
|
+
const Go = {
|
|
14372
14368
|
editor: {
|
|
14373
14369
|
type: Object,
|
|
14374
14370
|
required: !0
|
|
@@ -14481,7 +14477,7 @@ class ep extends Uf {
|
|
|
14481
14477
|
this.renderer.destroy();
|
|
14482
14478
|
}
|
|
14483
14479
|
}
|
|
14484
|
-
function
|
|
14480
|
+
function Yo(n, e) {
|
|
14485
14481
|
return (t) => t.editor.contentComponent ? new ep(n, t, e) : {};
|
|
14486
14482
|
}
|
|
14487
14483
|
const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = Ce.create({
|
|
@@ -14603,7 +14599,7 @@ const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = Ce.create({
|
|
|
14603
14599
|
if (!t || !s)
|
|
14604
14600
|
return !1;
|
|
14605
14601
|
const { tr: o } = n.state;
|
|
14606
|
-
return o.replaceSelectionWith(this.type.create({ language: s })), o.setSelection(
|
|
14602
|
+
return o.replaceSelectionWith(this.type.create({ language: s })), o.setSelection(D.near(o.doc.resolve(Math.max(0, o.selection.from - 2)))), o.insertText(t.replace(/\r\n?/g, `
|
|
14607
14603
|
`)), o.setMeta("paste", !0), n.dispatch(o), !0;
|
|
14608
14604
|
}
|
|
14609
14605
|
}
|
|
@@ -14691,7 +14687,7 @@ const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = Ce.create({
|
|
|
14691
14687
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
14692
14688
|
};
|
|
14693
14689
|
}
|
|
14694
|
-
}), lp =
|
|
14690
|
+
}), lp = fe.create({
|
|
14695
14691
|
name: "placeholder",
|
|
14696
14692
|
addOptions() {
|
|
14697
14693
|
return {
|
|
@@ -14742,16 +14738,16 @@ const tp = /^```([a-z]+)?[\s\n]$/, np = /^~~~([a-z]+)?[\s\n]$/, rp = Ce.create({
|
|
|
14742
14738
|
}), cp = {
|
|
14743
14739
|
name: "EmojiComponent",
|
|
14744
14740
|
components: {
|
|
14745
|
-
NodeViewWrapper:
|
|
14746
|
-
DtEmoji:
|
|
14741
|
+
NodeViewWrapper: Uo,
|
|
14742
|
+
DtEmoji: ms
|
|
14747
14743
|
},
|
|
14748
|
-
props:
|
|
14744
|
+
props: Go
|
|
14749
14745
|
};
|
|
14750
14746
|
function dp(n, e, t, r, i, s) {
|
|
14751
|
-
const o =
|
|
14752
|
-
return
|
|
14753
|
-
default:
|
|
14754
|
-
|
|
14747
|
+
const o = A("dt-emoji"), l = A("node-view-wrapper");
|
|
14748
|
+
return w(), L(l, { class: "d-d-inline-block" }, {
|
|
14749
|
+
default: O(() => [
|
|
14750
|
+
F(o, {
|
|
14755
14751
|
size: "300",
|
|
14756
14752
|
code: n.node.attrs.code
|
|
14757
14753
|
}, null, 8, ["code"])
|
|
@@ -14783,15 +14779,15 @@ function hp(n) {
|
|
|
14783
14779
|
} : null;
|
|
14784
14780
|
}
|
|
14785
14781
|
const fp = new ae("suggestion");
|
|
14786
|
-
function
|
|
14782
|
+
function Xo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
|
|
14787
14783
|
let h;
|
|
14788
14784
|
const f = d == null ? void 0 : d(), p = new se({
|
|
14789
14785
|
key: n,
|
|
14790
14786
|
view() {
|
|
14791
14787
|
return {
|
|
14792
14788
|
update: async (m, g) => {
|
|
14793
|
-
var y,
|
|
14794
|
-
const S = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (
|
|
14789
|
+
var y, C, E, P, N, I, V;
|
|
14790
|
+
const S = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (C = this.key) === null || C === void 0 ? void 0 : C.getState(m.state), ye = S.active && j.active && S.range.from !== j.range.from, Kt = !S.active && j.active, Hr = S.active && !j.active, tl = !Kt && !Hr && S.query !== j.query, Ct = Kt || ye, Wt = tl && !ye, An = Hr || ye;
|
|
14795
14791
|
if (!Ct && !Wt && !An)
|
|
14796
14792
|
return;
|
|
14797
14793
|
const it = An && !Ct ? S : j, $r = m.dom.querySelector(`[data-decoration-id="${it.decorationId}"]`);
|
|
@@ -14813,13 +14809,13 @@ function Yo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14813
14809
|
// this can be used for building popups without a DOM node
|
|
14814
14810
|
clientRect: $r ? () => {
|
|
14815
14811
|
var vt;
|
|
14816
|
-
const { decorationId:
|
|
14812
|
+
const { decorationId: nl } = (vt = this.key) === null || vt === void 0 ? void 0 : vt.getState(e.state), Dn = m.dom.querySelector(`[data-decoration-id="${nl}"]`);
|
|
14817
14813
|
return (Dn == null ? void 0 : Dn.getBoundingClientRect()) || null;
|
|
14818
14814
|
} : null
|
|
14819
14815
|
}, Ct && ((E = f == null ? void 0 : f.onBeforeStart) === null || E === void 0 || E.call(f, h)), Wt && ((P = f == null ? void 0 : f.onBeforeUpdate) === null || P === void 0 || P.call(f, h)), (Wt || Ct) && (h.items = await c({
|
|
14820
14816
|
editor: e,
|
|
14821
14817
|
query: it.query
|
|
14822
|
-
})), An && ((
|
|
14818
|
+
})), An && ((N = f == null ? void 0 : f.onExit) === null || N === void 0 || N.call(f, h)), Wt && ((I = f == null ? void 0 : f.onUpdate) === null || I === void 0 || I.call(f, h)), Ct && ((V = f == null ? void 0 : f.onStart) === null || V === void 0 || V.call(f, h));
|
|
14823
14819
|
},
|
|
14824
14820
|
destroy: () => {
|
|
14825
14821
|
var m;
|
|
@@ -14842,8 +14838,8 @@ function Yo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14842
14838
|
};
|
|
14843
14839
|
},
|
|
14844
14840
|
// Apply changes to the plugin state from a view transaction.
|
|
14845
|
-
apply(m, g, y,
|
|
14846
|
-
const { isEditable: E } = e, { composing: P } = e.view, { selection:
|
|
14841
|
+
apply(m, g, y, C) {
|
|
14842
|
+
const { isEditable: E } = e, { composing: P } = e.view, { selection: N } = m, { empty: I, from: V } = N, S = { ...g };
|
|
14847
14843
|
if (S.composing = P, E && (I || e.view.composing)) {
|
|
14848
14844
|
(V < g.range.from || V > g.range.to) && !P && !g.composing && (S.active = !1);
|
|
14849
14845
|
const j = hp({
|
|
@@ -14851,9 +14847,9 @@ function Yo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14851
14847
|
allowSpaces: r,
|
|
14852
14848
|
allowedPrefixes: i,
|
|
14853
14849
|
startOfLine: s,
|
|
14854
|
-
$position:
|
|
14855
|
-
}),
|
|
14856
|
-
j && u({ editor: e, state:
|
|
14850
|
+
$position: N.$from
|
|
14851
|
+
}), ye = `id_${Math.floor(Math.random() * 4294967295)}`;
|
|
14852
|
+
j && u({ editor: e, state: C, range: j.range }) ? (S.active = !0, S.decorationId = g.decorationId ? g.decorationId : ye, S.range = j.range, S.query = j.query, S.text = j.text) : S.active = !1;
|
|
14857
14853
|
} else
|
|
14858
14854
|
S.active = !1;
|
|
14859
14855
|
return S.active || (S.decorationId = null, S.range = { from: 0, to: 0 }, S.query = null, S.text = null), S;
|
|
@@ -14863,17 +14859,17 @@ function Yo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14863
14859
|
// Call the keydown hook if suggestion is active.
|
|
14864
14860
|
handleKeyDown(m, g) {
|
|
14865
14861
|
var y;
|
|
14866
|
-
const { active:
|
|
14867
|
-
return
|
|
14862
|
+
const { active: C, range: E } = p.getState(m.state);
|
|
14863
|
+
return C && ((y = f == null ? void 0 : f.onKeyDown) === null || y === void 0 ? void 0 : y.call(f, { view: m, event: g, range: E })) || !1;
|
|
14868
14864
|
},
|
|
14869
14865
|
// Setup decorator on the currently active suggestion.
|
|
14870
14866
|
decorations(m) {
|
|
14871
|
-
const { active: g, range: y, decorationId:
|
|
14867
|
+
const { active: g, range: y, decorationId: C } = p.getState(m);
|
|
14872
14868
|
return g ? H.create(m.doc, [
|
|
14873
14869
|
le.inline(y.from, y.to, {
|
|
14874
14870
|
nodeName: o,
|
|
14875
14871
|
class: l,
|
|
14876
|
-
"data-decoration-id":
|
|
14872
|
+
"data-decoration-id": C
|
|
14877
14873
|
})
|
|
14878
14874
|
]) : null;
|
|
14879
14875
|
}
|
|
@@ -14884,7 +14880,7 @@ function Yo({ pluginKey: n = fp, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
14884
14880
|
const pp = {
|
|
14885
14881
|
name: "SuggestionList",
|
|
14886
14882
|
components: {
|
|
14887
|
-
DtListItem:
|
|
14883
|
+
DtListItem: Ia
|
|
14888
14884
|
},
|
|
14889
14885
|
props: {
|
|
14890
14886
|
items: {
|
|
@@ -14916,7 +14912,7 @@ const pp = {
|
|
|
14916
14912
|
},
|
|
14917
14913
|
methods: {
|
|
14918
14914
|
onKeyDown({ event: n }) {
|
|
14919
|
-
return n.key === "ArrowUp" ? (this.upHandler(), !0) : n.key === "ArrowDown" ? (this.downHandler(), !0) : n.key === "Enter" ? (this.enterHandler(), !0) : !1;
|
|
14915
|
+
return n.key === "ArrowUp" ? (this.upHandler(), !0) : n.key === "ArrowDown" ? (this.downHandler(), !0) : n.key === "Enter" ? (this.enterHandler(), n.stopPropagation(), !0) : !1;
|
|
14920
14916
|
},
|
|
14921
14917
|
upHandler() {
|
|
14922
14918
|
this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
|
|
@@ -14951,10 +14947,10 @@ const pp = {
|
|
|
14951
14947
|
class: "dt-suggestion-list"
|
|
14952
14948
|
};
|
|
14953
14949
|
function yp(n, e, t, r, i, s) {
|
|
14954
|
-
const o =
|
|
14955
|
-
return
|
|
14950
|
+
const o = A("dt-list-item");
|
|
14951
|
+
return w(), B("div", mp, [
|
|
14956
14952
|
bl(G("ul", gp, [
|
|
14957
|
-
(
|
|
14953
|
+
(w(!0), B(ps, null, ds(t.items, (l, a) => (w(), L(o, {
|
|
14958
14954
|
key: l.id,
|
|
14959
14955
|
class: $([
|
|
14960
14956
|
"dt-suggestion-list--item",
|
|
@@ -14964,8 +14960,8 @@ function yp(n, e, t, r, i, s) {
|
|
|
14964
14960
|
onClick: (c) => s.selectItem(a),
|
|
14965
14961
|
onKeydown: dt(s.onKeyDown, ["prevent", "stop"])
|
|
14966
14962
|
}, {
|
|
14967
|
-
default:
|
|
14968
|
-
(
|
|
14963
|
+
default: O(() => [
|
|
14964
|
+
(w(), L(Xe(t.itemComponent), { item: l }, null, 8, ["item"]))
|
|
14969
14965
|
]),
|
|
14970
14966
|
_: 2
|
|
14971
14967
|
}, 1032, ["class", "onClick", "onKeydown"]))), 128))
|
|
@@ -14974,11 +14970,11 @@ function yp(n, e, t, r, i, s) {
|
|
|
14974
14970
|
])
|
|
14975
14971
|
]);
|
|
14976
14972
|
}
|
|
14977
|
-
const
|
|
14973
|
+
const Zo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
|
|
14978
14974
|
name: "EmojiSuggestion",
|
|
14979
14975
|
components: {
|
|
14980
|
-
DtEmoji:
|
|
14981
|
-
DtStack:
|
|
14976
|
+
DtEmoji: ms,
|
|
14977
|
+
DtStack: Ss
|
|
14982
14978
|
},
|
|
14983
14979
|
props: {
|
|
14984
14980
|
item: {
|
|
@@ -14988,17 +14984,17 @@ const Xo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
|
|
|
14988
14984
|
}
|
|
14989
14985
|
};
|
|
14990
14986
|
function kp(n, e, t, r, i, s) {
|
|
14991
|
-
const o =
|
|
14992
|
-
return
|
|
14987
|
+
const o = A("dt-emoji"), l = A("dt-stack");
|
|
14988
|
+
return w(), L(l, {
|
|
14993
14989
|
direction: "row",
|
|
14994
14990
|
gap: "400"
|
|
14995
14991
|
}, {
|
|
14996
|
-
default:
|
|
14997
|
-
|
|
14992
|
+
default: O(() => [
|
|
14993
|
+
F(o, {
|
|
14998
14994
|
size: "200",
|
|
14999
14995
|
code: t.item.code
|
|
15000
14996
|
}, null, 8, ["code"]),
|
|
15001
|
-
$t(" " +
|
|
14997
|
+
$t(" " + ue(t.item.code), 1)
|
|
15002
14998
|
]),
|
|
15003
14999
|
_: 1
|
|
15004
15000
|
});
|
|
@@ -15025,7 +15021,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
15025
15021
|
let n, e;
|
|
15026
15022
|
return {
|
|
15027
15023
|
onStart: (t) => {
|
|
15028
|
-
n = new jr(
|
|
15024
|
+
n = new jr(Zo, {
|
|
15029
15025
|
props: {
|
|
15030
15026
|
itemComponent: gn(Sp),
|
|
15031
15027
|
itemType: "emoji",
|
|
@@ -15059,13 +15055,13 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
15059
15055
|
};
|
|
15060
15056
|
}
|
|
15061
15057
|
}, wp = new ae("emoji"), Cp = /:\w+:$/, vp = /:\w+:/g, Ep = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Mp = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, is = (n) => {
|
|
15062
|
-
if (n &&
|
|
15058
|
+
if (n && gs(n[0]))
|
|
15063
15059
|
return {
|
|
15064
15060
|
index: n.index,
|
|
15065
15061
|
text: n[0],
|
|
15066
15062
|
match: n
|
|
15067
15063
|
};
|
|
15068
|
-
}, Op = (n) => [...n.matchAll(vp)].filter((t) =>
|
|
15064
|
+
}, Op = (n) => [...n.matchAll(vp)].filter((t) => gs(t[0])).map((t) => ({
|
|
15069
15065
|
index: t.index,
|
|
15070
15066
|
text: t[0],
|
|
15071
15067
|
match: t
|
|
@@ -15084,7 +15080,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
15084
15080
|
inline: !0,
|
|
15085
15081
|
selectable: !0,
|
|
15086
15082
|
addNodeView() {
|
|
15087
|
-
return
|
|
15083
|
+
return Yo(up);
|
|
15088
15084
|
},
|
|
15089
15085
|
addAttributes() {
|
|
15090
15086
|
return {
|
|
@@ -15164,7 +15160,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
|
|
|
15164
15160
|
},
|
|
15165
15161
|
addProseMirrorPlugins() {
|
|
15166
15162
|
return [
|
|
15167
|
-
|
|
15163
|
+
Xo({
|
|
15168
15164
|
editor: this.editor,
|
|
15169
15165
|
...this.options.suggestion,
|
|
15170
15166
|
...xp
|
|
@@ -15221,7 +15217,7 @@ function Pp(n, e, t, r) {
|
|
|
15221
15217
|
for (const l of o)
|
|
15222
15218
|
l.mark.type === r && t.removeMark(l.from, l.to, r);
|
|
15223
15219
|
}
|
|
15224
|
-
const ss =
|
|
15220
|
+
const ss = dl(1, 15);
|
|
15225
15221
|
function ls(n, e, t, r, i, s) {
|
|
15226
15222
|
if (!n)
|
|
15227
15223
|
return;
|
|
@@ -15238,7 +15234,7 @@ function ls(n, e, t, r, i, s) {
|
|
|
15238
15234
|
"right",
|
|
15239
15235
|
ss
|
|
15240
15236
|
), d = n.slice(a.from, c.to);
|
|
15241
|
-
Np(d,
|
|
15237
|
+
Np(d, ul, Ap).forEach((h) => {
|
|
15242
15238
|
const f = Dp(h[0]), p = e + a.from + h.index + 1, m = p + f.length;
|
|
15243
15239
|
i.addMark(p, m, s.create());
|
|
15244
15240
|
});
|
|
@@ -15392,20 +15388,19 @@ const _p = {
|
|
|
15392
15388
|
},
|
|
15393
15389
|
addProseMirrorPlugins() {
|
|
15394
15390
|
return [
|
|
15395
|
-
|
|
15391
|
+
Xo({
|
|
15396
15392
|
editor: this.editor,
|
|
15397
15393
|
...this.options.suggestion
|
|
15398
15394
|
})
|
|
15399
15395
|
];
|
|
15400
15396
|
}
|
|
15401
|
-
})
|
|
15402
|
-
const zp = {
|
|
15397
|
+
}), zp = {
|
|
15403
15398
|
name: "MentionComponent",
|
|
15404
15399
|
components: {
|
|
15405
|
-
NodeViewWrapper:
|
|
15406
|
-
DtLink:
|
|
15400
|
+
NodeViewWrapper: Uo,
|
|
15401
|
+
DtLink: xa
|
|
15407
15402
|
},
|
|
15408
|
-
props:
|
|
15403
|
+
props: Go,
|
|
15409
15404
|
computed: {
|
|
15410
15405
|
text() {
|
|
15411
15406
|
return "@" + this.$props.node.attrs.name;
|
|
@@ -15413,16 +15408,16 @@ const zp = {
|
|
|
15413
15408
|
}
|
|
15414
15409
|
};
|
|
15415
15410
|
function Vp(n, e, t, r, i, s) {
|
|
15416
|
-
const o =
|
|
15417
|
-
return
|
|
15418
|
-
default:
|
|
15419
|
-
|
|
15411
|
+
const o = A("dt-link"), l = A("node-view-wrapper");
|
|
15412
|
+
return w(), L(l, { class: "d-d-inline-block" }, {
|
|
15413
|
+
default: O(() => [
|
|
15414
|
+
F(o, {
|
|
15420
15415
|
kind: "inverted",
|
|
15421
15416
|
class: "dt-link--mention",
|
|
15422
15417
|
href: null
|
|
15423
15418
|
}, {
|
|
15424
|
-
default:
|
|
15425
|
-
$t(
|
|
15419
|
+
default: O(() => [
|
|
15420
|
+
$t(ue(s.text), 1)
|
|
15426
15421
|
]),
|
|
15427
15422
|
_: 1
|
|
15428
15423
|
})
|
|
@@ -15432,7 +15427,7 @@ function Vp(n, e, t, r, i, s) {
|
|
|
15432
15427
|
}
|
|
15433
15428
|
const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
|
|
15434
15429
|
addNodeView() {
|
|
15435
|
-
return
|
|
15430
|
+
return Yo(jp);
|
|
15436
15431
|
},
|
|
15437
15432
|
parseHTML() {
|
|
15438
15433
|
return [
|
|
@@ -15460,11 +15455,11 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
|
|
|
15460
15455
|
renderHTML({ HTMLAttributes: n }) {
|
|
15461
15456
|
return ["mention-component", Fe(this.options.HTMLAttributes, n), 0];
|
|
15462
15457
|
}
|
|
15463
|
-
}),
|
|
15458
|
+
}), Qo = [
|
|
15464
15459
|
"text",
|
|
15465
15460
|
"json",
|
|
15466
15461
|
"html"
|
|
15467
|
-
],
|
|
15462
|
+
], el = [
|
|
15468
15463
|
"start",
|
|
15469
15464
|
"end",
|
|
15470
15465
|
"all"
|
|
@@ -15472,7 +15467,7 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
|
|
|
15472
15467
|
name: "MentionSuggestion",
|
|
15473
15468
|
components: {
|
|
15474
15469
|
DtAvatar: Jl,
|
|
15475
|
-
DtStack:
|
|
15470
|
+
DtStack: Ss
|
|
15476
15471
|
},
|
|
15477
15472
|
props: {
|
|
15478
15473
|
item: {
|
|
@@ -15490,18 +15485,18 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
|
|
|
15490
15485
|
}
|
|
15491
15486
|
};
|
|
15492
15487
|
function qp(n, e, t, r, i, s) {
|
|
15493
|
-
const o =
|
|
15494
|
-
return
|
|
15488
|
+
const o = A("dt-avatar"), l = A("dt-stack");
|
|
15489
|
+
return w(), L(l, {
|
|
15495
15490
|
direction: "row",
|
|
15496
15491
|
gap: "400"
|
|
15497
15492
|
}, {
|
|
15498
|
-
default:
|
|
15499
|
-
|
|
15493
|
+
default: O(() => [
|
|
15494
|
+
F(o, {
|
|
15500
15495
|
"full-name": s.name,
|
|
15501
15496
|
"image-src": s.avatarSrc,
|
|
15502
15497
|
size: "xs"
|
|
15503
15498
|
}, null, 8, ["full-name", "image-src"]),
|
|
15504
|
-
$t(" " +
|
|
15499
|
+
$t(" " + ue(s.name), 1)
|
|
15505
15500
|
]),
|
|
15506
15501
|
_: 1
|
|
15507
15502
|
});
|
|
@@ -15514,7 +15509,7 @@ const Kp = /* @__PURE__ */ q($p, [["render", qp]]), Wp = {
|
|
|
15514
15509
|
let n, e;
|
|
15515
15510
|
return {
|
|
15516
15511
|
onStart: (t) => {
|
|
15517
|
-
n = new jr(
|
|
15512
|
+
n = new jr(Zo, {
|
|
15518
15513
|
// // using vue 2:
|
|
15519
15514
|
// parent: this,
|
|
15520
15515
|
// propsData: props,
|
|
@@ -15549,8 +15544,7 @@ const Kp = /* @__PURE__ */ q($p, [["render", qp]]), Wp = {
|
|
|
15549
15544
|
}
|
|
15550
15545
|
};
|
|
15551
15546
|
}
|
|
15552
|
-
}
|
|
15553
|
-
const Jp = {
|
|
15547
|
+
}, Jp = {
|
|
15554
15548
|
name: "DtRichTextEditor",
|
|
15555
15549
|
components: {
|
|
15556
15550
|
EditorContent: Qf
|
|
@@ -15602,7 +15596,7 @@ const Jp = {
|
|
|
15602
15596
|
type: [Boolean, String, Number],
|
|
15603
15597
|
default: !1,
|
|
15604
15598
|
validator(n) {
|
|
15605
|
-
return typeof n == "string" ?
|
|
15599
|
+
return typeof n == "string" ? el.includes(n) : !0;
|
|
15606
15600
|
}
|
|
15607
15601
|
},
|
|
15608
15602
|
/**
|
|
@@ -15615,7 +15609,7 @@ const Jp = {
|
|
|
15615
15609
|
type: String,
|
|
15616
15610
|
default: "text",
|
|
15617
15611
|
validator(n) {
|
|
15618
|
-
return
|
|
15612
|
+
return Qo.includes(n);
|
|
15619
15613
|
}
|
|
15620
15614
|
},
|
|
15621
15615
|
/**
|
|
@@ -15799,24 +15793,23 @@ const Jp = {
|
|
|
15799
15793
|
}
|
|
15800
15794
|
};
|
|
15801
15795
|
function Up(n, e, t, r, i, s) {
|
|
15802
|
-
const o =
|
|
15803
|
-
return
|
|
15796
|
+
const o = A("editor-content");
|
|
15797
|
+
return w(), L(o, {
|
|
15804
15798
|
editor: i.editor,
|
|
15805
15799
|
"data-qa": "dt-rich-text-editor"
|
|
15806
15800
|
}, null, 8, ["editor"]);
|
|
15807
15801
|
}
|
|
15808
|
-
const Gp = /* @__PURE__ */ q(Jp, [["render", Up]])
|
|
15809
|
-
const Yp = {
|
|
15802
|
+
const Gp = /* @__PURE__ */ q(Jp, [["render", Up]]), Yp = {
|
|
15810
15803
|
name: "DtRecipeMessageInput",
|
|
15811
15804
|
components: {
|
|
15812
15805
|
DtButton: yn,
|
|
15813
15806
|
DtEmojiPicker: Ml,
|
|
15814
15807
|
DtIcon: nt,
|
|
15815
15808
|
DtInput: Ol,
|
|
15816
|
-
DtNotice:
|
|
15817
|
-
DtPopover:
|
|
15809
|
+
DtNotice: pa,
|
|
15810
|
+
DtPopover: Wa,
|
|
15818
15811
|
DtRichTextEditor: Gp,
|
|
15819
|
-
DtTooltip:
|
|
15812
|
+
DtTooltip: hl
|
|
15820
15813
|
},
|
|
15821
15814
|
mixins: [],
|
|
15822
15815
|
inheritAttrs: !1,
|
|
@@ -15868,7 +15861,7 @@ const Yp = {
|
|
|
15868
15861
|
type: [Boolean, String, Number],
|
|
15869
15862
|
default: !1,
|
|
15870
15863
|
validator(n) {
|
|
15871
|
-
return typeof n == "string" ?
|
|
15864
|
+
return typeof n == "string" ? el.includes(n) : !0;
|
|
15872
15865
|
}
|
|
15873
15866
|
},
|
|
15874
15867
|
/**
|
|
@@ -15881,7 +15874,7 @@ const Yp = {
|
|
|
15881
15874
|
type: String,
|
|
15882
15875
|
default: "text",
|
|
15883
15876
|
validator(n) {
|
|
15884
|
-
return
|
|
15877
|
+
return Qo.includes(n);
|
|
15885
15878
|
}
|
|
15886
15879
|
},
|
|
15887
15880
|
/**
|
|
@@ -16039,6 +16032,34 @@ const Yp = {
|
|
|
16039
16032
|
sendTooltipLabel: {
|
|
16040
16033
|
type: String,
|
|
16041
16034
|
default: "Send"
|
|
16035
|
+
},
|
|
16036
|
+
/**
|
|
16037
|
+
* isEdit
|
|
16038
|
+
*/
|
|
16039
|
+
isEdit: {
|
|
16040
|
+
type: Boolean,
|
|
16041
|
+
default: !1
|
|
16042
|
+
},
|
|
16043
|
+
/**
|
|
16044
|
+
* i18n Save changes button text
|
|
16045
|
+
*/
|
|
16046
|
+
saveChangesButtonText: {
|
|
16047
|
+
type: String,
|
|
16048
|
+
default: "Save changes"
|
|
16049
|
+
},
|
|
16050
|
+
/**
|
|
16051
|
+
* Cancel aria label
|
|
16052
|
+
*/
|
|
16053
|
+
cancelButtonAriaLabel: {
|
|
16054
|
+
type: String,
|
|
16055
|
+
default: "Cancel button"
|
|
16056
|
+
},
|
|
16057
|
+
/**
|
|
16058
|
+
* Cancel button i18n text
|
|
16059
|
+
*/
|
|
16060
|
+
cancelButtonText: {
|
|
16061
|
+
type: String,
|
|
16062
|
+
default: "Cancel"
|
|
16042
16063
|
}
|
|
16043
16064
|
},
|
|
16044
16065
|
emits: [
|
|
@@ -16070,7 +16091,14 @@ const Yp = {
|
|
|
16070
16091
|
* @event notice-close
|
|
16071
16092
|
* @type {Boolean}
|
|
16072
16093
|
*/
|
|
16073
|
-
"notice-close"
|
|
16094
|
+
"notice-close",
|
|
16095
|
+
/**
|
|
16096
|
+
* Fires when cancel button is pressed (only on edit mode)
|
|
16097
|
+
*
|
|
16098
|
+
* @event cancel
|
|
16099
|
+
* @type {Boolean}
|
|
16100
|
+
*/
|
|
16101
|
+
"cancel"
|
|
16074
16102
|
],
|
|
16075
16103
|
data() {
|
|
16076
16104
|
return {
|
|
@@ -16116,6 +16144,9 @@ const Yp = {
|
|
|
16116
16144
|
},
|
|
16117
16145
|
emojiPickerHovered() {
|
|
16118
16146
|
return this.emojiPickerFocus || this.emojiPickerOpened;
|
|
16147
|
+
},
|
|
16148
|
+
sendButtonKind() {
|
|
16149
|
+
return this.isSendDisabled ? "muted" : "default";
|
|
16119
16150
|
}
|
|
16120
16151
|
},
|
|
16121
16152
|
watch: {
|
|
@@ -16156,6 +16187,9 @@ const Yp = {
|
|
|
16156
16187
|
onSend() {
|
|
16157
16188
|
this.isSendDisabled || this.$emit("submit", this.internalInputValue);
|
|
16158
16189
|
},
|
|
16190
|
+
onCancel() {
|
|
16191
|
+
this.$emit("cancel");
|
|
16192
|
+
},
|
|
16159
16193
|
noticeClose() {
|
|
16160
16194
|
this.$emit("notice-close", !0);
|
|
16161
16195
|
},
|
|
@@ -16167,11 +16201,14 @@ const Yp = {
|
|
|
16167
16201
|
key: 0,
|
|
16168
16202
|
class: "d-fc-error d-mr16 d-as-center dt-message-input--remaining-char",
|
|
16169
16203
|
"data-qa": "dt-message-input-character-limit"
|
|
16170
|
-
}, nm = {
|
|
16171
|
-
|
|
16172
|
-
|
|
16173
|
-
|
|
16174
|
-
|
|
16204
|
+
}, nm = { key: 0 }, rm = {
|
|
16205
|
+
key: 0,
|
|
16206
|
+
class: "d-d-flex d-jc-space-between d-h24 d-ai-center"
|
|
16207
|
+
}, im = { "data-qa": "dt-message-input-footer-left" }, sm = { "data-qa": "dt-message-input-footer-right" };
|
|
16208
|
+
function om(n, e, t, r, i, s) {
|
|
16209
|
+
const o = A("dt-icon"), l = A("dt-notice"), a = A("dt-rich-text-editor"), c = A("dt-button"), d = A("dt-input"), u = A("dt-tooltip"), h = A("dt-emoji-picker"), f = A("dt-popover");
|
|
16210
|
+
return w(), B(ps, null, [
|
|
16211
|
+
t.showNotice ? (w(), L(l, {
|
|
16175
16212
|
key: 0,
|
|
16176
16213
|
"data-qa": "dt-message-input-error-notice",
|
|
16177
16214
|
class: $(s.noticeClasses),
|
|
@@ -16179,17 +16216,17 @@ function sm(n, e, t, r, i, s) {
|
|
|
16179
16216
|
"close-button-props": s.computedCloseButtonProps,
|
|
16180
16217
|
onClose: s.noticeClose
|
|
16181
16218
|
}, {
|
|
16182
|
-
icon:
|
|
16183
|
-
|
|
16219
|
+
icon: O(() => [
|
|
16220
|
+
F(o, {
|
|
16184
16221
|
size: "300",
|
|
16185
16222
|
name: "alert-circle"
|
|
16186
16223
|
})
|
|
16187
16224
|
]),
|
|
16188
|
-
default:
|
|
16189
|
-
$t(
|
|
16225
|
+
default: O(() => [
|
|
16226
|
+
$t(ue(t.noticeMessage) + " ", 1)
|
|
16190
16227
|
]),
|
|
16191
16228
|
_: 1
|
|
16192
|
-
}, 8, ["class", "kind", "close-button-props", "onClose"])) :
|
|
16229
|
+
}, 8, ["class", "kind", "close-button-props", "onClose"])) : _("", !0),
|
|
16193
16230
|
G("div", Xp, [
|
|
16194
16231
|
G("div", {
|
|
16195
16232
|
"data-qa": "dt-message-input",
|
|
@@ -16207,7 +16244,7 @@ function sm(n, e, t, r, i, s) {
|
|
|
16207
16244
|
class: "d-of-auto d-mx16 d-mt8 d-mb4",
|
|
16208
16245
|
style: Sl({ "max-height": t.maxHeight })
|
|
16209
16246
|
}, [
|
|
16210
|
-
|
|
16247
|
+
F(a, St({
|
|
16211
16248
|
ref: "richTextEditor",
|
|
16212
16249
|
modelValue: i.internalInputValue,
|
|
16213
16250
|
"onUpdate:modelValue": e[0] || (e[0] = (p) => i.internalInputValue = p),
|
|
@@ -16223,16 +16260,17 @@ function sm(n, e, t, r, i, s) {
|
|
|
16223
16260
|
onBlur: e[2] || (e[2] = (p) => i.hasFocus = !1)
|
|
16224
16261
|
}), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder"])
|
|
16225
16262
|
], 4),
|
|
16226
|
-
|
|
16263
|
+
z(n.$slots, "middle"),
|
|
16227
16264
|
G("section", Zp, [
|
|
16228
16265
|
G("div", Qp, [
|
|
16229
|
-
_(u, {
|
|
16266
|
+
t.isEdit ? _("", !0) : (w(), L(u, {
|
|
16267
|
+
key: 0,
|
|
16230
16268
|
placement: "top-start",
|
|
16231
16269
|
message: t.imageTooltipLabel,
|
|
16232
16270
|
offset: [-4, -4]
|
|
16233
16271
|
}, {
|
|
16234
|
-
anchor:
|
|
16235
|
-
|
|
16272
|
+
anchor: O(() => [
|
|
16273
|
+
F(c, {
|
|
16236
16274
|
"data-qa": "dt-message-input-image-btn",
|
|
16237
16275
|
size: "sm",
|
|
16238
16276
|
circle: "",
|
|
@@ -16245,15 +16283,15 @@ function sm(n, e, t, r, i, s) {
|
|
|
16245
16283
|
onFocusin: e[5] || (e[5] = (p) => i.imagePickerFocus = !0),
|
|
16246
16284
|
onFocusout: e[6] || (e[6] = (p) => i.imagePickerFocus = !1)
|
|
16247
16285
|
}, {
|
|
16248
|
-
icon:
|
|
16249
|
-
|
|
16286
|
+
icon: O(() => [
|
|
16287
|
+
F(o, {
|
|
16250
16288
|
name: "image",
|
|
16251
16289
|
size: "300"
|
|
16252
16290
|
})
|
|
16253
16291
|
]),
|
|
16254
16292
|
_: 1
|
|
16255
16293
|
}, 8, ["kind", "aria-label", "onClick"]),
|
|
16256
|
-
|
|
16294
|
+
F(d, {
|
|
16257
16295
|
ref: "messageInputImageUpload",
|
|
16258
16296
|
"data-qa": "dt-message-input-image-input",
|
|
16259
16297
|
type: "file",
|
|
@@ -16264,8 +16302,8 @@ function sm(n, e, t, r, i, s) {
|
|
|
16264
16302
|
}, null, 8, ["onInput"])
|
|
16265
16303
|
]),
|
|
16266
16304
|
_: 1
|
|
16267
|
-
}, 8, ["message"]),
|
|
16268
|
-
|
|
16305
|
+
}, 8, ["message"])),
|
|
16306
|
+
F(f, {
|
|
16269
16307
|
"data-qa": "dt-message-input-emoji-picker-popover",
|
|
16270
16308
|
open: i.emojiPickerOpened,
|
|
16271
16309
|
"initial-focus-element": "#searchInput",
|
|
@@ -16274,13 +16312,13 @@ function sm(n, e, t, r, i, s) {
|
|
|
16274
16312
|
i.emojiPickerOpened = p;
|
|
16275
16313
|
})
|
|
16276
16314
|
}, {
|
|
16277
|
-
anchor:
|
|
16278
|
-
|
|
16315
|
+
anchor: O(() => [
|
|
16316
|
+
F(u, {
|
|
16279
16317
|
message: t.emojiTooltipMessage,
|
|
16280
16318
|
offset: [0, -4]
|
|
16281
16319
|
}, {
|
|
16282
|
-
anchor:
|
|
16283
|
-
|
|
16320
|
+
anchor: O(() => [
|
|
16321
|
+
F(c, {
|
|
16284
16322
|
"data-qa": "dt-message-input-emoji-picker-btn",
|
|
16285
16323
|
size: "sm",
|
|
16286
16324
|
circle: "",
|
|
@@ -16294,8 +16332,8 @@ function sm(n, e, t, r, i, s) {
|
|
|
16294
16332
|
onFocusin: e[9] || (e[9] = (p) => i.emojiPickerFocus = !0),
|
|
16295
16333
|
onFocusout: e[10] || (e[10] = (p) => i.emojiPickerFocus = !1)
|
|
16296
16334
|
}, {
|
|
16297
|
-
icon:
|
|
16298
|
-
|
|
16335
|
+
icon: O(() => [
|
|
16336
|
+
F(o, {
|
|
16299
16337
|
name: s.emojiPickerHovered ? "very-satisfied" : "satisfied",
|
|
16300
16338
|
size: "300"
|
|
16301
16339
|
}, null, 8, ["name"])
|
|
@@ -16306,8 +16344,8 @@ function sm(n, e, t, r, i, s) {
|
|
|
16306
16344
|
_: 1
|
|
16307
16345
|
}, 8, ["message"])
|
|
16308
16346
|
]),
|
|
16309
|
-
content:
|
|
16310
|
-
|
|
16347
|
+
content: O(() => [
|
|
16348
|
+
F(h, {
|
|
16311
16349
|
"tab-set-labels": t.emojiTabSetLabels,
|
|
16312
16350
|
"skin-selector-button-tooltip-label": t.emojiSkinSelectorButtonTooltipLabel,
|
|
16313
16351
|
"search-no-results-label": t.emojiSearchNoResultsLabel,
|
|
@@ -16322,30 +16360,46 @@ function sm(n, e, t, r, i, s) {
|
|
|
16322
16360
|
}, 8, ["open"])
|
|
16323
16361
|
]),
|
|
16324
16362
|
G("div", em, [
|
|
16325
|
-
s.displayCharacterLimitWarning ? (
|
|
16363
|
+
s.displayCharacterLimitWarning ? (w(), L(u, {
|
|
16326
16364
|
key: 0,
|
|
16327
16365
|
enabled: t.characterLimitWarningMessage && t.characterLimitCount - s.inputLength < 0,
|
|
16328
16366
|
placement: "top-end",
|
|
16329
16367
|
message: t.characterLimitWarningMessage,
|
|
16330
16368
|
offset: [10, -8]
|
|
16331
16369
|
}, {
|
|
16332
|
-
anchor:
|
|
16333
|
-
s.displayCharacterLimitWarning ? (
|
|
16370
|
+
anchor: O(() => [
|
|
16371
|
+
s.displayCharacterLimitWarning ? (w(), B("p", tm, ue(t.characterLimitCount - s.inputLength), 1)) : _("", !0)
|
|
16372
|
+
]),
|
|
16373
|
+
_: 1
|
|
16374
|
+
}, 8, ["enabled", "message"])) : _("", !0),
|
|
16375
|
+
t.isEdit ? (w(), L(c, {
|
|
16376
|
+
key: 1,
|
|
16377
|
+
"data-qa": "dt-message-input-cancel-button",
|
|
16378
|
+
class: "dt-message-input--cancel-button",
|
|
16379
|
+
size: "sm",
|
|
16380
|
+
kind: "muted",
|
|
16381
|
+
importance: "clear",
|
|
16382
|
+
"aria-label": t.cancelButtonAriaLabel,
|
|
16383
|
+
onClick: s.onCancel
|
|
16384
|
+
}, {
|
|
16385
|
+
default: O(() => [
|
|
16386
|
+
G("p", null, ue(t.cancelButtonText), 1)
|
|
16334
16387
|
]),
|
|
16335
16388
|
_: 1
|
|
16336
|
-
}, 8, ["
|
|
16337
|
-
|
|
16389
|
+
}, 8, ["aria-label", "onClick"])) : _("", !0),
|
|
16390
|
+
F(u, {
|
|
16338
16391
|
placement: "top-end",
|
|
16392
|
+
enabled: !t.isEdit,
|
|
16339
16393
|
message: t.sendTooltipLabel,
|
|
16340
16394
|
show: !s.isSendDisabled && i.sendButtonFocus,
|
|
16341
|
-
offset: [6, -
|
|
16395
|
+
offset: [6, -8]
|
|
16342
16396
|
}, {
|
|
16343
|
-
anchor:
|
|
16344
|
-
|
|
16397
|
+
anchor: O(() => [
|
|
16398
|
+
F(c, {
|
|
16345
16399
|
"data-qa": "dt-message-input-send-btn",
|
|
16346
16400
|
size: "sm",
|
|
16347
|
-
kind: s.
|
|
16348
|
-
circle:
|
|
16401
|
+
kind: s.sendButtonKind,
|
|
16402
|
+
circle: !t.isEdit,
|
|
16349
16403
|
importance: "primary",
|
|
16350
16404
|
class: $({
|
|
16351
16405
|
"message-input-button__disabled d-fc-muted": s.isSendDisabled
|
|
@@ -16357,49 +16411,57 @@ function sm(n, e, t, r, i, s) {
|
|
|
16357
16411
|
onMouseleave: e[14] || (e[14] = (p) => i.sendButtonFocus = !1),
|
|
16358
16412
|
onFocusin: e[15] || (e[15] = (p) => i.sendButtonFocus = !0),
|
|
16359
16413
|
onFocusout: e[16] || (e[16] = (p) => i.sendButtonFocus = !1)
|
|
16360
|
-
}, {
|
|
16361
|
-
|
|
16362
|
-
_(
|
|
16363
|
-
name: "send",
|
|
16364
|
-
size: "300"
|
|
16365
|
-
})
|
|
16414
|
+
}, cs({
|
|
16415
|
+
default: O(() => [
|
|
16416
|
+
t.isEdit ? (w(), B("p", nm, ue(t.saveChangesButtonText), 1)) : _("", !0)
|
|
16366
16417
|
]),
|
|
16367
|
-
_:
|
|
16368
|
-
},
|
|
16418
|
+
_: 2
|
|
16419
|
+
}, [
|
|
16420
|
+
t.isEdit ? void 0 : {
|
|
16421
|
+
name: "icon",
|
|
16422
|
+
fn: O(() => [
|
|
16423
|
+
F(o, {
|
|
16424
|
+
name: "send",
|
|
16425
|
+
size: "300"
|
|
16426
|
+
})
|
|
16427
|
+
]),
|
|
16428
|
+
key: "0"
|
|
16429
|
+
}
|
|
16430
|
+
]), 1032, ["kind", "circle", "class", "aria-label", "aria-disabled", "onClick"])
|
|
16369
16431
|
]),
|
|
16370
16432
|
_: 1
|
|
16371
|
-
}, 8, ["message", "show"])
|
|
16433
|
+
}, 8, ["enabled", "message", "show"])
|
|
16372
16434
|
])
|
|
16373
16435
|
])
|
|
16374
16436
|
], 34),
|
|
16375
|
-
|
|
16376
|
-
G("div", rm, [
|
|
16377
|
-
L(n.$slots, "footerLeft")
|
|
16378
|
-
]),
|
|
16437
|
+
t.isEdit ? _("", !0) : (w(), B("section", rm, [
|
|
16379
16438
|
G("div", im, [
|
|
16380
|
-
|
|
16439
|
+
z(n.$slots, "footerLeft")
|
|
16440
|
+
]),
|
|
16441
|
+
G("div", sm, [
|
|
16442
|
+
z(n.$slots, "footerRight")
|
|
16381
16443
|
])
|
|
16382
|
-
])
|
|
16444
|
+
]))
|
|
16383
16445
|
])
|
|
16384
16446
|
], 64);
|
|
16385
16447
|
}
|
|
16386
|
-
const
|
|
16448
|
+
const um = /* @__PURE__ */ q(Yp, [["render", om]]);
|
|
16387
16449
|
export {
|
|
16388
16450
|
In as A,
|
|
16389
16451
|
Ql as D,
|
|
16390
16452
|
Jt as L,
|
|
16391
|
-
|
|
16453
|
+
ya as M,
|
|
16392
16454
|
wr as N,
|
|
16393
|
-
|
|
16455
|
+
La as P,
|
|
16394
16456
|
Cr as S,
|
|
16395
16457
|
sa as a,
|
|
16396
16458
|
ua as b,
|
|
16397
|
-
|
|
16398
|
-
|
|
16459
|
+
xa as c,
|
|
16460
|
+
Ia as d,
|
|
16399
16461
|
vr as e,
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16462
|
+
Wa as f,
|
|
16463
|
+
ys as g,
|
|
16464
|
+
_a as h,
|
|
16403
16465
|
Jl as i,
|
|
16404
16466
|
Jr as j,
|
|
16405
16467
|
Rl as k,
|
|
@@ -16408,14 +16470,14 @@ export {
|
|
|
16408
16470
|
Bl as n,
|
|
16409
16471
|
Ll as o,
|
|
16410
16472
|
Wr as p,
|
|
16411
|
-
|
|
16473
|
+
pa as q,
|
|
16412
16474
|
Ur as r,
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16475
|
+
Pa as s,
|
|
16476
|
+
Ra as t,
|
|
16477
|
+
Ba as u,
|
|
16416
16478
|
Pl as v,
|
|
16417
16479
|
Ot as w,
|
|
16418
16480
|
Tl as x,
|
|
16419
|
-
|
|
16420
|
-
|
|
16481
|
+
Ss as y,
|
|
16482
|
+
um as z
|
|
16421
16483
|
};
|