smart-editor-v3 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var Qe = (r, e, n) => Xo(r, typeof e != "symbol" ? e + "" : e, n);
4
4
  import "./style.css";
5
5
  import { NTooltip as qt, NButton as Se, NPopover as Yo, NDrawerContent as Zo, NDrawer as Qo, NInput as In, NCheckbox as er, NCard as tr, NDropdown as lt, NSelect as En, NColorPicker as Nn, NBackTop as nr, NModal as or, NFormItem as rr, NInputNumber as Rn, useMessage as lr, zhCN as Fn, enUS as Hn, dateZhCN as zn, dateEnUS as Dn, darkTheme as On, NMessageProvider as sr, NConfigProvider as Pn } from "naive-ui";
6
6
  import { createI18n as ir } from "vue-i18n";
7
- import { useStorage as nn, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Vn, useOnline as cr, useWindowSize as jt, onClickOutside as Mt, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as hr, useFileDialog as Gt, useDark as Un, useTimestamp as fr, createInjectionState as br } from "@vueuse/core";
7
+ import { useStorage as nn, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Vn, useOnline as cr, useWindowSize as jt, onClickOutside as Mt, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as hr, useFileDialog as Gt, useDark as Un, useTimestamp as br, createInjectionState as fr } from "@vueuse/core";
8
8
  import { ref as B, watch as de, openBlock as m, createElementBlock as M, Fragment as J, renderList as ve, unref as i, createElementVNode as v, toDisplayString as I, normalizeClass as K, createBlock as _, resolveDynamicComponent as oe, withCtx as T, createTextVNode as te, renderSlot as pe, computed as U, onMounted as Re, inject as gr, createVNode as g, createCommentVNode as H, normalizeStyle as le, isRef as je, h as _e, onUnmounted as vr, onBeforeUnmount as Xe, useAttrs as Kt, mergeProps as ge, withDirectives as nt, vShow as kt, nextTick as _r, onBeforeMount as Jn, provide as on, mergeModels as rn, useModel as yr } from "vue";
9
9
  import Cr from "dexie";
10
10
  import wt from "hotkeys-js";
@@ -510,7 +510,7 @@ const hl = {
510
510
  },
511
511
  feedback: "Issues / Feedback",
512
512
  poweredBy: "Tech Support"
513
- }, fl = {
513
+ }, bl = {
514
514
  toolbar: {
515
515
  insert: "插入"
516
516
  },
@@ -1130,7 +1130,7 @@ const hl = {
1130
1130
  companyUrl: "https://ipraclass.com/",
1131
1131
  // 反馈地址
1132
1132
  feedbackUrl: "https://o00i7ra5yrz.feishu.cn/share/base/form/shrcnlCFJlRfJhQpA5AWRniYQyc"
1133
- }, bl = Object.keys(Pt), fo = {
1133
+ }, fl = Object.keys(Pt), bo = {
1134
1134
  common: {
1135
1135
  primaryColor: "#497fed",
1136
1136
  primaryColorHover: "#497fed",
@@ -1150,7 +1150,7 @@ const hl = {
1150
1150
  Dropdown: {
1151
1151
  fontSizeMedium: "12px"
1152
1152
  }
1153
- }, bo = {
1153
+ }, fo = {
1154
1154
  common: {
1155
1155
  primaryColor: "#508AFF",
1156
1156
  primaryColorHover: "#508AFF",
@@ -1196,7 +1196,7 @@ const $ = ar(() => {
1196
1196
  marks: x
1197
1197
  }) => {
1198
1198
  s.value.enabled = w, s.value.once = A, s.value.marks = x;
1199
- }, u = B([]), d = `#smart-editor-${Te(4)}`, p = B(!1), h = B(!1), b = B(!1), f = (w) => {
1199
+ }, u = B([]), d = `#smart-editor-${Te(4)}`, p = B(!1), h = B(!1), f = B(!1), b = (w) => {
1200
1200
  e.value = w;
1201
1201
  }, C = B(!1), y = (w) => {
1202
1202
  const A = Object.keys(w).includes("value") ? w.value : w;
@@ -1256,10 +1256,10 @@ const $ = ar(() => {
1256
1256
  savedAt: l,
1257
1257
  painter: s,
1258
1258
  setPainter: a,
1259
- assistantBox: b,
1259
+ assistantBox: f,
1260
1260
  blockMenu: p,
1261
1261
  editor: e,
1262
- setEditor: f,
1262
+ setEditor: b,
1263
1263
  editorDestroyed: n,
1264
1264
  searchReplace: h,
1265
1265
  options: t,
@@ -1274,7 +1274,7 @@ const $ = ar(() => {
1274
1274
  defaultLocale: "zh_CN",
1275
1275
  messages: {
1276
1276
  en_US: hl,
1277
- zh_CN: fl
1277
+ zh_CN: bl
1278
1278
  }
1279
1279
  }), { global: Yt } = vl, { t: c } = Yt, go = () => Yt;
1280
1280
  function Ke(r) {
@@ -1570,9 +1570,9 @@ const Be = {
1570
1570
  Re(() => {
1571
1571
  d.value = Vn(document.querySelector(e)), Tt("f11, command+f11", d.value.toggle);
1572
1572
  });
1573
- const b = B(!1), f = cr(), C = gr("saveContent");
1573
+ const f = B(!1), b = cr(), C = gr("saveContent");
1574
1574
  function y() {
1575
- C(), b.value = !1;
1575
+ C(), f.value = !1;
1576
1576
  }
1577
1577
  function k() {
1578
1578
  Lt.content.get(n.value.editorKey).then((x) => {
@@ -1581,7 +1581,7 @@ const Be = {
1581
1581
  }).catch((x) => {
1582
1582
  Be.message.error(x.message);
1583
1583
  }).finally(() => {
1584
- b.value = !1;
1584
+ f.value = !1;
1585
1585
  });
1586
1586
  }
1587
1587
  function w() {
@@ -1764,23 +1764,23 @@ const Be = {
1764
1764
  }, 8, ["to"]),
1765
1765
  g(F, {
1766
1766
  placement: "top",
1767
- show: i(b),
1767
+ show: i(f),
1768
1768
  to: i(e),
1769
1769
  "show-arrow": !1,
1770
1770
  raw: "",
1771
1771
  trigger: "click",
1772
- "onUpdate:show": L[2] || (L[2] = (q) => b.value = q)
1772
+ "onUpdate:show": L[2] || (L[2] = (q) => f.value = q)
1773
1773
  }, {
1774
1774
  trigger: T(() => [
1775
1775
  g(N, {
1776
- class: K(["smart-toolbar-actions-button", { active: i(b) }]),
1776
+ class: K(["smart-toolbar-actions-button", { active: i(f) }]),
1777
1777
  quaternary: "",
1778
1778
  size: "tiny"
1779
1779
  }, {
1780
1780
  default: T(() => [
1781
1781
  v("span", Fl, [
1782
1782
  v("i", {
1783
- class: K(["smart-status-online i-sed:pluse", { offline: !i(f) }])
1783
+ class: K(["smart-status-online i-sed:pluse", { offline: !i(b) }])
1784
1784
  }, null, 2),
1785
1785
  v("span", Hl, [
1786
1786
  i(l) ? (m(), M("span", {
@@ -1799,7 +1799,7 @@ const Be = {
1799
1799
  ]),
1800
1800
  default: T(() => [
1801
1801
  v("div", Ol, [
1802
- v("div", null, I(("t" in x ? x.t : i(c))("save.network")) + " " + I(i(f) ? ("t" in x ? x.t : i(c))("save.online") : ("t" in x ? x.t : i(c))("save.offline")), 1),
1802
+ v("div", null, I(("t" in x ? x.t : i(c))("save.network")) + " " + I(i(b) ? ("t" in x ? x.t : i(c))("save.online") : ("t" in x ? x.t : i(c))("save.offline")), 1),
1803
1803
  v("div", null, [
1804
1804
  te(I(("t" in x ? x.t : i(c))("save.savedAt")) + " ", 1),
1805
1805
  i(l) ? (m(), M("span", {
@@ -1952,7 +1952,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
1952
1952
  function h(w = !1) {
1953
1953
  e.value && (w && e.value.commands.resetIndex(), e.value.commands.setSearchTerm(s.value), e.value.commands.setReplaceTerm(a.value), e.value.commands.setCaseSensitive(u.value));
1954
1954
  }
1955
- function b() {
1955
+ function f() {
1956
1956
  if (!e.value)
1957
1957
  return;
1958
1958
  const { results: w, resultIndex: A } = e.value.storage.searchAndReplace, x = w[A];
@@ -1978,17 +1978,17 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
1978
1978
  w !== A && h(!0);
1979
1979
  }
1980
1980
  );
1981
- function f() {
1981
+ function b() {
1982
1982
  var w;
1983
- (w = e.value) == null || w.commands.nextSearchResult(), b();
1983
+ (w = e.value) == null || w.commands.nextSearchResult(), f();
1984
1984
  }
1985
1985
  function C() {
1986
1986
  var w;
1987
- (w = e.value) == null || w.commands.previousSearchResult(), b();
1987
+ (w = e.value) == null || w.commands.previousSearchResult(), f();
1988
1988
  }
1989
1989
  function y() {
1990
1990
  var w;
1991
- (w = e.value) == null || w.commands.replace(), b();
1991
+ (w = e.value) == null || w.commands.replace(), f();
1992
1992
  }
1993
1993
  const k = () => {
1994
1994
  var w;
@@ -2035,7 +2035,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2035
2035
  g(L, {
2036
2036
  disabled: i(d) === 0,
2037
2037
  quaternary: "",
2038
- onClick: f
2038
+ onClick: b
2039
2039
  }, {
2040
2040
  default: T(() => A[4] || (A[4] = [
2041
2041
  v("i", { class: "i-sed:arrow-down" }, null, -1)
@@ -2099,7 +2099,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2099
2099
  g(L, {
2100
2100
  disabled: i(d) === 0,
2101
2101
  type: "primary",
2102
- onClick: f
2102
+ onClick: b
2103
2103
  }, {
2104
2104
  default: T(() => [
2105
2105
  te(I(("t" in w ? w.t : i(c))("search.search")), 1)
@@ -2133,11 +2133,11 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2133
2133
  var p, h;
2134
2134
  (p = n.value) == null || p.chain().focus().setCurrentNodeSelection().unsetAllMarks().run();
2135
2135
  const u = n.value ? Ne(n.value) : null, d = () => {
2136
- var f;
2137
- let b = 0;
2138
- return (f = n.value) == null || f.state.doc.descendants((C, y) => {
2139
- C === u && (b = y + C.nodeSize);
2140
- }), b;
2136
+ var b;
2137
+ let f = 0;
2138
+ return (b = n.value) == null || b.state.doc.descendants((C, y) => {
2139
+ C === u && (f = y + C.nodeSize);
2140
+ }), f;
2141
2141
  };
2142
2142
  (h = n.value) == null || h.chain().focus(d() - 1).run();
2143
2143
  }
@@ -2151,11 +2151,11 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2151
2151
  onClick: () => {
2152
2152
  var h;
2153
2153
  const u = n.value ? Ne(n.value) : null, d = () => {
2154
- var f;
2155
- let b = 0;
2156
- return (f = n.value) == null || f.state.doc.descendants((C, y) => {
2157
- C === u && (b = y + C.nodeSize);
2158
- }), b;
2154
+ var b;
2155
+ let f = 0;
2156
+ return (b = n.value) == null || b.state.doc.descendants((C, y) => {
2157
+ C === u && (f = y + C.nodeSize);
2158
+ }), f;
2159
2159
  }, p = u == null ? void 0 : u.type.create(
2160
2160
  {
2161
2161
  ...u.attrs,
@@ -2219,13 +2219,13 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2219
2219
  "onUpdate:show": a
2220
2220
  }, {
2221
2221
  default: T(() => {
2222
- var b, f;
2222
+ var f, b;
2223
2223
  return [
2224
2224
  g(p, {
2225
- class: K(["smart-menu-button smart-menu-button-drag", { active: i(t) && ((b = i(n)) == null ? void 0 : b.isEditable) !== !1 }]),
2225
+ class: K(["smart-menu-button smart-menu-button-drag", { active: i(t) && ((f = i(n)) == null ? void 0 : f.isEditable) !== !1 }]),
2226
2226
  quaternary: "",
2227
2227
  size: "small",
2228
- disabled: ((f = i(n)) == null ? void 0 : f.isEditable) === !1
2228
+ disabled: ((b = i(n)) == null ? void 0 : b.isEditable) === !1
2229
2229
  }, {
2230
2230
  default: T(() => d[0] || (d[0] = [
2231
2231
  v("div", { class: "smart-button-content" }, [
@@ -2248,7 +2248,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2248
2248
  return () => _e("i", { class: `${C}`, style: "font-size: 16px;" });
2249
2249
  }
2250
2250
  const h = U(() => {
2251
- var C, y, k, w, A, x, L, N, R, F, W, S, V, j, q, Q, G, ue, ee, fe, ke, Le, De;
2251
+ var C, y, k, w, A, x, L, N, R, F, W, S, V, j, q, Q, G, ue, ee, be, ke, Le, De;
2252
2252
  return [
2253
2253
  {
2254
2254
  label: c("assistant.text"),
@@ -2257,7 +2257,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2257
2257
  show: !!((y = (C = t.value) == null ? void 0 : C.assistant) != null && y.enabled && ((k = n.value) != null && k.isActive("paragraph") || (w = n.value) != null && w.isActive("heading")) && ((N = (L = (x = (A = n.value) == null ? void 0 : A.state) == null ? void 0 : x.selection) == null ? void 0 : L.$from) != null && N.nodeAfter)),
2258
2258
  props: {
2259
2259
  onClick: () => {
2260
- b();
2260
+ f();
2261
2261
  }
2262
2262
  }
2263
2263
  },
@@ -2529,7 +2529,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2529
2529
  label: c("base.heading.text", { level: 3 }),
2530
2530
  key: "heading3",
2531
2531
  icon: p("i-sed:h3"),
2532
- disabled: (fe = n.value) == null ? void 0 : fe.isActive("heading", { level: 3 }),
2532
+ disabled: (be = n.value) == null ? void 0 : be.isActive("heading", { level: 3 }),
2533
2533
  props: {
2534
2534
  onClick: () => {
2535
2535
  var O, Z, ce;
@@ -2621,13 +2621,13 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2621
2621
  }
2622
2622
  ];
2623
2623
  });
2624
- function b() {
2624
+ function f() {
2625
2625
  var k, w, A, x;
2626
2626
  l.value = !0, (k = n.value) == null || k.commands.selectParentNode(), (w = n.value) == null || w.commands.focus();
2627
2627
  const { from: C, to: y } = ((A = n.value) == null ? void 0 : A.state.selection) ?? {};
2628
2628
  (x = n.value) == null || x.commands.setTextSelection({ from: C ?? 0, to: y ?? 0 });
2629
2629
  }
2630
- async function f(C) {
2630
+ async function b(C) {
2631
2631
  n.value.commands.focus(), o.value = C, s.value = C;
2632
2632
  }
2633
2633
  return (C, y) => {
@@ -2639,7 +2639,7 @@ const Gl = { class: "smart-search-replace-container" }, Kl = { class: "smart-sea
2639
2639
  placement: "bottom-end",
2640
2640
  options: i(h),
2641
2641
  trigger: "click",
2642
- "onUpdate:show": f
2642
+ "onUpdate:show": b
2643
2643
  }, {
2644
2644
  default: T(() => {
2645
2645
  var x, L;
@@ -2722,7 +2722,7 @@ const ss = {
2722
2722
  }, ms = {
2723
2723
  key: 0,
2724
2724
  class: "operation"
2725
- }, hs = ["innerHTML"], fs = { class: "dot" }, bs = {
2725
+ }, hs = ["innerHTML"], bs = { class: "dot" }, fs = {
2726
2726
  key: 0,
2727
2727
  class: "assistant_panel_action smart-scrollbar"
2728
2728
  }, gs = ["onClick"], vs = { class: "prompt_item_icon" }, _s = { class: "prompt_item_text" }, ys = {
@@ -2731,7 +2731,7 @@ const ss = {
2731
2731
  const { options: e, editor: n, assistantBox: o } = $(), t = B(!1), l = B(""), s = B(!1), a = B(30), u = B(0), d = B(0), p = B({
2732
2732
  content: "",
2733
2733
  error: !1
2734
- }), h = B(null), b = B(null), f = B(null), C = U(() => [
2734
+ }), h = B(null), f = B(null), b = B(null), C = U(() => [
2735
2735
  {
2736
2736
  category: "continue_write",
2737
2737
  iconSvg: "assistant-keep-write",
@@ -2788,20 +2788,20 @@ const ss = {
2788
2788
  k();
2789
2789
  });
2790
2790
  async function w(R) {
2791
- if (R && (b.value = R), !b.value)
2791
+ if (R && (f.value = R), !f.value)
2792
2792
  return;
2793
2793
  l.value = "", s.value = !1, u.value = 0, d.value = 0, p.value = {
2794
2794
  content: "",
2795
2795
  error: !1
2796
2796
  };
2797
2797
  const { aiTalk: F, handleError: W, handleMessage: S } = e.value.assistant;
2798
- f.value = new AbortController();
2799
- const { signal: V } = f.value;
2798
+ b.value = new AbortController();
2799
+ const { signal: V } = b.value;
2800
2800
  t.value = !0;
2801
2801
  try {
2802
2802
  const j = await F({
2803
2803
  msg: it(n.value),
2804
- category: b.value.category,
2804
+ category: f.value.category,
2805
2805
  signal: V
2806
2806
  });
2807
2807
  if (!j.ok) {
@@ -2822,12 +2822,12 @@ const ss = {
2822
2822
  break;
2823
2823
  } else {
2824
2824
  ee += Q.decode(ue, { stream: !0 });
2825
- let fe;
2826
- for (; (fe = ee.indexOf(`
2825
+ let be;
2826
+ for (; (be = ee.indexOf(`
2827
2827
 
2828
2828
  `)) !== -1; ) {
2829
- const ke = ee.slice(0, fe);
2830
- ee = ee.slice(fe + 2), l.value += S(ke).result || "";
2829
+ const ke = ee.slice(0, be);
2830
+ ee = ee.slice(be + 2), l.value += S(ke).result || "";
2831
2831
  }
2832
2832
  }
2833
2833
  }
@@ -2840,7 +2840,7 @@ const ss = {
2840
2840
  o.value = !1, (R = n.value) == null || R.commands.focus();
2841
2841
  }
2842
2842
  function x() {
2843
- f.value && f.value.abort();
2843
+ b.value && b.value.abort();
2844
2844
  }
2845
2845
  function L() {
2846
2846
  var F, W;
@@ -2853,7 +2853,7 @@ const ss = {
2853
2853
  (S = n.value) == null || S.chain().focus().insertContentAt({ from: R, to: F }, p.value.content).run();
2854
2854
  }
2855
2855
  return Xe(() => {
2856
- f.value && f.value.abort();
2856
+ b.value && b.value.abort();
2857
2857
  }), (R, F) => (m(), M("div", is, [
2858
2858
  v("div", as, [
2859
2859
  i(p).content === "" || i(t) ? (m(), M("div", us, [
@@ -2882,7 +2882,7 @@ const ss = {
2882
2882
  }, I(i(c)("assistant.replace")), 1),
2883
2883
  v("button", {
2884
2884
  class: "operation_button",
2885
- onClick: F[0] || (F[0] = (W) => w(i(b)))
2885
+ onClick: F[0] || (F[0] = (W) => w(i(f)))
2886
2886
  }, I(i(c)("assistant.rewrite")), 1),
2887
2887
  v("button", {
2888
2888
  class: "operation_button",
@@ -2895,10 +2895,10 @@ const ss = {
2895
2895
  class: "result",
2896
2896
  innerHTML: i(p).content
2897
2897
  }, null, 8, hs),
2898
- v("div", fs, I(i(c)("assistant.comment")), 1)
2898
+ v("div", bs, I(i(c)("assistant.comment")), 1)
2899
2899
  ])) : H("", !0)
2900
2900
  ]),
2901
- i(p).content === "" ? (m(), M("div", bs, [
2901
+ i(p).content === "" ? (m(), M("div", fs, [
2902
2902
  (m(!0), M(J, null, ve(i(C), (W, S) => (m(), M("div", {
2903
2903
  key: S,
2904
2904
  class: "prompt_item",
@@ -3016,17 +3016,17 @@ const ss = {
3016
3016
  d.value = y;
3017
3017
  }
3018
3018
  );
3019
- const b = B(null), f = B(null);
3019
+ const f = B(null), b = B(null);
3020
3020
  function C(y) {
3021
3021
  o("toggle-popup", y);
3022
3022
  }
3023
3023
  return Mt(
3024
- f,
3024
+ b,
3025
3025
  () => {
3026
3026
  o("toggle-popup", !1);
3027
3027
  },
3028
3028
  {
3029
- ignore: [b, ".smart-popup"]
3029
+ ignore: [f, ".smart-popup"]
3030
3030
  }
3031
3031
  ), (y, k) => {
3032
3032
  const w = Se, A = lt, x = En, L = qt;
@@ -3155,7 +3155,7 @@ const ss = {
3155
3155
  trigger: T(() => [
3156
3156
  v("span", {
3157
3157
  ref_key: "popupHandleRef",
3158
- ref: b,
3158
+ ref: f,
3159
3159
  class: "smart-button-icon-arrow smart-button-handle",
3160
3160
  onClick: k[0] || (k[0] = (S) => C(!r.popupVisible))
3161
3161
  }, k[6] || (k[6] = [
@@ -3165,7 +3165,7 @@ const ss = {
3165
3165
  default: T(() => [
3166
3166
  v("div", {
3167
3167
  ref_key: "popupContentRef",
3168
- ref: f,
3168
+ ref: b,
3169
3169
  class: "smart-popup-content p-x-8 p-y-4"
3170
3170
  }, [
3171
3171
  pe(y.$slots, "content", {}, void 0, !0)
@@ -3188,7 +3188,7 @@ const ss = {
3188
3188
  return [
3189
3189
  g(w, ge({
3190
3190
  ref_key: "popupHandleRef",
3191
- ref: b,
3191
+ ref: f,
3192
3192
  class: ["smart-menu-button", {
3193
3193
  "show-text": !r.hideText,
3194
3194
  active: r.menuActive && ((S = i(s)) == null ? void 0 : S.isEditable) !== !1
@@ -3220,7 +3220,7 @@ const ss = {
3220
3220
  default: T(() => [
3221
3221
  v("div", {
3222
3222
  ref_key: "popupContentRef",
3223
- ref: f,
3223
+ ref: b,
3224
3224
  class: "smart-popup-content p-x-8 p-y-4"
3225
3225
  }, [
3226
3226
  pe(y.$slots, "content", {}, void 0, !0)
@@ -3257,18 +3257,18 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3257
3257
  emits: ["change", "update:visible"],
3258
3258
  setup(r, { emit: e }) {
3259
3259
  const n = r, o = e, { popupVisible: t } = ye(), { options: l } = $(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
3260
- function p(f) {
3260
+ function p(b) {
3261
3261
  t.value = !0, s.value.colors.forEach((C, y) => {
3262
- C === f && s.value.colors.splice(y, 1);
3263
- }), s.value.colors.unshift(f), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", f), o("update:visible");
3262
+ C === b && s.value.colors.splice(y, 1);
3263
+ }), s.value.colors.unshift(b), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", b), o("update:visible");
3264
3264
  }
3265
- function h(f) {
3266
- p(f), o("change", f);
3265
+ function h(b) {
3266
+ p(b), o("change", b);
3267
3267
  }
3268
- function b() {
3268
+ function f() {
3269
3269
  return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
3270
3270
  }
3271
- return (f, C) => {
3271
+ return (b, C) => {
3272
3272
  var w;
3273
3273
  const y = Se, k = Nn;
3274
3274
  return m(), M("div", {
@@ -3282,7 +3282,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3282
3282
  onClick: C[0] || (C[0] = (A) => h(i(u)))
3283
3283
  }, {
3284
3284
  default: T(() => [
3285
- te(I(("t" in f ? f.t : i(c))("colorPicker.default")), 1)
3285
+ te(I(("t" in b ? b.t : i(c))("colorPicker.default")), 1)
3286
3286
  ]),
3287
3287
  _: 1
3288
3288
  })
@@ -3297,7 +3297,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3297
3297
  ]),
3298
3298
  v("div", {
3299
3299
  class: "smart-color-picker-group-title",
3300
- textContent: I(("t" in f ? f.t : i(c))("colorPicker.standard"))
3300
+ textContent: I(("t" in b ? b.t : i(c))("colorPicker.standard"))
3301
3301
  }, null, 8, Ds),
3302
3302
  v("div", Os, [
3303
3303
  (m(), M(J, null, ve(a, (A, x) => v("div", {
@@ -3310,7 +3310,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3310
3310
  i(s).colors.length > 0 ? (m(), M(J, { key: 0 }, [
3311
3311
  v("div", {
3312
3312
  class: "smart-color-picker-group-title",
3313
- textContent: I(("t" in f ? f.t : i(c))("colorPicker.recent"))
3313
+ textContent: I(("t" in b ? b.t : i(c))("colorPicker.recent"))
3314
3314
  }, null, 8, Vs),
3315
3315
  v("div", Ws, [
3316
3316
  (m(!0), M(J, null, ve(i(s).colors, (A, x) => (m(), M("div", {
@@ -3325,7 +3325,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3325
3325
  g(k, {
3326
3326
  to: d,
3327
3327
  placement: "right",
3328
- "render-label": b,
3328
+ "render-label": f,
3329
3329
  onComplete: p
3330
3330
  })
3331
3331
  ], 8, Rs);
@@ -3359,8 +3359,8 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3359
3359
  d === "" ? (p = s.value) == null || p.chain().focus().unsetHighlight().run() : (h = s.value) == null || h.chain().focus().setHighlight({ color: d }).run();
3360
3360
  }
3361
3361
  return (d, p) => {
3362
- const h = at, b = E;
3363
- return m(), _(b, {
3362
+ const h = at, f = E;
3363
+ return m(), _(f, {
3364
3364
  ico: "i-sed:highlight",
3365
3365
  text: r.text || ("t" in d ? d.t : i(c))("base.bgColor"),
3366
3366
  "menu-type": "popup",
@@ -3368,7 +3368,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3368
3368
  "hide-text": "",
3369
3369
  "popup-visible": i(t),
3370
3370
  onTogglePopup: i(l),
3371
- onMenuClick: p[0] || (p[0] = (f) => u(i(a)))
3371
+ onMenuClick: p[0] || (p[0] = (b) => u(i(a)))
3372
3372
  }, {
3373
3373
  content: T(() => [
3374
3374
  g(h, {
@@ -3416,8 +3416,8 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3416
3416
  d === "" ? (p = s.value) == null || p.chain().focus().unsetColor().run() : (h = s.value) == null || h.chain().focus().setColor(d).run();
3417
3417
  }
3418
3418
  return (d, p) => {
3419
- const h = at, b = E;
3420
- return m(), _(b, {
3419
+ const h = at, f = E;
3420
+ return m(), _(f, {
3421
3421
  ico: "i-sed:font-color-picker",
3422
3422
  text: r.text || ("t" in d ? d.t : i(c))("base.color"),
3423
3423
  "menu-type": "popup",
@@ -3425,7 +3425,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
3425
3425
  "hide-text": "",
3426
3426
  "popup-visible": i(t),
3427
3427
  onTogglePopup: i(l),
3428
- onMenuClick: p[0] || (p[0] = (f) => u(i(a)))
3428
+ onMenuClick: p[0] || (p[0] = (b) => u(i(a)))
3429
3429
  }, {
3430
3430
  content: T(() => [
3431
3431
  g(h, {
@@ -4489,7 +4489,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4489
4489
  }, null, 8, ["text", "menu-active"]);
4490
4490
  };
4491
4491
  }
4492
- }, fi = {
4492
+ }, bi = {
4493
4493
  __name: "vertical-middle",
4494
4494
  emits: "update:popupVisible",
4495
4495
  setup(r, { emit: e }) {
@@ -4514,7 +4514,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4514
4514
  }, null, 8, ["text", "menu-active"]);
4515
4515
  };
4516
4516
  }
4517
- }, bi = {
4517
+ }, fi = {
4518
4518
  __name: "vertical-top",
4519
4519
  emits: "update:popupVisible",
4520
4520
  setup(r, { emit: e }) {
@@ -4550,7 +4550,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4550
4550
  return l || "top";
4551
4551
  });
4552
4552
  return (l, s) => {
4553
- const a = bi, u = fi, d = hi, p = E;
4553
+ const a = fi, u = bi, d = hi, p = E;
4554
4554
  return m(), _(p, {
4555
4555
  ico: `i-sed:table-align-${i(t)}`,
4556
4556
  text: ("t" in l ? l.t : i(c))("bubbleMenu.imageFloat"),
@@ -4819,7 +4819,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4819
4819
  const { options: e, editor: n } = $();
4820
4820
  return (o, t) => {
4821
4821
  var O, Z, ce, ut, ct, dt, pt, mt, Ye, Ze, tn;
4822
- const l = Mi, s = $i, a = Si, u = ki, d = Ci, p = yi, h = _i, b = vi, f = mi, C = pi, y = di, k = ci, w = ui, A = ai, x = ii, L = si, N = ri, R = oi, F = ni, W = ti, S = ei, V = Qs, j = Zs, q = Ys, Q = Xs, G = Gs, ue = xo, ee = wo, fe = ko, ke = Co, Le = yo, De = _o;
4822
+ const l = Mi, s = $i, a = Si, u = ki, d = Ci, p = yi, h = _i, f = vi, b = mi, C = pi, y = di, k = ci, w = ui, A = ai, x = ii, L = si, N = ri, R = oi, F = ni, W = ti, S = ei, V = Qs, j = Zs, q = Ys, Q = Xs, G = Gs, ue = xo, ee = wo, be = ko, ke = Co, Le = yo, De = _o;
4823
4823
  return (O = i(n)) != null && O.isActive("map") || (Z = i(n)) != null && Z.getAttributes("bubble").bubble || (ce = i(n)) != null && ce.isActive("pagination") || (ut = i(n)) != null && ut.isActive("horizontalRule") || (ct = i(n)) != null && ct.getAttributes("image").error ? (m(), M(J, { key: 0 }, [], 64)) : (dt = i(n)) != null && dt.isActive("image") && !((pt = i(n)) != null && pt.getAttributes("image").error) ? (m(), M(J, { key: 1 }, [
4824
4824
  g(l),
4825
4825
  g(s),
@@ -4830,9 +4830,9 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4830
4830
  g(d),
4831
4831
  g(p),
4832
4832
  g(h),
4833
- g(b),
4834
- t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4835
4833
  g(f),
4834
+ t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4835
+ g(b),
4836
4836
  g(C),
4837
4837
  g(y),
4838
4838
  g(k),
@@ -4862,7 +4862,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4862
4862
  ], 64)) : H("", !0),
4863
4863
  g(ue),
4864
4864
  g(ee),
4865
- g(fe),
4865
+ g(be),
4866
4866
  g(ke),
4867
4867
  t[6] || (t[6] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
4868
4868
  g(Le),
@@ -4903,9 +4903,9 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4903
4903
  "tippy-options": i(a)
4904
4904
  }, {
4905
4905
  default: T(() => {
4906
- var b, f, C, y;
4906
+ var f, b, C, y;
4907
4907
  return [
4908
- (f = (b = i(e)) == null ? void 0 : b.document) != null && f.enableBubbleMenu && !i(l) ? (m(), _(p, { key: 0 })) : H("", !0),
4908
+ (b = (f = i(e)) == null ? void 0 : f.document) != null && b.enableBubbleMenu && !i(l) ? (m(), _(p, { key: 0 })) : H("", !0),
4909
4909
  (y = (C = i(e)) == null ? void 0 : C.assistant) != null && y.enabled && i(l) ? (m(), _(h, { key: 1 })) : H("", !0)
4910
4910
  ];
4911
4911
  }),
@@ -4922,9 +4922,9 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4922
4922
  if (!p) return !1;
4923
4923
  const h = _t(p.node, (k) => k.type === l.nodes.detailsContent);
4924
4924
  if (!h.length || yt(p.start + h[0].pos + 1, r)) return !1;
4925
- const b = n.doc.resolve(p.pos + p.node.nodeSize), f = ln.findFrom(b, 1, !1);
4926
- if (!f) return !1;
4927
- const { tr: C } = n, y = new ln(f);
4925
+ const f = n.doc.resolve(p.pos + p.node.nodeSize), b = ln.findFrom(f, 1, !1);
4926
+ if (!b) return !1;
4927
+ const { tr: C } = n, y = new ln(b);
4928
4928
  return C.setSelection(y), C.scrollIntoView(), o.dispatch(C), !0;
4929
4929
  }, Ei = Y.create({ name: "details", content: "detailsSummary detailsContent", group: "block", defining: !0, isolating: !0, allowGapCursor: !1, addOptions: () => ({ persist: !1, openClassName: "is-open", HTMLAttributes: {} }), addAttributes() {
4930
4930
  return this.options.persist ? { open: { default: !1, parseHTML: (r) => r.hasAttribute("open"), renderHTML: ({ open: r }) => r ? { open: "" } : {} } } : [];
@@ -4955,8 +4955,8 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4955
4955
  if (r.isEditable && typeof e == "function") {
4956
4956
  const { from: d, to: p } = r.state.selection;
4957
4957
  r.chain().command(({ tr: h }) => {
4958
- const b = e(), f = h.doc.nodeAt(b);
4959
- return (f == null ? void 0 : f.type) === this.type && (h.setNodeMarkup(b, void 0, { open: !f.attrs.open }), !0);
4958
+ const f = e(), b = h.doc.nodeAt(f);
4959
+ return (b == null ? void 0 : b.type) === this.type && (h.setNodeMarkup(f, void 0, { open: !b.attrs.open }), !0);
4960
4960
  }).setTextSelection({ from: d, to: p }).focus(void 0, { scrollIntoView: !1 }).run();
4961
4961
  }
4962
4962
  } else r.commands.focus(void 0, { scrollIntoView: !1 });
@@ -4976,7 +4976,7 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4976
4976
  if (!t) return !1;
4977
4977
  const l = _t(t.node, (y) => y.type === o.nodes.detailsSummary), s = _t(t.node, (y) => y.type === o.nodes.detailsContent);
4978
4978
  if (!l.length || !s.length) return !1;
4979
- const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), h = { from: d, to: d + t.node.nodeSize }, b = u.node.content.toJSON() || [], f = p.parent.type.contentMatch.defaultType, C = [f == null ? void 0 : f.create(null, a.node.content).toJSON(), ...b];
4979
+ const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), h = { from: d, to: d + t.node.nodeSize }, f = u.node.content.toJSON() || [], b = p.parent.type.contentMatch.defaultType, C = [b == null ? void 0 : b.create(null, a.node.content).toJSON(), ...f];
4980
4980
  return e().insertContentAt(h, C).setTextSelection(d + 1).run();
4981
4981
  } };
4982
4982
  }, addKeyboardShortcuts() {
@@ -4995,23 +4995,23 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
4995
4995
  if (!d || !a.canReplaceWith(u, u, d)) return !1;
4996
4996
  const p = d.createAndFill();
4997
4997
  if (!p) return !1;
4998
- const h = s ? l.after() + 1 : l.after(-1), b = e.tr.replaceWith(h, h, p), f = b.doc.resolve(h), C = jn.near(f, 1);
4999
- return b.setSelection(C), b.scrollIntoView(), n.dispatch(b), !0;
4998
+ const h = s ? l.after() + 1 : l.after(-1), f = e.tr.replaceWith(h, h, p), b = f.doc.resolve(h), C = jn.near(b, 1);
4999
+ return f.setSelection(C), f.scrollIntoView(), n.dispatch(f), !0;
5000
5000
  }, ArrowRight: ({ editor: r }) => mn(r, "right"), ArrowDown: ({ editor: r }) => mn(r, "down") };
5001
5001
  }, addProseMirrorPlugins() {
5002
5002
  return [new Fe({ key: new Ue("detailsSelection"), appendTransaction: (r, e, n) => {
5003
5003
  const { editor: o, type: t } = this;
5004
- if (!r.some((b) => b.selectionSet) || !e.selection.empty || !n.selection.empty || !kr(n, t.name)) return;
5004
+ if (!r.some((f) => f.selectionSet) || !e.selection.empty || !n.selection.empty || !kr(n, t.name)) return;
5005
5005
  const { $from: s } = n.selection;
5006
5006
  if (yt(s.pos, o)) return;
5007
- const a = ((b, f, C) => {
5008
- for (let y = b.depth; y > 0; y -= 1) {
5009
- const k = b.node(y), w = f(k), A = yt(b.start(y), C);
5010
- if (w && A) return { pos: y > 0 ? b.before(y) : 0, start: b.start(y), depth: y, node: k };
5007
+ const a = ((f, b, C) => {
5008
+ for (let y = f.depth; y > 0; y -= 1) {
5009
+ const k = f.node(y), w = b(k), A = yt(f.start(y), C);
5010
+ if (w && A) return { pos: y > 0 ? f.before(y) : 0, start: f.start(y), depth: y, node: k };
5011
5011
  }
5012
- })(s, (b) => b.type === t, o);
5012
+ })(s, (f) => f.type === t, o);
5013
5013
  if (!a) return;
5014
- const u = _t(a.node, (b) => b.type === n.schema.nodes.detailsSummary);
5014
+ const u = _t(a.node, (f) => f.type === n.schema.nodes.detailsSummary);
5015
5015
  if (!u.length) return;
5016
5016
  const d = u[0], p = (e.selection.from < n.selection.from ? "forward" : "backward") == "forward" ? a.start + d.pos : a.pos + d.pos + d.node.nodeSize, h = Bt.create(n.doc, p);
5017
5017
  return n.tr.setSelection(h);
@@ -5022,12 +5022,12 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
5022
5022
  const { regex: e, katexOptions: n = {}, editor: o, shouldRender: t } = r;
5023
5023
  return new Fe({ key: new Ue("mathematics"), state: { init: () => He.empty, apply(l, s, a, u) {
5024
5024
  const { selection: d } = u, p = [];
5025
- return u.doc.descendants((h, b) => {
5026
- const f = t(u, b, h);
5027
- if (h.isText && h.text && f) {
5025
+ return u.doc.descendants((h, f) => {
5026
+ const b = t(u, f, h);
5027
+ if (h.isText && h.text && b) {
5028
5028
  let C;
5029
5029
  for (; C = e.exec(h.text); ) {
5030
- const y = b + C.index, k = y + C[0].length, w = C.slice(1).find(Boolean);
5030
+ const y = f + C.index, k = y + C[0].length, w = C.slice(1).find(Boolean);
5031
5031
  if (w) {
5032
5032
  const A = d.$from.pos - d.$to.pos, x = d.$anchor.pos >= y && d.$anchor.pos <= k, L = d.$from.pos >= y && d.$to.pos <= k, N = A === 0 && x || L;
5033
5033
  N && o.isEditable || p.push(xt.widget(y, () => {
@@ -5050,17 +5050,17 @@ const Rs = ["id"], Fs = { class: "smart-color-picker-default-button" }, Hs = { c
5050
5050
  }, Fi = (r, e) => r.doc.resolve(e).parent.type.name !== "codeBlock", Ao = $e.create({ name: "Mathematics", addOptions: () => ({ regex: /\$([^\$]*)\$/gi, katexOptions: void 0, shouldRender: Fi }), addProseMirrorPlugins() {
5051
5051
  return [Ri({ ...this.options, editor: this.editor })];
5052
5052
  } });
5053
- var be = [];
5053
+ var fe = [];
5054
5054
  for (var Nt = 0; Nt < 256; ++Nt)
5055
- be.push((Nt + 256).toString(16).slice(1));
5055
+ fe.push((Nt + 256).toString(16).slice(1));
5056
5056
  function Hi(r, e = 0) {
5057
- return (be[r[e + 0]] + be[r[e + 1]] + be[r[e + 2]] + be[r[e + 3]] + "-" + be[r[e + 4]] + be[r[e + 5]] + "-" + be[r[e + 6]] + be[r[e + 7]] + "-" + be[r[e + 8]] + be[r[e + 9]] + "-" + be[r[e + 10]] + be[r[e + 11]] + be[r[e + 12]] + be[r[e + 13]] + be[r[e + 14]] + be[r[e + 15]]).toLowerCase();
5057
+ return (fe[r[e + 0]] + fe[r[e + 1]] + fe[r[e + 2]] + fe[r[e + 3]] + "-" + fe[r[e + 4]] + fe[r[e + 5]] + "-" + fe[r[e + 6]] + fe[r[e + 7]] + "-" + fe[r[e + 8]] + fe[r[e + 9]] + "-" + fe[r[e + 10]] + fe[r[e + 11]] + fe[r[e + 12]] + fe[r[e + 13]] + fe[r[e + 14]] + fe[r[e + 15]]).toLowerCase();
5058
5058
  }
5059
- var ft, zi = new Uint8Array(16);
5059
+ var bt, zi = new Uint8Array(16);
5060
5060
  function Di() {
5061
- if (!ft && (ft = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ft))
5061
+ if (!bt && (bt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !bt))
5062
5062
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5063
- return ft(zi);
5063
+ return bt(zi);
5064
5064
  }
5065
5065
  var Oi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
5066
5066
  const hn = {
@@ -5090,11 +5090,11 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5090
5090
  });
5091
5091
  }
5092
5092
  return s ? l : null;
5093
- } }), fn = (r, e) => {
5093
+ } }), bn = (r, e) => {
5094
5094
  let n = 1;
5095
5095
  const o = e.at(-1), t = [...e].reverse().find((s) => s.originalLevel <= r.node.attrs.level), l = (t == null ? void 0 : t.level) || 1;
5096
5096
  return n = r.node.attrs.level > ((o == null ? void 0 : o.originalLevel) || 1) ? ((o == null ? void 0 : o.level) || 1) + 1 : r.node.attrs.level < ((o == null ? void 0 : o.originalLevel) || 1) ? l : (o == null ? void 0 : o.level) || 1, n;
5097
- }, bn = (r, e) => {
5097
+ }, fn = (r, e) => {
5098
5098
  const n = e.at(-1);
5099
5099
  return n ? ((n == null ? void 0 : n.itemIndex) || 1) + 1 : 1;
5100
5100
  }, Vi = (r, e, n) => {
@@ -5128,8 +5128,8 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5128
5128
  if (s.node.textContent.length === 0) return;
5129
5129
  const u = e.view.domAtPos(s.pos + 1).node, d = r.storage.scrollPosition >= u.offsetTop;
5130
5130
  l.push(u);
5131
- const p = s.node.attrs.level, h = o[a - 1], b = r.getLevelFn(s, t), f = r.getIndexFn(s, t, b);
5132
- t = h ? [...t, { itemIndex: f, id: s.node.attrs["data-toc-id"], originalLevel: p, level: b, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: !1, node: s.node, dom: u }] : [...t, { itemIndex: f, id: s.node.attrs["data-toc-id"], originalLevel: p, level: b, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: d, node: s.node, dom: u }];
5131
+ const p = s.node.attrs.level, h = o[a - 1], f = r.getLevelFn(s, t), b = r.getIndexFn(s, t, f);
5132
+ t = h ? [...t, { itemIndex: b, id: s.node.attrs["data-toc-id"], originalLevel: p, level: f, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: !1, node: s.node, dom: u }] : [...t, { itemIndex: b, id: s.node.attrs["data-toc-id"], originalLevel: p, level: f, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: d, node: s.node, dom: u }];
5133
5133
  }), t = To(t, r), n) {
5134
5134
  const s = r.storage.content.length === 0;
5135
5135
  n(t, s);
@@ -5140,7 +5140,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5140
5140
  }, addOptions: () => ({ onUpdate: () => {
5141
5141
  }, getId: (r) => Vt(), scrollParent: typeof window < "u" ? () => window : void 0, anchorTypes: ["heading"] }), onUpdate() {
5142
5142
  var r;
5143
- gn({ editor: this.editor, storage: this.storage, onUpdate: (r = this.options.onUpdate) === null || r === void 0 ? void 0 : r.bind(this), getIndexFn: this.options.getIndex || bn, getLevelFn: this.options.getLevel || fn, anchorTypes: this.options.anchorTypes });
5143
+ gn({ editor: this.editor, storage: this.storage, onUpdate: (r = this.options.onUpdate) === null || r === void 0 ? void 0 : r.bind(this), getIndexFn: this.options.getIndex || fn, getLevelFn: this.options.getLevel || bn, anchorTypes: this.options.anchorTypes });
5144
5144
  }, onCreate() {
5145
5145
  var r;
5146
5146
  const { tr: e } = this.editor.state, n = [];
@@ -5154,7 +5154,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5154
5154
  }
5155
5155
  n.push(a);
5156
5156
  }
5157
- }), this.editor.view.dispatch(e), gn({ editor: this.editor, storage: this.storage, onUpdate: (r = this.options.onUpdate) === null || r === void 0 ? void 0 : r.bind(this), getIndexFn: this.options.getIndex || bn, getLevelFn: this.options.getLevel || fn, anchorTypes: this.options.anchorTypes }), this.storage.scrollHandler = () => {
5157
+ }), this.editor.view.dispatch(e), gn({ editor: this.editor, storage: this.storage, onUpdate: (r = this.options.onUpdate) === null || r === void 0 ? void 0 : r.bind(this), getIndexFn: this.options.getIndex || fn, getLevelFn: this.options.getLevel || bn, anchorTypes: this.options.anchorTypes }), this.storage.scrollHandler = () => {
5158
5158
  var t;
5159
5159
  if (!this.options.scrollParent) return;
5160
5160
  const l = typeof this.options.scrollParent == "function" ? this.options.scrollParent() : this.options.scrollParent, s = l instanceof HTMLElement ? l.scrollTop : l.scrollY;
@@ -5294,11 +5294,11 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5294
5294
  }
5295
5295
  t.value = !1;
5296
5296
  }
5297
- }, { controls: !0 });
5297
+ });
5298
5298
  function u() {
5299
5299
  if (t.value = !t.value, t.value) {
5300
- const { top: d, right: p, bottom: h, left: b, width: f, height: C } = pr(o), { width: y, height: k } = jt();
5301
- l.value = b.value > y.value / 2, s.value = d.value < k.value / 2, a.value = {}, l.value ? a.value.right = `${y.value - p.value - f.value}px` : a.value.left = `${b.value - f.value}px`, s.value ? a.value.top = `${d.value + f.value + 10}px` : a.value.bottom = `${k.value - h.value + C.value + 10}px`;
5300
+ const { top: d, right: p, bottom: h, left: f, width: b, height: C } = pr(o), { width: y, height: k } = jt();
5301
+ l.value = f.value > y.value / 2, s.value = d.value < k.value / 2, a.value = {}, l.value ? a.value.right = `${y.value - p.value - b.value}px` : a.value.left = `${f.value - b.value}px`, s.value ? a.value.top = `${d.value + b.value + 10}px` : a.value.bottom = `${k.value - h.value + C.value + 10}px`;
5302
5302
  }
5303
5303
  }
5304
5304
  return (d, p) => (m(), _(i(ie), {
@@ -5309,19 +5309,20 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5309
5309
  default: T(() => [
5310
5310
  i(n).render.bubble ? (m(), _(oe(i(n).render.bubble()), {
5311
5311
  key: 0,
5312
- "node-view-props": { ...d.props }
5312
+ "show-bubble": i(t),
5313
+ onToggleBubble: u
5313
5314
  }, {
5314
5315
  default: T(() => [
5315
5316
  g(i(At), { class: "bubble-block-input smart-scrollbar" })
5316
5317
  ]),
5317
5318
  _: 1
5318
- }, 8, ["node-view-props"])) : (m(), M(J, { key: 1 }, [
5319
+ }, 40, ["show-bubble"])) : (m(), M(J, { key: 1 }, [
5319
5320
  v("span", {
5320
5321
  class: "bubble-block-label",
5321
5322
  contenteditable: "false",
5322
5323
  onClick: u
5323
5324
  }, [
5324
- i(n).render.bubbleIcon ? (m(), _(oe(i(n).render.bubbleIcon), { key: 0 })) : (m(), M("i", Xi))
5325
+ i(n).render.bubbleIcon ? (m(), _(oe(i(n).render.bubbleIcon()), { key: 0 })) : (m(), M("i", Xi))
5325
5326
  ]),
5326
5327
  nt(v("div", {
5327
5328
  class: K(["bubble-block-content", [
@@ -5341,7 +5342,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5341
5342
  _: 1
5342
5343
  }, 512));
5343
5344
  }
5344
- }, Zi = /* @__PURE__ */ z(Yi, [["__scopeId", "data-v-7241892b"]]), Qi = Y.create({
5345
+ }, Zi = /* @__PURE__ */ z(Yi, [["__scopeId", "data-v-64ceb567"]]), Qi = Y.create({
5345
5346
  name: "bubble",
5346
5347
  inline: !0,
5347
5348
  group: "inline",
@@ -5623,8 +5624,8 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5623
5624
  class: K(["output", d.node.attrs.theme])
5624
5625
  }, [
5625
5626
  v("div", ca, [
5626
- (m(!0), M(J, null, ve(i(a), (h, b) => (m(), M("div", {
5627
- key: b,
5627
+ (m(!0), M(J, null, ve(i(a), (h, f) => (m(), M("div", {
5628
+ key: f,
5628
5629
  class: K(["row", h.type])
5629
5630
  }, I(h.text), 3))), 128))
5630
5631
  ])
@@ -5703,7 +5704,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5703
5704
  _: 1
5704
5705
  }));
5705
5706
  }
5706
- }, fa = /* @__PURE__ */ z(ha, [["__scopeId", "data-v-ad2a6a54"]]), ba = Y.create({
5707
+ }, ba = /* @__PURE__ */ z(ha, [["__scopeId", "data-v-ad2a6a54"]]), fa = Y.create({
5707
5708
  name: "codeOnline",
5708
5709
  group: "block",
5709
5710
  atom: !0,
@@ -5736,7 +5737,7 @@ const Pi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
5736
5737
  };
5737
5738
  },
5738
5739
  addNodeView() {
5739
- return ae(fa);
5740
+ return ae(ba);
5740
5741
  }
5741
5742
  }), et = Y.create({
5742
5743
  name: "column",
@@ -5977,15 +5978,15 @@ class re {
5977
5978
  */
5978
5979
  findIndex(e, n = -1) {
5979
5980
  if (e == 0)
5980
- return bt(0, e);
5981
+ return ft(0, e);
5981
5982
  if (e == this.size)
5982
- return bt(this.content.length, e);
5983
+ return ft(this.content.length, e);
5983
5984
  if (e > this.size || e < 0)
5984
5985
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
5985
5986
  for (let o = 0, t = 0; ; o++) {
5986
5987
  let l = this.child(o), s = t + l.nodeSize;
5987
5988
  if (s >= e)
5988
- return s == e || n > 0 ? bt(o + 1, s) : bt(o, t);
5989
+ return s == e || n > 0 ? ft(o + 1, s) : ft(o, t);
5989
5990
  t = s;
5990
5991
  }
5991
5992
  }
@@ -6051,7 +6052,7 @@ class re {
6051
6052
  }
6052
6053
  re.empty = new re([], 0);
6053
6054
  const Rt = { index: 0, offset: 0 };
6054
- function bt(r, e) {
6055
+ function ft(r, e) {
6055
6056
  return Rt.index = r, Rt.offset = e, Rt;
6056
6057
  }
6057
6058
  class ga extends Error {
@@ -6239,11 +6240,11 @@ class xe {
6239
6240
  break;
6240
6241
  let d = this.ranges[a + l], p = this.ranges[a + s], h = u + d;
6241
6242
  if (e <= h) {
6242
- let b = d ? e == u ? -1 : e == h ? 1 : n : n, f = u + t + (b < 0 ? 0 : p);
6243
+ let f = d ? e == u ? -1 : e == h ? 1 : n : n, b = u + t + (f < 0 ? 0 : p);
6243
6244
  if (o)
6244
- return f;
6245
+ return b;
6245
6246
  let C = e == (n < 0 ? u : h) ? null : va(a / 3, e - u), y = e == u ? No : e == h ? Eo : Ct;
6246
- return (n < 0 ? e != u : e != h) && (y |= Ro), new _n(f, y, C);
6247
+ return (n < 0 ? e != u : e != h) && (y |= Ro), new _n(b, y, C);
6247
6248
  }
6248
6249
  t += p - d;
6249
6250
  }
@@ -7289,8 +7290,8 @@ const zo = Y.create({
7289
7290
  if (a === void 0)
7290
7291
  return;
7291
7292
  let u = [];
7292
- a.node.descendants((h, b, f) => {
7293
- (f == null ? void 0 : f.type.name) === et.name && h.push(h);
7293
+ a.node.descendants((h, f, b) => {
7294
+ (b == null ? void 0 : b.type.name) === et.name && h.push(h);
7294
7295
  }), u = u.reverse().filter((h) => h.content.size > 0);
7295
7296
  const d = o.doc.resolve(a.pos), p = new Ae(d);
7296
7297
  return o = o.setSelection(p), u.forEach(
@@ -7312,23 +7313,23 @@ const zo = Y.create({
7312
7313
  console.warn("failed depth check");
7313
7314
  return;
7314
7315
  }
7315
- let b;
7316
+ let f;
7316
7317
  if (t) {
7317
7318
  const k = d.content().toJSON(), w = Ho(k), A = An(o - 1);
7318
- b = xn({
7319
+ f = xn({
7319
7320
  content: [w, ...A]
7320
7321
  });
7321
7322
  } else {
7322
7323
  const k = An(o);
7323
- b = xn({
7324
+ f = xn({
7324
7325
  content: k
7325
7326
  });
7326
7327
  }
7327
- const f = a.type.schema.nodeFromJSON(b);
7328
- if (f === null)
7328
+ const b = a.type.schema.nodeFromJSON(f);
7329
+ if (b === null)
7329
7330
  return;
7330
7331
  const C = d.$anchor.parent.type;
7331
- return ((k) => !(!k.contentMatch.matchType(this.type) || !this.options.nestedColumns && k.name === et.name))(C) ? (l = l.setSelection(d), l = l.replaceSelectionWith(f, !1), s(l)) : void 0;
7332
+ return ((k) => !(!k.contentMatch.matchType(this.type) || !this.options.nestedColumns && k.name === et.name))(C) ? (l = l.setSelection(d), l = l.replaceSelectionWith(b, !1), s(l)) : void 0;
7332
7333
  } catch (a) {
7333
7334
  console.error(a);
7334
7335
  }
@@ -7381,8 +7382,8 @@ const zo = Y.create({
7381
7382
  if (u !== a + 1) return !1;
7382
7383
  const d = s.node.type.contentMatch.defaultType, p = d == null ? void 0 : d.createAndFill();
7383
7384
  if (!p) return !1;
7384
- const h = e.doc.resolve(s.pos + 1), b = u - 1, f = s.node.child(b), C = h.posAtIndex(b, s.depth);
7385
- if (!f.eq(p)) return !1;
7385
+ const h = e.doc.resolve(s.pos + 1), f = u - 1, b = s.node.child(f), C = h.posAtIndex(f, s.depth);
7386
+ if (!b.eq(p)) return !1;
7386
7387
  const y = t.node(-3);
7387
7388
  if (!y) return !1;
7388
7389
  const k = t.indexAfter(-3), w = qn(y.contentMatchAt(k));
@@ -7393,7 +7394,7 @@ const zo = Y.create({
7393
7394
  x.replaceWith(L, L, A);
7394
7395
  const N = x.doc.resolve(L), R = jn.near(N, 1);
7395
7396
  x.setSelection(R);
7396
- const F = C, W = C + f.nodeSize;
7397
+ const F = C, W = C + b.nodeSize;
7397
7398
  return x.delete(F, W), x.scrollIntoView(), n.dispatch(x), !0;
7398
7399
  } };
7399
7400
  } }), Aa = xa.extend({
@@ -7788,10 +7789,10 @@ class Pa {
7788
7789
  if (!e)
7789
7790
  return null;
7790
7791
  if (e != null && e.pos) {
7791
- const { node: p } = this.editorView.domAtPos(e.pos), { x: h, y: b } = p.getBoundingClientRect();
7792
+ const { node: p } = this.editorView.domAtPos(e.pos), { x: h, y: f } = p.getBoundingClientRect();
7792
7793
  return this.editorView.dispatch(this.editorView.state.tr.setMeta(We, {
7793
7794
  x: h,
7794
- y: b,
7795
+ y: f,
7795
7796
  pos: null
7796
7797
  })), e.pos;
7797
7798
  }
@@ -8109,12 +8110,12 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8109
8110
  Mt(h, () => {
8110
8111
  r.selected || (p.value = !1);
8111
8112
  });
8112
- function b() {
8113
+ function f() {
8113
8114
  p.value = !0, r.editor.commands.setNodeSelection(r.getPos());
8114
8115
  }
8115
- const f = B({ width: 0, height: 0 });
8116
+ const b = B({ width: 0, height: 0 });
8116
8117
  function C(S) {
8117
- f.value.width = S.target.width, f.value.height = S.target.height;
8118
+ b.value.width = S.target.width, b.value.height = S.target.height;
8118
8119
  }
8119
8120
  const y = B({
8120
8121
  width: 1e4,
@@ -8133,7 +8134,7 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8133
8134
  if (t.value === "Y")
8134
8135
  return;
8135
8136
  S.preventDefault(), S.stopPropagation(), x.value.x = S.clientX, x.value.y = S.clientY;
8136
- const j = f.value.width, q = f.value.height, Q = j / q;
8137
+ const j = b.value.width, q = b.value.height, Q = j / q;
8137
8138
  let G = Number(r.node.attrs.width), ue = Number(r.node.attrs.height);
8138
8139
  const ee = y.value.width;
8139
8140
  G && !ue ? (G = G > ee ? ee : G, ue = Math.round(G / Q)) : ue && !G ? (G = Math.round(ue * Q), G = G > ee ? ee : G) : !G && !ue ? (G = j > ee ? ee : j, ue = Math.round(G / Q)) : G = G > ee ? ee : G, x.value.w = G, x.value.h = ue, x.value.dir = V, w.value = !0, F();
@@ -8141,11 +8142,11 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8141
8142
  const N = Wn((S) => {
8142
8143
  if (S.preventDefault(), S.stopPropagation(), !w.value)
8143
8144
  return;
8144
- const { x: V, y: j, w: q, h: Q, dir: G } = x.value, ue = (S.clientX - V) * (/l/.test(G) ? -1 : 1), ee = (S.clientY - j) * (/t/.test(G) ? -1 : 1), fe = Ka(q + ue, 20, y.value.width), ke = l.value ? null : Math.max(Q + ee, 20);
8145
+ const { x: V, y: j, w: q, h: Q, dir: G } = x.value, ue = (S.clientX - V) * (/l/.test(G) ? -1 : 1), ee = (S.clientY - j) * (/t/.test(G) ? -1 : 1), be = Ka(q + ue, 20, y.value.width), ke = l.value ? null : Math.max(Q + ee, 20);
8145
8146
  A.value = {
8146
- width: fe,
8147
- height: fe * (f.value.height / f.value.width)
8148
- }, r.updateAttributes({ width: fe, height: ke });
8147
+ width: be,
8148
+ height: be * (b.value.height / b.value.width)
8149
+ }, r.updateAttributes({ width: be, height: ke });
8149
8150
  }, 16);
8150
8151
  function R(S) {
8151
8152
  S.preventDefault(), S.stopPropagation(), w.value && (w.value = !1, x.value = {
@@ -8154,7 +8155,7 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8154
8155
  w: 0,
8155
8156
  h: 0,
8156
8157
  dir: ""
8157
- }, W(), b());
8158
+ }, W(), f());
8158
8159
  }
8159
8160
  function F() {
8160
8161
  document == null || document.addEventListener("mousemove", N, !0), document == null || document.addEventListener("mouseup", R, !0);
@@ -8185,7 +8186,7 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8185
8186
  style: le(i(e).style),
8186
8187
  class: "image-view__body__image",
8187
8188
  onLoad: C,
8188
- onClick: b
8189
+ onClick: f
8189
8190
  }, null, 44, Xa)) : (m(), M("div", Ya)),
8190
8191
  nt(v("div", Za, [
8191
8192
  te(I(i(A).width) + " ", 1),
@@ -8212,7 +8213,7 @@ const Tn = (r) => typeof r == "number", Xa = ["src", "alt"], Ya = {
8212
8213
  _: 1
8213
8214
  }, 8, ["class", "style"]));
8214
8215
  }
8215
- }, nu = /* @__PURE__ */ z(tu, [["__scopeId", "data-v-8e666c9d"]]), ou = {
8216
+ }, nu = /* @__PURE__ */ z(tu, [["__scopeId", "data-v-26202538"]]), ou = {
8216
8217
  "size-small": 100,
8217
8218
  "size-medium": 400,
8218
8219
  "size-large": "100%"
@@ -8447,10 +8448,10 @@ class su {
8447
8448
  if (u.type.name === "image" && !this.isOurOwnPic(u.attrs)) {
8448
8449
  const p = this.newUploadingImageNode(
8449
8450
  u.attrs
8450
- ), h = d + a, b = h + u.nodeSize;
8451
+ ), h = d + a, f = h + u.nodeSize;
8451
8452
  s = s.replace(
8452
8453
  h,
8453
- b,
8454
+ f,
8454
8455
  new Et(ht.from(p), 0, 0)
8455
8456
  ), a += p.nodeSize - u.nodeSize, o.push({
8456
8457
  id: p.attrs.uploadId,
@@ -8719,7 +8720,7 @@ const cu = $e.create({
8719
8720
  _: 1
8720
8721
  }));
8721
8722
  }
8722
- }, fu = /* @__PURE__ */ z(hu, [["__scopeId", "data-v-0adcd46c"]]), bu = Y.create({
8723
+ }, bu = /* @__PURE__ */ z(hu, [["__scopeId", "data-v-0adcd46c"]]), fu = Y.create({
8723
8724
  name: "inlineGallery",
8724
8725
  group: "inline",
8725
8726
  inline: !0,
@@ -8753,7 +8754,7 @@ const cu = $e.create({
8753
8754
  };
8754
8755
  },
8755
8756
  addNodeView() {
8756
- return ae(fu);
8757
+ return ae(bu);
8757
8758
  }
8758
8759
  }), gu = {
8759
8760
  __name: "inline-read-view",
@@ -9310,7 +9311,7 @@ const cu = $e.create({
9310
9311
  if (/bottom/.test(l.target.className)) {
9311
9312
  let u = l.screenX;
9312
9313
  const d = l.target.classList.contains("bottom-left") ? -1 : 1, p = (h) => {
9313
- const b = s.clientWidth, f = h.screenX - u, C = b + d * f, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9314
+ const f = s.clientWidth, b = h.screenX - u, C = f + d * b, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9314
9315
  k,
9315
9316
  Math.min(w, C)
9316
9317
  );
@@ -9325,7 +9326,7 @@ const cu = $e.create({
9325
9326
  if (/top/.test(l.target.className)) {
9326
9327
  let u = l.screenX;
9327
9328
  const d = l.target.classList.contains("top-left") ? -1 : 1, p = (h) => {
9328
- const b = s.clientWidth, f = h.screenX - u, C = b + d * f, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9329
+ const f = s.clientWidth, b = h.screenX - u, C = f + d * b, y = document.querySelector(".ProseMirror").clientWidth, k = 40, w = y - 32, A = Math.max(
9329
9330
  k,
9330
9331
  Math.min(w, C)
9331
9332
  );
@@ -9416,14 +9417,14 @@ function Vu(r, e, n, o) {
9416
9417
  }), s = s.filter(Boolean);
9417
9418
  for (const u of s) {
9418
9419
  const { text: d, pos: p } = u, h = Array.from(d.matchAll(e)).filter(
9419
- ([b]) => b.trim()
9420
+ ([f]) => f.trim()
9420
9421
  );
9421
- for (const b of h) {
9422
- if (b[0] === "")
9422
+ for (const f of h) {
9423
+ if (f[0] === "")
9423
9424
  break;
9424
- b.index !== void 0 && l.push({
9425
- from: p + b.index,
9426
- to: p + b.index + b[0].length
9425
+ f.index !== void 0 && l.push({
9426
+ from: p + f.index,
9427
+ to: p + f.index + f[0].length
9427
9428
  });
9428
9429
  }
9429
9430
  }
@@ -9530,13 +9531,13 @@ const qu = new Ue(
9530
9531
  searchTerm: d,
9531
9532
  lastSearchTerm: p,
9532
9533
  caseSensitive: h,
9533
- lastCaseSensitive: b,
9534
- resultIndex: f,
9534
+ lastCaseSensitive: f,
9535
+ resultIndex: b,
9535
9536
  lastResultIndex: C
9536
9537
  } = r.storage.searchAndReplace;
9537
- if (!a && p === d && b === h && C === f)
9538
+ if (!a && p === d && f === h && C === b)
9538
9539
  return u;
9539
- if (o(d), t(h), l(f), !d)
9540
+ if (o(d), t(h), l(b), !d)
9540
9541
  return r.storage.searchAndReplace.results = [], He.empty;
9541
9542
  const { decorationsToReturn: y, results: k } = Vu(
9542
9543
  s,
@@ -9546,7 +9547,7 @@ const qu = new Ue(
9546
9547
  h
9547
9548
  ),
9548
9549
  e,
9549
- f
9550
+ b
9550
9551
  );
9551
9552
  return r.storage.searchAndReplace.results = k, y;
9552
9553
  }
@@ -9646,29 +9647,29 @@ const qu = new Ue(
9646
9647
  });
9647
9648
  function $n(r, e, n, o, t, l) {
9648
9649
  let s = 0, a = !0, u = e.firstChild;
9649
- const d = r.firstChild, { tableBorder: p, widthAuto: h, tableAuto: b } = r.attrs;
9650
- for (let f = 0, C = 0; f < d.childCount; f += 1) {
9651
- const { colspan: y, colwidth: k } = d.child(f).attrs;
9650
+ const d = r.firstChild, { tableBorder: p, widthAuto: h, tableAuto: f } = r.attrs;
9651
+ for (let b = 0, C = 0; b < d.childCount; b += 1) {
9652
+ const { colspan: y, colwidth: k } = d.child(b).attrs;
9652
9653
  for (let w = 0; w < y; w += 1, C += 1) {
9653
9654
  const A = t === C ? l : k && k[w], x = A && !h ? `${A}px` : "";
9654
9655
  s += A || o, A || (a = !1), u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
9655
9656
  }
9656
9657
  }
9657
9658
  for (; u; ) {
9658
- const f = u.nextSibling;
9659
- u.parentNode.removeChild(u), u = f;
9659
+ const b = u.nextSibling;
9660
+ u.parentNode.removeChild(u), u = b;
9660
9661
  }
9661
- if (a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`), b) {
9662
+ if (a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`), f) {
9662
9663
  n.style.width = "100%", n.style.minWidth = "", u = e.firstChild;
9663
- for (let f = 0, C = 0; f < d.childCount; f += 1) {
9664
- const { colspan: y, colwidth: k } = d.child(f).attrs;
9664
+ for (let b = 0, C = 0; b < d.childCount; b += 1) {
9665
+ const { colspan: y, colwidth: k } = d.child(b).attrs;
9665
9666
  for (let w = 0; w < y; w += 1, C += 1) {
9666
9667
  const A = t === C ? l : k && k[w], x = A && !h ? `${A / s * 100}%` : "";
9667
9668
  u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
9668
9669
  }
9669
9670
  }
9670
9671
  }
9671
- p ? n.setAttribute("data-table-border", p) : n.removeAttribute("data-table-border"), h ? n.setAttribute("data-width-auto", h) : n.removeAttribute("data-width-auto"), b ? n.setAttribute("data-table-auto", b) : n.removeAttribute("data-table-auto");
9672
+ p ? n.setAttribute("data-table-border", p) : n.removeAttribute("data-table-border"), h ? n.setAttribute("data-width-auto", h) : n.removeAttribute("data-width-auto"), f ? n.setAttribute("data-table-auto", f) : n.removeAttribute("data-table-auto");
9672
9673
  }
9673
9674
  class Yu {
9674
9675
  constructor(e, n) {
@@ -9686,18 +9687,18 @@ function Zu(r, e, n, o, t) {
9686
9687
  const a = [], u = e.firstChild;
9687
9688
  if (!u)
9688
9689
  return {};
9689
- for (let b = 0, f = 0; b < u.childCount; b += 1) {
9690
- const { colspan: C, colwidth: y } = u.child(b).attrs;
9691
- for (let k = 0; k < C; k += 1, f += 1) {
9692
- const w = o === f ? t : y && y[k], A = w ? `${w}px` : "";
9690
+ for (let f = 0, b = 0; f < u.childCount; f += 1) {
9691
+ const { colspan: C, colwidth: y } = u.child(f).attrs;
9692
+ for (let k = 0; k < C; k += 1, b += 1) {
9693
+ const w = o === b ? t : y && y[k], A = w ? `${w}px` : "";
9693
9694
  l += w || n, w || (s = !1), a.push(["col", A ? { style: `width: ${A}` } : {}]);
9694
9695
  }
9695
9696
  }
9696
9697
  if (r)
9697
- for (let b = 0; b < a.length; b += 1) {
9698
- const { colwidth: f } = u.child(b).attrs;
9699
- a[b][1].style = `width: ${Math.ceil(
9700
- f / l * 100
9698
+ for (let f = 0; f < a.length; f += 1) {
9699
+ const { colwidth: b } = u.child(f).attrs;
9700
+ a[f][1].style = `width: ${Math.ceil(
9701
+ b / l * 100
9701
9702
  )}%;`;
9702
9703
  }
9703
9704
  const d = s ? `${l}px` : "", p = s ? "" : `${l}px`;
@@ -10239,7 +10240,7 @@ const Jo = Y.create({
10239
10240
  qi,
10240
10241
  sa,
10241
10242
  oa,
10242
- bu,
10243
+ fu,
10243
10244
  mu,
10244
10245
  ku,
10245
10246
  Ha,
@@ -10247,7 +10248,7 @@ const Jo = Y.create({
10247
10248
  Mu,
10248
10249
  Du,
10249
10250
  Ga,
10250
- ba,
10251
+ fa,
10251
10252
  Iu,
10252
10253
  Fu,
10253
10254
  _u,
@@ -10256,10 +10257,10 @@ const Jo = Y.create({
10256
10257
  ], ac = {
10257
10258
  __name: "index",
10258
10259
  setup(r) {
10259
- var d, p, h, b;
10260
- const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = $(), s = mr(async ({ editor: f }) => {
10260
+ var d, p, h, f;
10261
+ const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = $(), s = mr(async ({ editor: b }) => {
10261
10262
  try {
10262
- await Lt.content.put({ content_id: e.value.editorKey, content: f.getHTML(), version: mo().unix(), hashMd: ho(JSON.stringify(f.getJSON())) });
10263
+ await Lt.content.put({ content_id: e.value.editorKey, content: b.getHTML(), version: mo().unix(), hashMd: ho(JSON.stringify(b.getJSON())) });
10263
10264
  } catch (C) {
10264
10265
  Be.message.error(C.message);
10265
10266
  }
@@ -10271,7 +10272,7 @@ const Jo = Y.create({
10271
10272
  attributes: {
10272
10273
  class: "smart-editor"
10273
10274
  },
10274
- ...(b = e.value.document) == null ? void 0 : b.editorProps
10275
+ ...(f = e.value.document) == null ? void 0 : f.editorProps
10275
10276
  },
10276
10277
  extensions: [...ic],
10277
10278
  onUpdate: s
@@ -10286,7 +10287,7 @@ const Jo = Y.create({
10286
10287
  }
10287
10288
  return Re(() => u()), Xe(() => {
10288
10289
  a.destroy();
10289
- }), (f, C) => {
10290
+ }), (b, C) => {
10290
10291
  var w;
10291
10292
  const y = Ii, k = ss;
10292
10293
  return m(), M(J, null, [
@@ -10301,7 +10302,7 @@ const Jo = Y.create({
10301
10302
  ], 64);
10302
10303
  };
10303
10304
  }
10304
- }, uc = { class: "smart-toc-container" }, cc = { class: "smart-toc-title" }, dc = { class: "smart-scrollbar smart-toc-content" }, pc = ["textContent"], mc = ["data-heading", "onClick"], hc = { class: "smart-toc-text" }, fc = {
10305
+ }, uc = { class: "smart-toc-container" }, cc = { class: "smart-toc-title" }, dc = { class: "smart-scrollbar smart-toc-content" }, pc = ["textContent"], mc = ["data-heading", "onClick"], hc = { class: "smart-toc-text" }, bc = {
10305
10306
  __name: "toc",
10306
10307
  emits: ["close"],
10307
10308
  setup(r, { emit: e }) {
@@ -10310,7 +10311,7 @@ const Jo = Y.create({
10310
10311
  if (!t.value)
10311
10312
  return;
10312
10313
  const u = l.value.find(
10313
- (f) => "isActive" in f && f.isActive
10314
+ (b) => "isActive" in b && b.isActive
10314
10315
  );
10315
10316
  u && "isActive" in u && (u.isActive = !1), "isActive" in a && (a.isActive = !0);
10316
10317
  const d = t.value.view.dom.querySelector(
@@ -10321,8 +10322,8 @@ const Jo = Y.create({
10321
10322
  p == null || p.scrollTo({
10322
10323
  top: (d == null ? void 0 : d.offsetTop) ?? 10
10323
10324
  });
10324
- const h = t.value.view.posAtDOM(d, 0), { tr: b } = t.value.view.state;
10325
- b.setSelection(new Bt(b.doc.resolve(h))), t.value.view.dispatch(b), t.value.view.focus();
10325
+ const h = t.value.view.posAtDOM(d, 0), { tr: f } = t.value.view.state;
10326
+ f.setSelection(new Bt(f.doc.resolve(h))), t.value.view.dispatch(f), t.value.view.focus();
10326
10327
  }
10327
10328
  return (a, u) => (m(), M("div", uc, [
10328
10329
  v("div", cc, [
@@ -10354,7 +10355,7 @@ const Jo = Y.create({
10354
10355
  ])
10355
10356
  ]));
10356
10357
  }
10357
- }, bc = /* @__PURE__ */ z(fc, [["__scopeId", "data-v-5e6e7219"]]), gc = { class: "smart-page-container" }, vc = { class: "smart-zoomable-container smart-scrollbar" }, _c = {
10358
+ }, fc = /* @__PURE__ */ z(bc, [["__scopeId", "data-v-5e6e7219"]]), gc = { class: "smart-page-container" }, vc = { class: "smart-zoomable-container smart-scrollbar" }, _c = {
10358
10359
  __name: "page",
10359
10360
  setup(r) {
10360
10361
  const { container: e, page: n } = $(), o = U(() => {
@@ -10386,7 +10387,7 @@ const Jo = Y.create({
10386
10387
  ), Re(() => {
10387
10388
  a.value = Vn(document.querySelector(e)), s();
10388
10389
  }), (u, d) => {
10389
- const p = bc, h = ac, b = nr, f = es;
10390
+ const p = fc, h = ac, f = nr, b = es;
10390
10391
  return m(), M("div", gc, [
10391
10392
  i(n).showToc ? (m(), _(p, {
10392
10393
  key: 0,
@@ -10417,14 +10418,14 @@ const Jo = Y.create({
10417
10418
  }, [
10418
10419
  pe(u.$slots, "editor_tool", {}, void 0, !0)
10419
10420
  ], 32)) : H("", !0),
10420
- g(b, {
10421
+ g(f, {
10421
10422
  to: `${i(e)} .smart-zoomable-container`,
10422
10423
  "listen-to": `${i(e)} .smart-zoomable-container`,
10423
10424
  "visibility-height": 800,
10424
10425
  right: 25,
10425
10426
  bottom: 40
10426
10427
  }, null, 8, ["to", "listen-to"]),
10427
- g(f)
10428
+ g(b)
10428
10429
  ]);
10429
10430
  };
10430
10431
  }
@@ -10433,8 +10434,8 @@ const Jo = Y.create({
10433
10434
  setup(r, { expose: e }) {
10434
10435
  const n = B(null), o = B(null), t = B(!0), l = B(!0);
10435
10436
  function s() {
10436
- const { scrollLeft: h, scrollWidth: b, clientWidth: f } = o.value;
10437
- t.value = h === 0, l.value = h + f + 1 >= b;
10437
+ const { scrollLeft: h, scrollWidth: f, clientWidth: b } = o.value;
10438
+ t.value = h === 0, l.value = h + b + 1 >= f;
10438
10439
  }
10439
10440
  const a = () => o.value.scrollLeft -= 100, u = () => o.value.scrollLeft += 100;
10440
10441
  hr(n.value, () => {
@@ -10454,7 +10455,7 @@ const Jo = Y.create({
10454
10455
  }
10455
10456
  return e({
10456
10457
  update: p
10457
- }), (h, b) => (m(), M("div", {
10458
+ }), (h, f) => (m(), M("div", {
10458
10459
  ref_key: "wraperRef",
10459
10460
  ref: n,
10460
10461
  class: "smart-scrollable-container"
@@ -10463,7 +10464,7 @@ const Jo = Y.create({
10463
10464
  key: 0,
10464
10465
  class: "smart-scrollable-control scrollable-left",
10465
10466
  onClick: a
10466
- }, b[0] || (b[0] = [
10467
+ }, f[0] || (f[0] = [
10467
10468
  v("i", { class: "arrow i-sed:arrow-down" }, null, -1)
10468
10469
  ]))),
10469
10470
  v("div", {
@@ -10477,7 +10478,7 @@ const Jo = Y.create({
10477
10478
  key: 1,
10478
10479
  class: "smart-scrollable-control scrollable-right",
10479
10480
  onClick: u
10480
- }, b[1] || (b[1] = [
10481
+ }, f[1] || (f[1] = [
10481
10482
  v("i", { class: "arrow i-sed:arrow-down" }, null, -1)
10482
10483
  ])))
10483
10484
  ], 512));
@@ -10632,7 +10633,7 @@ const Jo = Y.create({
10632
10633
  }, 100);
10633
10634
  }
10634
10635
  ), (a, u) => {
10635
- const d = E, p = In, h = rr, b = Se, f = Sc;
10636
+ const d = E, p = In, h = rr, f = Se, b = Sc;
10636
10637
  return m(), M(J, null, [
10637
10638
  g(d, {
10638
10639
  ico: "i-sed:link",
@@ -10640,7 +10641,7 @@ const Jo = Y.create({
10640
10641
  "hide-text": "",
10641
10642
  onMenuClick: u[0] || (u[0] = (C) => n.value = !0)
10642
10643
  }, null, 8, ["text"]),
10643
- g(f, {
10644
+ g(b, {
10644
10645
  visible: i(n),
10645
10646
  header: ("t" in a ? a.t : i(c))("insert.link.title"),
10646
10647
  width: "420px",
@@ -10680,7 +10681,7 @@ const Jo = Y.create({
10680
10681
  }, 8, ["validation-status", "label"])
10681
10682
  ]),
10682
10683
  v("div", Mc, [
10683
- g(b, {
10684
+ g(f, {
10684
10685
  quaternary: "",
10685
10686
  onClick: u[3] || (u[3] = (C) => n.value = !1)
10686
10687
  }, {
@@ -10689,7 +10690,7 @@ const Jo = Y.create({
10689
10690
  ]),
10690
10691
  _: 1
10691
10692
  }),
10692
- g(b, {
10693
+ g(f, {
10693
10694
  type: "primary",
10694
10695
  onClick: s
10695
10696
  }, {
@@ -10719,12 +10720,12 @@ const Jo = Y.create({
10719
10720
  l.value.rows = 0, l.value.cols = 0;
10720
10721
  }
10721
10722
  function d() {
10722
- var b;
10723
+ var f;
10723
10724
  const { rows: p, cols: h } = l.value;
10724
- p === 0 || p > 1e3 || h === 0 || h > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
10725
+ p === 0 || p > 1e3 || h === 0 || h > 30 || ((f = o.value) == null || f.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
10725
10726
  }
10726
10727
  return (p, h) => {
10727
- const b = Rn, f = Se, C = E;
10728
+ const f = Rn, b = Se, C = E;
10728
10729
  return m(), _(C, {
10729
10730
  ico: "i-sed:table",
10730
10731
  text: ("t" in p ? p.t : i(c))("table.insert.text"),
@@ -10756,7 +10757,7 @@ const Jo = Y.create({
10756
10757
  class: "smart-table-custom-title",
10757
10758
  textContent: I(("t" in p ? p.t : i(c))("table.insert.property"))
10758
10759
  }, null, 8, Nc),
10759
- g(b, {
10760
+ g(f, {
10760
10761
  value: i(l).rows,
10761
10762
  "onUpdate:value": h[0] || (h[0] = (y) => i(l).rows = y),
10762
10763
  size: "small",
@@ -10768,7 +10769,7 @@ const Jo = Y.create({
10768
10769
  ]),
10769
10770
  _: 1
10770
10771
  }, 8, ["value"]),
10771
- g(b, {
10772
+ g(f, {
10772
10773
  value: i(l).cols,
10773
10774
  "onUpdate:value": h[1] || (h[1] = (y) => i(l).cols = y),
10774
10775
  size: "small",
@@ -10780,7 +10781,7 @@ const Jo = Y.create({
10780
10781
  ]),
10781
10782
  _: 1
10782
10783
  }, 8, ["value"]),
10783
- g(f, {
10784
+ g(b, {
10784
10785
  type: "primary",
10785
10786
  size: "small",
10786
10787
  block: "",
@@ -10839,14 +10840,14 @@ const Jo = Y.create({
10839
10840
  if (!l)
10840
10841
  return;
10841
10842
  const s = (a = e.value) == null ? void 0 : a.chain().focus();
10842
- (u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (d = e.value) == null || d.view.state.doc.descendants((b, f) => {
10843
+ (u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (d = e.value) == null || d.view.state.doc.descendants((f, b) => {
10843
10844
  var C, y;
10844
- if (b.type.name === "orderedList") {
10845
+ if (f.type.name === "orderedList") {
10845
10846
  const { state: k } = e.value, { selection: w } = k, { $from: A } = w;
10846
- if (b !== A.node(A.depth - 2))
10847
+ if (f !== A.node(A.depth - 2))
10847
10848
  return;
10848
10849
  const x = (C = e.value) == null ? void 0 : C.view.state.tr.setNodeMarkup(
10849
- f,
10850
+ b,
10850
10851
  void 0,
10851
10852
  {
10852
10853
  listStyleType: l
@@ -11062,14 +11063,14 @@ const Jo = Y.create({
11062
11063
  setup(r) {
11063
11064
  const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = $(), t = U(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
11064
11065
  return (l, s) => {
11065
- var b;
11066
+ var f;
11066
11067
  const a = qc, u = Jc, d = Uc, p = Wc, h = E;
11067
11068
  return m(), _(h, {
11068
11069
  ico: `i-sed:align-${i(t)}`,
11069
11070
  text: ("t" in l ? l.t : i(c))("base.align.title"),
11070
11071
  "menu-type": "popup",
11071
11072
  "hide-text": "",
11072
- disabled: !((b = i(o)) != null && b.can().chain().focus().setTextAlign("center").run()),
11073
+ disabled: !((f = i(o)) != null && f.can().chain().focus().setTextAlign("center").run()),
11073
11074
  "popup-visible": i(e),
11074
11075
  onTogglePopup: i(n)
11075
11076
  }, {
@@ -11194,19 +11195,19 @@ const Jo = Y.create({
11194
11195
  function l(p) {
11195
11196
  if (!p || p === "default")
11196
11197
  return !0;
11197
- const h = "Cambria", b = "text", f = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
11198
- y.width = f, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
11198
+ const h = "Cambria", f = "text", b = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
11199
+ y.width = b, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
11199
11200
  const w = (A) => {
11200
11201
  if (!k)
11201
11202
  return [];
11202
- k.clearRect(0, 0, f, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(b, f / 2, C / 2);
11203
- const { data: x } = k.getImageData(0, 0, f, C);
11203
+ k.clearRect(0, 0, b, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(f, b / 2, C / 2);
11204
+ const { data: x } = k.getImageData(0, 0, b, C);
11204
11205
  return Array.from(x).filter((L) => L !== 0);
11205
11206
  };
11206
11207
  return w(h).join("") !== w(p).join("");
11207
11208
  }
11208
11209
  const s = U(() => {
11209
- var f;
11210
+ var b;
11210
11211
  const p = (C) => C.map((y) => ({
11211
11212
  ...y,
11212
11213
  disabled: !l(y.value)
@@ -11215,9 +11216,9 @@ const Jo = Y.create({
11215
11216
  type: "group",
11216
11217
  key: "all",
11217
11218
  label: c("base.fontFamily.all"),
11218
- children: p((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
11219
+ children: p((b = e.value.dicts) == null ? void 0 : b.fonts) ?? []
11219
11220
  }
11220
- ], b = (C) => C.map(
11221
+ ], f = (C) => C.map(
11221
11222
  (y) => {
11222
11223
  var k;
11223
11224
  return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
@@ -11232,12 +11233,12 @@ const Jo = Y.create({
11232
11233
  type: "group",
11233
11234
  key: "recent",
11234
11235
  label: c("base.fontFamily.recent"),
11235
- children: p(b(o.value.fonts))
11236
+ children: p(f(o.value.fonts))
11236
11237
  }), t.value.length > 0 && h.unshift({
11237
11238
  type: "group",
11238
11239
  key: "used",
11239
11240
  label: c("base.fontFamily.used"),
11240
- children: p(b(t.value))
11241
+ children: p(f(t.value))
11241
11242
  }), h;
11242
11243
  });
11243
11244
  function a(p) {
@@ -11247,19 +11248,19 @@ const Jo = Y.create({
11247
11248
  ]);
11248
11249
  }
11249
11250
  function u() {
11250
- var b;
11251
- const h = JSON.stringify((b = n.value) == null ? void 0 : b.getJSON()).match(/"fontFamily":"([^"]+)"/g);
11251
+ var f;
11252
+ const h = JSON.stringify((f = n.value) == null ? void 0 : f.getJSON()).match(/"fontFamily":"([^"]+)"/g);
11252
11253
  if (h)
11253
- for (const f of h) {
11254
- const C = f.replace('"fontFamily":"', "").replace('"', "");
11254
+ for (const b of h) {
11255
+ const C = b.replace('"fontFamily":"', "").replace('"', "");
11255
11256
  t.value.includes(C) || t.value.push(C);
11256
11257
  }
11257
11258
  }
11258
11259
  function d(p) {
11259
- var h, b;
11260
- p && p !== "default" ? (o.value.fonts.forEach((f, C) => {
11261
- f === p && o.value.fonts.splice(C, 1);
11262
- }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (b = n.value) == null || b.chain().focus().unsetFontFamily().run(), u();
11260
+ var h, f;
11261
+ p && p !== "default" ? (o.value.fonts.forEach((b, C) => {
11262
+ b === p && o.value.fonts.splice(C, 1);
11263
+ }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (f = n.value) == null || f.chain().focus().unsetFontFamily().run(), u();
11263
11264
  }
11264
11265
  return de(
11265
11266
  () => n.value,
@@ -11267,14 +11268,14 @@ const Jo = Y.create({
11267
11268
  p && u();
11268
11269
  }
11269
11270
  ), (p, h) => {
11270
- var f;
11271
- const b = E;
11272
- return m(), _(b, ge({
11271
+ var b;
11272
+ const f = E;
11273
+ return m(), _(f, ge({
11273
11274
  text: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
11274
11275
  "menu-type": "select",
11275
11276
  "hide-text": "",
11276
11277
  "select-options": i(s),
11277
- "select-value": ((f = i(n)) == null ? void 0 : f.getAttributes("textStyle").fontFamily) || "default"
11278
+ "select-value": ((b = i(n)) == null ? void 0 : b.getAttributes("textStyle").fontFamily) || "default"
11278
11279
  }, p.$attrs, {
11279
11280
  placeholder: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
11280
11281
  "render-label": a,
@@ -11390,30 +11391,30 @@ const Jo = Y.create({
11390
11391
  __name: "classic",
11391
11392
  setup(r) {
11392
11393
  const e = B(null), n = B(!1), { editor: o, options: t, toolbarHover: l } = $(), s = B(!1), a = B(""), u = B("");
11393
- function d(f) {
11394
- return () => _e("i", { class: `${f}`, style: "font-size: 16px;" });
11394
+ function d(b) {
11395
+ return () => _e("i", { class: `${b}`, style: "font-size: 16px;" });
11395
11396
  }
11396
- function p(f) {
11397
+ function p(b) {
11397
11398
  try {
11398
- t.value.render[a.value].insertAction(o.value, f.data);
11399
+ t.value.render[a.value].insertAction(o.value, b.data);
11399
11400
  } catch {
11400
11401
  throw new Error("插入失败,请配置插入方法");
11401
11402
  } finally {
11402
11403
  s.value = !1;
11403
11404
  }
11404
11405
  }
11405
- function h(f) {
11406
- l.value = f;
11406
+ function h(b) {
11407
+ l.value = b;
11407
11408
  }
11408
- const b = U(() => [
11409
+ const f = U(() => [
11409
11410
  {
11410
11411
  label: c("moreBar.quote"),
11411
11412
  key: "quote",
11412
11413
  icon: d("i-sed:quote"),
11413
11414
  props: {
11414
11415
  onClick: () => {
11415
- var f;
11416
- (f = o.value) == null || f.chain().focus().toggleBlockquote().run();
11416
+ var b;
11417
+ (b = o.value) == null || b.chain().focus().toggleBlockquote().run();
11417
11418
  }
11418
11419
  }
11419
11420
  },
@@ -11423,8 +11424,8 @@ const Jo = Y.create({
11423
11424
  icon: d("i-sed:split-block"),
11424
11425
  props: {
11425
11426
  onClick: () => {
11426
- var f, C;
11427
- (f = o.value) == null || f.chain().focus().enter().run(), (C = o.value) == null || C.chain().focus().setHorizontalRule().run();
11427
+ var b, C;
11428
+ (b = o.value) == null || b.chain().focus().enter().run(), (C = o.value) == null || C.chain().focus().setHorizontalRule().run();
11428
11429
  }
11429
11430
  }
11430
11431
  },
@@ -11439,8 +11440,8 @@ const Jo = Y.create({
11439
11440
  icon: d("i-sed:column-block"),
11440
11441
  props: {
11441
11442
  onClick: () => {
11442
- var f;
11443
- (f = o.value) == null || f.chain().focus().setColumns(2).run();
11443
+ var b;
11444
+ (b = o.value) == null || b.chain().focus().setColumns(2).run();
11444
11445
  }
11445
11446
  }
11446
11447
  },
@@ -11450,8 +11451,8 @@ const Jo = Y.create({
11450
11451
  icon: d("i-sed:fold-block"),
11451
11452
  props: {
11452
11453
  onClick: () => {
11453
- var f;
11454
- (f = o.value) == null || f.chain().focus().setDetails().run();
11454
+ var b;
11455
+ (b = o.value) == null || b.chain().focus().setDetails().run();
11455
11456
  }
11456
11457
  }
11457
11458
  },
@@ -11461,8 +11462,8 @@ const Jo = Y.create({
11461
11462
  icon: d("i-sed:highlight-block"),
11462
11463
  props: {
11463
11464
  onClick: () => {
11464
- var f;
11465
- (f = o.value) == null || f.chain().focus().setHighlightBlock().run();
11465
+ var b;
11466
+ (b = o.value) == null || b.chain().focus().setHighlightBlock().run();
11466
11467
  }
11467
11468
  }
11468
11469
  }
@@ -11559,8 +11560,8 @@ const Jo = Y.create({
11559
11560
  icon: d("i-sed:bubble-inline"),
11560
11561
  props: {
11561
11562
  onClick: () => {
11562
- var f;
11563
- (f = o.value) == null || f.chain().focus().setBubble().run();
11563
+ var b;
11564
+ (b = o.value) == null || b.chain().focus().setBubble().run();
11564
11565
  }
11565
11566
  }
11566
11567
  },
@@ -11652,8 +11653,8 @@ const Jo = Y.create({
11652
11653
  icon: d("i-sed:code-block"),
11653
11654
  props: {
11654
11655
  onClick: () => {
11655
- var f, C;
11656
- (f = o.value) == null || f.chain().focus().setCodeBlock().run(), (C = o.value) == null || C.chain().focus().enter().run();
11656
+ var b, C;
11657
+ (b = o.value) == null || b.chain().focus().setCodeBlock().run(), (C = o.value) == null || C.chain().focus().enter().run();
11657
11658
  }
11658
11659
  }
11659
11660
  },
@@ -11777,9 +11778,9 @@ const Jo = Y.create({
11777
11778
  show: !!t.value.render.paper
11778
11779
  }
11779
11780
  ]);
11780
- return (f, C) => {
11781
+ return (b, C) => {
11781
11782
  var Ye;
11782
- const y = Se, k = lt, w = od, A = nd, x = td, L = Qc, N = Zc, R = xo, F = wo, W = ko, S = Co, V = yo, j = _o, q = Yc, Q = Xc, G = Kc, ue = Gc, ee = Vc, fe = Pc, ke = Oc, Le = Dc, De = zc, O = Hc, Z = Fc, ce = Lc, ut = Tc, ct = Ac, dt = xc, pt = wc, mt = kc;
11783
+ const y = Se, k = lt, w = od, A = nd, x = td, L = Qc, N = Zc, R = xo, F = wo, W = ko, S = Co, V = yo, j = _o, q = Yc, Q = Xc, G = Kc, ue = Gc, ee = Vc, be = Pc, ke = Oc, Le = Dc, De = zc, O = Hc, Z = Fc, ce = Lc, ut = Tc, ct = Ac, dt = xc, pt = wc, mt = kc;
11783
11784
  return m(), M(J, null, [
11784
11785
  nt((m(), _(mt, {
11785
11786
  ref_key: "scrollableRef",
@@ -11791,7 +11792,7 @@ const Jo = Y.create({
11791
11792
  v("div", ld, [
11792
11793
  g(k, {
11793
11794
  trigger: "click",
11794
- options: i(b),
11795
+ options: i(f),
11795
11796
  "onUpdate:show": C[0] || (C[0] = (Ze) => n.value = Ze)
11796
11797
  }, {
11797
11798
  default: T(() => [
@@ -11836,7 +11837,7 @@ const Jo = Y.create({
11836
11837
  v("div", ud, [
11837
11838
  g(ue),
11838
11839
  g(ee),
11839
- g(fe),
11840
+ g(be),
11840
11841
  g(ke),
11841
11842
  g(Le),
11842
11843
  g(De)
@@ -11871,14 +11872,14 @@ const Jo = Y.create({
11871
11872
  ], 64);
11872
11873
  };
11873
11874
  }
11874
- }, hd = /* @__PURE__ */ z(md, [["__scopeId", "data-v-4734f00e"]]), fd = {}, bd = { class: "smart-toolbar-container" };
11875
+ }, hd = /* @__PURE__ */ z(md, [["__scopeId", "data-v-4734f00e"]]), bd = {}, fd = { class: "smart-toolbar-container" };
11875
11876
  function gd(r, e) {
11876
11877
  const n = hd;
11877
- return m(), M("div", bd, [
11878
+ return m(), M("div", fd, [
11878
11879
  g(n)
11879
11880
  ]);
11880
11881
  }
11881
- const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0"]]), _d = {
11882
+ const vd = /* @__PURE__ */ z(bd, [["render", gd], ["__scopeId", "data-v-3d91acb0"]]), _d = {
11882
11883
  __name: "message-api",
11883
11884
  setup(r) {
11884
11885
  return Be.message = lr(), (e, n) => (m(), M("div"));
@@ -11891,7 +11892,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11891
11892
  class: "smart-footer"
11892
11893
  }, Gh = /* @__PURE__ */ Object.assign({ name: "SmartEditor" }, {
11893
11894
  __name: "index",
11894
- props: bl,
11895
+ props: fl,
11895
11896
  emits: [
11896
11897
  "beforeCreate",
11897
11898
  "created",
@@ -11924,13 +11925,13 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11924
11925
  tableOfContents: d,
11925
11926
  savedAt: p,
11926
11927
  editor: h,
11927
- setOptions: b,
11928
- resetStore: f,
11928
+ setOptions: f,
11929
+ resetStore: b,
11929
11930
  page: C,
11930
11931
  editorDestroyed: y
11931
11932
  } = $();
11932
11933
  Jn(() => {
11933
- y.value = !1, b(o), t("beforeCreate");
11934
+ y.value = !1, f(o), t("beforeCreate");
11934
11935
  }), Xe(() => {
11935
11936
  W();
11936
11937
  });
@@ -11938,14 +11939,14 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11938
11939
  var S;
11939
11940
  return !((S = u.value.document) != null && S.readOnly);
11940
11941
  }), w = ze("locale"), A = B(!1), x = Wn(async () => {
11941
- var V, j, q, Q, G, ue, ee, fe;
11942
+ var V, j, q, Q, G, ue, ee, be;
11942
11943
  if ((V = u.value.document) != null && V.readOnly)
11943
11944
  return;
11944
11945
  let S = null;
11945
11946
  try {
11946
11947
  S = Be.message.loading(c("save.saving"), { placement: "bottom", closable: !0 });
11947
11948
  const ke = mo().unix(), Le = ho(JSON.stringify((j = h.value) == null ? void 0 : j.getJSON()));
11948
- if (await Lt.content.put({ content_id: u.value.editorKey, content: (q = h.value) == null ? void 0 : q.getHTML(), version: ke, hashMd: Le }), !await ((fe = (Q = u.value) == null ? void 0 : Q.onSave) == null ? void 0 : fe.call(
11949
+ if (await Lt.content.put({ content_id: u.value.editorKey, content: (q = h.value) == null ? void 0 : q.getHTML(), version: ke, hashMd: Le }), !await ((be = (Q = u.value) == null ? void 0 : Q.onSave) == null ? void 0 : be.call(
11949
11950
  Q,
11950
11951
  {
11951
11952
  html: (G = h.value) == null ? void 0 : G.getHTML(),
@@ -11959,7 +11960,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11959
11960
  return;
11960
11961
  }
11961
11962
  t("saved"), S && (S.destroy(), S = null), Be.message.success(c("save.success"), { placement: "bottom" });
11962
- const O = fr({ offset: 0 });
11963
+ const O = br({ offset: 0 });
11963
11964
  p.value = O.value;
11964
11965
  } catch (ke) {
11965
11966
  Be.message.error(c("save.error"), { placement: "bottom" }), console.error(ke.message);
@@ -11986,7 +11987,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
11986
11987
  ), h.value.on("blur", ({ editor: S, event: V }) => {
11987
11988
  t("blur", { editor: S, event: V });
11988
11989
  }), h.value.on("destroy", () => {
11989
- f(), t("destroy");
11990
+ b(), t("destroy");
11990
11991
  }));
11991
11992
  }
11992
11993
  ), de(
@@ -12018,7 +12019,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12018
12019
  }
12019
12020
  de(
12020
12021
  () => o,
12021
- () => b(o),
12022
+ () => f(o),
12022
12023
  { deep: !0 }
12023
12024
  );
12024
12025
  const F = () => {
@@ -12032,11 +12033,11 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12032
12033
  });
12033
12034
  function W() {
12034
12035
  var S;
12035
- (S = h.value) == null || S.destroy(), pn("ctrl+s,command+s"), pn("esc"), f();
12036
+ (S = h.value) == null || S.destroy(), pn("ctrl+s,command+s"), pn("esc"), b();
12036
12037
  }
12037
12038
  return on("saveContent", x), on("setLocale", N), e({
12038
12039
  getOptions: () => u.value,
12039
- setOptions: b,
12040
+ setOptions: f,
12040
12041
  setLocale: N,
12041
12042
  getEditor: () => h,
12042
12043
  useEditor: () => h.value,
@@ -12071,7 +12072,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12071
12072
  const j = _d, q = sr, Q = vd, G = yc, ue = ql, ee = Pn;
12072
12073
  return m(), _(ee, {
12073
12074
  "cls-prefix": "se",
12074
- "theme-overrides": i(l) ? i(bo) : i(fo),
12075
+ "theme-overrides": i(l) ? i(fo) : i(bo),
12075
12076
  locale: i(w) !== "en_US" ? i(Fn) : i(Hn),
12076
12077
  "date-locale": i(w) !== "en_US" ? i(zn) : i(Dn),
12077
12078
  theme: i(l) ? i(On) : null
@@ -12206,7 +12207,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12206
12207
  ]
12207
12208
  },
12208
12209
  imageAccept: ["image/jpeg", "image/gif", "image/png", "image/jpg"]
12209
- }, [Ad, D] = br(() => {
12210
+ }, [Ad, D] = fr(() => {
12210
12211
  const r = `#smart-editor-slim-${Te(4)}`, e = B(xd), n = B(null), o = (d) => {
12211
12212
  n.value = d;
12212
12213
  }, t = B(null), l = (d) => {
@@ -12331,17 +12332,17 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12331
12332
  d.value = y;
12332
12333
  }
12333
12334
  );
12334
- const b = B(null), f = B(null);
12335
+ const f = B(null), b = B(null);
12335
12336
  function C(y) {
12336
12337
  o("toggle-popup", y);
12337
12338
  }
12338
12339
  return Mt(
12339
- f,
12340
+ b,
12340
12341
  () => {
12341
12342
  o("toggle-popup", !1);
12342
12343
  },
12343
12344
  {
12344
- ignore: [b, ".smart-popup"]
12345
+ ignore: [f, ".smart-popup"]
12345
12346
  }
12346
12347
  ), (y, k) => {
12347
12348
  const w = Se, A = lt, x = En, L = qt;
@@ -12470,7 +12471,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12470
12471
  trigger: T(() => [
12471
12472
  v("span", {
12472
12473
  ref_key: "popupHandleRef",
12473
- ref: b,
12474
+ ref: f,
12474
12475
  class: "smart-button-icon-arrow smart-button-handle",
12475
12476
  onClick: k[0] || (k[0] = (S) => C(!r.popupVisible))
12476
12477
  }, k[6] || (k[6] = [
@@ -12480,7 +12481,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12480
12481
  default: T(() => [
12481
12482
  v("div", {
12482
12483
  ref_key: "popupContentRef",
12483
- ref: f,
12484
+ ref: b,
12484
12485
  class: "smart-popup-content p-x-8 p-y-4"
12485
12486
  }, [
12486
12487
  pe(y.$slots, "content", {}, void 0, !0)
@@ -12503,7 +12504,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12503
12504
  return [
12504
12505
  g(w, ge({
12505
12506
  ref_key: "popupHandleRef",
12506
- ref: b,
12507
+ ref: f,
12507
12508
  class: ["smart-menu-button", {
12508
12509
  "show-text": !r.hideText,
12509
12510
  active: r.menuActive && ((S = i(s)) == null ? void 0 : S.isEditable) !== !1
@@ -12535,7 +12536,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
12535
12536
  default: T(() => [
12536
12537
  v("div", {
12537
12538
  ref_key: "popupContentRef",
12538
- ref: f,
12539
+ ref: b,
12539
12540
  class: "smart-popup-content p-x-8 p-y-4"
12540
12541
  }, [
12541
12542
  pe(y.$slots, "content", {}, void 0, !0)
@@ -13148,18 +13149,18 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13148
13149
  emits: ["change", "update:visible"],
13149
13150
  setup(r, { emit: e }) {
13150
13151
  const n = r, o = e, { popupVisible: t } = ye(), { slimOptions: l } = D(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
13151
- function p(f) {
13152
+ function p(b) {
13152
13153
  t.value = !0, s.value.colors.forEach((C, y) => {
13153
- C === f && s.value.colors.splice(y, 1);
13154
- }), s.value.colors.unshift(f), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", f), o("update:visible");
13154
+ C === b && s.value.colors.splice(y, 1);
13155
+ }), s.value.colors.unshift(b), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", b), o("update:visible");
13155
13156
  }
13156
- function h(f) {
13157
- p(f), o("change", f);
13157
+ function h(b) {
13158
+ p(b), o("change", b);
13158
13159
  }
13159
- function b() {
13160
+ function f() {
13160
13161
  return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
13161
13162
  }
13162
- return (f, C) => {
13163
+ return (b, C) => {
13163
13164
  var w;
13164
13165
  const y = Se, k = Nn;
13165
13166
  return m(), M("div", {
@@ -13173,7 +13174,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13173
13174
  onClick: C[0] || (C[0] = (A) => h(i(u)))
13174
13175
  }, {
13175
13176
  default: T(() => [
13176
- te(I(("t" in f ? f.t : i(c))("colorPicker.default")), 1)
13177
+ te(I(("t" in b ? b.t : i(c))("colorPicker.default")), 1)
13177
13178
  ]),
13178
13179
  _: 1
13179
13180
  })
@@ -13188,7 +13189,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13188
13189
  ]),
13189
13190
  v("div", {
13190
13191
  class: "smart-color-picker-group-title",
13191
- textContent: I(("t" in f ? f.t : i(c))("colorPicker.standard"))
13192
+ textContent: I(("t" in b ? b.t : i(c))("colorPicker.standard"))
13192
13193
  }, null, 8, Jd),
13193
13194
  v("div", qd, [
13194
13195
  (m(), M(J, null, ve(a, (A, x) => v("div", {
@@ -13201,7 +13202,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13201
13202
  i(s).colors.length > 0 ? (m(), M(J, { key: 0 }, [
13202
13203
  v("div", {
13203
13204
  class: "smart-color-picker-group-title",
13204
- textContent: I(("t" in f ? f.t : i(c))("colorPicker.recent"))
13205
+ textContent: I(("t" in b ? b.t : i(c))("colorPicker.recent"))
13205
13206
  }, null, 8, Gd),
13206
13207
  v("div", Kd, [
13207
13208
  (m(!0), M(J, null, ve(i(s).colors, (A, x) => (m(), M("div", {
@@ -13216,7 +13217,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13216
13217
  g(k, {
13217
13218
  to: d,
13218
13219
  placement: "right",
13219
- "render-label": b,
13220
+ "render-label": f,
13220
13221
  onComplete: p
13221
13222
  })
13222
13223
  ], 8, Pd);
@@ -13563,7 +13564,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13563
13564
  }, null, 8, ["ico", "text"]);
13564
13565
  };
13565
13566
  }
13566
- }, fp = {
13567
+ }, bp = {
13567
13568
  __name: "delete",
13568
13569
  setup(r) {
13569
13570
  const { editor: e } = D();
@@ -13580,13 +13581,13 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13580
13581
  }, null, 8, ["text"]);
13581
13582
  };
13582
13583
  }
13583
- }, bp = {
13584
+ }, fp = {
13584
13585
  __name: "menus",
13585
13586
  setup(r) {
13586
13587
  const { editor: e, showTableBar: n } = D();
13587
13588
  return (o, t) => {
13588
13589
  var L;
13589
- const l = fp, s = hp, a = mp, u = pp, d = dp, p = sp, h = lp, b = rp, f = op, C = np, y = tp, k = ep, w = Qd, A = Od, x = Dd;
13590
+ const l = bp, s = hp, a = mp, u = pp, d = dp, p = sp, h = lp, f = rp, b = op, C = np, y = tp, k = ep, w = Qd, A = Od, x = Dd;
13590
13591
  return (L = i(e)) != null && L.isActive("tableCell") && i(n) ? (m(), M(J, { key: 0 }, [
13591
13592
  g(l),
13592
13593
  t[0] || (t[0] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
@@ -13597,8 +13598,8 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13597
13598
  t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
13598
13599
  g(p),
13599
13600
  g(h),
13600
- g(b),
13601
13601
  g(f),
13602
+ g(b),
13602
13603
  g(C),
13603
13604
  g(y),
13604
13605
  g(k),
@@ -13609,7 +13610,7 @@ const vd = /* @__PURE__ */ z(fd, [["render", gd], ["__scopeId", "data-v-3d91acb0
13609
13610
  ], 64)) : H("", !0);
13610
13611
  };
13611
13612
  }
13612
- }, gp = /* @__PURE__ */ z(bp, [["__scopeId", "data-v-bd0d430f"]]), vp = {
13613
+ }, gp = /* @__PURE__ */ z(fp, [["__scopeId", "data-v-bd0d430f"]]), vp = {
13613
13614
  __name: "index",
13614
13615
  setup(r) {
13615
13616
  const { editor: e } = D(), n = B(null), o = B({
@@ -13860,12 +13861,12 @@ const Cp = {
13860
13861
  l.value.rows = 0, l.value.cols = 0;
13861
13862
  }
13862
13863
  function d() {
13863
- var b;
13864
+ var f;
13864
13865
  const { rows: p, cols: h } = l.value;
13865
- p === 0 || p > 1e3 || h === 0 || h > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
13866
+ p === 0 || p > 1e3 || h === 0 || h > 30 || ((f = o.value) == null || f.chain().focus().insertTable({ rows: p, cols: h, withHeaderRow: !1 }).run(), e.value = !1);
13866
13867
  }
13867
13868
  return (p, h) => {
13868
- const b = Rn, f = Se, C = P;
13869
+ const f = Rn, b = Se, C = P;
13869
13870
  return m(), _(C, {
13870
13871
  ico: "i-sed:table",
13871
13872
  text: ("t" in p ? p.t : i(c))("table.insert.text"),
@@ -13897,7 +13898,7 @@ const Cp = {
13897
13898
  class: "smart-table-custom-title",
13898
13899
  textContent: I(("t" in p ? p.t : i(c))("table.insert.property"))
13899
13900
  }, null, 8, Mp),
13900
- g(b, {
13901
+ g(f, {
13901
13902
  value: i(l).rows,
13902
13903
  "onUpdate:value": h[0] || (h[0] = (y) => i(l).rows = y),
13903
13904
  size: "small",
@@ -13909,7 +13910,7 @@ const Cp = {
13909
13910
  ]),
13910
13911
  _: 1
13911
13912
  }, 8, ["value"]),
13912
- g(b, {
13913
+ g(f, {
13913
13914
  value: i(l).cols,
13914
13915
  "onUpdate:value": h[1] || (h[1] = (y) => i(l).cols = y),
13915
13916
  size: "small",
@@ -13921,7 +13922,7 @@ const Cp = {
13921
13922
  ]),
13922
13923
  _: 1
13923
13924
  }, 8, ["value"]),
13924
- g(f, {
13925
+ g(b, {
13925
13926
  type: "primary",
13926
13927
  size: "small",
13927
13928
  block: "",
@@ -14088,14 +14089,14 @@ const Cp = {
14088
14089
  setup(r) {
14089
14090
  const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = D(), t = U(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
14090
14091
  return (l, s) => {
14091
- var b;
14092
+ var f;
14092
14093
  const a = Hp, u = Fp, d = Rp, p = Np, h = P;
14093
14094
  return m(), _(h, {
14094
14095
  ico: `i-sed:align-${i(t)}`,
14095
14096
  text: ("t" in l ? l.t : i(c))("base.align.title"),
14096
14097
  "menu-type": "popup",
14097
14098
  "hide-text": "",
14098
- disabled: !((b = i(o)) != null && b.can().chain().focus().setTextAlign("center").run()),
14099
+ disabled: !((f = i(o)) != null && f.can().chain().focus().setTextAlign("center").run()),
14099
14100
  "popup-visible": i(e),
14100
14101
  onTogglePopup: i(n)
14101
14102
  }, {
@@ -14202,8 +14203,8 @@ const Cp = {
14202
14203
  d === "" ? (p = s.value) == null || p.chain().focus().unsetHighlight().run() : (h = s.value) == null || h.chain().focus().setHighlight({ color: d }).run();
14203
14204
  }
14204
14205
  return (d, p) => {
14205
- const h = Go, b = P;
14206
- return m(), _(b, {
14206
+ const h = Go, f = P;
14207
+ return m(), _(f, {
14207
14208
  ico: "i-sed:highlight",
14208
14209
  text: r.text || ("t" in d ? d.t : i(c))("base.bgColor"),
14209
14210
  "menu-type": "popup",
@@ -14211,7 +14212,7 @@ const Cp = {
14211
14212
  "hide-text": "",
14212
14213
  "popup-visible": i(t),
14213
14214
  onTogglePopup: i(l),
14214
- onMenuClick: p[0] || (p[0] = (f) => u(i(a)))
14215
+ onMenuClick: p[0] || (p[0] = (b) => u(i(a)))
14215
14216
  }, {
14216
14217
  content: T(() => [
14217
14218
  g(h, {
@@ -14259,8 +14260,8 @@ const Cp = {
14259
14260
  d === "" ? (p = s.value) == null || p.chain().focus().unsetColor().run() : (h = s.value) == null || h.chain().focus().setColor(d).run();
14260
14261
  }
14261
14262
  return (d, p) => {
14262
- const h = at, b = P;
14263
- return m(), _(b, {
14263
+ const h = at, f = P;
14264
+ return m(), _(f, {
14264
14265
  ico: "i-sed:font-color-picker",
14265
14266
  text: r.text || ("t" in d ? d.t : i(c))("base.color"),
14266
14267
  "menu-type": "popup",
@@ -14268,7 +14269,7 @@ const Cp = {
14268
14269
  "hide-text": "",
14269
14270
  "popup-visible": i(t),
14270
14271
  onTogglePopup: i(l),
14271
- onMenuClick: p[0] || (p[0] = (f) => u(i(a)))
14272
+ onMenuClick: p[0] || (p[0] = (b) => u(i(a)))
14272
14273
  }, {
14273
14274
  content: T(() => [
14274
14275
  g(h, {
@@ -14417,19 +14418,19 @@ const Cp = {
14417
14418
  function l(p) {
14418
14419
  if (!p || p === "default")
14419
14420
  return !0;
14420
- const h = "Cambria", b = "text", f = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
14421
- y.width = f, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
14421
+ const h = "Cambria", f = "text", b = 100, C = 100, y = document.createElement("canvas"), k = y.getContext("2d", { willReadFrequently: !0 });
14422
+ y.width = b, y.height = C, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
14422
14423
  const w = (A) => {
14423
14424
  if (!k)
14424
14425
  return [];
14425
- k.clearRect(0, 0, f, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(b, f / 2, C / 2);
14426
- const { data: x } = k.getImageData(0, 0, f, C);
14426
+ k.clearRect(0, 0, b, C), k.font = `${C / 4}px ${A}, ${h}`, k.fillText(f, b / 2, C / 2);
14427
+ const { data: x } = k.getImageData(0, 0, b, C);
14427
14428
  return Array.from(x).filter((L) => L !== 0);
14428
14429
  };
14429
14430
  return w(h).join("") !== w(p).join("");
14430
14431
  }
14431
14432
  const s = U(() => {
14432
- var f;
14433
+ var b;
14433
14434
  const p = (C) => C.map((y) => ({
14434
14435
  ...y,
14435
14436
  disabled: !l(y.value)
@@ -14438,9 +14439,9 @@ const Cp = {
14438
14439
  type: "group",
14439
14440
  key: "all",
14440
14441
  label: c("base.fontFamily.all"),
14441
- children: p((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
14442
+ children: p((b = e.value.dicts) == null ? void 0 : b.fonts) ?? []
14442
14443
  }
14443
- ], b = (C) => C.map(
14444
+ ], f = (C) => C.map(
14444
14445
  (y) => {
14445
14446
  var k;
14446
14447
  return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
@@ -14455,12 +14456,12 @@ const Cp = {
14455
14456
  type: "group",
14456
14457
  key: "recent",
14457
14458
  label: c("base.fontFamily.recent"),
14458
- children: p(b(o.value.fonts))
14459
+ children: p(f(o.value.fonts))
14459
14460
  }), t.value.length > 0 && h.unshift({
14460
14461
  type: "group",
14461
14462
  key: "used",
14462
14463
  label: c("base.fontFamily.used"),
14463
- children: p(b(t.value))
14464
+ children: p(f(t.value))
14464
14465
  }), h;
14465
14466
  });
14466
14467
  function a(p) {
@@ -14470,19 +14471,19 @@ const Cp = {
14470
14471
  ]);
14471
14472
  }
14472
14473
  function u() {
14473
- var b;
14474
- const h = JSON.stringify((b = n.value) == null ? void 0 : b.getJSON()).match(/"fontFamily":"([^"]+)"/g);
14474
+ var f;
14475
+ const h = JSON.stringify((f = n.value) == null ? void 0 : f.getJSON()).match(/"fontFamily":"([^"]+)"/g);
14475
14476
  if (h)
14476
- for (const f of h) {
14477
- const C = f.replace('"fontFamily":"', "").replace('"', "");
14477
+ for (const b of h) {
14478
+ const C = b.replace('"fontFamily":"', "").replace('"', "");
14478
14479
  t.value.includes(C) || t.value.push(C);
14479
14480
  }
14480
14481
  }
14481
14482
  function d(p) {
14482
- var h, b;
14483
- p && p !== "default" ? (o.value.fonts.forEach((f, C) => {
14484
- f === p && o.value.fonts.splice(C, 1);
14485
- }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (b = n.value) == null || b.chain().focus().unsetFontFamily().run(), u();
14483
+ var h, f;
14484
+ p && p !== "default" ? (o.value.fonts.forEach((b, C) => {
14485
+ b === p && o.value.fonts.splice(C, 1);
14486
+ }), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (h = n.value) == null || h.chain().focus().setFontFamily(p).run()) : (f = n.value) == null || f.chain().focus().unsetFontFamily().run(), u();
14486
14487
  }
14487
14488
  return de(
14488
14489
  () => n.value,
@@ -14490,14 +14491,14 @@ const Cp = {
14490
14491
  p && u();
14491
14492
  }
14492
14493
  ), (p, h) => {
14493
- var f;
14494
- const b = P;
14495
- return m(), _(b, ge({
14494
+ var b;
14495
+ const f = P;
14496
+ return m(), _(f, ge({
14496
14497
  text: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
14497
14498
  "menu-type": "select",
14498
14499
  "hide-text": "",
14499
14500
  "select-options": i(s),
14500
- "select-value": ((f = i(n)) == null ? void 0 : f.getAttributes("textStyle").fontFamily) || "default"
14501
+ "select-value": ((b = i(n)) == null ? void 0 : b.getAttributes("textStyle").fontFamily) || "default"
14501
14502
  }, p.$attrs, {
14502
14503
  placeholder: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
14503
14504
  "render-label": a,
@@ -14591,7 +14592,7 @@ const Cp = {
14591
14592
  setup(r) {
14592
14593
  const { config: e } = D();
14593
14594
  return (n, o) => {
14594
- const t = tm, l = em, s = Zp, a = Yp, u = Xp, d = Kp, p = Gp, h = jp, b = qp, f = Up, C = Vp, y = Pp, k = Op, w = Dp, A = Ep, x = Ip, L = Lp, N = Tp, R = Ap, F = xp, W = wp;
14595
+ const t = tm, l = em, s = Zp, a = Yp, u = Xp, d = Kp, p = Gp, h = jp, f = qp, b = Up, C = Vp, y = Pp, k = Op, w = Dp, A = Ep, x = Ip, L = Lp, N = Tp, R = Ap, F = xp, W = wp;
14595
14596
  return m(), M("div", nm, [
14596
14597
  g(t),
14597
14598
  g(l),
@@ -14601,8 +14602,8 @@ const Cp = {
14601
14602
  g(d),
14602
14603
  g(p),
14603
14604
  g(h),
14604
- g(b),
14605
14605
  g(f),
14606
+ g(b),
14606
14607
  g(C),
14607
14608
  g(y),
14608
14609
  g(k),
@@ -14658,24 +14659,24 @@ const Cp = {
14658
14659
  { throwOnError: !1 }
14659
14660
  )}</span>`) : "";
14660
14661
  }
14661
- const b = yr(r, "modelValue");
14662
+ const f = yr(r, "modelValue");
14662
14663
  Re(() => {
14663
14664
  var C;
14664
- (C = a.value) == null || C.commands.setContent(b.value);
14665
+ (C = a.value) == null || C.commands.setContent(f.value);
14665
14666
  });
14666
- function f() {
14667
+ function b() {
14667
14668
  var C;
14668
14669
  (C = a.value) == null || C.destroy();
14669
14670
  }
14670
14671
  return Xe(() => {
14671
- f();
14672
+ b();
14672
14673
  }), de(
14673
14674
  () => a.value,
14674
14675
  () => {
14675
14676
  a.value && (a.value.on("create", () => {
14676
14677
  o("getHtml", h(a.value.getHTML()));
14677
14678
  }), a.value.on("update", () => {
14678
- o("getHtml", h(a.value.getHTML())), b.value = a.value.getJSON();
14679
+ o("getHtml", h(a.value.getHTML())), f.value = a.value.getJSON();
14679
14680
  }), a.value.on("selectionUpdate", ({ editor: C }) => {
14680
14681
  const { $from: y } = C.state.selection;
14681
14682
  d.value = y.parent.type.name === "tableCell";
@@ -14685,7 +14686,7 @@ const Cp = {
14685
14686
  const k = rm, w = kp, A = Pn;
14686
14687
  return m(), _(A, {
14687
14688
  "cls-prefix": "se",
14688
- "theme-overrides": i(t) ? i(bo) : i(fo),
14689
+ "theme-overrides": i(t) ? i(fo) : i(bo),
14689
14690
  locale: i(s) !== "en_US" ? i(Fn) : i(Hn),
14690
14691
  "date-locale": i(s) !== "en_US" ? i(zn) : i(Dn),
14691
14692
  theme: i(t) ? i(On) : null