smart-editor-v3 1.8.9 → 1.8.10

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.
@@ -3,7 +3,7 @@ var X7 = (n, e, t) => e in n ? J7(n, e, { enumerable: !0, configurable: !0, writ
3
3
  var R0 = (n, e, t) => X7(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "./style.css";
5
5
  import { NTooltip as Mp, NButton as Er, NEmpty as Q7, NTag as Z7, NDrawerContent as jy, NDrawer as qy, NPopover as e8, NInput as Ky, NCheckbox as t8, NCard as n8, NDropdown as uc, NSelect as Gy, NColorPicker as Yy, NBackTop as r8, NModal as i8, NFormItem as o8, NInputNumber as Jy, useMessage as s8, zhCN as Xy, enUS as Qy, dateZhCN as Zy, dateEnUS as e4, darkTheme as t4, NMessageProvider as a8, NConfigProvider as n4 } from "naive-ui";
6
- import { defineComponent as ro, h as qt, getCurrentInstance as ga, effectScope as l8, inject as c8, onMounted as Mr, onUnmounted as r4, computed as Ye, watch as jt, Fragment as et, isRef as No, ref as ue, shallowRef as u8, createVNode as V, Text as d8, openBlock as I, createElementBlock as le, renderList as Mn, unref as g, createElementVNode as q, toDisplayString as xe, normalizeClass as ht, createBlock as X, resolveDynamicComponent as Kt, withCtx as ne, createTextVNode as Mt, renderSlot as vn, onBeforeUnmount as io, watchEffect as f8, nextTick as i4, provide as Mu, markRaw as o4, reactive as h8, render as O1, customRef as p8, withDirectives as El, normalizeStyle as Jt, vShow as Nu, createCommentVNode as Ve, useAttrs as Np, mergeProps as Pn, onBeforeMount as s4, mergeModels as D1, useModel as m8 } from "vue";
6
+ import { defineComponent as ro, h as qt, getCurrentInstance as ga, effectScope as l8, inject as c8, onMounted as Mr, onUnmounted as r4, computed as Ye, watch as jt, Fragment as et, isRef as Oo, ref as ue, shallowRef as u8, createVNode as V, Text as d8, openBlock as I, createElementBlock as le, renderList as Mn, unref as g, createElementVNode as q, toDisplayString as xe, normalizeClass as ht, createBlock as X, resolveDynamicComponent as Kt, withCtx as ne, createTextVNode as Mt, renderSlot as vn, onBeforeUnmount as io, watchEffect as f8, nextTick as i4, provide as Mu, markRaw as o4, reactive as h8, render as O1, customRef as p8, withDirectives as El, normalizeStyle as Jt, vShow as Nu, createCommentVNode as Ve, useAttrs as Np, mergeProps as Pn, onBeforeMount as s4, mergeModels as D1, useModel as m8 } from "vue";
7
7
  import { useStorage as I1, createGlobalState as g8, onClickOutside as Wd, useElementBounding as b8, useWindowSize as Op, useThrottleFn as Dp, useTimeAgo as v8, useOnline as y8, useClipboard as w8, useFullscreen as _8, useResizeObserver as k8, useFileDialog as Ip, useDark as a4, useTimestamp as x8, createInjectionState as C8 } from "@vueuse/core";
8
8
  import { createEditor as S8 } from "prism-code-editor";
9
9
  import { defaultCommands as T8, editHistory as A8 } from "prism-code-editor/commands";
@@ -76,7 +76,7 @@ function jd(n, ...e) {
76
76
  }
77
77
  const Ti = (n, e = !1) => e ? Symbol.for(n) : Symbol(n), P8 = (n, e, t) => $8({ l: n, k: e, s: t }), $8 = (n) => JSON.stringify(n).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), Cn = (n) => typeof n == "number" && isFinite(n), F8 = (n) => c4(n) === "[object Date]", ba = (n) => c4(n) === "[object RegExp]", qd = (n) => lt(n) && Object.keys(n).length === 0, Sn = Object.assign;
78
78
  let L1;
79
- const ds = () => L1 || (L1 = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
79
+ const fs = () => L1 || (L1 = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
80
80
  function R1(n) {
81
81
  return n.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
82
82
  }
@@ -122,12 +122,12 @@ function U8(n, e = 0, t = n.length) {
122
122
  return o.join(`
123
123
  `);
124
124
  }
125
- function Ko(n, e) {
125
+ function Go(n, e) {
126
126
  typeof console < "u" && (console.warn("[intlify] " + n), e && console.warn(e.stack));
127
127
  }
128
128
  const P1 = {};
129
129
  function u4(n) {
130
- P1[n] || (P1[n] = !0, Ko(n));
130
+ P1[n] || (P1[n] = !0, Go(n));
131
131
  }
132
132
  function Rp() {
133
133
  const n = /* @__PURE__ */ new Map();
@@ -1102,7 +1102,7 @@ function v_(n, e = {}) {
1102
1102
  * Released under the MIT License.
1103
1103
  */
1104
1104
  function y_() {
1105
- typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (ds().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (ds().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
1105
+ typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (fs().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (fs().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
1106
1106
  }
1107
1107
  function B0(n) {
1108
1108
  return (t) => w_(t, n);
@@ -1164,11 +1164,11 @@ function eh(n, e) {
1164
1164
  }
1165
1165
  const __ = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
1166
1166
  function k_(n, e) {
1167
- e && Y8(n) && Ko(jd(__, { source: n }));
1167
+ e && Y8(n) && Go(jd(__, { source: n }));
1168
1168
  }
1169
1169
  const x_ = (n) => n;
1170
1170
  let Nc = /* @__PURE__ */ Object.create(null);
1171
- const Ro = (n) => _t(n) && (n.t === 0 || n.type === 0) && ("b" in n || "body" in n);
1171
+ const Bo = (n) => _t(n) && (n.t === 0 || n.type === 0) && ("b" in n || "body" in n);
1172
1172
  function C_(n, e = {}) {
1173
1173
  let t = !1;
1174
1174
  const r = e.onError || K8;
@@ -1191,8 +1191,8 @@ function S_(n, e) {
1191
1191
  }), l = B0(s);
1192
1192
  return a ? l : Nc[i] = l;
1193
1193
  } else {
1194
- if (process.env.NODE_ENV !== "production" && !Ro(n))
1195
- return Ko(`the message that is resolve with key '${e.key}' is not supported for jit compilation`), () => n;
1194
+ if (process.env.NODE_ENV !== "production" && !Bo(n))
1195
+ return Go(`the message that is resolve with key '${e.key}' is not supported for jit compilation`), () => n;
1196
1196
  const t = n.cacheKey;
1197
1197
  if (t) {
1198
1198
  const r = Nc[t];
@@ -1305,8 +1305,8 @@ function L_(n, e, t) {
1305
1305
  }
1306
1306
  return r;
1307
1307
  }
1308
- const Go = [];
1309
- Go[
1308
+ const Yo = [];
1309
+ Yo[
1310
1310
  0
1311
1311
  /* States.BEFORE_PATH */
1312
1312
  ] = {
@@ -1328,7 +1328,7 @@ Go[
1328
1328
  /* States.AFTER_PATH */
1329
1329
  ]
1330
1330
  };
1331
- Go[
1331
+ Yo[
1332
1332
  1
1333
1333
  /* States.IN_PATH */
1334
1334
  ] = {
@@ -1349,7 +1349,7 @@ Go[
1349
1349
  /* States.AFTER_PATH */
1350
1350
  ]
1351
1351
  };
1352
- Go[
1352
+ Yo[
1353
1353
  2
1354
1354
  /* States.BEFORE_IDENT */
1355
1355
  ] = {
@@ -1368,7 +1368,7 @@ Go[
1368
1368
  /* Actions.APPEND */
1369
1369
  ]
1370
1370
  };
1371
- Go[
1371
+ Yo[
1372
1372
  3
1373
1373
  /* States.IN_IDENT */
1374
1374
  ] = {
@@ -1403,7 +1403,7 @@ Go[
1403
1403
  /* Actions.PUSH */
1404
1404
  ]
1405
1405
  };
1406
- Go[
1406
+ Yo[
1407
1407
  4
1408
1408
  /* States.IN_SUB_PATH */
1409
1409
  ] = {
@@ -1434,7 +1434,7 @@ Go[
1434
1434
  /* Actions.APPEND */
1435
1435
  ]
1436
1436
  };
1437
- Go[
1437
+ Yo[
1438
1438
  5
1439
1439
  /* States.IN_SINGLE_QUOTE */
1440
1440
  ] = {
@@ -1450,7 +1450,7 @@ Go[
1450
1450
  /* Actions.APPEND */
1451
1451
  ]
1452
1452
  };
1453
- Go[
1453
+ Yo[
1454
1454
  6
1455
1455
  /* States.IN_DOUBLE_QUOTE */
1456
1456
  ] = {
@@ -1553,7 +1553,7 @@ function z_(n) {
1553
1553
  }
1554
1554
  for (; r !== null; )
1555
1555
  if (t++, o = n[t], !(o === "\\" && h())) {
1556
- if (l = $_(o), d = Go[r], c = d[l] || d.l || 8, c === 8 || (r = c[0], c[1] !== void 0 && (u = f[c[1]], u && (a = o, u() === !1))))
1556
+ if (l = $_(o), d = Yo[r], c = d[l] || d.l || 8, c === 8 || (r = c[0], c[1] !== void 0 && (u = f[c[1]], u && (a = o, u() === !1))))
1557
1557
  return;
1558
1558
  if (r === 7)
1559
1559
  return e;
@@ -1629,7 +1629,7 @@ const q1 = (n) => {
1629
1629
  }, Q_ = () => g4;
1630
1630
  let K1 = 0;
1631
1631
  function Z_(n = {}) {
1632
- const e = $t(n.onWarn) ? n.onWarn : Ko, t = Te(n.version) ? n.version : j_, r = Te(n.locale) || $t(n.locale) ? n.locale : Nl, i = $t(r) ? Nl : r, o = rn(n.fallbackLocale) || lt(n.fallbackLocale) || Te(n.fallbackLocale) || n.fallbackLocale === !1 ? n.fallbackLocale : i, s = lt(n.messages) ? n.messages : { [i]: {} }, a = lt(n.datetimeFormats) ? n.datetimeFormats : { [i]: {} }, l = lt(n.numberFormats) ? n.numberFormats : { [i]: {} }, c = Sn({}, n.modifiers || {}, q_()), u = n.pluralRules || {}, d = $t(n.missing) ? n.missing : null, f = yt(n.missingWarn) || ba(n.missingWarn) ? n.missingWarn : !0, h = yt(n.fallbackWarn) || ba(n.fallbackWarn) ? n.fallbackWarn : !0, p = !!n.fallbackFormat, m = !!n.unresolving, v = $t(n.postTranslation) ? n.postTranslation : null, y = lt(n.processor) ? n.processor : null, k = yt(n.warnHtmlMessage) ? n.warnHtmlMessage : !0, A = !!n.escapeParameter, x = $t(n.messageCompiler) ? n.messageCompiler : f4;
1632
+ const e = $t(n.onWarn) ? n.onWarn : Go, t = Te(n.version) ? n.version : j_, r = Te(n.locale) || $t(n.locale) ? n.locale : Nl, i = $t(r) ? Nl : r, o = rn(n.fallbackLocale) || lt(n.fallbackLocale) || Te(n.fallbackLocale) || n.fallbackLocale === !1 ? n.fallbackLocale : i, s = lt(n.messages) ? n.messages : { [i]: {} }, a = lt(n.datetimeFormats) ? n.datetimeFormats : { [i]: {} }, l = lt(n.numberFormats) ? n.numberFormats : { [i]: {} }, c = Sn({}, n.modifiers || {}, q_()), u = n.pluralRules || {}, d = $t(n.missing) ? n.missing : null, f = yt(n.missingWarn) || ba(n.missingWarn) ? n.missingWarn : !0, h = yt(n.fallbackWarn) || ba(n.fallbackWarn) ? n.fallbackWarn : !0, p = !!n.fallbackFormat, m = !!n.unresolving, v = $t(n.postTranslation) ? n.postTranslation : null, y = lt(n.processor) ? n.processor : null, k = yt(n.warnHtmlMessage) ? n.warnHtmlMessage : !0, A = !!n.escapeParameter, x = $t(n.messageCompiler) ? n.messageCompiler : f4;
1633
1633
  process.env.NODE_ENV !== "production" && $t(n.messageCompiler) && u4(Cs(cr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
1634
1634
  const T = $t(n.messageResolver) ? n.messageResolver : h4 || H_, E = $t(n.localeFallbacker) ? n.localeFallbacker : p4 || D_, R = _t(n.fallbackContext) ? n.fallbackContext : void 0, U = n, L = _t(U.__datetimeFormatters) ? U.__datetimeFormatters : /* @__PURE__ */ new Map(), te = _t(U.__numberFormatters) ? U.__numberFormatters : /* @__PURE__ */ new Map(), re = _t(U.__meta) ? U.__meta : {};
1635
1635
  K1++;
@@ -1924,10 +1924,10 @@ function tg(n, ...e) {
1924
1924
  v,
1925
1925
  a[v] || {}
1926
1926
  ] : k4(n, l, v, s, d, u), x = y, T = l;
1927
- if (!h && !(Te(x) || Ro(x) || Pr(x)) && m && (x = p, T = x), !h && (!(Te(x) || Ro(x) || Pr(x)) || !Te(k)))
1927
+ if (!h && !(Te(x) || Bo(x) || Pr(x)) && m && (x = p, T = x), !h && (!(Te(x) || Bo(x) || Pr(x)) || !Te(k)))
1928
1928
  return i ? Kd : l;
1929
1929
  if (process.env.NODE_ENV !== "production" && Te(x) && n.messageCompiler == null)
1930
- return Ko(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`), l;
1930
+ return Go(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`), l;
1931
1931
  let E = !1;
1932
1932
  const R = () => {
1933
1933
  E = !0;
@@ -1982,7 +1982,7 @@ function k4(n, e, t, r, i, o) {
1982
1982
  groupId: `${v}:${e}`
1983
1983
  }), A && x && Cr && xs && (Cr(x), xs("intlify message resolve", A, x));
1984
1984
  }
1985
- if (Te(h) || Ro(h) || Pr(h))
1985
+ if (Te(h) || Bo(h) || Pr(h))
1986
1986
  break;
1987
1987
  if (!ek(f, u)) {
1988
1988
  const T = $p(
@@ -2040,7 +2040,7 @@ function uk(n, e, t) {
2040
2040
  }
2041
2041
  function rh(...n) {
2042
2042
  const [e, t, r] = n, i = {};
2043
- if (!Te(e) && !Cn(e) && !Pr(e) && !Ro(e))
2043
+ if (!Te(e) && !Cn(e) && !Pr(e) && !Bo(e))
2044
2044
  throw Wi(Wn.INVALID_ARGUMENT);
2045
2045
  const o = Cn(e) ? String(e) : (Pr(e), e);
2046
2046
  return Cn(t) ? i.plural = t : Te(t) ? i.default = t : lt(t) && !qd(t) ? i.named = t : rn(t) && (i.list = t), Cn(r) ? i.plural = r : Te(r) ? i.default = r : lt(r) && Sn(i, r), [o, i];
@@ -2092,7 +2092,7 @@ function hk(n, e, t, r) {
2092
2092
  );
2093
2093
  m = s(v, h);
2094
2094
  }
2095
- if (Te(m) || Ro(m)) {
2095
+ if (Te(m) || Bo(m)) {
2096
2096
  let v = !1;
2097
2097
  const k = x4(n, h, e, m, h, () => {
2098
2098
  v = !0;
@@ -2201,7 +2201,7 @@ function _k(n, e) {
2201
2201
  */
2202
2202
  const kk = "10.0.1";
2203
2203
  function xk() {
2204
- typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (ds().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (ds().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (ds().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (ds().__INTLIFY_PROD_DEVTOOLS__ = !1);
2204
+ typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (fs().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (fs().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (fs().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (fs().__INTLIFY_PROD_DEVTOOLS__ = !1);
2205
2205
  }
2206
2206
  const Co = {
2207
2207
  FALLBACK_TO_ROOT: U_,
@@ -2268,7 +2268,7 @@ function Dl(n) {
2268
2268
  let i = n, o = !1;
2269
2269
  for (let s = 0; s < r; s++) {
2270
2270
  if (t[s] in i || (i[t[s]] = {}), !_t(i[t[s]])) {
2271
- process.env.NODE_ENV !== "production" && Ko(Yd(Co.IGNORE_OBJ_FLATTEN, {
2271
+ process.env.NODE_ENV !== "production" && Go(Yd(Co.IGNORE_OBJ_FLATTEN, {
2272
2272
  key: t[s]
2273
2273
  })), o = !0;
2274
2274
  break;
@@ -2417,7 +2417,7 @@ function zp(n = {}) {
2417
2417
  if (ct !== "translate exists" && // for not `te` (e.g `t`)
2418
2418
  Cn(Zr) && Zr === Kd || ct === "translate exists" && !Zr) {
2419
2419
  const [Dr, Hs] = ge();
2420
- if (process.env.NODE_ENV !== "production" && e && Te(Dr) && se(ct, Hs) && (p && (Gd(h, Dr) || b4(f, Dr)) && Ko(Yd(Co.FALLBACK_TO_ROOT, {
2420
+ if (process.env.NODE_ENV !== "production" && e && Te(Dr) && se(ct, Hs) && (p && (Gd(h, Dr) || b4(f, Dr)) && Go(Yd(Co.FALLBACK_TO_ROOT, {
2421
2421
  key: Dr,
2422
2422
  type: ct
2423
2423
  })), process.env.NODE_ENV !== "production")) {
@@ -2485,7 +2485,7 @@ function zp(n = {}) {
2485
2485
  if (!oe)
2486
2486
  return !1;
2487
2487
  const ct = Te(ge) ? ge : a.value, Dt = Gt(ct), Or = R.messageResolver(Dt, oe);
2488
- return Ro(Or) || Pr(Or) || Te(Or);
2488
+ return Bo(Or) || Pr(Or) || Te(Or);
2489
2489
  }, () => [oe], "translate exists", (ct) => Reflect.apply(ct.te, ct, [oe, ge]), Tk, (ct) => yt(ct));
2490
2490
  }
2491
2491
  function gn(oe) {
@@ -2740,7 +2740,7 @@ function Hp(n) {
2740
2740
  const e = {};
2741
2741
  return Object.keys(n).forEach((t) => {
2742
2742
  const r = n[t];
2743
- $t(r) && "source" in r ? e[t] = Rk(r) : Ro(r) && r.loc && r.loc.source ? e[t] = r.loc.source : _t(r) ? e[t] = Hp(r) : e[t] = r;
2743
+ $t(r) && "source" in r ? e[t] = Rk(r) : Bo(r) && r.loc && r.loc.source ? e[t] = r.loc.source : _t(r) ? e[t] = Hp(r) : e[t] = r;
2744
2744
  }), e;
2745
2745
  }
2746
2746
  const Dk = {
@@ -3417,7 +3417,7 @@ function Up(n = {}) {
3417
3417
  return E4(r, n, i), r;
3418
3418
  if (o === "parent") {
3419
3419
  let l = rx(t, e, n.__useComponent);
3420
- return l == null && (process.env.NODE_ENV !== "production" && Ko(Yd(Co.NOT_FOUND_PARENT_SCOPE)), l = r), l;
3420
+ return l == null && (process.env.NODE_ENV !== "production" && Go(Yd(Co.NOT_FOUND_PARENT_SCOPE)), l = r), l;
3421
3421
  }
3422
3422
  const s = t;
3423
3423
  let a = s.__getInstance(e);
@@ -3492,7 +3492,7 @@ function ax(n, e) {
3492
3492
  const o = Object.getOwnPropertyDescriptor(e, i);
3493
3493
  if (!o)
3494
3494
  throw nr(Pt.UNEXPECTED_ERROR);
3495
- const s = No(o.value) ? {
3495
+ const s = Oo(o.value) ? {
3496
3496
  get() {
3497
3497
  return o.value.value;
3498
3498
  },
@@ -3522,7 +3522,7 @@ K_(S_);
3522
3522
  G_(V_);
3523
3523
  Y_(d4);
3524
3524
  if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
3525
- const n = ds();
3525
+ const n = fs();
3526
3526
  n.__INTLIFY__ = !0, T_(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
3527
3527
  }
3528
3528
  process.env.NODE_ENV;
@@ -4620,7 +4620,7 @@ const lx = {
4620
4620
  function Vr(n = 8) {
4621
4621
  return Math.random().toString(36).substring(2, n + 2);
4622
4622
  }
4623
- function Bo(n, e) {
4623
+ function Po(n, e) {
4624
4624
  const { options: t } = de(), r = `smart-editor:${t.value.editorKey}:${n}`;
4625
4625
  if (n === "locale")
4626
4626
  return I1(r, t.value.locale);
@@ -4650,7 +4650,7 @@ const de = g8(() => {
4650
4650
  ...i.value,
4651
4651
  ...Object.keys(A).reduce((T, E) => (A[E] !== void 0 && (T[E] = A[E]), T), {})
4652
4652
  };
4653
- const x = Bo("locale");
4653
+ const x = Po("locale");
4654
4654
  return x.value || (x.value = i.value.locale), i.value;
4655
4655
  }, y = () => {
4656
4656
  e.value = void 0, f.value = !1, l.value = [], t.value = !0, o.value = null;
@@ -5963,7 +5963,7 @@ class Bu {
5963
5963
  }
5964
5964
  }
5965
5965
  const Tx = /* @__PURE__ */ Object.create(null);
5966
- let Oo = class ph {
5966
+ let Do = class ph {
5967
5967
  /**
5968
5968
  @internal
5969
5969
  */
@@ -6326,8 +6326,8 @@ let Oo = class ph {
6326
6326
  return o.type.checkAttrs(o.attrs), o;
6327
6327
  }
6328
6328
  };
6329
- Oo.prototype.text = void 0;
6330
- let Ax = class mh extends Oo {
6329
+ Do.prototype.text = void 0;
6330
+ let Ax = class mh extends Do {
6331
6331
  /**
6332
6332
  @internal
6333
6333
  */
@@ -6833,7 +6833,7 @@ let vg = class Q4 {
6833
6833
  create(e = null, t, r) {
6834
6834
  if (this.isText)
6835
6835
  throw new Error("NodeType.create can't construct text nodes");
6836
- return new Oo(this, this.computeAttrs(e), be.from(t), Ft.setFrom(r));
6836
+ return new Do(this, this.computeAttrs(e), be.from(t), Ft.setFrom(r));
6837
6837
  }
6838
6838
  /**
6839
6839
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -6841,7 +6841,7 @@ let vg = class Q4 {
6841
6841
  if it doesn't match.
6842
6842
  */
6843
6843
  createChecked(e = null, t, r) {
6844
- return t = be.from(t), this.checkContent(t), new Oo(this, this.computeAttrs(e), t, Ft.setFrom(r));
6844
+ return t = be.from(t), this.checkContent(t), new Do(this, this.computeAttrs(e), t, Ft.setFrom(r));
6845
6845
  }
6846
6846
  /**
6847
6847
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
@@ -6859,7 +6859,7 @@ let vg = class Q4 {
6859
6859
  t = s.append(t);
6860
6860
  }
6861
6861
  let i = this.contentMatch.matchFragment(t), o = i && i.fillBefore(be.empty, !0);
6862
- return o ? new Oo(this, e, t.append(o), Ft.setFrom(r)) : null;
6862
+ return o ? new Do(this, e, t.append(o), Ft.setFrom(r)) : null;
6863
6863
  }
6864
6864
  /**
6865
6865
  Returns true if the given fragment is valid content for this node
@@ -7068,7 +7068,7 @@ class Z4 {
7068
7068
  bound.
7069
7069
  */
7070
7070
  nodeFromJSON(e) {
7071
- return Oo.fromJSON(this, e);
7071
+ return Do.fromJSON(this, e);
7072
7072
  }
7073
7073
  /**
7074
7074
  Deserialize a mark from its JSON representation. This method is
@@ -8593,7 +8593,7 @@ function i9(n, e, t = 1, r) {
8593
8593
  }
8594
8594
  n.step(new En(e, e, new Ae(o.append(s), t, t), !0));
8595
8595
  }
8596
- function Yo(n, e) {
8596
+ function Jo(n, e) {
8597
8597
  let t = n.resolve(e), r = t.index();
8598
8598
  return c2(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
8599
8599
  }
@@ -10006,7 +10006,7 @@ class na {
10006
10006
  let i = new j0(e.schema, e.plugins), o = new na(i);
10007
10007
  return i.fields.forEach((s) => {
10008
10008
  if (s.name == "doc")
10009
- o.doc = Oo.fromJSON(e.schema, t.doc);
10009
+ o.doc = Do.fromJSON(e.schema, t.doc);
10010
10010
  else if (s.name == "selection")
10011
10011
  o.selection = Ue.fromJSON(o.doc, t.selection);
10012
10012
  else if (s.name == "storedMarks")
@@ -10155,7 +10155,7 @@ function dc(n) {
10155
10155
  const e0 = function(n) {
10156
10156
  return n.focusNode && As(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
10157
10157
  };
10158
- function ls(n, e) {
10158
+ function cs(n, e) {
10159
10159
  let t = document.createEvent("Event");
10160
10160
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
10161
10161
  }
@@ -10179,9 +10179,9 @@ function x9(n, e, t) {
10179
10179
  return { node: r.startContainer, offset: Math.min($r(r.startContainer), r.startOffset) };
10180
10180
  }
10181
10181
  }
10182
- const _i = typeof navigator < "u" ? navigator : null, Rg = typeof document < "u" ? document : null, Jo = _i && _i.userAgent || "", wh = /Edge\/(\d+)/.exec(Jo), b2 = /MSIE \d/.exec(Jo), _h = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jo), fr = !!(b2 || _h || wh), Do = b2 ? document.documentMode : _h ? +_h[1] : wh ? +wh[1] : 0, ri = !fr && /gecko\/(\d+)/i.test(Jo);
10183
- ri && +(/Firefox\/(\d+)/.exec(Jo) || [0, 0])[1];
10184
- const kh = !fr && /Chrome\/(\d+)/.exec(Jo), qn = !!kh, v2 = kh ? +kh[1] : 0, rr = !fr && !!_i && /Apple Computer/.test(_i.vendor), xa = rr && (/Mobile\/\w+/.test(Jo) || !!_i && _i.maxTouchPoints > 2), Br = xa || (_i ? /Mac/.test(_i.platform) : !1), C9 = _i ? /Win/.test(_i.platform) : !1, ji = /Android \d/.test(Jo), fc = !!Rg && "webkitFontSmoothing" in Rg.documentElement.style, S9 = fc ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
10182
+ const _i = typeof navigator < "u" ? navigator : null, Rg = typeof document < "u" ? document : null, Xo = _i && _i.userAgent || "", wh = /Edge\/(\d+)/.exec(Xo), b2 = /MSIE \d/.exec(Xo), _h = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xo), fr = !!(b2 || _h || wh), Io = b2 ? document.documentMode : _h ? +_h[1] : wh ? +wh[1] : 0, ri = !fr && /gecko\/(\d+)/i.test(Xo);
10183
+ ri && +(/Firefox\/(\d+)/.exec(Xo) || [0, 0])[1];
10184
+ const kh = !fr && /Chrome\/(\d+)/.exec(Xo), qn = !!kh, v2 = kh ? +kh[1] : 0, rr = !fr && !!_i && /Apple Computer/.test(_i.vendor), xa = rr && (/Mobile\/\w+/.test(Xo) || !!_i && _i.maxTouchPoints > 2), Br = xa || (_i ? /Mac/.test(_i.platform) : !1), C9 = _i ? /Win/.test(_i.platform) : !1, ji = /Android \d/.test(Xo), fc = !!Rg && "webkitFontSmoothing" in Rg.documentElement.style, S9 = fc ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
10185
10185
  function T9(n) {
10186
10186
  let e = n.defaultView && n.defaultView.visualViewport;
10187
10187
  return e ? {
@@ -10515,7 +10515,7 @@ let $g = null, Fg = null, zg = !1;
10515
10515
  function z9(n, e, t) {
10516
10516
  return $g == e && Fg == t ? zg : ($g = e, Fg = t, zg = t == "up" || t == "down" ? P9(n, e, t) : F9(n, e, t));
10517
10517
  }
10518
- const qr = 0, Hg = 1, fs = 2, ki = 3;
10518
+ const qr = 0, Hg = 1, hs = 2, ki = 3;
10519
10519
  class hc {
10520
10520
  constructor(e, t, r, i) {
10521
10521
  this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = qr, r.pmViewDesc = this;
@@ -10831,19 +10831,19 @@ class hc {
10831
10831
  if (r == s ? e <= s && t >= r : e < s && t > r) {
10832
10832
  let a = r + o.border, l = s - o.border;
10833
10833
  if (e >= a && t <= l) {
10834
- this.dirty = e == r || t == s ? fs : Hg, e == a && t == l && (o.contentLost || o.dom.parentNode != this.contentDOM) ? o.dirty = ki : o.markDirty(e - a, t - a);
10834
+ this.dirty = e == r || t == s ? hs : Hg, e == a && t == l && (o.contentLost || o.dom.parentNode != this.contentDOM) ? o.dirty = ki : o.markDirty(e - a, t - a);
10835
10835
  return;
10836
10836
  } else
10837
- o.dirty = o.dom == o.contentDOM && o.dom.parentNode == this.contentDOM && !o.children.length ? fs : ki;
10837
+ o.dirty = o.dom == o.contentDOM && o.dom.parentNode == this.contentDOM && !o.children.length ? hs : ki;
10838
10838
  }
10839
10839
  r = s;
10840
10840
  }
10841
- this.dirty = fs;
10841
+ this.dirty = hs;
10842
10842
  }
10843
10843
  markParentsDirty() {
10844
10844
  let e = 1;
10845
10845
  for (let t = this.parent; t; t = t.parent, e++) {
10846
- let r = e == 1 ? fs : Hg;
10846
+ let r = e == 1 ? hs : Hg;
10847
10847
  t.dirty < r && (t.dirty = r);
10848
10848
  }
10849
10849
  }
@@ -10950,7 +10950,7 @@ class Es extends hc {
10950
10950
  this.spec.destroy && this.spec.destroy(), super.destroy();
10951
10951
  }
10952
10952
  }
10953
- class Io extends hc {
10953
+ class Lo extends hc {
10954
10954
  constructor(e, t, r, i, o, s, a, l, c) {
10955
10955
  super(e, [], o, s), this.node = t, this.outerDeco = r, this.innerDeco = i, this.nodeDOM = a;
10956
10956
  }
@@ -10978,7 +10978,7 @@ class Io extends hc {
10978
10978
  } else u || ({ dom: u, contentDOM: d } = Bs.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
10979
10979
  !d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
10980
10980
  let f = u;
10981
- return u = M2(u, r, t), c ? l = new V9(e, t, r, i, u, d || null, f, c, o, s + 1) : t.isText ? new t0(e, t, r, i, u, f, o) : new Io(e, t, r, i, u, d || null, f, o, s + 1);
10981
+ return u = M2(u, r, t), c ? l = new V9(e, t, r, i, u, d || null, f, c, o, s + 1) : t.isText ? new t0(e, t, r, i, u, f, o) : new Lo(e, t, r, i, u, d || null, f, o, s + 1);
10982
10982
  }
10983
10983
  parseRule() {
10984
10984
  if (this.node.type.spec.reparseInView)
@@ -11021,7 +11021,7 @@ class Io extends hc {
11021
11021
  l.syncToMarks(c.marks, r, e);
11022
11022
  let h;
11023
11023
  l.findNodeMatch(c, u, d, f) || a && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = l.findIndexWithChild(o.node)) > -1 && l.updateNodeAt(c, u, d, h, e) || l.updateNextNode(c, u, d, e, f, i) || l.addNode(c, u, d, e, i), i += c.nodeSize;
11024
- }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == fs) && (s && this.protectLocalComposition(e, s), A2(this.contentDOM, this.children, e), xa && G9(this.dom));
11024
+ }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == hs) && (s && this.protectLocalComposition(e, s), A2(this.contentDOM, this.children, e), xa && G9(this.dom));
11025
11025
  }
11026
11026
  localCompositionInfo(e, t) {
11027
11027
  let { from: r, to: i } = e.state.selection;
@@ -11078,10 +11078,10 @@ class Io extends hc {
11078
11078
  }
11079
11079
  function Vg(n, e, t, r, i) {
11080
11080
  M2(r, e, n);
11081
- let o = new Io(void 0, n, e, t, r, r, r, i, 0);
11081
+ let o = new Lo(void 0, n, e, t, r, r, r, i, 0);
11082
11082
  return o.contentDOM && o.updateChildren(i, 0), o;
11083
11083
  }
11084
- class t0 extends Io {
11084
+ class t0 extends Lo {
11085
11085
  constructor(e, t, r, i, o, s, a) {
11086
11086
  super(e, t, r, i, o, null, s, a, 0);
11087
11087
  }
@@ -11138,7 +11138,7 @@ class T2 extends hc {
11138
11138
  return this.dom.nodeName == "IMG";
11139
11139
  }
11140
11140
  }
11141
- class V9 extends Io {
11141
+ class V9 extends Lo {
11142
11142
  constructor(e, t, r, i, o, s, a, l, c, u) {
11143
11143
  super(e, t, r, i, o, s, a, c, u), this.spec = l;
11144
11144
  }
@@ -11195,11 +11195,11 @@ const fl = function(n) {
11195
11195
  n && (this.nodeName = n);
11196
11196
  };
11197
11197
  fl.prototype = /* @__PURE__ */ Object.create(null);
11198
- const hs = [new fl()];
11198
+ const ps = [new fl()];
11199
11199
  function xh(n, e, t) {
11200
11200
  if (n.length == 0)
11201
- return hs;
11202
- let r = t ? hs[0] : new fl(), i = [r];
11201
+ return ps;
11202
+ let r = t ? ps[0] : new fl(), i = [r];
11203
11203
  for (let o = 0; o < n.length; o++) {
11204
11204
  let s = n[o].type.attrs;
11205
11205
  if (s) {
@@ -11213,16 +11213,16 @@ function xh(n, e, t) {
11213
11213
  return i;
11214
11214
  }
11215
11215
  function E2(n, e, t, r) {
11216
- if (t == hs && r == hs)
11216
+ if (t == ps && r == ps)
11217
11217
  return e;
11218
11218
  let i = e;
11219
11219
  for (let o = 0; o < r.length; o++) {
11220
11220
  let s = r[o], a = t[o];
11221
11221
  if (o) {
11222
11222
  let l;
11223
- a && a.nodeName == s.nodeName && i != n && (l = i.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(i), a = hs[0]), i = l;
11223
+ a && a.nodeName == s.nodeName && i != n && (l = i.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(i), a = ps[0]), i = l;
11224
11224
  }
11225
- U9(i, a || hs[0], s);
11225
+ U9(i, a || ps[0], s);
11226
11226
  }
11227
11227
  return i;
11228
11228
  }
@@ -11249,7 +11249,7 @@ function U9(n, e, t) {
11249
11249
  }
11250
11250
  }
11251
11251
  function M2(n, e, t) {
11252
- return E2(n, n, hs, xh(e, t, n.nodeType != 1));
11252
+ return E2(n, n, ps, xh(e, t, n.nodeType != 1));
11253
11253
  }
11254
11254
  function Fu(n, e) {
11255
11255
  if (n.length != e.length)
@@ -11325,7 +11325,7 @@ class W9 {
11325
11325
  }
11326
11326
  updateNodeAt(e, t, r, i, o) {
11327
11327
  let s = this.top.children[i];
11328
- return s.dirty == ki && s.dom == s.contentDOM && (s.dirty = fs), s.update(e, t, r, o) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
11328
+ return s.dirty == ki && s.dom == s.contentDOM && (s.dirty = hs), s.update(e, t, r, o) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
11329
11329
  }
11330
11330
  findIndexWithChild(e) {
11331
11331
  for (; ; ) {
@@ -11349,7 +11349,7 @@ class W9 {
11349
11349
  updateNextNode(e, t, r, i, o, s) {
11350
11350
  for (let a = this.index; a < this.top.children.length; a++) {
11351
11351
  let l = this.top.children[a];
11352
- if (l instanceof Io) {
11352
+ if (l instanceof Lo) {
11353
11353
  let c = this.preMatch.matched.get(l);
11354
11354
  if (c != null && c != o)
11355
11355
  return !1;
@@ -11357,7 +11357,7 @@ class W9 {
11357
11357
  if (!f && l.update(e, t, r, i))
11358
11358
  return this.destroyBetween(this.index, a), l.dom != u && (this.changed = !0), this.index++, !0;
11359
11359
  if (!f && (d = this.recreateWrapper(l, e, t, r, i, s)))
11360
- return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = fs, d.updateChildren(i, s + 1), d.dirty = qr), this.changed = !0, this.index++, !0;
11360
+ return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = hs, d.updateChildren(i, s + 1), d.dirty = qr), this.changed = !0, this.index++, !0;
11361
11361
  break;
11362
11362
  }
11363
11363
  }
@@ -11368,7 +11368,7 @@ class W9 {
11368
11368
  recreateWrapper(e, t, r, i, o, s) {
11369
11369
  if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !Fu(r, e.outerDeco) || !i.eq(e.innerDeco))
11370
11370
  return null;
11371
- let a = Io.create(this.top, t, r, i, o, s);
11371
+ let a = Lo.create(this.top, t, r, i, o, s);
11372
11372
  if (a.contentDOM) {
11373
11373
  a.children = e.children, e.children = [];
11374
11374
  for (let l of a.children)
@@ -11378,7 +11378,7 @@ class W9 {
11378
11378
  }
11379
11379
  // Insert the node as a newly created node desc.
11380
11380
  addNode(e, t, r, i, o) {
11381
- let s = Io.create(this.top, e, t, r, i, o);
11381
+ let s = Lo.create(this.top, e, t, r, i, o);
11382
11382
  s.contentDOM && s.updateChildren(i, o + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
11383
11383
  }
11384
11384
  placeWidget(e, t, r) {
@@ -11622,7 +11622,7 @@ function X9(n) {
11622
11622
  if (!e)
11623
11623
  return;
11624
11624
  let r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
11625
- i ? t.setStart(r.parentNode, $n(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && fr && Do <= 11 && (r.disabled = !0, r.disabled = !1);
11625
+ i ? t.setStart(r.parentNode, $n(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && fr && Io <= 11 && (r.disabled = !0, r.disabled = !1);
11626
11626
  }
11627
11627
  function O2(n, e) {
11628
11628
  if (e instanceof ze) {
@@ -12149,7 +12149,7 @@ or.keydown = (n, e) => {
12149
12149
  if (t.keyCode != 229 && n.domObserver.forceFlush(), xa && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
12150
12150
  let r = Date.now();
12151
12151
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
12152
- n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, ls(13, "Enter"))), n.input.lastIOSEnter = 0);
12152
+ n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, cs(13, "Enter"))), n.input.lastIOSEnter = 0);
12153
12153
  }, 200);
12154
12154
  } else n.someProp("handleKeyDown", (r) => r(n, t)) || oC(n, t) ? t.preventDefault() : Ao(n, "key");
12155
12155
  };
@@ -12385,7 +12385,7 @@ function MC(n, e) {
12385
12385
  t.parentNode && t.parentNode.removeChild(t), n.focus();
12386
12386
  }, 50);
12387
12387
  }
12388
- const Bl = fr && Do < 15 || xa && S9 < 604;
12388
+ const Bl = fr && Io < 15 || xa && S9 < 604;
12389
12389
  ir.copy = or.cut = (n, e) => {
12390
12390
  let t = e, r = n.state.selection, i = t.type == "cut";
12391
12391
  if (r.empty)
@@ -12510,7 +12510,7 @@ ir.beforeinput = (n, e) => {
12510
12510
  n.domObserver.flushSoon();
12511
12511
  let { domChangeCount: r } = n.input;
12512
12512
  setTimeout(() => {
12513
- if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (o) => o(n, ls(8, "Backspace")))))
12513
+ if (n.input.domChangeCount != r || (n.dom.blur(), n.focus(), n.someProp("handleKeyDown", (o) => o(n, cs(8, "Backspace")))))
12514
12514
  return;
12515
12515
  let { $cursor: i } = n.state.selection;
12516
12516
  i && i.pos > 0 && n.dispatch(n.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
@@ -12548,7 +12548,7 @@ class Vu {
12548
12548
  this.spec.destroy && this.spec.destroy(e);
12549
12549
  }
12550
12550
  }
12551
- class Lo {
12551
+ class Ro {
12552
12552
  constructor(e, t) {
12553
12553
  this.attrs = e, this.spec = t || vs;
12554
12554
  }
@@ -12560,10 +12560,10 @@ class Lo {
12560
12560
  return t.from < t.to;
12561
12561
  }
12562
12562
  eq(e) {
12563
- return this == e || e instanceof Lo && $l(this.attrs, e.attrs) && $l(this.spec, e.spec);
12563
+ return this == e || e instanceof Ro && $l(this.attrs, e.attrs) && $l(this.spec, e.spec);
12564
12564
  }
12565
12565
  static is(e) {
12566
- return e.type instanceof Lo;
12566
+ return e.type instanceof Ro;
12567
12567
  }
12568
12568
  destroy() {
12569
12569
  }
@@ -12630,7 +12630,7 @@ class hn {
12630
12630
  each inline node between `from` and `to`.
12631
12631
  */
12632
12632
  static inline(e, t, r, i) {
12633
- return new hn(e, t, new Lo(r, i));
12633
+ return new hn(e, t, new Ro(r, i));
12634
12634
  }
12635
12635
  /**
12636
12636
  Creates a node decoration. `from` and `to` should point precisely
@@ -12651,7 +12651,7 @@ class hn {
12651
12651
  @internal
12652
12652
  */
12653
12653
  get inline() {
12654
- return this.type instanceof Lo;
12654
+ return this.type instanceof Ro;
12655
12655
  }
12656
12656
  /**
12657
12657
  @internal
@@ -12782,7 +12782,7 @@ class wt {
12782
12782
  let o = e + 1, s = o + t.content.size;
12783
12783
  for (let a = 0; a < this.local.length; a++) {
12784
12784
  let l = this.local[a];
12785
- if (l.from < s && l.to > o && l.type instanceof Lo) {
12785
+ if (l.from < s && l.to > o && l.type instanceof Ro) {
12786
12786
  let c = Math.max(o, l.from) - o, u = Math.min(s, l.to) - o;
12787
12787
  c < u && (i || (i = [])).push(l.copy(c, u));
12788
12788
  }
@@ -12821,11 +12821,11 @@ class wt {
12821
12821
  localsInner(e) {
12822
12822
  if (this == Un)
12823
12823
  return Zs;
12824
- if (e.inlineContent || !this.local.some(Lo.is))
12824
+ if (e.inlineContent || !this.local.some(Ro.is))
12825
12825
  return this.local;
12826
12826
  let t = [];
12827
12827
  for (let r = 0; r < this.local.length; r++)
12828
- this.local[r].type instanceof Lo || t.push(this.local[r]);
12828
+ this.local[r].type instanceof Ro || t.push(this.local[r]);
12829
12829
  return t;
12830
12830
  }
12831
12831
  forEachSet(e) {
@@ -13034,7 +13034,7 @@ const LC = {
13034
13034
  attributes: !0,
13035
13035
  attributeOldValue: !0,
13036
13036
  subtree: !0
13037
- }, RC = fr && Do <= 11;
13037
+ }, RC = fr && Io <= 11;
13038
13038
  class BC {
13039
13039
  constructor() {
13040
13040
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
@@ -13054,7 +13054,7 @@ class PC {
13054
13054
  this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new BC(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
13055
13055
  for (let i = 0; i < r.length; i++)
13056
13056
  this.queue.push(r[i]);
13057
- fr && Do <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
13057
+ fr && Io <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
13058
13058
  }), RC && (this.onCharData = (r) => {
13059
13059
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
13060
13060
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
@@ -13095,7 +13095,7 @@ class PC {
13095
13095
  if (Gg(this.view)) {
13096
13096
  if (this.suppressingSelectionUpdates)
13097
13097
  return Ki(this.view);
13098
- if (fr && Do <= 11 && !this.view.state.selection.empty) {
13098
+ if (fr && Io <= 11 && !this.view.state.selection.empty) {
13099
13099
  let e = this.view.domSelectionRange();
13100
13100
  if (e.focusNode && As(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
13101
13101
  return this.flushSoon();
@@ -13173,7 +13173,7 @@ class PC {
13173
13173
  if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
13174
13174
  return { from: r.posBefore, to: r.posAfter };
13175
13175
  let i = e.previousSibling, o = e.nextSibling;
13176
- if (fr && Do <= 11 && e.addedNodes.length)
13176
+ if (fr && Io <= 11 && e.addedNodes.length)
13177
13177
  for (let u = 0; u < e.addedNodes.length; u++) {
13178
13178
  let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
13179
13179
  (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (i = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (o = f);
@@ -13272,7 +13272,7 @@ function WC(n, e, t, r, i) {
13272
13272
  if (n.input.compositionPendingChanges = 0, e < 0) {
13273
13273
  let L = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, te = Qp(n, L);
13274
13274
  if (te && !n.state.selection.eq(te)) {
13275
- if (qn && ji && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (S) => S(n, ls(13, "Enter"))))
13275
+ if (qn && ji && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (S) => S(n, cs(13, "Enter"))))
13276
13276
  return;
13277
13277
  let re = n.state.tr.setSelection(te);
13278
13278
  L == "pointer" ? re.setMeta("pointer", !0) : L == "key" && re.scrollIntoView(), o && re.setMeta("composition", o), n.dispatch(re);
@@ -13284,7 +13284,7 @@ function WC(n, e, t, r, i) {
13284
13284
  let l = n.state.selection, c = HC(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
13285
13285
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
13286
13286
  let p = KC(d.content, c.doc.content, c.from, f, h);
13287
- if (p && n.input.domChangeCount++, (xa && n.input.lastIOSEnter > Date.now() - 225 || ji) && i.some((L) => L.nodeType == 1 && !UC.test(L.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (L) => L(n, ls(13, "Enter")))) {
13287
+ if (p && n.input.domChangeCount++, (xa && n.input.lastIOSEnter > Date.now() - 225 || ji) && i.some((L) => L.nodeType == 1 && !UC.test(L.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (L) => L(n, cs(13, "Enter")))) {
13288
13288
  n.input.lastIOSEnter = 0;
13289
13289
  return;
13290
13290
  }
@@ -13301,25 +13301,25 @@ function WC(n, e, t, r, i) {
13301
13301
  }
13302
13302
  return;
13303
13303
  }
13304
- n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof Fe && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), fr && Do <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
13304
+ n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof Fe && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), fr && Io <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
13305
13305
  let m = c.doc.resolveNoCache(p.start - c.from), v = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), k = m.sameParent(v) && m.parent.inlineContent && y.end() >= p.endA, A;
13306
- if ((xa && n.input.lastIOSEnter > Date.now() - 225 && (!k || i.some((L) => L.nodeName == "DIV" || L.nodeName == "P")) || !k && m.pos < c.doc.content.size && !m.sameParent(v) && (A = Ue.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && A.head == v.pos) && n.someProp("handleKeyDown", (L) => L(n, ls(13, "Enter")))) {
13306
+ if ((xa && n.input.lastIOSEnter > Date.now() - 225 && (!k || i.some((L) => L.nodeName == "DIV" || L.nodeName == "P")) || !k && m.pos < c.doc.content.size && !m.sameParent(v) && (A = Ue.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && A.head == v.pos) && n.someProp("handleKeyDown", (L) => L(n, cs(13, "Enter")))) {
13307
13307
  n.input.lastIOSEnter = 0;
13308
13308
  return;
13309
13309
  }
13310
- if (n.state.selection.anchor > p.start && qC(u, p.start, p.endA, m, v) && n.someProp("handleKeyDown", (L) => L(n, ls(8, "Backspace")))) {
13310
+ if (n.state.selection.anchor > p.start && qC(u, p.start, p.endA, m, v) && n.someProp("handleKeyDown", (L) => L(n, cs(8, "Backspace")))) {
13311
13311
  ji && qn && n.domObserver.suppressSelectionUpdates();
13312
13312
  return;
13313
13313
  }
13314
13314
  qn && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), ji && !k && m.start() != v.start() && v.parentOffset == 0 && m.depth == v.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, v = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
13315
13315
  n.someProp("handleKeyDown", function(L) {
13316
- return L(n, ls(13, "Enter"));
13316
+ return L(n, cs(13, "Enter"));
13317
13317
  });
13318
13318
  }, 20));
13319
13319
  let x = p.start, T = p.endA, E, R, U;
13320
13320
  if (k) {
13321
13321
  if (m.pos == v.pos)
13322
- fr && Do <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Ki(n), 20)), E = n.state.tr.delete(x, T), R = u.resolve(p.start).marksAcross(u.resolve(p.endA));
13322
+ fr && Io <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Ki(n), 20)), E = n.state.tr.delete(x, T), R = u.resolve(p.start).marksAcross(u.resolve(p.endA));
13323
13323
  else if (
13324
13324
  // Adding or removing a mark
13325
13325
  p.endA == p.endB && (U = jC(m.parent.content.cut(m.parentOffset, v.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
@@ -13801,7 +13801,7 @@ function fb(n) {
13801
13801
  if (n.spec.state || n.spec.filterTransaction || n.spec.appendTransaction)
13802
13802
  throw new RangeError("Plugins passed directly to the view must not have a state component");
13803
13803
  }
13804
- var Po = {
13804
+ var $o = {
13805
13805
  8: "Backspace",
13806
13806
  9: "Tab",
13807
13807
  10: "Enter",
@@ -13880,13 +13880,13 @@ var Po = {
13880
13880
  221: "}",
13881
13881
  222: '"'
13882
13882
  }, XC = typeof navigator < "u" && /Mac/.test(navigator.platform), QC = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
13883
- for (var Fn = 0; Fn < 10; Fn++) Po[48 + Fn] = Po[96 + Fn] = String(Fn);
13884
- for (var Fn = 1; Fn <= 24; Fn++) Po[Fn + 111] = "F" + Fn;
13883
+ for (var Fn = 0; Fn < 10; Fn++) $o[48 + Fn] = $o[96 + Fn] = String(Fn);
13884
+ for (var Fn = 1; Fn <= 24; Fn++) $o[Fn + 111] = "F" + Fn;
13885
13885
  for (var Fn = 65; Fn <= 90; Fn++)
13886
- Po[Fn] = String.fromCharCode(Fn + 32), Wu[Fn] = String.fromCharCode(Fn);
13887
- for (var Q0 in Po) Wu.hasOwnProperty(Q0) || (Wu[Q0] = Po[Q0]);
13886
+ $o[Fn] = String.fromCharCode(Fn + 32), Wu[Fn] = String.fromCharCode(Fn);
13887
+ for (var Q0 in $o) Wu.hasOwnProperty(Q0) || (Wu[Q0] = $o[Q0]);
13888
13888
  function ZC(n) {
13889
- var e = XC && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || QC && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Wu : Po)[n.keyCode] || n.key || "Unidentified";
13889
+ var e = XC && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || QC && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Wu : $o)[n.keyCode] || n.key || "Unidentified";
13890
13890
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
13891
13891
  }
13892
13892
  const eS = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
@@ -13935,7 +13935,7 @@ function sm(n) {
13935
13935
  if (a && a(t.state, t.dispatch, t))
13936
13936
  return !0;
13937
13937
  }
13938
- if ((r.shiftKey || r.altKey || r.metaKey || i.charCodeAt(0) > 127) && (o = Po[r.keyCode]) && o != i) {
13938
+ if ((r.shiftKey || r.altKey || r.metaKey || i.charCodeAt(0) > 127) && (o = $o[r.keyCode]) && o != i) {
13939
13939
  let a = e[Z0(o, r)];
13940
13940
  if (a && a(t.state, t.dispatch, t))
13941
13941
  return !0;
@@ -14098,7 +14098,7 @@ function lm(n) {
14098
14098
  const dS = (n, e) => {
14099
14099
  let t = n.selection, r = t instanceof ze, i;
14100
14100
  if (r) {
14101
- if (t.node.isTextblock || !Yo(n.doc, t.from))
14101
+ if (t.node.isTextblock || !Jo(n.doc, t.from))
14102
14102
  return !1;
14103
14103
  i = t.from;
14104
14104
  } else if (i = Xd(n.doc, t.from, -1), i == null)
@@ -14111,7 +14111,7 @@ const dS = (n, e) => {
14111
14111
  }, fS = (n, e) => {
14112
14112
  let t = n.selection, r;
14113
14113
  if (t instanceof ze) {
14114
- if (t.node.isTextblock || !Yo(n.doc, t.to))
14114
+ if (t.node.isTextblock || !Jo(n.doc, t.to))
14115
14115
  return !1;
14116
14116
  r = t.to;
14117
14117
  } else if (r = Xd(n.doc, t.to, 1), r == null)
@@ -14174,7 +14174,7 @@ const mS = (n, e) => {
14174
14174
  };
14175
14175
  function yS(n, e, t) {
14176
14176
  let r = e.nodeBefore, i = e.nodeAfter, o = e.index();
14177
- return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(o - 1, o) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(o, o + 1) || !(i.isTextblock || Yo(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
14177
+ return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(o - 1, o) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(o, o + 1) || !(i.isTextblock || Jo(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
14178
14178
  }
14179
14179
  function e3(n, e, t, r) {
14180
14180
  let i = e.nodeBefore, o = e.nodeAfter, s, a, l = i.type.spec.isolating || o.type.spec.isolating;
@@ -14188,7 +14188,7 @@ function e3(n, e, t, r) {
14188
14188
  p = be.from(s[y].create(null, p));
14189
14189
  p = be.from(i.copy(p));
14190
14190
  let m = n.tr.step(new Nn(e.pos - 1, h, e.pos, h, new Ae(p, 1, 0), s.length, !0)), v = m.doc.resolve(h + 2 * s.length);
14191
- v.nodeAfter && v.nodeAfter.type == i.type && Yo(m.doc, v.pos) && m.join(v.pos), t(m.scrollIntoView());
14191
+ v.nodeAfter && v.nodeAfter.type == i.type && Jo(m.doc, v.pos) && m.join(v.pos), t(m.scrollIntoView());
14192
14192
  }
14193
14193
  return !0;
14194
14194
  }
@@ -14306,7 +14306,7 @@ function TS(n, e, t, r) {
14306
14306
  return !1;
14307
14307
  i.lift(r, a);
14308
14308
  let l = i.mapping.map(o, -1) - 1;
14309
- return Yo(i.doc, l) && i.join(l), e(i.scrollIntoView()), !0;
14309
+ return Jo(i.doc, l) && i.join(l), e(i.scrollIntoView()), !0;
14310
14310
  }
14311
14311
  function AS(n, e, t) {
14312
14312
  let r = n.tr, i = t.parent;
@@ -15364,7 +15364,7 @@ function fm(n, e, t) {
15364
15364
  to: c
15365
15365
  };
15366
15366
  }
15367
- function Xo(n, e) {
15367
+ function Qo(n, e) {
15368
15368
  if (typeof n == "string") {
15369
15369
  if (!e.marks[n])
15370
15370
  throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);
@@ -15373,7 +15373,7 @@ function Xo(n, e) {
15373
15373
  return n;
15374
15374
  }
15375
15375
  const rT = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
15376
- const o = Xo(n, r.schema), { doc: s, selection: a } = t, { $from: l, from: c, to: u } = a;
15376
+ const o = Qo(n, r.schema), { doc: s, selection: a } = t, { $from: l, from: c, to: u } = a;
15377
15377
  if (i) {
15378
15378
  const d = fm(l, o, e);
15379
15379
  if (d && d.from <= c && d.to >= u) {
@@ -15448,7 +15448,7 @@ function Pc(n) {
15448
15448
  return l3(t);
15449
15449
  }
15450
15450
  function qu(n, e, t) {
15451
- if (n instanceof Oo || n instanceof be)
15451
+ if (n instanceof Do || n instanceof be)
15452
15452
  return n;
15453
15453
  t = {
15454
15454
  slice: !0,
@@ -15617,7 +15617,7 @@ const wT = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
15617
15617
  u && i && r.maybeStep(u);
15618
15618
  }), !0;
15619
15619
  };
15620
- function $o(n, e, t = {}) {
15620
+ function Fo(n, e, t = {}) {
15621
15621
  const { from: r, to: i, empty: o } = n.selection, s = e ? wn(e, n.schema) : null, a = [];
15622
15622
  n.doc.nodesBetween(r, i, (d, f) => {
15623
15623
  if (d.isText)
@@ -15634,7 +15634,7 @@ function $o(n, e, t = {}) {
15634
15634
  }
15635
15635
  const _T = (n, e = {}) => ({ state: t, dispatch: r }) => {
15636
15636
  const i = wn(n, t.schema);
15637
- return $o(t, i, e) ? hS(t, r) : !1;
15637
+ return Fo(t, i, e) ? hS(t, r) : !1;
15638
15638
  }, kT = () => ({ state: n, dispatch: e }) => bS(n, e), xT = (n) => ({ state: e, dispatch: t }) => {
15639
15639
  const r = wn(n, e.schema);
15640
15640
  return SS(r)(e, t);
@@ -15649,7 +15649,7 @@ function vb(n, e) {
15649
15649
  const ST = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
15650
15650
  let o = null, s = null;
15651
15651
  const a = l0(typeof n == "string" ? n : n.name, r.schema);
15652
- return a ? (a === "node" && (o = wn(n, r.schema)), a === "mark" && (s = Xo(n, r.schema)), i && t.selection.ranges.forEach((l) => {
15652
+ return a ? (a === "node" && (o = wn(n, r.schema)), a === "mark" && (s = Qo(n, r.schema)), i && t.selection.ranges.forEach((l) => {
15653
15653
  r.doc.nodesBetween(l.$from.pos, l.$to.pos, (c, u) => {
15654
15654
  o && o === c.type && t.setNodeMarkup(u, void 0, vb(c.attrs, e)), s && c.marks.length && c.marks.forEach((d) => {
15655
15655
  s === d.type && t.addMark(u, u + c.nodeSize, s.create(vb(d.attrs, e)));
@@ -15685,7 +15685,7 @@ const IT = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: o, dispatch: s, comm
15685
15685
  });
15686
15686
  };
15687
15687
  function u3(n, e) {
15688
- const t = Xo(e, n.schema), { from: r, to: i, empty: o } = n.selection, s = [];
15688
+ const t = Qo(e, n.schema), { from: r, to: i, empty: o } = n.selection, s = [];
15689
15689
  o ? (n.storedMarks && s.push(...n.storedMarks), s.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (l) => {
15690
15690
  s.push(...l.marks);
15691
15691
  });
@@ -15738,7 +15738,7 @@ function d3(n, e) {
15738
15738
  };
15739
15739
  }
15740
15740
  }
15741
- function Qo(n) {
15741
+ function Zo(n) {
15742
15742
  return (e) => d3(e.$from, n);
15743
15743
  }
15744
15744
  function f3(n, e) {
@@ -15832,7 +15832,7 @@ function mu(n, e, t) {
15832
15832
  }));
15833
15833
  }
15834
15834
  function Oh(n, e, t = {}) {
15835
- const { empty: r, ranges: i } = n.selection, o = e ? Xo(e, n.schema) : null;
15835
+ const { empty: r, ranges: i } = n.selection, o = e ? Qo(e, n.schema) : null;
15836
15836
  if (r)
15837
15837
  return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => o ? o.name === d.type.name : !0).find((d) => ju(d.attrs, t, { strict: !1 }));
15838
15838
  let s = 0;
@@ -15856,14 +15856,14 @@ function Oh(n, e, t = {}) {
15856
15856
  }
15857
15857
  function p3(n, e, t = {}) {
15858
15858
  if (!e)
15859
- return $o(n, null, t) || Oh(n, null, t);
15859
+ return Fo(n, null, t) || Oh(n, null, t);
15860
15860
  const r = l0(e, n.schema);
15861
- return r === "node" ? $o(n, e, t) : r === "mark" ? Oh(n, e, t) : !1;
15861
+ return r === "node" ? Fo(n, e, t) : r === "mark" ? Oh(n, e, t) : !1;
15862
15862
  }
15863
15863
  const HT = (n, e) => {
15864
15864
  const { $from: t, $to: r, $anchor: i } = n.selection;
15865
15865
  if (e) {
15866
- const o = Qo((a) => a.type.name === e)(n.selection);
15866
+ const o = Zo((a) => a.type.name === e)(n.selection);
15867
15867
  if (!o)
15868
15868
  return !1;
15869
15869
  const s = n.doc.resolve(o.pos + 1);
@@ -15949,7 +15949,7 @@ function UT(n, e, t) {
15949
15949
  });
15950
15950
  }
15951
15951
  const WT = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
15952
- const { selection: o } = t, { empty: s, ranges: a } = o, l = Xo(n, r.schema);
15952
+ const { selection: o } = t, { empty: s, ranges: a } = o, l = Qo(n, r.schema);
15953
15953
  if (i)
15954
15954
  if (s) {
15955
15955
  const c = u3(r, l);
@@ -16080,28 +16080,28 @@ const JT = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
16080
16080
  }
16081
16081
  return !0;
16082
16082
  }, tf = (n, e) => {
16083
- const t = Qo((s) => s.type === e)(n.selection);
16083
+ const t = Zo((s) => s.type === e)(n.selection);
16084
16084
  if (!t)
16085
16085
  return !0;
16086
16086
  const r = n.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
16087
16087
  if (r === void 0)
16088
16088
  return !0;
16089
16089
  const i = n.doc.nodeAt(r);
16090
- return t.node.type === (i == null ? void 0 : i.type) && Yo(n.doc, t.pos) && n.join(t.pos), !0;
16090
+ return t.node.type === (i == null ? void 0 : i.type) && Jo(n.doc, t.pos) && n.join(t.pos), !0;
16091
16091
  }, nf = (n, e) => {
16092
- const t = Qo((s) => s.type === e)(n.selection);
16092
+ const t = Zo((s) => s.type === e)(n.selection);
16093
16093
  if (!t)
16094
16094
  return !0;
16095
16095
  const r = n.doc.resolve(t.start).after(t.depth);
16096
16096
  if (r === void 0)
16097
16097
  return !0;
16098
16098
  const i = n.doc.nodeAt(r);
16099
- return t.node.type === (i == null ? void 0 : i.type) && Yo(n.doc, r) && n.join(r), !0;
16099
+ return t.node.type === (i == null ? void 0 : i.type) && Jo(n.doc, r) && n.join(r), !0;
16100
16100
  }, QT = (n, e, t, r = {}) => ({ editor: i, tr: o, state: s, dispatch: a, chain: l, commands: c, can: u }) => {
16101
16101
  const { extensions: d, splittableMarks: f } = i.extensionManager, h = wn(n, s.schema), p = wn(e, s.schema), { selection: m, storedMarks: v } = s, { $from: y, $to: k } = m, A = y.blockRange(k), x = v || m.$to.parentOffset && m.$from.marks();
16102
16102
  if (!A)
16103
16103
  return !1;
16104
- const T = Qo((E) => yb(E.type.name, d))(m);
16104
+ const T = Zo((E) => yb(E.type.name, d))(m);
16105
16105
  if (A.depth >= 1 && T && A.depth - T.depth <= 1) {
16106
16106
  if (T.node.type === h)
16107
16107
  return c.liftListItem(p);
@@ -16113,15 +16113,15 @@ const JT = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
16113
16113
  return o.ensureMarks(R), E ? !0 : c.clearNodes();
16114
16114
  }).wrapInList(h, r).command(() => tf(o, h)).command(() => nf(o, h)).run();
16115
16115
  }, ZT = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
16116
- const { extendEmptyMarkRange: o = !1 } = t, s = Xo(n, r.schema);
16116
+ const { extendEmptyMarkRange: o = !1 } = t, s = Qo(n, r.schema);
16117
16117
  return Oh(r, s, e) ? i.unsetMark(s, { extendEmptyMarkRange: o }) : i.setMark(s, e);
16118
16118
  }, eA = (n, e, t = {}) => ({ state: r, commands: i }) => {
16119
- const o = wn(n, r.schema), s = wn(e, r.schema), a = $o(r, o, t);
16119
+ const o = wn(n, r.schema), s = wn(e, r.schema), a = Fo(r, o, t);
16120
16120
  let l;
16121
16121
  return r.selection.$anchor.sameParent(r.selection.$head) && (l = r.selection.$anchor.parent.attrs), a ? i.setNode(s, l) : i.setNode(o, { ...l, ...t });
16122
16122
  }, tA = (n, e = {}) => ({ state: t, commands: r }) => {
16123
16123
  const i = wn(n, t.schema);
16124
- return $o(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
16124
+ return Fo(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
16125
16125
  }, nA = () => ({ state: n, dispatch: e }) => {
16126
16126
  const t = n.plugins;
16127
16127
  for (let r = 0; r < t.length; r += 1) {
@@ -16149,7 +16149,7 @@ const JT = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
16149
16149
  }), !0;
16150
16150
  }, iA = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
16151
16151
  var o;
16152
- const { extendEmptyMarkRange: s = !1 } = e, { selection: a } = t, l = Xo(n, r.schema), { $from: c, empty: u, ranges: d } = a;
16152
+ const { extendEmptyMarkRange: s = !1 } = e, { selection: a } = t, l = Qo(n, r.schema), { $from: c, empty: u, ranges: d } = a;
16153
16153
  if (!i)
16154
16154
  return !0;
16155
16155
  if (u && s) {
@@ -16164,7 +16164,7 @@ const JT = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
16164
16164
  }, oA = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
16165
16165
  let o = null, s = null;
16166
16166
  const a = l0(typeof n == "string" ? n : n.name, r.schema);
16167
- return a ? (a === "node" && (o = wn(n, r.schema)), a === "mark" && (s = Xo(n, r.schema)), i && t.selection.ranges.forEach((l) => {
16167
+ return a ? (a === "node" && (o = wn(n, r.schema)), a === "mark" && (s = Qo(n, r.schema)), i && t.selection.ranges.forEach((l) => {
16168
16168
  const c = l.$from.pos, u = l.$to.pos;
16169
16169
  let d, f, h, p;
16170
16170
  t.selection.empty ? r.doc.nodesBetween(c, u, (m, v) => {
@@ -16431,7 +16431,7 @@ const cA = ft.create({
16431
16431
  ];
16432
16432
  }
16433
16433
  });
16434
- class cs {
16434
+ class us {
16435
16435
  get name() {
16436
16436
  return this.node.type.name;
16437
16437
  }
@@ -16490,15 +16490,15 @@ class cs {
16490
16490
  if (this.depth === 0)
16491
16491
  return null;
16492
16492
  const e = this.resolvedPos.start(this.resolvedPos.depth - 1), t = this.resolvedPos.doc.resolve(e);
16493
- return new cs(t, this.editor);
16493
+ return new us(t, this.editor);
16494
16494
  }
16495
16495
  get before() {
16496
16496
  let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
16497
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new cs(e, this.editor);
16497
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new us(e, this.editor);
16498
16498
  }
16499
16499
  get after() {
16500
16500
  let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
16501
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new cs(e, this.editor);
16501
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new us(e, this.editor);
16502
16502
  }
16503
16503
  get children() {
16504
16504
  const e = [];
@@ -16506,8 +16506,8 @@ class cs {
16506
16506
  const i = t.isBlock && !t.isTextblock, o = t.isAtom && !t.isText, s = this.pos + r + (o ? 0 : 1), a = this.resolvedPos.doc.resolve(s);
16507
16507
  if (!i && a.depth <= this.depth)
16508
16508
  return;
16509
- const l = new cs(a, this.editor, i, i ? t : null);
16510
- i && (l.actualDepth = this.depth + 1), e.push(new cs(a, this.editor, i, i ? t : null));
16509
+ const l = new us(a, this.editor, i, i ? t : null);
16510
+ i && (l.actualDepth = this.depth + 1), e.push(new us(a, this.editor, i, i ? t : null));
16511
16511
  }), e;
16512
16512
  }
16513
16513
  get firstChild() {
@@ -16976,7 +16976,7 @@ let yA = class extends MS {
16976
16976
  }
16977
16977
  $pos(e) {
16978
16978
  const t = this.state.doc.resolve(e);
16979
- return new cs(t, this);
16979
+ return new us(t, this);
16980
16980
  }
16981
16981
  get $doc() {
16982
16982
  return this.$pos(0);
@@ -17068,7 +17068,7 @@ function Fl(n) {
17068
17068
  i().updateAttributes(d, o).run();
17069
17069
  }
17070
17070
  const u = s.doc.resolve(t.from - 1).nodeBefore;
17071
- u && u.type === n.type && Yo(s.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, u)) && s.join(t.from - 1);
17071
+ u && u.type === n.type && Jo(s.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, u)) && s.join(t.from - 1);
17072
17072
  }
17073
17073
  });
17074
17074
  }
@@ -17202,7 +17202,7 @@ class wA {
17202
17202
  this.editor.commands.deleteRange({ from: e, to: t });
17203
17203
  }
17204
17204
  }
17205
- function Fo(n) {
17205
+ function zo(n) {
17206
17206
  return new $S({
17207
17207
  find: n.find,
17208
17208
  handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
@@ -17612,7 +17612,7 @@ const w3 = ft.create({
17612
17612
  },
17613
17613
  addPasteRules() {
17614
17614
  return [
17615
- Fo({
17615
+ zo({
17616
17616
  find: AA,
17617
17617
  type: this.type
17618
17618
  })
@@ -17676,7 +17676,7 @@ const w3 = ft.create({
17676
17676
  function DA(n, e) {
17677
17677
  return n in e || (e[n] = []), e[n];
17678
17678
  }
17679
- function ps(n, e, t) {
17679
+ function ms(n, e, t) {
17680
17680
  e[Ih] && (e[pl] = !0, e[sl] = !0), e[Lh] && (e[pl] = !0, e[Rh] = !0), e[pl] && (e[sl] = !0), e[Rh] && (e[sl] = !0), e[sl] && (e[Bh] = !0), e[S3] && (e[Bh] = !0);
17681
17681
  for (const r in e) {
17682
17682
  const i = DA(r, t);
@@ -17748,7 +17748,7 @@ ur.prototype = {
17748
17748
  tr(n, e, t, r) {
17749
17749
  r = r || ur.groups;
17750
17750
  let i;
17751
- return e && e.j ? i = e : (i = new ur(e), t && r && ps(e, t, r)), this.jr.push([n, i]), i;
17751
+ return e && e.j ? i = e : (i = new ur(e), t && r && ms(e, t, r)), this.jr.push([n, i]), i;
17752
17752
  },
17753
17753
  /**
17754
17754
  * Short for "take transitions", will take as many sequential transitions as
@@ -17806,8 +17806,8 @@ ur.prototype = {
17806
17806
  if (r)
17807
17807
  if (s.t && typeof s.t == "string") {
17808
17808
  const l = Sa(IA(s.t, r), t);
17809
- ps(o, l, r);
17810
- } else t && ps(o, t, r);
17809
+ ms(o, l, r);
17810
+ } else t && ms(o, t, r);
17811
17811
  s.t = o;
17812
17812
  }
17813
17813
  return i.j[n] = s, s;
@@ -17915,16 +17915,16 @@ function BA(n = []) {
17915
17915
  fo(t, $c[m], $h, $i, h);
17916
17916
  for (let m = 0; m < Fc.length; m++)
17917
17917
  fo(t, Fc[m], Fh, Ph, p);
17918
- ps($h, {
17918
+ ms($h, {
17919
17919
  tld: !0,
17920
17920
  ascii: !0
17921
- }, e), ps(Fh, {
17921
+ }, e), ms(Fh, {
17922
17922
  utld: !0,
17923
17923
  alpha: !0
17924
- }, e), fo(t, "file", gu, $i, h), fo(t, "mailto", gu, $i, h), fo(t, "http", ea, $i, h), fo(t, "https", ea, $i, h), fo(t, "ftp", ea, $i, h), fo(t, "ftps", ea, $i, h), ps(gu, {
17924
+ }, e), fo(t, "file", gu, $i, h), fo(t, "mailto", gu, $i, h), fo(t, "http", ea, $i, h), fo(t, "https", ea, $i, h), fo(t, "ftp", ea, $i, h), fo(t, "ftps", ea, $i, h), ms(gu, {
17925
17925
  scheme: !0,
17926
17926
  ascii: !0
17927
- }, e), ps(ea, {
17927
+ }, e), ms(ea, {
17928
17928
  slashscheme: !0,
17929
17929
  ascii: !0
17930
17930
  }, e), n = n.sort((m, v) => m[0] > v[0] ? 1 : -1);
@@ -18447,7 +18447,7 @@ function GA(n) {
18447
18447
  });
18448
18448
  }
18449
18449
  const YA = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
18450
- function rs(n, e) {
18450
+ function is(n, e) {
18451
18451
  const t = [
18452
18452
  "http",
18453
18453
  "https",
@@ -18501,7 +18501,7 @@ const JA = sr.create({
18501
18501
  rel: "noopener noreferrer nofollow",
18502
18502
  class: null
18503
18503
  },
18504
- isAllowedUri: (n, e) => !!rs(n, e.protocols),
18504
+ isAllowedUri: (n, e) => !!is(n, e.protocols),
18505
18505
  validate: (n) => !!n,
18506
18506
  shouldAutoLink: (n) => !!n
18507
18507
  };
@@ -18532,7 +18532,7 @@ const JA = sr.create({
18532
18532
  getAttrs: (n) => {
18533
18533
  const e = n.getAttribute("href");
18534
18534
  return !e || !this.options.isAllowedUri(e, {
18535
- defaultValidate: (t) => !!rs(t, this.options.protocols),
18535
+ defaultValidate: (t) => !!is(t, this.options.protocols),
18536
18536
  protocols: this.options.protocols,
18537
18537
  defaultProtocol: this.options.defaultProtocol
18538
18538
  }) ? !1 : null;
@@ -18542,7 +18542,7 @@ const JA = sr.create({
18542
18542
  },
18543
18543
  renderHTML({ HTMLAttributes: n }) {
18544
18544
  return this.options.isAllowedUri(n.href, {
18545
- defaultValidate: (e) => !!rs(e, this.options.protocols),
18545
+ defaultValidate: (e) => !!is(e, this.options.protocols),
18546
18546
  protocols: this.options.protocols,
18547
18547
  defaultProtocol: this.options.defaultProtocol
18548
18548
  }) ? ["a", Be(this.options.HTMLAttributes, n), 0] : [
@@ -18556,7 +18556,7 @@ const JA = sr.create({
18556
18556
  setLink: (n) => ({ chain: e }) => {
18557
18557
  const { href: t } = n;
18558
18558
  return this.options.isAllowedUri(t, {
18559
- defaultValidate: (r) => !!rs(r, this.options.protocols),
18559
+ defaultValidate: (r) => !!is(r, this.options.protocols),
18560
18560
  protocols: this.options.protocols,
18561
18561
  defaultProtocol: this.options.defaultProtocol
18562
18562
  }) ? e().setMark(this.name, n).setMeta("preventAutolink", !0).run() : !1;
@@ -18564,7 +18564,7 @@ const JA = sr.create({
18564
18564
  toggleLink: (n) => ({ chain: e }) => {
18565
18565
  const { href: t } = n;
18566
18566
  return this.options.isAllowedUri(t, {
18567
- defaultValidate: (r) => !!rs(r, this.options.protocols),
18567
+ defaultValidate: (r) => !!is(r, this.options.protocols),
18568
18568
  protocols: this.options.protocols,
18569
18569
  defaultProtocol: this.options.defaultProtocol
18570
18570
  }) ? e().toggleMark(this.name, n, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run() : !1;
@@ -18574,12 +18574,12 @@ const JA = sr.create({
18574
18574
  },
18575
18575
  addPasteRules() {
18576
18576
  return [
18577
- Fo({
18577
+ zo({
18578
18578
  find: (n) => {
18579
18579
  const e = [];
18580
18580
  if (n) {
18581
18581
  const { protocols: t, defaultProtocol: r } = this.options, i = I3(n).filter((o) => o.isLink && this.options.isAllowedUri(o.value, {
18582
- defaultValidate: (s) => !!rs(s, t),
18582
+ defaultValidate: (s) => !!is(s, t),
18583
18583
  protocols: t,
18584
18584
  defaultProtocol: r
18585
18585
  }));
@@ -18609,7 +18609,7 @@ const JA = sr.create({
18609
18609
  type: this.type,
18610
18610
  defaultProtocol: this.options.defaultProtocol,
18611
18611
  validate: (r) => this.options.isAllowedUri(r, {
18612
- defaultValidate: (i) => !!rs(i, e),
18612
+ defaultValidate: (i) => !!is(i, e),
18613
18613
  protocols: e,
18614
18614
  defaultProtocol: t
18615
18615
  }),
@@ -18654,7 +18654,7 @@ const JA = sr.create({
18654
18654
  return !0;
18655
18655
  if (n.state.selection.from !== n.state.selection.to)
18656
18656
  return !1;
18657
- if (!$o(n.state, e) && XA(n.state, e, t)) {
18657
+ if (!Fo(n.state, e) && XA(n.state, e, t)) {
18658
18658
  const { $anchor: a } = n.state.selection, l = n.state.doc.resolve(a.before() - 1), c = [];
18659
18659
  l.node().descendants((f, h) => {
18660
18660
  f.type.name === e && c.push({ node: f, pos: h });
@@ -18665,7 +18665,7 @@ const JA = sr.create({
18665
18665
  const d = n.state.doc.resolve(l.start() + u.pos + 1);
18666
18666
  return n.chain().cut({ from: a.start() - 1, to: a.end() + 1 }, d.end()).joinForward().run();
18667
18667
  }
18668
- if (!$o(n.state, e) || !VT(n.state))
18668
+ if (!Fo(n.state, e) || !VT(n.state))
18669
18669
  return !1;
18670
18670
  const r = d0(e, n.state);
18671
18671
  if (!r)
@@ -18679,7 +18679,7 @@ const JA = sr.create({
18679
18679
  const t = L3(n, e), r = d0(n, e);
18680
18680
  return !r || !t ? !1 : t < r.depth;
18681
18681
  }, Mb = (n, e) => {
18682
- if (!$o(n.state, e) || !HT(n.state, e))
18682
+ if (!Fo(n.state, e) || !HT(n.state, e))
18683
18683
  return !1;
18684
18684
  const { selection: t } = n.state, { $from: r, $to: i } = t;
18685
18685
  return !t.empty && r.sameParent(i) ? !1 : eE(e, n.state) ? n.chain().focus(n.state.selection.from + 4).lift(e).joinBackward().run() : tE(e, n.state) ? n.chain().joinForward().joinBackward().run() : n.commands.joinItemForward();
@@ -19123,11 +19123,11 @@ const JA = sr.create({
19123
19123
  },
19124
19124
  addPasteRules() {
19125
19125
  return [
19126
- Fo({
19126
+ zo({
19127
19127
  find: AE,
19128
19128
  type: this.type
19129
19129
  }),
19130
- Fo({
19130
+ zo({
19131
19131
  find: ME,
19132
19132
  type: this.type
19133
19133
  })
@@ -19221,7 +19221,7 @@ const JA = sr.create({
19221
19221
  },
19222
19222
  addPasteRules() {
19223
19223
  return [
19224
- Fo({
19224
+ zo({
19225
19225
  find: IE,
19226
19226
  type: this.type
19227
19227
  })
@@ -20090,11 +20090,11 @@ const q3 = j3(!1, !0), K3 = j3(!0, !0), iM = ft.create({
20090
20090
  },
20091
20091
  addPasteRules() {
20092
20092
  return [
20093
- Fo({
20093
+ zo({
20094
20094
  find: sM,
20095
20095
  type: this.type
20096
20096
  }),
20097
- Fo({
20097
+ zo({
20098
20098
  find: lM,
20099
20099
  type: this.type
20100
20100
  })
@@ -20272,7 +20272,7 @@ const q3 = j3(!1, !0), K3 = j3(!0, !0), iM = ft.create({
20272
20272
  },
20273
20273
  addPasteRules() {
20274
20274
  return [
20275
- Fo({
20275
+ zo({
20276
20276
  find: hM,
20277
20277
  type: this.type
20278
20278
  })
@@ -20290,7 +20290,7 @@ const q3 = j3(!1, !0), K3 = j3(!0, !0), iM = ft.create({
20290
20290
  }), vu = (n, e) => e.view.domAtPos(n).node.offsetParent !== null, Bb = (n, e) => {
20291
20291
  const { state: t, view: r, extensionManager: i } = n, { schema: o, selection: s } = t, { empty: a, $anchor: l } = s, c = !!i.extensions.find((v) => v.name === "gapCursor");
20292
20292
  if (!a || l.parent.type !== o.nodes.detailsSummary || !c || e === "right" && l.parentOffset !== l.parent.nodeSize - 2) return !1;
20293
- const u = Qo((v) => v.type === o.nodes.details)(s);
20293
+ const u = Zo((v) => v.type === o.nodes.details)(s);
20294
20294
  if (!u) return !1;
20295
20295
  const d = pu(u.node, (v) => v.type === o.nodes.detailsContent);
20296
20296
  if (!d.length || vu(u.start + d[0].pos + 1, n)) return !1;
@@ -20344,7 +20344,7 @@ const q3 = j3(!1, !0), K3 = j3(!0, !0), iM = ft.create({
20344
20344
  const c = ((t = l.toJSON()) === null || t === void 0 ? void 0 : t.content) || [];
20345
20345
  return e().insertContentAt({ from: a.start, to: a.end }, { type: this.name, content: [{ type: "detailsSummary" }, { type: "detailsContent", content: c }] }).setTextSelection(a.start + 2).run();
20346
20346
  }, unsetDetails: () => ({ state: n, chain: e }) => {
20347
- const { selection: t, schema: r } = n, i = Qo((m) => m.type === this.type)(t);
20347
+ const { selection: t, schema: r } = n, i = Zo((m) => m.type === this.type)(t);
20348
20348
  if (!i) return !1;
20349
20349
  const o = pu(i.node, (m) => m.type === r.nodes.detailsSummary), s = pu(i.node, (m) => m.type === r.nodes.detailsContent);
20350
20350
  if (!o.length || !s.length) return !1;
@@ -23752,7 +23752,7 @@ var Vh = {
23752
23752
  return Math.min(e.number * r, t.maxSize);
23753
23753
  }, Se = function(e) {
23754
23754
  return +e.toFixed(4) + "em";
23755
- }, zo = function(e) {
23755
+ }, Ho = function(e) {
23756
23756
  return e.filter((t) => t).join(" ");
23757
23757
  }, e5 = function(e, t, r) {
23758
23758
  if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = r || {}, t) {
@@ -23762,7 +23762,7 @@ var Vh = {
23762
23762
  }
23763
23763
  }, t5 = function(e) {
23764
23764
  var t = document.createElement(e);
23765
- t.className = zo(this.classes);
23765
+ t.className = Ho(this.classes);
23766
23766
  for (var r in this.style)
23767
23767
  this.style.hasOwnProperty(r) && (t.style[r] = this.style[r]);
23768
23768
  for (var i in this.attributes)
@@ -23772,7 +23772,7 @@ var Vh = {
23772
23772
  return t;
23773
23773
  }, n5 = function(e) {
23774
23774
  var t = "<" + e;
23775
- this.classes.length && (t += ' class="' + He.escape(zo(this.classes)) + '"');
23775
+ this.classes.length && (t += ' class="' + He.escape(Ho(this.classes)) + '"');
23776
23776
  var r = "";
23777
23777
  for (var i in this.style)
23778
23778
  this.style.hasOwnProperty(i) && (r += He.hyphenate(i) + ":" + this.style[i] + ";");
@@ -23866,7 +23866,7 @@ class Yr {
23866
23866
  */
23867
23867
  toNode() {
23868
23868
  var e = document.createTextNode(this.text), t = null;
23869
- this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = Se(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = zo(this.classes));
23869
+ this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = Se(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = Ho(this.classes));
23870
23870
  for (var r in this.style)
23871
23871
  this.style.hasOwnProperty(r) && (t = t || document.createElement("span"), t.style[r] = this.style[r]);
23872
23872
  return t ? (t.appendChild(e), t) : e;
@@ -23876,7 +23876,7 @@ class Yr {
23876
23876
  */
23877
23877
  toMarkup() {
23878
23878
  var e = !1, t = "<span";
23879
- this.classes.length && (e = !0, t += ' class="', t += He.escape(zo(this.classes)), t += '"');
23879
+ this.classes.length && (e = !0, t += ' class="', t += He.escape(Ho(this.classes)), t += '"');
23880
23880
  var r = "";
23881
23881
  this.italic > 0 && (r += "margin-right:" + this.italic + "em;");
23882
23882
  for (var i in this.style)
@@ -23908,7 +23908,7 @@ class Qi {
23908
23908
  return e += "</svg>", e;
23909
23909
  }
23910
23910
  }
23911
- class Ho {
23911
+ class Vo {
23912
23912
  constructor(e, t) {
23913
23913
  this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = t;
23914
23914
  }
@@ -24608,9 +24608,9 @@ for (var Xn = 0; Xn < _d.length; Xn++) {
24608
24608
  Xe = "𝕜";
24609
24609
  b(w, C, je, "k", Xe);
24610
24610
  b(fe, C, G, "k", Xe);
24611
- for (var is = 0; is < 10; is++) {
24612
- var mo = is.toString();
24613
- Xe = String.fromCharCode(55349, 57294 + is), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57314 + is), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57324 + is), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57334 + is), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe);
24611
+ for (var ss = 0; ss < 10; ss++) {
24612
+ var mo = ss.toString();
24613
+ Xe = String.fromCharCode(55349, 57294 + ss), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57314 + ss), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57324 + ss), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe), Xe = String.fromCharCode(55349, 57334 + ss), b(w, C, je, mo, Xe), b(fe, C, G, mo, Xe);
24614
24614
  }
24615
24615
  var Wh = "ÐÞþ";
24616
24616
  for (var gf = 0; gf < Wh.length; gf++) {
@@ -24764,7 +24764,7 @@ var jc = [
24764
24764
  } else
24765
24765
  throw new Error("unexpected type: " + r + " in makeOrd");
24766
24766
  }, oN = (n, e) => {
24767
- if (zo(n.classes) !== zo(e.classes) || n.skew !== e.skew || n.maxFontSize !== e.maxFontSize)
24767
+ if (Ho(n.classes) !== Ho(e.classes) || n.skew !== e.skew || n.maxFontSize !== e.maxFontSize)
24768
24768
  return !1;
24769
24769
  if (n.classes.length === 1) {
24770
24770
  var t = n.classes[0];
@@ -24961,7 +24961,7 @@ var jc = [
24961
24961
  oiiintSize1: ["oiiintSize1", 1.304, 0.499],
24962
24962
  oiiintSize2: ["oiiintSize2", 1.98, 0.659]
24963
24963
  }, hN = function(e, t) {
24964
- var [r, i, o] = a5[e], s = new Ho(r), a = new Qi([s], {
24964
+ var [r, i, o] = a5[e], s = new Vo(r), a = new Qi([s], {
24965
24965
  width: Se(i),
24966
24966
  height: Se(o),
24967
24967
  // Override CSS rule `.katex svg { width: 100% }`
@@ -24989,7 +24989,7 @@ var jc = [
24989
24989
  }, tn = {
24990
24990
  number: 3,
24991
24991
  unit: "mu"
24992
- }, ss = {
24992
+ }, as = {
24993
24993
  number: 4,
24994
24994
  unit: "mu"
24995
24995
  }, Bi = {
@@ -24998,7 +24998,7 @@ var jc = [
24998
24998
  }, pN = {
24999
24999
  mord: {
25000
25000
  mop: tn,
25001
- mbin: ss,
25001
+ mbin: as,
25002
25002
  mrel: Bi,
25003
25003
  minner: tn
25004
25004
  },
@@ -25009,10 +25009,10 @@ var jc = [
25009
25009
  minner: tn
25010
25010
  },
25011
25011
  mbin: {
25012
- mord: ss,
25013
- mop: ss,
25014
- mopen: ss,
25015
- minner: ss
25012
+ mord: as,
25013
+ mop: as,
25014
+ mopen: as,
25015
+ minner: as
25016
25016
  },
25017
25017
  mrel: {
25018
25018
  mord: Bi,
@@ -25023,7 +25023,7 @@ var jc = [
25023
25023
  mopen: {},
25024
25024
  mclose: {
25025
25025
  mop: tn,
25026
- mbin: ss,
25026
+ mbin: as,
25027
25027
  mrel: Bi,
25028
25028
  minner: tn
25029
25029
  },
@@ -25039,7 +25039,7 @@ var jc = [
25039
25039
  minner: {
25040
25040
  mord: tn,
25041
25041
  mop: tn,
25042
- mbin: ss,
25042
+ mbin: as,
25043
25043
  mrel: Bi,
25044
25044
  mopen: tn,
25045
25045
  mpunct: tn,
@@ -25257,7 +25257,7 @@ class Fr {
25257
25257
  var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
25258
25258
  for (var t in this.attributes)
25259
25259
  Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
25260
- this.classes.length > 0 && (e.className = zo(this.classes));
25260
+ this.classes.length > 0 && (e.className = Ho(this.classes));
25261
25261
  for (var r = 0; r < this.children.length; r++)
25262
25262
  e.appendChild(this.children[r].toNode());
25263
25263
  return e;
@@ -25269,7 +25269,7 @@ class Fr {
25269
25269
  var e = "<" + this.type;
25270
25270
  for (var t in this.attributes)
25271
25271
  Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += He.escape(this.attributes[t]), e += '"');
25272
- this.classes.length > 0 && (e += ' class ="' + He.escape(zo(this.classes)) + '"'), e += ">";
25272
+ this.classes.length > 0 && (e += ' class ="' + He.escape(Ho(this.classes)) + '"'), e += ">";
25273
25273
  for (var r = 0; r < this.children.length; r++)
25274
25274
  e += this.children[r].toMarkup();
25275
25275
  return e += "</" + this.type + ">", e;
@@ -25412,7 +25412,7 @@ var ve = {
25412
25412
  o.push(l), s = l;
25413
25413
  }
25414
25414
  return o;
25415
- }, Vo = function(e, t, r) {
25415
+ }, Uo = function(e, t, r) {
25416
25416
  return Dm(gr(e, t, r));
25417
25417
  }, zt = function(e, t) {
25418
25418
  if (!e)
@@ -25568,7 +25568,7 @@ var d5 = function(e) {
25568
25568
  var p = [1, 1, 2, 2, 3, 3][u];
25569
25569
  l === "widehat" || l === "widecheck" ? (a = [0, 1062, 2364, 2364, 2364][p], d = [0, 239, 300, 360, 420][p], h = [0, 0.24, 0.3, 0.3, 0.36, 0.42][p], f = l + p) : (a = [0, 600, 1033, 2339, 2340][p], d = [0, 260, 286, 306, 312][p], h = [0, 0.26, 0.286, 0.3, 0.306, 0.34][p], f = "tilde" + p);
25570
25570
  }
25571
- var m = new Ho(f), v = new Qi([m], {
25571
+ var m = new Vo(f), v = new Qi([m], {
25572
25572
  width: "100%",
25573
25573
  height: Se(h),
25574
25574
  viewBox: "0 0 " + a + " " + d,
@@ -25592,7 +25592,7 @@ var d5 = function(e) {
25592
25592
  throw new Error(`Correct katexImagesData or update code here to support
25593
25593
  ` + R + " children.");
25594
25594
  for (var re = 0; re < R; re++) {
25595
- var S = new Ho(A[re]), P = new Qi([S], {
25595
+ var S = new Vo(A[re]), P = new Qi([S], {
25596
25596
  width: "400em",
25597
25597
  height: Se(E),
25598
25598
  viewBox: "0 0 " + a + " " + T,
@@ -26503,7 +26503,7 @@ var al = function(e, t, r) {
26503
26503
  elem: o
26504
26504
  };
26505
26505
  }, vf = function(e, t, r) {
26506
- var i = bi["Size4-Regular"][e.charCodeAt(0)] ? bi["Size4-Regular"][e.charCodeAt(0)][4] : bi["Size1-Regular"][e.charCodeAt(0)][4], o = new Ho("inner", WM(e, Math.round(1e3 * t))), s = new Qi([o], {
26506
+ var i = bi["Size4-Regular"][e.charCodeAt(0)] ? bi["Size4-Regular"][e.charCodeAt(0)][4] : bi["Size1-Regular"][e.charCodeAt(0)][4], o = new Vo("inner", WM(e, Math.round(1e3 * t))), s = new Qi([o], {
26507
26507
  width: Se(i),
26508
26508
  height: Se(t),
26509
26509
  // Override CSS rule `.katex svg { width: 100% }`
@@ -26532,7 +26532,7 @@ var al = function(e, t, r) {
26532
26532
  r && (te *= i.sizeMultiplier);
26533
26533
  var re = L / 2 - te, S = [];
26534
26534
  if (d.length > 0) {
26535
- var P = L - m - A, D = Math.round(L * 1e3), M = jM(d, Math.round(P * 1e3)), Y = new Ho(d, M), K = (f / 1e3).toFixed(3) + "em", j = (D / 1e3).toFixed(3) + "em", se = new Qi([Y], {
26535
+ var P = L - m - A, D = Math.round(L * 1e3), M = jM(d, Math.round(P * 1e3)), Y = new Vo(d, M), K = (f / 1e3).toFixed(3) + "em", j = (D / 1e3).toFixed(3) + "em", se = new Qi([Y], {
26536
26536
  width: K,
26537
26537
  height: j,
26538
26538
  viewBox: "0 0 " + f + " " + D
@@ -26558,7 +26558,7 @@ var al = function(e, t, r) {
26558
26558
  }, Me);
26559
26559
  return Bm(ee.makeSpan(["delimsizing", "mult"], [$e], Me), qe.TEXT, i, s);
26560
26560
  }, yf = 80, wf = 0.08, _f = function(e, t, r, i, o) {
26561
- var s = UM(e, i, r), a = new Ho(e, s), l = new Qi([a], {
26561
+ var s = UM(e, i, r), a = new Vo(e, s), l = new Qi([a], {
26562
26562
  // Note: 1000:1 ratio of viewBox to document em width.
26563
26563
  width: "400em",
26564
26564
  height: Se(t),
@@ -26914,7 +26914,7 @@ var Pm = (n, e) => {
26914
26914
  i = i / u.sizeMultiplier;
26915
26915
  var d = t.height + t.depth + l + c;
26916
26916
  t.style.paddingLeft = Se(d / 2 + l);
26917
- var f = Math.floor(1e3 * d * i), h = HM(f), p = new Qi([new Ho("phase", h)], {
26917
+ var f = Math.floor(1e3 * d * i), h = HM(f), p = new Qi([new Vo("phase", h)], {
26918
26918
  width: "400em",
26919
26919
  height: Se(f / 1e3),
26920
26920
  viewBox: "0 0 400000 " + f,
@@ -27159,7 +27159,7 @@ function Fm(n) {
27159
27159
  if (n.indexOf("ed") === -1)
27160
27160
  return n.indexOf("*") === -1;
27161
27161
  }
27162
- function Zo(n, e, t) {
27162
+ function es(n, e, t) {
27163
27163
  var {
27164
27164
  hskipBeforeAndAfter: r,
27165
27165
  addJot: i,
@@ -27377,7 +27377,7 @@ var Ei = function(e, t) {
27377
27377
  return /[sd]/.test(R) && u.setAttribute("rowlines", R.trim()), f !== "" && (u = new ve.MathNode("menclose", [u]), u.setAttribute("notation", f.trim())), e.arraystretch && e.arraystretch < 1 && (u = new ve.MathNode("mstyle", [u]), u.setAttribute("scriptlevel", "1")), u;
27378
27378
  }, N5 = function(e, t) {
27379
27379
  e.envName.indexOf("ed") === -1 && b0(e);
27380
- var r = [], i = e.envName.indexOf("at") > -1 ? "alignat" : "align", o = e.envName === "split", s = Zo(e.parser, {
27380
+ var r = [], i = e.envName.indexOf("at") > -1 ? "alignat" : "align", o = e.envName === "split", s = es(e.parser, {
27381
27381
  cols: r,
27382
27382
  addJot: !0,
27383
27383
  autoTag: o ? void 0 : Fm(e.envName),
@@ -27453,7 +27453,7 @@ Ai({
27453
27453
  // \@preamble in lttab.dtx
27454
27454
  maxNumCols: i.length
27455
27455
  };
27456
- return Zo(n.parser, o, zm(n.envName));
27456
+ return es(n.parser, o, zm(n.envName));
27457
27457
  },
27458
27458
  htmlBuilder: Ei,
27459
27459
  mathmlBuilder: Mi
@@ -27490,7 +27490,7 @@ Ai({
27490
27490
  }];
27491
27491
  }
27492
27492
  }
27493
- var o = Zo(n.parser, r, zm(n.envName)), s = Math.max(0, ...o.body.map((a) => a.length));
27493
+ var o = es(n.parser, r, zm(n.envName)), s = Math.max(0, ...o.body.map((a) => a.length));
27494
27494
  return o.cols = new Array(s).fill({
27495
27495
  type: "align",
27496
27496
  align: t
@@ -27516,7 +27516,7 @@ Ai({
27516
27516
  handler(n) {
27517
27517
  var e = {
27518
27518
  arraystretch: 0.5
27519
- }, t = Zo(n.parser, e, "script");
27519
+ }, t = es(n.parser, e, "script");
27520
27520
  return t.colSeparationType = "small", t;
27521
27521
  },
27522
27522
  htmlBuilder: Ei,
@@ -27545,7 +27545,7 @@ Ai({
27545
27545
  hskipBeforeAndAfter: !1,
27546
27546
  arraystretch: 0.5
27547
27547
  };
27548
- if (o = Zo(n.parser, o, "script"), o.body.length > 0 && o.body[0].length > 1)
27548
+ if (o = es(n.parser, o, "script"), o.body.length > 0 && o.body[0].length > 1)
27549
27549
  throw new we("{subarray} can contain only one column");
27550
27550
  return o;
27551
27551
  },
@@ -27577,7 +27577,7 @@ Ai({
27577
27577
  pregap: 0,
27578
27578
  postgap: 0
27579
27579
  }]
27580
- }, t = Zo(n.parser, e, zm(n.envName));
27580
+ }, t = es(n.parser, e, zm(n.envName));
27581
27581
  return {
27582
27582
  type: "leftright",
27583
27583
  mode: n.mode,
@@ -27619,7 +27619,7 @@ Ai({
27619
27619
  emptySingleRow: !0,
27620
27620
  leqno: n.parser.settings.leqno
27621
27621
  };
27622
- return Zo(n.parser, e, "display");
27622
+ return es(n.parser, e, "display");
27623
27623
  },
27624
27624
  htmlBuilder: Ei,
27625
27625
  mathmlBuilder: Mi
@@ -27649,7 +27649,7 @@ Ai({
27649
27649
  maxNumCols: 1,
27650
27650
  leqno: n.parser.settings.leqno
27651
27651
  };
27652
- return Zo(n.parser, e, "display");
27652
+ return es(n.parser, e, "display");
27653
27653
  },
27654
27654
  htmlBuilder: Ei,
27655
27655
  mathmlBuilder: Mi
@@ -28254,7 +28254,7 @@ Ee({
28254
28254
  return ee.makeAnchor(n.href, [], t, e);
28255
28255
  },
28256
28256
  mathmlBuilder: (n, e) => {
28257
- var t = Vo(n.body, e);
28257
+ var t = Uo(n.body, e);
28258
28258
  return t instanceof Fr || (t = new Fr("mrow", [t])), t.setAttribute("href", n.href), t;
28259
28259
  }
28260
28260
  });
@@ -28390,7 +28390,7 @@ Ee({
28390
28390
  o !== "class" && n.attributes.hasOwnProperty(o) && i.setAttribute(o, n.attributes[o]);
28391
28391
  return i;
28392
28392
  },
28393
- mathmlBuilder: (n, e) => Vo(n.body, e)
28393
+ mathmlBuilder: (n, e) => Uo(n.body, e)
28394
28394
  });
28395
28395
  Ee({
28396
28396
  type: "htmlmathml",
@@ -28414,7 +28414,7 @@ Ee({
28414
28414
  var t = Tn(n.html, e, !1);
28415
28415
  return ee.makeFragment(t);
28416
28416
  },
28417
- mathmlBuilder: (n, e) => Vo(n.mathml, e)
28417
+ mathmlBuilder: (n, e) => Uo(n.mathml, e)
28418
28418
  });
28419
28419
  var kf = function(e) {
28420
28420
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))
@@ -28658,7 +28658,7 @@ Ee({
28658
28658
  },
28659
28659
  mathmlBuilder: (n, e) => {
28660
28660
  var t = iv(n, e);
28661
- return Vo(t, e);
28661
+ return Uo(t, e);
28662
28662
  }
28663
28663
  });
28664
28664
  var R5 = (n, e, t, r, i, o, s) => {
@@ -29020,7 +29020,7 @@ Ps({
29020
29020
  return n.semisimple ? ee.makeFragment(Tn(n.body, e, !1)) : ee.makeSpan(["mord"], Tn(n.body, e, !0), e);
29021
29021
  },
29022
29022
  mathmlBuilder(n, e) {
29023
- return Vo(n.body, e, !0);
29023
+ return Uo(n.body, e, !0);
29024
29024
  }
29025
29025
  });
29026
29026
  Ee({
@@ -29654,7 +29654,7 @@ var av = () => {
29654
29654
  Ps({
29655
29655
  type: "tag",
29656
29656
  mathmlBuilder(n, e) {
29657
- var t = new ve.MathNode("mtable", [new ve.MathNode("mtr", [av(), new ve.MathNode("mtd", [Vo(n.body, e)]), av(), new ve.MathNode("mtd", [Vo(n.tag, e)])])]);
29657
+ var t = new ve.MathNode("mtable", [new ve.MathNode("mtr", [av(), new ve.MathNode("mtd", [Uo(n.body, e)]), av(), new ve.MathNode("mtd", [Uo(n.tag, e)])])]);
29658
29658
  return t.setAttribute("width", "100%"), t;
29659
29659
  }
29660
29660
  });
@@ -29723,7 +29723,7 @@ Ee({
29723
29723
  },
29724
29724
  mathmlBuilder(n, e) {
29725
29725
  var t = uv(n, e);
29726
- return Vo(n.body, t);
29726
+ return Uo(n.body, t);
29727
29727
  }
29728
29728
  });
29729
29729
  Ee({
@@ -32021,7 +32021,7 @@ var fO = function(e, t) {
32021
32021
  Anchor: Nm,
32022
32022
  SymbolNode: Yr,
32023
32023
  SvgNode: Qi,
32024
- PathNode: Ho,
32024
+ PathNode: Vo,
32025
32025
  LineNode: Uh
32026
32026
  }
32027
32027
  };
@@ -32309,7 +32309,7 @@ function to(n) {
32309
32309
  function $O(n) {
32310
32310
  return ["table", "td", "th"].indexOf(xi(n)) >= 0;
32311
32311
  }
32312
- function es(n) {
32312
+ function ts(n) {
32313
32313
  return ((Ns(n) ? n.ownerDocument : (
32314
32314
  // $FlowFixMe[prop-missing]
32315
32315
  n.document
@@ -32324,7 +32324,7 @@ function y0(n) {
32324
32324
  n.parentNode || // DOM Element detected
32325
32325
  (Gm(n) ? n.host : null) || // ShadowRoot detected
32326
32326
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
32327
- es(n)
32327
+ ts(n)
32328
32328
  );
32329
32329
  }
32330
32330
  function kv(n) {
@@ -32431,7 +32431,7 @@ function xv(n) {
32431
32431
  var y = s.hasOwnProperty("x"), k = s.hasOwnProperty("y"), A = pr, x = hr, T = window;
32432
32432
  if (c) {
32433
32433
  var E = yc(t), R = "clientHeight", U = "clientWidth";
32434
- if (E === Ar(t) && (E = es(t), to(E).position !== "static" && a === "absolute" && (R = "scrollHeight", U = "scrollWidth")), E = E, i === hr || (i === pr || i === Qr) && o === Wl) {
32434
+ if (E === Ar(t) && (E = ts(t), to(E).position !== "static" && a === "absolute" && (R = "scrollHeight", U = "scrollWidth")), E = E, i === hr || (i === pr || i === Qr) && o === Wl) {
32435
32435
  x = Xr;
32436
32436
  var L = d && E === T && T.visualViewport ? T.visualViewport.height : (
32437
32437
  // $FlowFixMe[prop-missing]
@@ -32543,10 +32543,10 @@ function Xm(n) {
32543
32543
  };
32544
32544
  }
32545
32545
  function Qm(n) {
32546
- return Ma(es(n)).left + Xm(n).scrollLeft;
32546
+ return Ma(ts(n)).left + Xm(n).scrollLeft;
32547
32547
  }
32548
32548
  function ZO(n, e) {
32549
- var t = Ar(n), r = es(n), i = t.visualViewport, o = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
32549
+ var t = Ar(n), r = ts(n), i = t.visualViewport, o = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
32550
32550
  if (i) {
32551
32551
  o = i.width, s = i.height;
32552
32552
  var c = Q5();
@@ -32560,7 +32560,7 @@ function ZO(n, e) {
32560
32560
  };
32561
32561
  }
32562
32562
  function eD(n) {
32563
- var e, t = es(n), r = Xm(n), i = (e = n.ownerDocument) == null ? void 0 : e.body, o = _s(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = _s(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), a = -r.scrollLeft + Qm(n), l = -r.scrollTop;
32563
+ var e, t = ts(n), r = Xm(n), i = (e = n.ownerDocument) == null ? void 0 : e.body, o = _s(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = _s(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), a = -r.scrollLeft + Qm(n), l = -r.scrollTop;
32564
32564
  return to(i || t).direction === "rtl" && (a += _s(t.clientWidth, i ? i.clientWidth : 0) - o), {
32565
32565
  width: o,
32566
32566
  height: s,
@@ -32597,7 +32597,7 @@ function tD(n, e) {
32597
32597
  return t.top = t.top + n.clientTop, t.left = t.left + n.clientLeft, t.bottom = t.top + n.clientHeight, t.right = t.left + n.clientWidth, t.width = n.clientWidth, t.height = n.clientHeight, t.x = t.left, t.y = t.top, t;
32598
32598
  }
32599
32599
  function Sv(n, e, t) {
32600
- return e === Y5 ? Qh(ZO(n, t)) : Ns(e) ? tD(e, t) : Qh(eD(es(n)));
32600
+ return e === Y5 ? Qh(ZO(n, t)) : Ns(e) ? tD(e, t) : Qh(eD(ts(n)));
32601
32601
  }
32602
32602
  function nD(n) {
32603
32603
  var e = xl(y0(n)), t = ["absolute", "fixed"].indexOf(to(n).position) >= 0, r = t && Gr(n) ? yc(n) : n;
@@ -32661,7 +32661,7 @@ function i6(n) {
32661
32661
  }
32662
32662
  function jl(n, e) {
32663
32663
  e === void 0 && (e = {});
32664
- var t = e, r = t.placement, i = r === void 0 ? n.placement : r, o = t.strategy, s = o === void 0 ? n.strategy : o, a = t.boundary, l = a === void 0 ? CO : a, c = t.rootBoundary, u = c === void 0 ? Y5 : c, d = t.elementContext, f = d === void 0 ? el : d, h = t.altBoundary, p = h === void 0 ? !1 : h, m = t.padding, v = m === void 0 ? 0 : m, y = t6(typeof v != "number" ? v : n6(v, vc)), k = f === el ? SO : el, A = n.rects.popper, x = n.elements[p ? k : f], T = rD(Ns(x) ? x : x.contextElement || es(n.elements.popper), l, u, s), E = Ma(n.elements.reference), R = i6({
32664
+ var t = e, r = t.placement, i = r === void 0 ? n.placement : r, o = t.strategy, s = o === void 0 ? n.strategy : o, a = t.boundary, l = a === void 0 ? CO : a, c = t.rootBoundary, u = c === void 0 ? Y5 : c, d = t.elementContext, f = d === void 0 ? el : d, h = t.altBoundary, p = h === void 0 ? !1 : h, m = t.padding, v = m === void 0 ? 0 : m, y = t6(typeof v != "number" ? v : n6(v, vc)), k = f === el ? SO : el, A = n.rects.popper, x = n.elements[p ? k : f], T = rD(Ns(x) ? x : x.contextElement || ts(n.elements.popper), l, u, s), E = Ma(n.elements.reference), R = i6({
32665
32665
  reference: E,
32666
32666
  element: A,
32667
32667
  strategy: "absolute",
@@ -32903,7 +32903,7 @@ function wD(n) {
32903
32903
  }
32904
32904
  function _D(n, e, t) {
32905
32905
  t === void 0 && (t = !1);
32906
- var r = Gr(e), i = Gr(e) && wD(e), o = es(e), s = Ma(n, i, t), a = {
32906
+ var r = Gr(e), i = Gr(e) && wD(e), o = ts(e), s = Ma(n, i, t), a = {
32907
32907
  scrollLeft: 0,
32908
32908
  scrollTop: 0
32909
32909
  }, l = {
@@ -33080,7 +33080,7 @@ function TD(n) {
33080
33080
  }
33081
33081
  var AD = [JO, pD, GO, X5, fD, aD, bD, WO, cD], ED = /* @__PURE__ */ TD({
33082
33082
  defaultModifiers: AD
33083
- }), MD = "tippy-box", o6 = "tippy-content", ND = "tippy-backdrop", s6 = "tippy-arrow", a6 = "tippy-svg-arrow", as = {
33083
+ }), MD = "tippy-box", o6 = "tippy-content", ND = "tippy-backdrop", s6 = "tippy-arrow", a6 = "tippy-svg-arrow", ls = {
33084
33084
  passive: !0,
33085
33085
  capture: !0
33086
33086
  }, l6 = function() {
@@ -33221,7 +33221,7 @@ function UD() {
33221
33221
  }
33222
33222
  }
33223
33223
  function WD() {
33224
- document.addEventListener("touchstart", VD, as), window.addEventListener("blur", UD);
33224
+ document.addEventListener("touchstart", VD, ls), window.addEventListener("blur", UD);
33225
33225
  }
33226
33226
  var jD = typeof window < "u" && typeof document < "u", qD = jD ? (
33227
33227
  // @ts-ignore
@@ -33575,11 +33575,11 @@ function nI(n, e) {
33575
33575
  }
33576
33576
  function tt() {
33577
33577
  var ie = D();
33578
- ie.addEventListener("mousedown", he, !0), ie.addEventListener("touchend", he, as), ie.addEventListener("touchstart", $e, as), ie.addEventListener("touchmove", Me, as);
33578
+ ie.addEventListener("mousedown", he, !0), ie.addEventListener("touchend", he, ls), ie.addEventListener("touchstart", $e, ls), ie.addEventListener("touchmove", Me, ls);
33579
33579
  }
33580
33580
  function Nt() {
33581
33581
  var ie = D();
33582
- ie.removeEventListener("mousedown", he, !0), ie.removeEventListener("touchend", he, as), ie.removeEventListener("touchstart", $e, as), ie.removeEventListener("touchmove", Me, as);
33582
+ ie.removeEventListener("mousedown", he, !0), ie.removeEventListener("touchend", he, ls), ie.removeEventListener("touchstart", $e, ls), ie.removeEventListener("touchmove", Me, ls);
33583
33583
  }
33584
33584
  function xt(ie, Re) {
33585
33585
  Tt(ie, function() {
@@ -35288,21 +35288,20 @@ const w6 = We.create({
35288
35288
  }
35289
35289
  }), _6 = sr.create({
35290
35290
  name: "copyMark",
35291
- priority: 10,
35292
35291
  addOptions() {
35293
35292
  return {
35294
35293
  HTMLAttributes: {}
35295
35294
  };
35296
35295
  },
35297
- // parseHTML() {
35298
- // return [
35299
- // {
35300
- // tag: 'span',
35301
- // },
35302
- // ]
35303
- // },
35296
+ parseHTML() {
35297
+ return [
35298
+ {
35299
+ tag: "mark"
35300
+ }
35301
+ ];
35302
+ },
35304
35303
  renderHTML({ HTMLAttributes: n }) {
35305
- return ["span", { HTMLAttributes: n }, 0];
35304
+ return ["mark", { HTMLAttributes: n }, 0];
35306
35305
  }
35307
35306
  }), k6 = ft.create({
35308
35307
  name: "customPaste",
@@ -35420,7 +35419,7 @@ const w6 = We.create({
35420
35419
  };
35421
35420
  }, addKeyboardShortcuts() {
35422
35421
  return { Enter: ({ editor: n }) => {
35423
- const { state: e, view: t } = n, { selection: r } = e, { $from: i, empty: o } = r, s = Qo((L) => L.type === this.type)(r);
35422
+ const { state: e, view: t } = n, { selection: r } = e, { $from: i, empty: o } = r, s = Zo((L) => L.type === this.type)(r);
35424
35423
  if (!o || !s || !s.node.childCount) return !1;
35425
35424
  const a = i.index(s.depth), { childCount: l } = s.node;
35426
35425
  if (l !== a + 1) return !1;
@@ -37668,7 +37667,7 @@ const AR = new St(
37668
37667
  return {
37669
37668
  setCurrentNodeSelection: () => ({ editor: n, chain: e }) => {
37670
37669
  var s;
37671
- const t = Qo(
37670
+ const t = Zo(
37672
37671
  (a) => NR.includes(a.type.name)
37673
37672
  )(n.state.selection);
37674
37673
  if (t)
@@ -37677,13 +37676,13 @@ const AR = new St(
37677
37676
  return e().setNodeSelection(o).run();
37678
37677
  },
37679
37678
  deleteSelectionNode: () => ({ editor: n, chain: e }) => {
37680
- const t = ts(n);
37679
+ const t = ns(n);
37681
37680
  return t ? OR.includes(t.type.name) ? (e().focus().deleteSelection().run(), !0) : n.isActive("table") ? (e().focus().deleteTable().run(), !0) : n.isActive("highlightBlock") ? (e().focus().deleteHighlightNode().run(), !0) : n.isActive("section") ? (e().focus().deleteSection().run(), !0) : n.isActive("columnBlock") ? (e().focus().deleteColumnNode().run(), !0) : e().focus().deleteNode(t.type.name).run() : !1;
37682
37681
  }
37683
37682
  };
37684
37683
  }
37685
37684
  });
37686
- function ts(n) {
37685
+ function ns(n) {
37687
37686
  var r;
37688
37687
  const { $anchor: e, node: t } = n.state.selection;
37689
37688
  return (r = t == null ? void 0 : t.type) != null && r.isAtom ? t : (n.commands.selectParentNode(), e.node(1) || t);
@@ -40379,7 +40378,7 @@ const j6 = We.create({
40379
40378
  addNodeView() {
40380
40379
  return en(FB);
40381
40380
  }
40382
- }), { options: K6, container: HB } = de(), { document: ly } = K6.value, cy = Bo("locale");
40381
+ }), { options: K6, container: HB } = de(), { document: ly } = K6.value, cy = Po("locale");
40383
40382
  function cp({ history: n }) {
40384
40383
  return [
40385
40384
  _6,
@@ -42553,16 +42552,16 @@ const Dd = /* @__PURE__ */ o1(GB), YB = { class: "smart-shortcuts-drawer-header"
42553
42552
  c.commands.setContent(p);
42554
42553
  }
42555
42554
  async function f() {
42556
- var p, m, v, y, k, A;
42555
+ var p, m, v, y, k;
42557
42556
  const h = await i.getItem(s.value);
42558
42557
  if (h && h.content) {
42559
- const x = Dd(JSON.stringify((p = r.value) == null ? void 0 : p.getJSON()));
42560
- x && !((m = r.value) != null && m.isEmpty) && (await i.saveItem(x, {
42558
+ const A = Dd(JSON.stringify((p = r.value) == null ? void 0 : p.getJSON()));
42559
+ A && !((m = r.value) != null && m.isEmpty) && (await i.saveItem(A, {
42561
42560
  content: (v = r.value) == null ? void 0 : v.getJSON(),
42562
42561
  time: Od().unix(),
42563
42562
  version: "local",
42564
42563
  versionId: (y = e.value.history) == null ? void 0 : y.versionId
42565
- }), l.value = await i.getAllItems()), (k = r.value) == null || k.commands.setContent(h.content), (A = r.value) == null || A.commands.enter(), a.value = !1;
42564
+ }), l.value = await i.getAllItems()), (k = r.value) == null || k.commands.setContent(h.content, !0), a.value = !1;
42566
42565
  }
42567
42566
  }
42568
42567
  return (h, p) => {
@@ -42588,7 +42587,7 @@ const Dd = /* @__PURE__ */ o1(GB), YB = { class: "smart-shortcuts-drawer-header"
42588
42587
  }, 8, ["content"]),
42589
42588
  V(x, {
42590
42589
  show: g(a),
42591
- "onUpdate:show": p[2] || (p[2] = (T) => No(a) ? a.value = T : null),
42590
+ "onUpdate:show": p[2] || (p[2] = (T) => Oo(a) ? a.value = T : null),
42592
42591
  "auto-focus": !1,
42593
42592
  height: 600,
42594
42593
  to: g(t),
@@ -43313,7 +43312,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43313
43312
  ]),
43314
43313
  V(R, {
43315
43314
  show: g(s),
43316
- "onUpdate:show": v[3] || (v[3] = (U) => No(s) ? s.value = U : null),
43315
+ "onUpdate:show": v[3] || (v[3] = (U) => Oo(s) ? s.value = U : null),
43317
43316
  width: 320,
43318
43317
  "trap-focus": !1,
43319
43318
  to: g(e)
@@ -43439,7 +43438,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43439
43438
  q("div", LP, [
43440
43439
  V(x, {
43441
43440
  value: g(a),
43442
- "onUpdate:value": A[0] || (A[0] = (U) => No(a) ? a.value = U : null),
43441
+ "onUpdate:value": A[0] || (A[0] = (U) => Oo(a) ? a.value = U : null),
43443
43442
  placeholder: ("t" in k ? k.t : g(_))("search.searchText"),
43444
43443
  clearable: ""
43445
43444
  }, {
@@ -43478,7 +43477,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43478
43477
  q("div", RP, [
43479
43478
  V(x, {
43480
43479
  value: g(l),
43481
- "onUpdate:value": A[1] || (A[1] = (U) => No(l) ? l.value = U : null),
43480
+ "onUpdate:value": A[1] || (A[1] = (U) => Oo(l) ? l.value = U : null),
43482
43481
  placeholder: ("t" in k ? k.t : g(_))("search.replaceText"),
43483
43482
  clearable: ""
43484
43483
  }, null, 8, ["value", "placeholder"])
@@ -43486,7 +43485,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43486
43485
  q("div", BP, [
43487
43486
  V(E, {
43488
43487
  checked: g(c),
43489
- "onUpdate:checked": A[2] || (A[2] = (U) => No(c) ? c.value = U : null)
43488
+ "onUpdate:checked": A[2] || (A[2] = (U) => Oo(c) ? c.value = U : null)
43490
43489
  }, {
43491
43490
  default: ne(() => [
43492
43491
  Mt(xe(("t" in k ? k.t : g(_))("search.caseSensitive")), 1)
@@ -43551,7 +43550,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43551
43550
  onClick: () => {
43552
43551
  var u, d;
43553
43552
  (u = t.value) == null || u.chain().focus().setCurrentNodeSelection().unsetAllMarks().run();
43554
- const l = t.value ? ts(t.value) : null, c = () => {
43553
+ const l = t.value ? ns(t.value) : null, c = () => {
43555
43554
  var h;
43556
43555
  let f = 0;
43557
43556
  return (h = t.value) == null || h.state.doc.descendants((p, m) => {
@@ -43662,7 +43661,7 @@ const gP = { class: "smart-status-bar" }, bP = { class: "smart-status-bar-left"
43662
43661
  }, 8, ["to", "options"]);
43663
43662
  };
43664
43663
  }
43665
- }, HP = /* @__PURE__ */ Ge(zP, [["__scopeId", "data-v-93337ccc"]]), VP = {
43664
+ }, HP = /* @__PURE__ */ Ge(zP, [["__scopeId", "data-v-7b00e4df"]]), VP = {
43666
43665
  __name: "node",
43667
43666
  setup(n) {
43668
43667
  const { container: e, editor: t, blockMenu: r, options: i, assistantBox: o } = de(), s = ue(!1), a = ue(!1), l = ue(""), c = ue("");
@@ -44692,7 +44691,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
44692
44691
  },
44693
44692
  emits: ["change", "update:visible"],
44694
44693
  setup(n, { emit: e }) {
44695
- const t = n, r = e, { popupVisible: i } = Jn(), { options: o } = de(), s = Bo("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], l = ue(t.defaultColor), c = `#color-picker-${Vr(4)}`;
44694
+ const t = n, r = e, { popupVisible: i } = Jn(), { options: o } = de(), s = Po("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], l = ue(t.defaultColor), c = `#color-picker-${Vr(4)}`;
44696
44695
  function u(h) {
44697
44696
  i.value = !0, s.value.colors.forEach((p, m) => {
44698
44697
  p === h && s.value.colors.splice(m, 1);
@@ -44964,20 +44963,31 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
44964
44963
  }, null, 8, ["text", "menu-active", "disabled"]);
44965
44964
  };
44966
44965
  }
44966
+ }, Mo = {
44967
+ message: {},
44968
+ dialog: {}
44967
44969
  }, I$ = {
44968
44970
  __name: "assistant",
44969
44971
  setup(n) {
44970
44972
  const { editor: e, assistantBox: t } = de();
44971
- function r() {
44972
- var i;
44973
- t.value = !0, (i = e.value) == null || i.commands.focus();
44973
+ function r(o) {
44974
+ const { from: s, to: a } = o.state.selection;
44975
+ let l = !0;
44976
+ return o.state.doc.nodesBetween(s, a, (c) => {
44977
+ if (c.type.name !== "paragraph" && c.type.name !== "text")
44978
+ return l && (Mo.message.error("包含非文本内容,不可执行AI功能!"), l = !1), !1;
44979
+ }), l;
44974
44980
  }
44975
- return (i, o) => {
44976
- const s = Le;
44977
- return I(), X(s, {
44981
+ function i() {
44982
+ var o;
44983
+ r(e.value) && (t.value = !0, (o = e.value) == null || o.commands.focus());
44984
+ }
44985
+ return (o, s) => {
44986
+ const a = Le;
44987
+ return I(), X(a, {
44978
44988
  ico: "i-sed:assistant",
44979
- text: ("t" in i ? i.t : g(_))("assistant.text"),
44980
- onMenuClick: r
44989
+ text: ("t" in o ? o.t : g(_))("assistant.text"),
44990
+ onMenuClick: i
44981
44991
  }, null, 8, ["text"]);
44982
44992
  };
44983
44993
  }
@@ -45037,20 +45047,17 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
45037
45047
  }, null, 8, ["text"]);
45038
45048
  };
45039
45049
  }
45040
- }, ms = {
45041
- message: {},
45042
- dialog: {}
45043
45050
  }, P$ = {
45044
45051
  __name: "copy",
45045
45052
  setup(n) {
45046
45053
  const { editor: e } = de();
45047
45054
  function t() {
45048
- const r = e.value ? ts(e.value) : null;
45055
+ const r = e.value ? ns(e.value) : null;
45049
45056
  if (r) {
45050
45057
  const { copy: i } = w8({
45051
45058
  source: ue(r.attrs.code)
45052
45059
  });
45053
- i(), ms.message.success(_("bubbleMenu.code.copy.success"));
45060
+ i(), Mo.message.success(_("bubbleMenu.code.copy.success"));
45054
45061
  }
45055
45062
  }
45056
45063
  return (r, i) => {
@@ -45068,7 +45075,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
45068
45075
  const { editor: e } = de();
45069
45076
  function t() {
45070
45077
  var i, o;
45071
- const r = e.value ? ts(e.value) : null;
45078
+ const r = e.value ? ns(e.value) : null;
45072
45079
  r && ((i = e.value) == null || i.commands.updateAttributes(r.type, {
45073
45080
  wordWrap: !r.attrs.wordWrap
45074
45081
  })), (o = e.value) == null || o.chain().focus().run();
@@ -45090,7 +45097,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
45090
45097
  const { editor: e } = de();
45091
45098
  function t() {
45092
45099
  var i, o;
45093
- const r = e.value ? ts(e.value) : null;
45100
+ const r = e.value ? ns(e.value) : null;
45094
45101
  r && ((i = e.value) == null || i.commands.updateAttributes(r.type, {
45095
45102
  lineNumbers: !r.attrs.lineNumbers
45096
45103
  })), (o = e.value) == null || o.chain().focus().run();
@@ -45115,7 +45122,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
45115
45122
  ];
45116
45123
  function r(i) {
45117
45124
  var s;
45118
- const o = e.value ? ts(e.value) : null;
45125
+ const o = e.value ? ns(e.value) : null;
45119
45126
  o && ((s = e.value) == null || s.commands.updateAttributes(o.type, { theme: i }));
45120
45127
  }
45121
45128
  return (i, o) => {
@@ -45137,7 +45144,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
45137
45144
  const { editor: e } = de(), t = Object.keys(R8).map((i) => ({ label: i, value: i }));
45138
45145
  function r(i) {
45139
45146
  var s;
45140
- const o = e.value ? ts(e.value) : null;
45147
+ const o = e.value ? ns(e.value) : null;
45141
45148
  o && ((s = e.value) == null || s.commands.updateAttributes(o.type, { language: i }));
45142
45149
  }
45143
45150
  return (i, o) => {
@@ -46378,7 +46385,7 @@ const w$ = ["id"], _$ = { class: "smart-color-picker-default-button" }, k$ = { c
46378
46385
  }, Ds = () => /* @__PURE__ */ new Set(), zf = (n) => n[n.length - 1], wF = (n, e) => {
46379
46386
  for (let t = 0; t < e.length; t++)
46380
46387
  n.push(e[t]);
46381
- }, Uo = Array.from, _F = (n, e) => {
46388
+ }, Wo = Array.from, _F = (n, e) => {
46382
46389
  for (let t = 0; t < n.length; t++)
46383
46390
  if (e(n[t], t, n))
46384
46391
  return !0;
@@ -46440,7 +46447,7 @@ class cw {
46440
46447
  * @param {Parameters<EVENTS[NAME]>} args The arguments that are applied to the event listener.
46441
46448
  */
46442
46449
  emit(e, t) {
46443
- return Uo((this._observers.get(e) || mr()).values()).forEach((r) => r(...t));
46450
+ return Wo((this._observers.get(e) || mr()).values()).forEach((r) => r(...t));
46444
46451
  }
46445
46452
  destroy() {
46446
46453
  this._observers = mr();
@@ -46485,13 +46492,13 @@ class kF {
46485
46492
  * @param {Array<any>} args The arguments that are applied to the event listener.
46486
46493
  */
46487
46494
  emit(e, t) {
46488
- return Uo((this._observers.get(e) || mr()).values()).forEach((r) => r(...t));
46495
+ return Wo((this._observers.get(e) || mr()).values()).forEach((r) => r(...t));
46489
46496
  }
46490
46497
  destroy() {
46491
46498
  this._observers = mr();
46492
46499
  }
46493
46500
  }
46494
- const Wo = Math.floor, Cu = Math.abs, uw = (n, e) => n < e ? n : e, $s = (n, e) => n > e ? n : e, dw = (n) => n !== 0 ? n < 0 : 1 / n < 0, my = 1, gy = 2, Hf = 4, Vf = 8, Ql = 32, Ji = 64, Sr = 128, _0 = 31, hp = 63, ks = 127, xF = 2147483647, fw = Number.MAX_SAFE_INTEGER, CF = Number.isInteger || ((n) => typeof n == "number" && isFinite(n) && Wo(n) === n), SF = (n) => n.toLowerCase(), TF = /^\s*/g, AF = (n) => n.replace(TF, ""), EF = /([A-Z])/g, by = (n, e) => AF(n.replace(EF, (t) => `${e}${SF(t)}`)), MF = (n) => {
46501
+ const jo = Math.floor, Cu = Math.abs, uw = (n, e) => n < e ? n : e, $s = (n, e) => n > e ? n : e, dw = (n) => n !== 0 ? n < 0 : 1 / n < 0, my = 1, gy = 2, Hf = 4, Vf = 8, Ql = 32, Ji = 64, Sr = 128, _0 = 31, hp = 63, ks = 127, xF = 2147483647, fw = Number.MAX_SAFE_INTEGER, CF = Number.isInteger || ((n) => typeof n == "number" && isFinite(n) && jo(n) === n), SF = (n) => n.toLowerCase(), TF = /^\s*/g, AF = (n) => n.replace(TF, ""), EF = /([A-Z])/g, by = (n, e) => AF(n.replace(EF, (t) => `${e}${SF(t)}`)), MF = (n) => {
46495
46502
  const e = unescape(encodeURIComponent(n)), t = e.length, r = new Uint8Array(t);
46496
46503
  for (let i = 0; i < t; i++)
46497
46504
  r[i] = /** @type {number} */
@@ -46529,12 +46536,12 @@ const k0 = () => new xc(), DF = (n) => {
46529
46536
  n.cpos === t && (n.bufs.push(n.cbuf), n.cbuf = new Uint8Array(t * 2), n.cpos = 0), n.cbuf[n.cpos++] = e;
46530
46537
  }, pp = An, vt = (n, e) => {
46531
46538
  for (; e > ks; )
46532
- An(n, Sr | ks & e), e = Wo(e / 128);
46539
+ An(n, Sr | ks & e), e = jo(e / 128);
46533
46540
  An(n, ks & e);
46534
46541
  }, a1 = (n, e) => {
46535
46542
  const t = dw(e);
46536
- for (t && (e = -e), An(n, (e > hp ? Sr : 0) | (t ? Ji : 0) | hp & e), e = Wo(e / 64); e > 0; )
46537
- An(n, (e > ks ? Sr : 0) | ks & e), e = Wo(e / 128);
46543
+ for (t && (e = -e), An(n, (e > hp ? Sr : 0) | (t ? Ji : 0) | hp & e), e = jo(e / 64); e > 0; )
46544
+ An(n, (e > ks ? Sr : 0) | ks & e), e = jo(e / 128);
46538
46545
  }, mp = new Uint8Array(3e4), LF = mp.length / 3, RF = (n, e) => {
46539
46546
  if (e.length < LF) {
46540
46547
  const t = Zl.encodeInto(e, mp).written || 0;
@@ -46827,7 +46834,7 @@ class Wf extends C0 {
46827
46834
  read() {
46828
46835
  if (this.count === 0) {
46829
46836
  const e = c1(this), t = e & 1;
46830
- this.diff = Wo(e / 2), this.count = 1, t && (this.count = dt(this) + 2);
46837
+ this.diff = jo(e / 2), this.count = 1, t && (this.count = dt(this) + 2);
46831
46838
  }
46832
46839
  return this.s += this.diff, this.count--, this.s;
46833
46840
  }
@@ -47037,7 +47044,7 @@ class Ua {
47037
47044
  this.clients = /* @__PURE__ */ new Map();
47038
47045
  }
47039
47046
  }
47040
- const jo = (n, e, t) => e.clients.forEach((r, i) => {
47047
+ const qo = (n, e, t) => e.clients.forEach((r, i) => {
47041
47048
  const o = (
47042
47049
  /** @type {Array<GC|Item>} */
47043
47050
  n.doc.store.clients.get(i)
@@ -47049,7 +47056,7 @@ const jo = (n, e, t) => e.clients.forEach((r, i) => {
47049
47056
  }), Oz = (n, e) => {
47050
47057
  let t = 0, r = n.length - 1;
47051
47058
  for (; t <= r; ) {
47052
- const i = Wo((t + r) / 2), o = n[i], s = o.clock;
47059
+ const i = jo((t + r) / 2), o = n[i], s = o.clock;
47053
47060
  if (s <= e) {
47054
47061
  if (e < s + o.len)
47055
47062
  return i;
@@ -47106,7 +47113,7 @@ const jo = (n, e, t) => e.clients.forEach((r, i) => {
47106
47113
  i.length > 0 && e.clients.set(r, i);
47107
47114
  }), e;
47108
47115
  }, ja = (n, e) => {
47109
- vt(n.restEncoder, e.clients.size), Uo(e.clients.entries()).sort((t, r) => r[0] - t[0]).forEach(([t, r]) => {
47116
+ vt(n.restEncoder, e.clients.size), Wo(e.clients.entries()).sort((t, r) => r[0] - t[0]).forEach(([t, r]) => {
47110
47117
  n.resetDsCurVal(), vt(n.restEncoder, t);
47111
47118
  const i = r.length;
47112
47119
  vt(n.restEncoder, i);
@@ -47152,7 +47159,7 @@ const jo = (n, e, t) => e.clients.forEach((r, i) => {
47152
47159
  }
47153
47160
  return null;
47154
47161
  }, Ew = mw;
47155
- class ns extends cw {
47162
+ class rs extends cw {
47156
47163
  /**
47157
47164
  * @param {DocOpts} opts configuration
47158
47165
  */
@@ -47195,7 +47202,7 @@ class ns extends cw {
47195
47202
  return this.subdocs;
47196
47203
  }
47197
47204
  getSubdocGuids() {
47198
- return new Set(Uo(this.subdocs).map((e) => e.guid));
47205
+ return new Set(Wo(this.subdocs).map((e) => e.guid));
47199
47206
  }
47200
47207
  /**
47201
47208
  * Changes that happen inside of a transaction are bundled. This means that
@@ -47289,7 +47296,7 @@ class ns extends cw {
47289
47296
  * @public
47290
47297
  */
47291
47298
  getText(e = "") {
47292
- return this.get(e, qo);
47299
+ return this.get(e, Ko);
47293
47300
  }
47294
47301
  /**
47295
47302
  * @template T
@@ -47343,7 +47350,7 @@ class ns extends cw {
47343
47350
  * Emit `destroy` event and unregister all event handlers.
47344
47351
  */
47345
47352
  destroy() {
47346
- this.isDestroyed = !0, Uo(this.subdocs).forEach((t) => t.destroy());
47353
+ this.isDestroyed = !0, Wo(this.subdocs).forEach((t) => t.destroy());
47347
47354
  const e = this._item;
47348
47355
  if (e !== null) {
47349
47356
  this._item = null;
@@ -47351,7 +47358,7 @@ class ns extends cw {
47351
47358
  /** @type {ContentDoc} */
47352
47359
  e.content
47353
47360
  );
47354
- t.doc = new ns({ guid: this.guid, ...t.opts, shouldLoad: !1 }), t.doc._item = e, Bt(
47361
+ t.doc = new rs({ guid: this.guid, ...t.opts, shouldLoad: !1 }), t.doc._item = e, Bt(
47355
47362
  /** @type {any} */
47356
47363
  e.parent.doc,
47357
47364
  (r) => {
@@ -47816,7 +47823,7 @@ const Rz = (n, e, t, r) => {
47816
47823
  mn(e, o) > i && r.set(o, i);
47817
47824
  }), S0(e).forEach((i, o) => {
47818
47825
  t.has(o) || r.set(o, 0);
47819
- }), vt(n.restEncoder, r.size), Uo(r.entries()).sort((i, o) => o[0] - i[0]).forEach(([i, o]) => {
47826
+ }), vt(n.restEncoder, r.size), Wo(r.entries()).sort((i, o) => o[0] - i[0]).forEach(([i, o]) => {
47820
47827
  Rz(
47821
47828
  n,
47822
47829
  /** @type {Array<GC|Item>} */
@@ -47870,7 +47877,7 @@ const Rz = (n, e, t, r) => {
47870
47877
  return t;
47871
47878
  }, Pz = (n, e, t) => {
47872
47879
  const r = [];
47873
- let i = Uo(t.keys()).sort((h, p) => h - p);
47880
+ let i = Wo(t.keys()).sort((h, p) => h - p);
47874
47881
  if (i.length === 0)
47875
47882
  return null;
47876
47883
  const o = () => {
@@ -48133,11 +48140,11 @@ class b1 {
48133
48140
  this.ds = e, this.sv = t;
48134
48141
  }
48135
48142
  }
48136
- const Lw = (n, e) => new b1(n, e), Kf = (n) => Lw(Aw(n.store), S0(n.store)), us = (n, e) => e === void 0 ? !n.deleted : e.sv.has(n.id.client) && (e.sv.get(n.id.client) || 0) > n.id.clock && !Wa(e.ds, n.id), vp = (n, e) => {
48143
+ const Lw = (n, e) => new b1(n, e), Kf = (n) => Lw(Aw(n.store), S0(n.store)), ds = (n, e) => e === void 0 ? !n.deleted : e.sv.has(n.id.client) && (e.sv.get(n.id.client) || 0) > n.id.clock && !Wa(e.ds, n.id), vp = (n, e) => {
48137
48144
  const t = so(n.meta, vp, Ds), r = n.doc.store;
48138
48145
  t.has(e) || (e.sv.forEach((i, o) => {
48139
48146
  i < mn(r, o) && dr(n, rt(o, i));
48140
- }), jo(n, e.ds, (i) => {
48147
+ }), qo(n, e.ds, (i) => {
48141
48148
  }), t.add(e));
48142
48149
  };
48143
48150
  class Rw {
@@ -48171,7 +48178,7 @@ const S0 = (n) => {
48171
48178
  let t = 0, r = n.length - 1, i = n[r], o = i.id.clock;
48172
48179
  if (o === e)
48173
48180
  return r;
48174
- let s = Wo(e / (o + i.length - 1) * r);
48181
+ let s = jo(e / (o + i.length - 1) * r);
48175
48182
  for (; t <= r; ) {
48176
48183
  if (i = n[s], o = i.id.clock, o <= e) {
48177
48184
  if (e < o + i.length)
@@ -48179,7 +48186,7 @@ const S0 = (n) => {
48179
48186
  t = s + 1;
48180
48187
  } else
48181
48188
  r = s - 1;
48182
- s = Wo((t + r) / 2);
48189
+ s = jo((t + r) / 2);
48183
48190
  }
48184
48191
  throw ii();
48185
48192
  }, Yz = (n, e) => {
@@ -48348,7 +48355,7 @@ class eH {
48348
48355
  }
48349
48356
  }
48350
48357
  const Dy = (n, e, t) => {
48351
- jo(n, t.deletions, (r) => {
48358
+ qo(n, t.deletions, (r) => {
48352
48359
  r instanceof Rt && e.scope.some((i) => i === n.doc || oc(
48353
48360
  /** @type {AbstractType<any>} */
48354
48361
  i,
@@ -48365,7 +48372,7 @@ const Dy = (n, e, t) => {
48365
48372
  e.pop()
48366
48373
  ), u = /* @__PURE__ */ new Set(), d = [];
48367
48374
  let f = !1;
48368
- jo(a, c.insertions, (h) => {
48375
+ qo(a, c.insertions, (h) => {
48369
48376
  if (h instanceof Rt) {
48370
48377
  if (h.redone !== null) {
48371
48378
  let { item: p, diff: m } = _p(l, h.id);
@@ -48378,7 +48385,7 @@ const Dy = (n, e, t) => {
48378
48385
  h
48379
48386
  )) && d.push(h);
48380
48387
  }
48381
- }), jo(a, c.deletions, (h) => {
48388
+ }), qo(a, c.deletions, (h) => {
48382
48389
  h instanceof Rt && o.some((p) => p === a.doc || oc(
48383
48390
  /** @type {AbstractType<any>} */
48384
48391
  p,
@@ -48418,7 +48425,7 @@ class Fw extends cw {
48418
48425
  ignoreRemoteMapChanges: s = !1,
48419
48426
  doc: a = (
48420
48427
  /** @type {Doc} */
48421
- fp(e) ? e[0].doc : e instanceof ns ? e : e.doc
48428
+ fp(e) ? e[0].doc : e instanceof rs ? e : e.doc
48422
48429
  )
48423
48430
  } = {}) {
48424
48431
  super(), this.scope = [], this.doc = a, this.addToScope(e), this.deleteFilter = i, o.add(this), this.trackedOrigins = o, this.captureTransaction = r, this.undoStack = [], this.redoStack = [], this.undoing = !1, this.redoing = !1, this.currStackItem = null, this.lastChange = 0, this.ignoreRemoteMapChanges = s, this.captureTimeout = t, this.afterTransactionHandler = (l) => {
@@ -48441,7 +48448,7 @@ class Fw extends cw {
48441
48448
  v.deletions = bp([v.deletions, l.deleteSet]), v.insertions = bp([v.insertions, f]);
48442
48449
  } else
48443
48450
  d.push(new eH(l.deleteSet, f)), p = !0;
48444
- !c && !u && (this.lastChange = h), jo(
48451
+ !c && !u && (this.lastChange = h), qo(
48445
48452
  l,
48446
48453
  l.deleteSet,
48447
48454
  /** @param {Item|GC} item */
@@ -49100,7 +49107,7 @@ const Uw = (n, e, t) => {
49100
49107
  const t = [];
49101
49108
  let r = n._start;
49102
49109
  for (; r !== null; ) {
49103
- if (r.countable && us(r, e)) {
49110
+ if (r.countable && ds(r, e)) {
49104
49111
  const i = r.content.getContent();
49105
49112
  for (let o = 0; o < i.length; o++)
49106
49113
  t.push(i[o]);
@@ -49185,7 +49192,7 @@ const Uw = (n, e, t) => {
49185
49192
  d
49186
49193
  ))), i.integrate(n, 0);
49187
49194
  break;
49188
- case ns:
49195
+ case rs:
49189
49196
  i = new Rt(rt(s, mn(a, s)), i, i && i.lastId, l, l && l.id, e, null, new Tc(
49190
49197
  /** @type {Doc} */
49191
49198
  d
@@ -49261,7 +49268,7 @@ const Uw = (n, e, t) => {
49261
49268
  r
49262
49269
  );
49263
49270
  break;
49264
- case ns:
49271
+ case rs:
49265
49272
  a = new Tc(
49266
49273
  /** @type {Doc} */
49267
49274
  r
@@ -49293,7 +49300,7 @@ const Uw = (n, e, t) => {
49293
49300
  let o = r;
49294
49301
  for (; o !== null && (!e.sv.has(o.id.client) || o.id.clock >= (e.sv.get(o.id.client) || 0)); )
49295
49302
  o = o.left;
49296
- o !== null && us(o, e) && (t[i] = o.content.getContent()[o.length - 1]);
49303
+ o !== null && ds(o, e) && (t[i] = o.content.getContent()[o.length - 1]);
49297
49304
  }), t;
49298
49305
  }, cu = (n) => (n.doc ?? Kn(), Nz(
49299
49306
  n._map.entries(),
@@ -49715,7 +49722,7 @@ class La extends Dn {
49715
49722
  e.writeTypeRef(zH);
49716
49723
  }
49717
49724
  }
49718
- const bH = (n) => new La(), Mo = (n, e) => n === e || typeof n == "object" && typeof e == "object" && n && e && uz(n, e);
49725
+ const bH = (n) => new La(), No = (n, e) => n === e || typeof n == "object" && typeof e == "object" && n && e && uz(n, e);
49719
49726
  class wp {
49720
49727
  /**
49721
49728
  * @param {Item|null} left
@@ -49772,7 +49779,7 @@ const Ry = (n, e, t) => {
49772
49779
  return Ry(n, s, t);
49773
49780
  }
49774
49781
  }, Zw = (n, e, t, r) => {
49775
- for (; t.right !== null && (t.right.deleted === !0 || t.right.content.constructor === _n && Mo(
49782
+ for (; t.right !== null && (t.right.deleted === !0 || t.right.content.constructor === _n && No(
49776
49783
  r.get(
49777
49784
  /** @type {ContentFormat} */
49778
49785
  t.right.content.key
@@ -49794,7 +49801,7 @@ const Ry = (n, e, t) => {
49794
49801
  r === null ? n.delete(t) : n.set(t, r);
49795
49802
  }, e7 = (n, e) => {
49796
49803
  for (; n.right !== null; ) {
49797
- if (!(n.right.deleted || n.right.content.constructor === _n && Mo(
49804
+ if (!(n.right.deleted || n.right.content.constructor === _n && No(
49798
49805
  e[
49799
49806
  /** @type {ContentFormat} */
49800
49807
  n.right.content.key
@@ -49808,7 +49815,7 @@ const Ry = (n, e, t) => {
49808
49815
  const i = n.doc, o = i.clientID, s = /* @__PURE__ */ new Map();
49809
49816
  for (const a in r) {
49810
49817
  const l = r[a], c = t.currentAttributes.get(a) ?? null;
49811
- if (!Mo(c, l)) {
49818
+ if (!No(c, l)) {
49812
49819
  s.set(a, c);
49813
49820
  const { left: u, right: d } = t;
49814
49821
  t.right = new Rt(rt(o, mn(i.store, o)), u, u && u.lastId, d, d && d.id, e, null, new _n(a, l)), t.right.integrate(n, 0), t.forward();
@@ -49840,7 +49847,7 @@ const Ry = (n, e, t) => {
49840
49847
  t.right.content
49841
49848
  ), u = i[l];
49842
49849
  if (u !== void 0) {
49843
- if (Mo(u, c))
49850
+ if (No(u, c))
49844
49851
  a.delete(l);
49845
49852
  else {
49846
49853
  if (r === 0)
@@ -49965,7 +49972,7 @@ const Ry = (n, e, t) => {
49965
49972
  );
49966
49973
  }
49967
49974
  Bt(t, (r) => {
49968
- jo(n, n.deleteSet, (i) => {
49975
+ qo(n, n.deleteSet, (i) => {
49969
49976
  if (i instanceof zr || !/** @type {YText} */
49970
49977
  i.parent._hasFormatting || e.has(
49971
49978
  /** @type {YText} */
@@ -50087,16 +50094,16 @@ class _H extends T0 {
50087
50094
  if (this.adds(s)) {
50088
50095
  if (!this.deletes(s)) {
50089
50096
  const m = i.get(h) ?? null;
50090
- Mo(m, p) ? p !== null && s.delete(r) : (a === "retain" && f(), Mo(p, o.get(h) ?? null) ? delete l[h] : l[h] = p);
50097
+ No(m, p) ? p !== null && s.delete(r) : (a === "retain" && f(), No(p, o.get(h) ?? null) ? delete l[h] : l[h] = p);
50091
50098
  }
50092
50099
  } else if (this.deletes(s)) {
50093
50100
  o.set(h, p);
50094
50101
  const m = i.get(h) ?? null;
50095
- Mo(m, p) || (a === "retain" && f(), l[h] = m);
50102
+ No(m, p) || (a === "retain" && f(), l[h] = m);
50096
50103
  } else if (!s.deleted) {
50097
50104
  o.set(h, p);
50098
50105
  const m = l[h];
50099
- m !== void 0 && (Mo(m, p) ? m !== null && s.delete(r) : (a === "retain" && f(), p === null ? delete l[h] : l[h] = p));
50106
+ m !== void 0 && (No(m, p) ? m !== null && s.delete(r) : (a === "retain" && f(), p === null ? delete l[h] : l[h] = p));
50100
50107
  }
50101
50108
  s.deleted || (a === "insert" && f(), qa(
50102
50109
  i,
@@ -50123,7 +50130,7 @@ class _H extends T0 {
50123
50130
  );
50124
50131
  }
50125
50132
  }
50126
- class qo extends Dn {
50133
+ class Ko extends Dn {
50127
50134
  /**
50128
50135
  * @param {String} [string] The initial value of the YText.
50129
50136
  */
@@ -50152,7 +50159,7 @@ class qo extends Dn {
50152
50159
  this._pending = null;
50153
50160
  }
50154
50161
  _copy() {
50155
- return new qo();
50162
+ return new Ko();
50156
50163
  }
50157
50164
  /**
50158
50165
  * Makes a copy of this data type that can be included somewhere else.
@@ -50162,7 +50169,7 @@ class qo extends Dn {
50162
50169
  * @return {YText}
50163
50170
  */
50164
50171
  clone() {
50165
- const e = new qo();
50172
+ const e = new Ko();
50166
50173
  return e.applyDelta(this.toDelta()), e;
50167
50174
  }
50168
50175
  /**
@@ -50251,11 +50258,11 @@ class qo extends Dn {
50251
50258
  }
50252
50259
  const u = () => {
50253
50260
  for (; l !== null; ) {
50254
- if (us(l, e) || t !== void 0 && us(l, t))
50261
+ if (ds(l, e) || t !== void 0 && ds(l, t))
50255
50262
  switch (l.content.constructor) {
50256
50263
  case oi: {
50257
50264
  const d = o.get("ychange");
50258
- e !== void 0 && !us(l, e) ? (d === void 0 || d.user !== l.id.client || d.type !== "removed") && (c(), o.set("ychange", r ? r("removed", l.id) : { type: "removed" })) : t !== void 0 && !us(l, t) ? (d === void 0 || d.user !== l.id.client || d.type !== "added") && (c(), o.set("ychange", r ? r("added", l.id) : { type: "added" })) : d !== void 0 && (c(), o.delete("ychange")), a += /** @type {ContentString} */
50265
+ e !== void 0 && !ds(l, e) ? (d === void 0 || d.user !== l.id.client || d.type !== "removed") && (c(), o.set("ychange", r ? r("removed", l.id) : { type: "removed" })) : t !== void 0 && !ds(l, t) ? (d === void 0 || d.user !== l.id.client || d.type !== "added") && (c(), o.set("ychange", r ? r("added", l.id) : { type: "added" })) : d !== void 0 && (c(), o.delete("ychange")), a += /** @type {ContentString} */
50259
50266
  l.content.str;
50260
50267
  break;
50261
50268
  }
@@ -50278,7 +50285,7 @@ class qo extends Dn {
50278
50285
  break;
50279
50286
  }
50280
50287
  case _n:
50281
- us(l, e) && (c(), qa(
50288
+ ds(l, e) && (c(), qa(
50282
50289
  o,
50283
50290
  /** @type {ContentFormat} */
50284
50291
  l.content
@@ -50431,7 +50438,7 @@ class qo extends Dn {
50431
50438
  e.writeTypeRef(HH);
50432
50439
  }
50433
50440
  }
50434
- const kH = (n) => new qo();
50441
+ const kH = (n) => new Ko();
50435
50442
  class Yf {
50436
50443
  /**
50437
50444
  * @param {YXmlFragment | YXmlElement} root
@@ -50575,7 +50582,7 @@ class Ls extends Dn {
50575
50582
  * @public
50576
50583
  */
50577
50584
  querySelectorAll(e) {
50578
- return e = e.toUpperCase(), Uo(new Yf(this, (t) => t.nodeName && t.nodeName.toUpperCase() === e));
50585
+ return e = e.toUpperCase(), Wo(new Yf(this, (t) => t.nodeName && t.nodeName.toUpperCase() === e));
50579
50586
  }
50580
50587
  /**
50581
50588
  * Creates YXmlEvent and calls observers.
@@ -51006,7 +51013,7 @@ class Fd extends La {
51006
51013
  }
51007
51014
  }
51008
51015
  const TH = (n) => new Fd(n.readKey());
51009
- class Tr extends qo {
51016
+ class Tr extends Ko {
51010
51017
  /**
51011
51018
  * @type {YXmlElement|YXmlText|null}
51012
51019
  */
@@ -51332,7 +51339,7 @@ class lc {
51332
51339
  return 1;
51333
51340
  }
51334
51341
  }
51335
- const NH = (n) => new lc(n.readLen()), r7 = (n, e) => new ns({ guid: n, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 });
51342
+ const NH = (n) => new lc(n.readLen()), r7 = (n, e) => new rs({ guid: n, ...e, shouldLoad: e.shouldLoad || e.autoLoad || !1 });
51336
51343
  class Tc {
51337
51344
  /**
51338
51345
  * @param {Doc} doc
@@ -52625,11 +52632,11 @@ class CV {
52625
52632
  */
52626
52633
  _renderSnapshot(e, t, r) {
52627
52634
  let i = this.doc;
52628
- e || (e = Kf(this.doc)), (e instanceof Uint8Array || t instanceof Uint8Array) && ((!(e instanceof Uint8Array) || !(t instanceof Uint8Array)) && u7(), i = new ns({ gc: !1 }), Ld(i, t), t = Kf(i), Ld(i, e), e = Kf(i)), this.mapping.clear(), this.mux(() => {
52635
+ e || (e = Kf(this.doc)), (e instanceof Uint8Array || t instanceof Uint8Array) && ((!(e instanceof Uint8Array) || !(t instanceof Uint8Array)) && u7(), i = new rs({ gc: !1 }), Ld(i, t), t = Kf(i), Ld(i, e), e = Kf(i)), this.mapping.clear(), this.mux(() => {
52629
52636
  i.transact((o) => {
52630
52637
  const s = r.permanentUserData;
52631
52638
  s && s.dss.forEach((u) => {
52632
- jo(o, u, (d) => {
52639
+ qo(o, u, (d) => {
52633
52640
  });
52634
52641
  });
52635
52642
  const a = (u, d) => {
@@ -52677,7 +52684,7 @@ class CV {
52677
52684
  }
52678
52685
  this.mux(() => {
52679
52686
  const i = (a, l) => this.mapping.delete(l);
52680
- jo(
52687
+ qo(
52681
52688
  t,
52682
52689
  t.deleteSet,
52683
52690
  (a) => {
@@ -52759,7 +52766,7 @@ const p7 = (n, e, t, r, i, o) => {
52759
52766
  u !== null && s.push(u);
52760
52767
  } else {
52761
52768
  const u = (c = l._item.right) == null ? void 0 : c.content.type;
52762
- u instanceof qo && !u._item.deleted && u._item.id.client === u.doc.clientID && (l.applyDelta([
52769
+ u instanceof Ko && !u._item.deleted && u._item.id.client === u.doc.clientID && (l.applyDelta([
52763
52770
  { retain: l.length },
52764
52771
  ...u.toDelta()
52765
52772
  ]), u.doc.transact((f) => {
@@ -53156,7 +53163,7 @@ const DV = (n) => {
53156
53163
  const e = Xi.getState(n).undoManager;
53157
53164
  if (e != null)
53158
53165
  return e.redo(), !0;
53159
- }, LV = /* @__PURE__ */ new Set(["paragraph"]), RV = (n, e) => !(n instanceof Rt) || !(n.content instanceof ai) || !(n.content.type instanceof qo || n.content.type instanceof tr && e.has(n.content.type.nodeName)) || n.content.type._length === 0, BV = ({ protectedNodes: n = LV, trackedOrigins: e = [], undoManager: t = null } = {}) => new mt({
53166
+ }, LV = /* @__PURE__ */ new Set(["paragraph"]), RV = (n, e) => !(n instanceof Rt) || !(n.content instanceof ai) || !(n.content.type instanceof Ko || n.content.type instanceof tr && e.has(n.content.type.nodeName)) || n.content.type._length === 0, BV = ({ protectedNodes: n = LV, trackedOrigins: e = [], undoManager: t = null } = {}) => new mt({
53160
53167
  key: Xi,
53161
53168
  state: {
53162
53169
  init: (r, i) => {
@@ -53414,7 +53421,7 @@ const ZV = {
53414
53421
  __name: "index",
53415
53422
  setup(n) {
53416
53423
  var c, u, d, f, h, p, m, v, y;
53417
- const { options: e, editor: t, painter: r, setEditor: i, editorDestroyed: o } = de(), s = new ns();
53424
+ const { options: e, editor: t, painter: r, setEditor: i, editorDestroyed: o } = de(), s = new rs();
53418
53425
  (c = e.value.history) != null && c.enable && new QV(`document-${e.value.editorKey}`, s).on("synced", async () => {
53419
53426
  var E, R, U, L;
53420
53427
  const A = new Y6(`history-${e.value.editorKey}`, "version"), x = Dd(JSON.stringify((E = e.value.document) == null ? void 0 : E.content)), T = Dd(JSON.stringify(t.value.getJSON()));
@@ -53423,7 +53430,7 @@ const ZV = {
53423
53430
  time: Od().unix(),
53424
53431
  version: "local",
53425
53432
  versionId: (R = e.value.history) == null ? void 0 : R.versionId
53426
- }), (L = t.value) == null || L.commands.setContent((U = e.value.document) == null ? void 0 : U.content);
53433
+ }), (L = t.value) == null || L.commands.setContent((U = e.value.document) == null ? void 0 : U.content, !0);
53427
53434
  });
53428
53435
  const a = new t1({
53429
53436
  editable: !((u = e.value.document) != null && u.readOnly),
@@ -53727,7 +53734,7 @@ const ZV = {
53727
53734
  i(), o(async (s) => {
53728
53735
  if (!s)
53729
53736
  return;
53730
- const a = ms.message.loading(_("base.importWord.converting")), l = await t.value.insertWordUpload({ file: s });
53737
+ const a = Mo.message.loading(_("base.importWord.converting")), l = await t.value.insertWordUpload({ file: s });
53731
53738
  await new Promise((c) => setTimeout(c, 2e3)), a.destroy(), t.value.insertWordFn(e.value, l);
53732
53739
  });
53733
53740
  }
@@ -53848,7 +53855,7 @@ const ZV = {
53848
53855
  default: ne(() => [
53849
53856
  V(u, {
53850
53857
  value: g(r),
53851
- "onUpdate:value": l[1] || (l[1] = (p) => No(r) ? r.value = p : null),
53858
+ "onUpdate:value": l[1] || (l[1] = (p) => Oo(r) ? r.value = p : null),
53852
53859
  valueModifiers: { trim: !0 },
53853
53860
  placeholder: ("t" in a ? a.t : g(_))("insert.link.hrefTextTip")
53854
53861
  }, null, 8, ["value", "placeholder"])
@@ -53864,7 +53871,7 @@ const ZV = {
53864
53871
  default: ne(() => [
53865
53872
  V(u, {
53866
53873
  value: g(i),
53867
- "onUpdate:value": l[2] || (l[2] = (p) => No(i) ? i.value = p : null),
53874
+ "onUpdate:value": l[2] || (l[2] = (p) => Oo(i) ? i.value = p : null),
53868
53875
  placeholder: ("t" in a ? a.t : g(_))("insert.link.hrefTip")
53869
53876
  }, null, 8, ["value", "placeholder"])
53870
53877
  ]),
@@ -54394,7 +54401,7 @@ const ZV = {
54394
54401
  }, WU = {
54395
54402
  __name: "font-family",
54396
54403
  setup(n) {
54397
- const { options: e, editor: t } = de(), r = Bo("recent");
54404
+ const { options: e, editor: t } = de(), r = Po("recent");
54398
54405
  function i(l) {
54399
54406
  if (!l || l === "default")
54400
54407
  return !0;
@@ -55067,7 +55074,7 @@ function lW(n, e) {
55067
55074
  const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb0"]]), uW = {
55068
55075
  __name: "message-api",
55069
55076
  setup(n) {
55070
- return ms.message = s8(), (e, t) => (I(), le("div"));
55077
+ return Mo.message = s8(), (e, t) => (I(), le("div"));
55071
55078
  }
55072
55079
  }, dW = ["id"], fW = {
55073
55080
  key: 0,
@@ -55123,13 +55130,13 @@ const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb
55123
55130
  const v = Ye(() => {
55124
55131
  var L;
55125
55132
  return !((L = l.value.document) != null && L.readOnly);
55126
- }), y = Bo("locale"), k = ue(!1), A = Dp(async () => {
55133
+ }), y = Po("locale"), k = ue(!1), A = Dp(async () => {
55127
55134
  var te, re, S, P, D, M, Y;
55128
55135
  if ((te = l.value.document) != null && te.readOnly)
55129
55136
  return;
55130
55137
  let L = null;
55131
55138
  try {
55132
- L = ms.message.loading(_("save.saving"), { placement: "bottom", closable: !0 });
55139
+ L = Mo.message.loading(_("save.saving"), { placement: "bottom", closable: !0 });
55133
55140
  const K = Od().unix(), j = Dd(JSON.stringify((re = d.value) == null ? void 0 : re.getJSON()));
55134
55141
  if (!await ((Y = (S = l.value) == null ? void 0 : S.onSave) == null ? void 0 : Y.call(
55135
55142
  S,
@@ -55141,14 +55148,14 @@ const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb
55141
55148
  hashMd: j
55142
55149
  }
55143
55150
  ))) {
55144
- L && (L.destroy(), L = null), ms.message.error("保存内容有误,请检查后再保存!", { placement: "bottom" });
55151
+ L && (L.destroy(), L = null), Mo.message.error("保存内容有误,请检查后再保存!", { placement: "bottom" });
55145
55152
  return;
55146
55153
  }
55147
- i("saved"), L && (L.destroy(), L = null), ms.message.success(_("save.success"), { placement: "bottom" });
55154
+ i("saved"), L && (L.destroy(), L = null), Mo.message.success(_("save.success"), { placement: "bottom" });
55148
55155
  const me = x8({ offset: 0 });
55149
55156
  u.value = me.value;
55150
55157
  } catch (K) {
55151
- ms.message.error(_("save.error"), { placement: "bottom" }), console.error(K.message);
55158
+ Mo.message.error(_("save.error"), { placement: "bottom" }), console.error(K.message);
55152
55159
  }
55153
55160
  }, 1e3);
55154
55161
  jt(
@@ -55188,7 +55195,7 @@ const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb
55188
55195
  throw new Error('"params" must be one of "zh-CN" or "en-US".');
55189
55196
  if (x.value === L)
55190
55197
  return;
55191
- const te = Bo("locale");
55198
+ const te = Po("locale");
55192
55199
  te.value = L, x.value = te.value;
55193
55200
  }
55194
55201
  function E(L = "html") {
@@ -55233,7 +55240,7 @@ const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb
55233
55240
  var L;
55234
55241
  return (L = d.value) == null ? void 0 : L.storage.characterCount.characters();
55235
55242
  },
55236
- getSelectionNode: () => d.value ? ts(d.value) : null,
55243
+ getSelectionNode: () => d.value ? ns(d.value) : null,
55237
55244
  deleteSelectionNode: () => {
55238
55245
  var L;
55239
55246
  return (L = d.value) == null ? void 0 : L.commands.deleteSelectionNode();
@@ -56328,7 +56335,7 @@ const cW = /* @__PURE__ */ Ge(sW, [["render", lW], ["__scopeId", "data-v-3d91acb
56328
56335
  },
56329
56336
  emits: ["change", "update:visible"],
56330
56337
  setup(n, { emit: e }) {
56331
- const t = n, r = e, { popupVisible: i } = Jn(), { slimOptions: o } = Ke(), s = Bo("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], l = ue(t.defaultColor), c = `#color-picker-${Vr(4)}`;
56338
+ const t = n, r = e, { popupVisible: i } = Jn(), { slimOptions: o } = Ke(), s = Po("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], l = ue(t.defaultColor), c = `#color-picker-${Vr(4)}`;
56332
56339
  function u(h) {
56333
56340
  i.value = !0, s.value.colors.forEach((p, m) => {
56334
56341
  p === h && s.value.colors.splice(m, 1);
@@ -57652,7 +57659,7 @@ const fj = {
57652
57659
  }, jj = {
57653
57660
  __name: "font-family",
57654
57661
  setup(n) {
57655
- const { slimOptions: e, editor: t } = Ke(), r = Bo("recent");
57662
+ const { slimOptions: e, editor: t } = Ke(), r = Po("recent");
57656
57663
  function i(l) {
57657
57664
  if (!l || l === "default")
57658
57665
  return !0;
@@ -57842,7 +57849,7 @@ const fj = {
57842
57849
  }, Xj = /* @__PURE__ */ Ge(Jj, [["__scopeId", "data-v-e22a8790"]]), Qj = ["id"], Zj = {
57843
57850
  key: 0,
57844
57851
  class: "smart-toolbar"
57845
- }, eq = { class: "smart-main" }, cK = /* @__PURE__ */ Object.assign({ name: "SmartEditorSlim" }, {
57852
+ }, eq = { class: "smart-main smart-scrollbar" }, cK = /* @__PURE__ */ Object.assign({ name: "SmartEditorSlim" }, {
57846
57853
  __name: "index",
57847
57854
  props: /* @__PURE__ */ D1(["config"], {
57848
57855
  modelValue: {},