reactjs-tiptap-editor-pro 0.2.41 → 0.2.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -2,11 +2,11 @@ var dr = Object.defineProperty;
2
2
  var ur = (e, t, n) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var me = (e, t, n) => ur(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as ie from "react";
5
- import { useRef as ne, useState as I, useEffect as R, useMemo as F, Fragment as Ve, useCallback as O, memo as fr, forwardRef as hr, useId as mr, useImperativeHandle as gr, useLayoutEffect as pr } from "react";
6
- import { jsx as a, jsxs as p, Fragment as N } from "react/jsx-runtime";
7
- import { i as Ke, S as re, t as vr, a as Ce, b as oe, r as J, c as Z, f as yr, d as ae, e as wr, D as Xe, g as qe, A as C, h as Ye, j as Je, C as xr, k as Ze, B as Y, s as cn, l as dn, m as un, u as Te, n as vt, o as L, p as U, P as br, q as Cr, v as Tr, L as $e, I as ye, w as se, x as Ae, y as Ar, K as ge, T as fn, M as yt, z as wt, F as Sr, E as hn, G as mn, H as Pr, J as he, N as _r, O as Nr, Q as Er, R as gn, U as $r, V as Or, W as z, X as Rr, Y as Ir, Z as Dr, _ as Br, $ as Mr, a0 as kr, a1 as W, a2 as Lr, a3 as xt, a4 as bt, a5 as Ct, a6 as Tt, a7 as At, a8 as St, a9 as pn, aa as zr, ab as vn, ac as yn, ad as Fr, ae as jr, af as Hr, ag as Pt, ah as Ur, ai as Gr, aj as Wr, ak as Vr, al as Kr, am as _t, an as Nt, ao as Xr, ap as qr, aq as Yr, ar as Jr, as as Zr, at as Qr, au as ei } from "./ColorPicker-B3iXkFey.js";
8
- import { u as D, B as ti, l as B, I as we, V as Et, E as ni } from "./locale-bundle-CT7qZRHF.js";
9
- import * as j from "@radix-ui/react-toast";
5
+ import { useRef as ne, useState as I, useEffect as R, useMemo as z, Fragment as Ve, useCallback as O, memo as fr, forwardRef as hr, useId as mr, useImperativeHandle as gr, useLayoutEffect as pr } from "react";
6
+ import { jsx as a, jsxs as p, Fragment as E } from "react/jsx-runtime";
7
+ import { i as Ke, S as re, t as vr, a as Ce, b as oe, r as J, c as Z, f as yr, d as ae, e as wr, D as Xe, g as qe, A as C, h as Ye, j as Je, C as xr, k as Ze, B as Y, s as cn, l as dn, m as un, u as Te, n as vt, o as L, p as U, P as br, q as Cr, v as Tr, L as $e, I as ye, w as se, x as Ae, y as Ar, K as ge, T as fn, M as yt, z as wt, F as Sr, E as hn, G as mn, H as Pr, J as he, N as _r, O as Er, Q as Nr, R as gn, U as $r, V as Or, W as j, X as Rr, Y as Ir, Z as Dr, _ as Br, $ as Mr, a0 as kr, a1 as X, a2 as Lr, a3 as xt, a4 as bt, a5 as Ct, a6 as Tt, a7 as At, a8 as St, a9 as pn, aa as zr, ab as vn, ac as yn, ad as Fr, ae as jr, af as Hr, ag as Pt, ah as Ur, ai as Gr, aj as Wr, ak as Vr, al as Kr, am as _t, an as Et, ao as Xr, ap as qr, aq as Yr, ar as Jr, as as Zr, at as Qr, au as ei } from "./ColorPicker-B3iXkFey.js";
8
+ import { u as D, B as ti, l as B, I as we, V as Nt, E as ni } from "./locale-bundle-CT7qZRHF.js";
9
+ import * as F from "@radix-ui/react-toast";
10
10
  import { X as ri, HelpCircle as ii, Pencil as oi, Trash2 as ai } from "lucide-react";
11
11
  import { Editor as si, makeDropdownToolbar as li } from "easydrawer";
12
12
  import ci from "katex";
@@ -81,13 +81,13 @@ function ee(e) {
81
81
  }
82
82
  return "";
83
83
  }
84
- var Ti = /[\\^$.*+?()[\]{}|]/g, Ai = /^\[object .+?Constructor\]$/, Si = Function.prototype, Pi = Object.prototype, _i = Si.toString, Ni = Pi.hasOwnProperty, Ei = RegExp(
85
- "^" + _i.call(Ni).replace(Ti, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
84
+ var Ti = /[\\^$.*+?()[\]{}|]/g, Ai = /^\[object .+?Constructor\]$/, Si = Function.prototype, Pi = Object.prototype, _i = Si.toString, Ei = Pi.hasOwnProperty, Ni = RegExp(
85
+ "^" + _i.call(Ei).replace(Ti, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
86
86
  );
87
87
  function $i(e) {
88
88
  if (!Ce(e) || xi(e))
89
89
  return !1;
90
- var t = xn(e) ? Ei : Ai;
90
+ var t = xn(e) ? Ni : Ai;
91
91
  return t.test(ee(e));
92
92
  }
93
93
  function Oi(e, t) {
@@ -216,8 +216,8 @@ var An = Object.prototype, eo = An.hasOwnProperty, to = An.propertyIsEnumerable,
216
216
  function no() {
217
217
  return !1;
218
218
  }
219
- var Sn = typeof exports == "object" && exports && !exports.nodeType && exports, kt = Sn && typeof module == "object" && module && !module.nodeType && module, ro = kt && kt.exports === Sn, Lt = ro ? J.Buffer : void 0, io = Lt ? Lt.isBuffer : void 0, Me = io || no, oo = "[object Arguments]", ao = "[object Array]", so = "[object Boolean]", lo = "[object Date]", co = "[object Error]", uo = "[object Function]", fo = "[object Map]", ho = "[object Number]", mo = "[object Object]", go = "[object RegExp]", po = "[object Set]", vo = "[object String]", yo = "[object WeakMap]", wo = "[object ArrayBuffer]", xo = "[object DataView]", bo = "[object Float32Array]", Co = "[object Float64Array]", To = "[object Int8Array]", Ao = "[object Int16Array]", So = "[object Int32Array]", Po = "[object Uint8Array]", _o = "[object Uint8ClampedArray]", No = "[object Uint16Array]", Eo = "[object Uint32Array]", $ = {};
220
- $[bo] = $[Co] = $[To] = $[Ao] = $[So] = $[Po] = $[_o] = $[No] = $[Eo] = !0;
219
+ var Sn = typeof exports == "object" && exports && !exports.nodeType && exports, kt = Sn && typeof module == "object" && module && !module.nodeType && module, ro = kt && kt.exports === Sn, Lt = ro ? J.Buffer : void 0, io = Lt ? Lt.isBuffer : void 0, Me = io || no, oo = "[object Arguments]", ao = "[object Array]", so = "[object Boolean]", lo = "[object Date]", co = "[object Error]", uo = "[object Function]", fo = "[object Map]", ho = "[object Number]", mo = "[object Object]", go = "[object RegExp]", po = "[object Set]", vo = "[object String]", yo = "[object WeakMap]", wo = "[object ArrayBuffer]", xo = "[object DataView]", bo = "[object Float32Array]", Co = "[object Float64Array]", To = "[object Int8Array]", Ao = "[object Int16Array]", So = "[object Int32Array]", Po = "[object Uint8Array]", _o = "[object Uint8ClampedArray]", Eo = "[object Uint16Array]", No = "[object Uint32Array]", $ = {};
220
+ $[bo] = $[Co] = $[To] = $[Ao] = $[So] = $[Po] = $[_o] = $[Eo] = $[No] = !0;
221
221
  $[oo] = $[ao] = $[wo] = $[so] = $[xo] = $[lo] = $[co] = $[uo] = $[fo] = $[ho] = $[mo] = $[go] = $[po] = $[vo] = $[yo] = !1;
222
222
  function $o(e) {
223
223
  return Z(e) && et(e.length) && !!$[oe(e)];
@@ -258,7 +258,7 @@ function zo(e) {
258
258
  Lo.call(e, n) && n != "constructor" && t.push(n);
259
259
  return t;
260
260
  }
261
- function Nn(e) {
261
+ function En(e) {
262
262
  return Tn(e) ? Do(e) : zo(e);
263
263
  }
264
264
  var Fo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, jo = /^\w*$/;
@@ -335,23 +335,23 @@ function oa(e, t) {
335
335
  var n = this.__data__, r = Se(n, e);
336
336
  return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
337
337
  }
338
- function K(e) {
338
+ function V(e) {
339
339
  var t = -1, n = e == null ? 0 : e.length;
340
340
  for (this.clear(); ++t < n; ) {
341
341
  var r = e[t];
342
342
  this.set(r[0], r[1]);
343
343
  }
344
344
  }
345
- K.prototype.clear = Qo;
346
- K.prototype.delete = na;
347
- K.prototype.get = ra;
348
- K.prototype.has = ia;
349
- K.prototype.set = oa;
345
+ V.prototype.clear = Qo;
346
+ V.prototype.delete = na;
347
+ V.prototype.get = ra;
348
+ V.prototype.has = ia;
349
+ V.prototype.set = oa;
350
350
  var ue = te(J, "Map");
351
351
  function aa() {
352
352
  this.size = 0, this.__data__ = {
353
353
  hash: new Q(),
354
- map: new (ue || K)(),
354
+ map: new (ue || V)(),
355
355
  string: new Q()
356
356
  };
357
357
  }
@@ -377,18 +377,18 @@ function ua(e, t) {
377
377
  var n = Pe(this, e), r = n.size;
378
378
  return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
379
379
  }
380
- function X(e) {
380
+ function K(e) {
381
381
  var t = -1, n = e == null ? 0 : e.length;
382
382
  for (this.clear(); ++t < n; ) {
383
383
  var r = e[t];
384
384
  this.set(r[0], r[1]);
385
385
  }
386
386
  }
387
- X.prototype.clear = aa;
388
- X.prototype.delete = la;
389
- X.prototype.get = ca;
390
- X.prototype.has = da;
391
- X.prototype.set = ua;
387
+ K.prototype.clear = aa;
388
+ K.prototype.delete = la;
389
+ K.prototype.get = ca;
390
+ K.prototype.has = da;
391
+ K.prototype.set = ua;
392
392
  var fa = "Expected a function";
393
393
  function it(e, t) {
394
394
  if (typeof e != "function" || t != null && typeof t != "function")
@@ -400,9 +400,9 @@ function it(e, t) {
400
400
  var s = e.apply(this, r);
401
401
  return n.cache = o.set(i, s) || o, s;
402
402
  };
403
- return n.cache = new (it.Cache || X)(), n;
403
+ return n.cache = new (it.Cache || K)(), n;
404
404
  }
405
- it.Cache = X;
405
+ it.Cache = K;
406
406
  var ha = 500;
407
407
  function ma(e) {
408
408
  var t = it(e, function(r) {
@@ -419,7 +419,7 @@ var ga = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
419
419
  function ke(e) {
420
420
  return e == null ? "" : xe(e);
421
421
  }
422
- function En(e, t) {
422
+ function Nn(e, t) {
423
423
  return G(e) ? e : rt(e, t) ? [e] : va(ke(e));
424
424
  }
425
425
  function _e(e) {
@@ -429,7 +429,7 @@ function _e(e) {
429
429
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
430
430
  }
431
431
  function $n(e, t) {
432
- t = En(t, e);
432
+ t = Nn(t, e);
433
433
  for (var n = 0, r = t.length; e != null && n < r; )
434
434
  e = e[_e(t[n++])];
435
435
  return n && n == r ? e : void 0;
@@ -466,7 +466,7 @@ function Ca(e, t, n) {
466
466
  var r = e.length;
467
467
  return n = n === void 0 ? r : n, n >= r ? e : ba(e, t, n);
468
468
  }
469
- var Ta = "\\ud800-\\udfff", Aa = "\\u0300-\\u036f", Sa = "\\ufe20-\\ufe2f", Pa = "\\u20d0-\\u20ff", _a = Aa + Sa + Pa, Na = "\\ufe0e\\ufe0f", Ea = "\\u200d", $a = RegExp("[" + Ea + Ta + _a + Na + "]");
469
+ var Ta = "\\ud800-\\udfff", Aa = "\\u0300-\\u036f", Sa = "\\ufe20-\\ufe2f", Pa = "\\u20d0-\\u20ff", _a = Aa + Sa + Pa, Ea = "\\ufe0e\\ufe0f", Na = "\\u200d", $a = RegExp("[" + Na + Ta + _a + Ea + "]");
470
470
  function ot(e) {
471
471
  return $a.test(e);
472
472
  }
@@ -481,7 +481,7 @@ function Wa(e) {
481
481
  return ot(e) ? Ga(e) : Oa(e);
482
482
  }
483
483
  function Va() {
484
- this.__data__ = new K(), this.size = 0;
484
+ this.__data__ = new V(), this.size = 0;
485
485
  }
486
486
  function Ka(e) {
487
487
  var t = this.__data__, n = t.delete(e);
@@ -496,23 +496,23 @@ function qa(e) {
496
496
  var Ya = 200;
497
497
  function Ja(e, t) {
498
498
  var n = this.__data__;
499
- if (n instanceof K) {
499
+ if (n instanceof V) {
500
500
  var r = n.__data__;
501
501
  if (!ue || r.length < Ya - 1)
502
502
  return r.push([e, t]), this.size = ++n.size, this;
503
- n = this.__data__ = new X(r);
503
+ n = this.__data__ = new K(r);
504
504
  }
505
505
  return n.set(e, t), this.size = n.size, this;
506
506
  }
507
- function V(e) {
508
- var t = this.__data__ = new K(e);
507
+ function W(e) {
508
+ var t = this.__data__ = new V(e);
509
509
  this.size = t.size;
510
510
  }
511
- V.prototype.clear = Va;
512
- V.prototype.delete = Ka;
513
- V.prototype.get = Xa;
514
- V.prototype.has = qa;
515
- V.prototype.set = Ja;
511
+ W.prototype.clear = Va;
512
+ W.prototype.delete = Ka;
513
+ W.prototype.get = Xa;
514
+ W.prototype.has = qa;
515
+ W.prototype.set = Ja;
516
516
  function Za(e, t) {
517
517
  for (var n = -1, r = e == null ? 0 : e.length, i = 0, o = []; ++n < r; ) {
518
518
  var s = e[n];
@@ -533,7 +533,7 @@ function rs(e, t, n) {
533
533
  return G(e) ? r : On(r, n(e));
534
534
  }
535
535
  function Ht(e) {
536
- return rs(e, Nn, ns);
536
+ return rs(e, En, ns);
537
537
  }
538
538
  var Fe = te(J, "DataView"), je = te(J, "Promise"), He = te(J, "Set"), Ut = "[object Map]", is = "[object Object]", Gt = "[object Promise]", Wt = "[object Set]", Vt = "[object WeakMap]", Kt = "[object DataView]", os = ee(Fe), as = ee(ue), ss = ee(je), ls = ee(He), cs = ee(Be), q = oe;
539
539
  (Fe && q(new Fe(new ArrayBuffer(1))) != Kt || ue && q(new ue()) != Ut || je && q(je.resolve()) != Gt || He && q(new He()) != Wt || Be && q(new Be()) != Vt) && (q = function(e) {
@@ -562,7 +562,7 @@ function fs(e) {
562
562
  }
563
563
  function fe(e) {
564
564
  var t = -1, n = e == null ? 0 : e.length;
565
- for (this.__data__ = new X(); ++t < n; )
565
+ for (this.__data__ = new K(); ++t < n; )
566
566
  this.add(e[t]);
567
567
  }
568
568
  fe.prototype.add = fe.prototype.push = us;
@@ -596,8 +596,8 @@ function zn(e, t, n, r, i, o) {
596
596
  break;
597
597
  }
598
598
  if (m) {
599
- if (!hs(t, function(A, _) {
600
- if (!Ln(m, _) && (g === A || i(g, A, n, r, o)))
599
+ if (!hs(t, function(S, _) {
600
+ if (!Ln(m, _) && (g === S || i(g, S, n, r, o)))
601
601
  return m.push(_);
602
602
  })) {
603
603
  h = !1;
@@ -622,14 +622,14 @@ function vs(e) {
622
622
  n[++t] = r;
623
623
  }), n;
624
624
  }
625
- var ys = 1, ws = 2, xs = "[object Boolean]", bs = "[object Date]", Cs = "[object Error]", Ts = "[object Map]", As = "[object Number]", Ss = "[object RegExp]", Ps = "[object Set]", _s = "[object String]", Ns = "[object Symbol]", Es = "[object ArrayBuffer]", $s = "[object DataView]", qt = re ? re.prototype : void 0, Ie = qt ? qt.valueOf : void 0;
625
+ var ys = 1, ws = 2, xs = "[object Boolean]", bs = "[object Date]", Cs = "[object Error]", Ts = "[object Map]", As = "[object Number]", Ss = "[object RegExp]", Ps = "[object Set]", _s = "[object String]", Es = "[object Symbol]", Ns = "[object ArrayBuffer]", $s = "[object DataView]", qt = re ? re.prototype : void 0, Ie = qt ? qt.valueOf : void 0;
626
626
  function Os(e, t, n, r, i, o, s) {
627
627
  switch (n) {
628
628
  case $s:
629
629
  if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
630
630
  return !1;
631
631
  e = e.buffer, t = t.buffer;
632
- case Es:
632
+ case Ns:
633
633
  return !(e.byteLength != t.byteLength || !o(new Xt(e), new Xt(t)));
634
634
  case xs:
635
635
  case bs:
@@ -652,7 +652,7 @@ function Os(e, t, n, r, i, o, s) {
652
652
  r |= ws, s.set(e, t);
653
653
  var f = zn(c(e), c(t), r, i, o, s);
654
654
  return s.delete(e), f;
655
- case Ns:
655
+ case Es:
656
656
  if (Ie)
657
657
  return Ie.call(e) == Ie.call(t);
658
658
  }
@@ -675,10 +675,10 @@ function Bs(e, t, n, r, i, o) {
675
675
  o.set(e, t), o.set(t, e);
676
676
  for (var x = s; ++u < l; ) {
677
677
  h = c[u];
678
- var A = e[h], _ = t[h];
678
+ var S = e[h], _ = t[h];
679
679
  if (r)
680
- var E = s ? r(_, A, h, t, e, o) : r(A, _, h, e, t, o);
681
- if (!(E === void 0 ? A === _ || i(A, _, n, r, o) : E)) {
680
+ var N = s ? r(_, S, h, t, e, o) : r(S, _, h, e, t, o);
681
+ if (!(N === void 0 ? S === _ || i(S, _, n, r, o) : N)) {
682
682
  y = !1;
683
683
  break;
684
684
  }
@@ -701,15 +701,15 @@ function Ls(e, t, n, r, i, o) {
701
701
  s = !0, f = !1;
702
702
  }
703
703
  if (h && !f)
704
- return o || (o = new V()), s || _n(e) ? zn(e, t, n, r, i, o) : Os(e, t, l, n, r, i, o);
704
+ return o || (o = new W()), s || _n(e) ? zn(e, t, n, r, i, o) : Os(e, t, l, n, r, i, o);
705
705
  if (!(n & Ms)) {
706
706
  var m = f && Zt.call(e, "__wrapped__"), g = u && Zt.call(t, "__wrapped__");
707
707
  if (m || g) {
708
708
  var y = m ? e.value() : e, x = g ? t.value() : t;
709
- return o || (o = new V()), i(y, x, n, r, o);
709
+ return o || (o = new W()), i(y, x, n, r, o);
710
710
  }
711
711
  }
712
- return h ? (o || (o = new V()), Bs(e, t, n, r, i, o)) : !1;
712
+ return h ? (o || (o = new W()), Bs(e, t, n, r, i, o)) : !1;
713
713
  }
714
714
  function at(e, t, n, r, i) {
715
715
  return e === t ? !0 : e == null || t == null || !Z(e) && !Z(t) ? e !== e && t !== t : Ls(e, t, n, r, at, i);
@@ -731,7 +731,7 @@ function js(e, t, n, r) {
731
731
  if (l === void 0 && !(c in e))
732
732
  return !1;
733
733
  } else {
734
- var f = new V(), u;
734
+ var f = new W(), u;
735
735
  if (!(u === void 0 ? at(d, l, zs | Fs, r, f) : u))
736
736
  return !1;
737
737
  }
@@ -742,7 +742,7 @@ function Fn(e) {
742
742
  return e === e && !Ce(e);
743
743
  }
744
744
  function Hs(e) {
745
- for (var t = Nn(e), n = t.length; n--; ) {
745
+ for (var t = En(e), n = t.length; n--; ) {
746
746
  var r = t[n], i = e[r];
747
747
  t[n] = [r, i, Fn(i)];
748
748
  }
@@ -763,7 +763,7 @@ function Gs(e, t) {
763
763
  return e != null && t in Object(e);
764
764
  }
765
765
  function Ws(e, t, n) {
766
- t = En(t, e);
766
+ t = Nn(t, e);
767
767
  for (var r = -1, i = t.length, o = !1; ++r < i; ) {
768
768
  var s = _e(t[r]);
769
769
  if (!(o = e != null && n(e, s)))
@@ -873,8 +873,8 @@ function Tl(e, t) {
873
873
  }
874
874
  return l + r;
875
875
  }
876
- const Al = j.Provider, qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
877
- j.Viewport,
876
+ const Al = F.Provider, qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
877
+ F.Viewport,
878
878
  {
879
879
  ref: n,
880
880
  className: ae(
@@ -884,7 +884,7 @@ const Al = j.Provider, qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__P
884
884
  ...t
885
885
  }
886
886
  ));
887
- qn.displayName = j.Viewport.displayName;
887
+ qn.displayName = F.Viewport.displayName;
888
888
  const Sl = wr(
889
889
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md !border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
890
890
  {
@@ -899,16 +899,16 @@ const Sl = wr(
899
899
  }
900
900
  }
901
901
  ), Yn = ie.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ a(
902
- j.Root,
902
+ F.Root,
903
903
  {
904
904
  ref: r,
905
905
  className: ae(Sl({ variant: t }), e),
906
906
  ...n
907
907
  }
908
908
  ));
909
- Yn.displayName = j.Root.displayName;
909
+ Yn.displayName = F.Root.displayName;
910
910
  const Pl = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
911
- j.Action,
911
+ F.Action,
912
912
  {
913
913
  ref: n,
914
914
  className: ae(
@@ -918,9 +918,9 @@ const Pl = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
918
918
  ...t
919
919
  }
920
920
  ));
921
- Pl.displayName = j.Action.displayName;
921
+ Pl.displayName = F.Action.displayName;
922
922
  const Jn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
923
- j.Close,
923
+ F.Close,
924
924
  {
925
925
  ref: n,
926
926
  className: ae(
@@ -932,25 +932,25 @@ const Jn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
932
932
  children: /* @__PURE__ */ a(ri, { className: "h-4 w-4" })
933
933
  }
934
934
  ));
935
- Jn.displayName = j.Close.displayName;
935
+ Jn.displayName = F.Close.displayName;
936
936
  const Zn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
937
- j.Title,
937
+ F.Title,
938
938
  {
939
939
  ref: n,
940
940
  className: ae("text-sm font-semibold", e),
941
941
  ...t
942
942
  }
943
943
  ));
944
- Zn.displayName = j.Title.displayName;
944
+ Zn.displayName = F.Title.displayName;
945
945
  const Qn = ie.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a(
946
- j.Description,
946
+ F.Description,
947
947
  {
948
948
  ref: n,
949
949
  className: ae("text-sm opacity-90", e),
950
950
  ...t
951
951
  }
952
952
  ));
953
- Qn.displayName = j.Description.displayName;
953
+ Qn.displayName = F.Description.displayName;
954
954
  let le = !1;
955
955
  function _l({ editor: e, attrs: t, extension: n }) {
956
956
  const [r, i] = I(!1), o = ne(null), s = ne(null), { alt: c, align: l } = t, d = n == null ? void 0 : n.options.upload, f = () => {
@@ -1002,13 +1002,13 @@ function _l({ editor: e, attrs: t, extension: n }) {
1002
1002
  }, x = (T) => {
1003
1003
  const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
1004
1004
  w && P && (w.setColor(T), P.serializeState());
1005
- }, A = (T) => {
1005
+ }, S = (T) => {
1006
1006
  const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
1007
1007
  w && P && (w.setThickness(T), P.serializeState());
1008
1008
  }, _ = (T) => {
1009
1009
  const w = o.current.toolController.getPrimaryTools()[5], P = s.current.getWidgetById("shape");
1010
1010
  w && P && (w.setBorderColor(T), P.serializeState());
1011
- }, E = () => {
1011
+ }, N = () => {
1012
1012
  if (le) {
1013
1013
  for (; o.current.history.redoStackSize > 0; )
1014
1014
  o.current.history.redo();
@@ -1050,15 +1050,15 @@ function _l({ editor: e, attrs: t, extension: n }) {
1050
1050
  onClear: () => {
1051
1051
  if (!le) {
1052
1052
  for (; o.current.history.undoStackSize > 0; )
1053
- E();
1053
+ N();
1054
1054
  le = !0;
1055
1055
  }
1056
1056
  },
1057
1057
  onRedo: () => {
1058
1058
  le || o.current.history.redo();
1059
1059
  },
1060
- onThicknessChange: A,
1061
- onUndo: E,
1060
+ onThicknessChange: S,
1061
+ onUndo: N,
1062
1062
  refEditor: o,
1063
1063
  setColorHighlight: g,
1064
1064
  setColorPen: h,
@@ -1091,13 +1091,13 @@ function er(e, t) {
1091
1091
  };
1092
1092
  }, [e, t]), n;
1093
1093
  }
1094
- const Nl = {
1094
+ const El = {
1095
1095
  maxWidth: "auto",
1096
1096
  zIndex: 20,
1097
1097
  appendTo: "parent",
1098
1098
  moveTransition: "transform 0.1s ease-out"
1099
1099
  };
1100
- function El({ item: e, disabled: t, editor: n }) {
1100
+ function Nl({ item: e, disabled: t, editor: n }) {
1101
1101
  var i;
1102
1102
  const r = e.component;
1103
1103
  return r ? /* @__PURE__ */ a(Ve, { children: e.type === "divider" ? /* @__PURE__ */ a(
@@ -1113,7 +1113,7 @@ function El({ item: e, disabled: t, editor: n }) {
1113
1113
  disabled: t || ((i = e == null ? void 0 : e.componentProps) == null ? void 0 : i.disabled),
1114
1114
  editor: n
1115
1115
  }
1116
- ) }) : /* @__PURE__ */ a(N, {});
1116
+ ) }) : /* @__PURE__ */ a(E, {});
1117
1117
  }
1118
1118
  function $l(e) {
1119
1119
  return e.type.name === "drawer";
@@ -1126,13 +1126,13 @@ function Ol(e) {
1126
1126
  if ($l(u))
1127
1127
  return f = !0, !1;
1128
1128
  }), f;
1129
- }, o = F(() => e.disabled ? [] : ec(e.editor), [e.disabled, e.editor, t]);
1130
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
1129
+ }, o = z(() => e.disabled ? [] : ec(e.editor), [e.disabled, e.editor, t]);
1130
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
1131
1131
  L,
1132
1132
  {
1133
1133
  editor: e == null ? void 0 : e.editor,
1134
1134
  shouldShow: i,
1135
- tippyOptions: Nl,
1135
+ tippyOptions: El,
1136
1136
  children: o != null && o.length ? /* @__PURE__ */ a("div", { className: "pointer-events-auto w-auto select-none rounded-sm !border border-neutral-200 bg-background px-3 py-2 shadow-sm transition-all dark:border-neutral-800", children: /* @__PURE__ */ a("div", { className: "relative flex h-[26px] flex-nowrap items-center justify-start whitespace-nowrap", children: o == null ? void 0 : o.map((s, c) => s.type === "edit" && (n != null && n.src) ? /* @__PURE__ */ a(
1137
1137
  _l,
1138
1138
  {
@@ -1142,14 +1142,14 @@ function Ol(e) {
1142
1142
  },
1143
1143
  `bubbleMenu-drawer-${c}`
1144
1144
  ) : /* @__PURE__ */ a(
1145
- El,
1145
+ Nl,
1146
1146
  {
1147
1147
  disabled: e.disabled,
1148
1148
  editor: e.editor,
1149
1149
  item: s
1150
1150
  },
1151
1151
  `bubbleMenu-drawer-${c}`
1152
- )) }) }) : /* @__PURE__ */ a(N, {})
1152
+ )) }) }) : /* @__PURE__ */ a(E, {})
1153
1153
  }
1154
1154
  ) });
1155
1155
  }
@@ -1232,7 +1232,7 @@ function Dl({ editor: e }) {
1232
1232
  },
1233
1233
  [e]
1234
1234
  ), g = O(() => e.isActive(se.name) && !i, [e, i]), y = O(() => Ae(se.name, e), [e]);
1235
- return /* @__PURE__ */ p(N, { children: [
1235
+ return /* @__PURE__ */ p(E, { children: [
1236
1236
  /* @__PURE__ */ a(
1237
1237
  L,
1238
1238
  {
@@ -1327,13 +1327,13 @@ function Bl({ editor: e, ...t }) {
1327
1327
  }, [e, i, l]), R(() => {
1328
1328
  c && s(r || "");
1329
1329
  }, [c]);
1330
- const h = F(() => {
1330
+ const h = z(() => {
1331
1331
  try {
1332
1332
  return ci.renderToString(`${o}`);
1333
1333
  } catch {
1334
1334
  return o;
1335
1335
  }
1336
- }, [o]), m = F(
1336
+ }, [o]), m = z(
1337
1337
  () => `${o}`.trim() ? /* @__PURE__ */ a("span", { contentEditable: !1, dangerouslySetInnerHTML: { __html: h || "" } }) : null,
1338
1338
  [o, h]
1339
1339
  );
@@ -1354,7 +1354,7 @@ function Bl({ editor: e, ...t }) {
1354
1354
  l(!1);
1355
1355
  }
1356
1356
  },
1357
- children: t != null && t.disabled ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a("div", { className: "p-2 bg-white !border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800", children: c ? /* @__PURE__ */ p(N, { children: [
1357
+ children: t != null && t.disabled ? /* @__PURE__ */ a(E, {}) : /* @__PURE__ */ a("div", { className: "p-2 bg-white !border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800", children: c ? /* @__PURE__ */ p(E, { children: [
1358
1358
  /* @__PURE__ */ a(
1359
1359
  fn,
1360
1360
  {
@@ -1383,8 +1383,8 @@ const tn = `graph TB
1383
1383
  a-->b`, Ml = ({ editor: e, attrs: t, extension: n }) => {
1384
1384
  const { alt: r, align: i } = t, [o, s] = I(decodeURIComponent(r ?? tn)), [c, l] = I(""), [d, f] = I(!1), u = ne(null), h = n == null ? void 0 : n.options.upload, m = async (x) => {
1385
1385
  try {
1386
- const { svg: A } = await $t.render("mermaid-svg", x);
1387
- l(A);
1386
+ const { svg: S } = await $t.render("mermaid-svg", x);
1387
+ l(S);
1388
1388
  } catch {
1389
1389
  l("");
1390
1390
  }
@@ -1450,10 +1450,10 @@ a-->b`, Ml = ({ editor: e, attrs: t, extension: n }) => {
1450
1450
  onClick: async () => {
1451
1451
  if (o !== "") {
1452
1452
  if (o) {
1453
- const x = u.current.querySelector("svg"), { width: A, height: _ } = x.getBoundingClientRect(), E = `mermaid-${cn()}.svg`;
1453
+ const x = u.current.querySelector("svg"), { width: S, height: _ } = x.getBoundingClientRect(), N = `mermaid-${cn()}.svg`;
1454
1454
  let b = dn(x.outerHTML);
1455
1455
  if (h) {
1456
- const v = un(b, E);
1456
+ const v = un(b, N);
1457
1457
  b = await h(v);
1458
1458
  }
1459
1459
  e == null || e.chain().focus().setMermaid(
@@ -1461,7 +1461,7 @@ a-->b`, Ml = ({ editor: e, attrs: t, extension: n }) => {
1461
1461
  type: "mermaid",
1462
1462
  src: b,
1463
1463
  alt: encodeURIComponent(o),
1464
- width: A,
1464
+ width: S,
1465
1465
  height: _
1466
1466
  },
1467
1467
  !!o
@@ -1500,7 +1500,7 @@ function Ll({ item: e, disabled: t, editor: n }) {
1500
1500
  disabled: t || ((i = e == null ? void 0 : e.componentProps) == null ? void 0 : i.disabled),
1501
1501
  editor: n
1502
1502
  }
1503
- ) }) : /* @__PURE__ */ a(N, {});
1503
+ ) }) : /* @__PURE__ */ a(E, {});
1504
1504
  }
1505
1505
  function zl(e) {
1506
1506
  return e.type.name === "mermaid";
@@ -1513,8 +1513,8 @@ function Fl(e) {
1513
1513
  if (zl(u))
1514
1514
  return f = !0, !1;
1515
1515
  }), f;
1516
- }, o = F(() => e.disabled ? [] : Ql(e.editor), [e.disabled, e.editor, t]);
1517
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
1516
+ }, o = z(() => e.disabled ? [] : Ql(e.editor), [e.disabled, e.editor, t]);
1517
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
1518
1518
  L,
1519
1519
  {
1520
1520
  editor: e == null ? void 0 : e.editor,
@@ -1536,7 +1536,7 @@ function Fl(e) {
1536
1536
  item: s
1537
1537
  },
1538
1538
  `bubbleMenu-mermaid-${c}`
1539
- )) }) }) : /* @__PURE__ */ a(N, {})
1539
+ )) }) }) : /* @__PURE__ */ a(E, {})
1540
1540
  }
1541
1541
  ) });
1542
1542
  }
@@ -1544,7 +1544,7 @@ function jl({ editor: e, disabled: t }) {
1544
1544
  const [n, r] = I(!1), { t: i } = D(), o = O(({ editor: l }) => l.isActive(wt.name), []), s = (l) => {
1545
1545
  e.commands.updateTweet({ src: l }), r(!1);
1546
1546
  }, c = O(() => Ae(wt.name, e), [e]);
1547
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
1547
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
1548
1548
  L,
1549
1549
  {
1550
1550
  editor: e,
@@ -1560,7 +1560,7 @@ function jl({ editor: e, disabled: t }) {
1560
1560
  r(!1);
1561
1561
  }
1562
1562
  },
1563
- children: t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a(N, { children: n ? /* @__PURE__ */ a(
1563
+ children: t ? /* @__PURE__ */ a(E, {}) : /* @__PURE__ */ a(E, { children: n ? /* @__PURE__ */ a(
1564
1564
  Sr,
1565
1565
  {
1566
1566
  editor: e,
@@ -1593,7 +1593,7 @@ function jl({ editor: e, disabled: t }) {
1593
1593
  }
1594
1594
  function Hl({ editor: e, disabled: t, bubbleMenu: n }) {
1595
1595
  const r = e.extensionManager.extensions.map((o) => o.name), i = () => {
1596
- var o, s, c, l, d, f, u, h, m, g, y, x, A, _, E, b, v, T;
1596
+ var o, s, c, l, d, f, u, h, m, g, y, x, S, _, N, b, v, T, w;
1597
1597
  return [
1598
1598
  r.includes("columns") && !((o = n == null ? void 0 : n.columnConfig) != null && o.hidden) ? /* @__PURE__ */ a(
1599
1599
  xc,
@@ -1675,26 +1675,27 @@ function Hl({ editor: e, disabled: t, bubbleMenu: n }) {
1675
1675
  },
1676
1676
  "twitter"
1677
1677
  ) : null,
1678
- (A = n == null ? void 0 : n.floatingMenuConfig) != null && A.hidden ? null : /* @__PURE__ */ a(
1678
+ (S = n == null ? void 0 : n.floatingMenuConfig) != null && S.hidden ? null : /* @__PURE__ */ a(
1679
1679
  ac,
1680
1680
  {
1681
1681
  disabled: t,
1682
- editor: e
1682
+ editor: e,
1683
+ onCopy: (_ = n == null ? void 0 : n.floatingMenuConfig) == null ? void 0 : _.onCopy
1683
1684
  },
1684
1685
  "content"
1685
1686
  ),
1686
- (_ = n == null ? void 0 : n.textConfig) != null && _.hidden ? null : /* @__PURE__ */ a(
1687
+ (N = n == null ? void 0 : n.textConfig) != null && N.hidden ? null : /* @__PURE__ */ a(
1687
1688
  sc,
1688
1689
  {
1689
1690
  disabled: t,
1690
1691
  editor: e,
1691
- items: (E = n == null ? void 0 : n.textConfig) == null ? void 0 : E.items,
1692
- showShow: (b = n == null ? void 0 : n.textConfig) == null ? void 0 : b.showShow,
1693
- filterItem: (v = n == null ? void 0 : n.textConfig) == null ? void 0 : v.filterItem
1692
+ items: (b = n == null ? void 0 : n.textConfig) == null ? void 0 : b.items,
1693
+ showShow: (v = n == null ? void 0 : n.textConfig) == null ? void 0 : v.showShow,
1694
+ filterItem: (T = n == null ? void 0 : n.textConfig) == null ? void 0 : T.filterItem
1694
1695
  },
1695
1696
  "text"
1696
1697
  ),
1697
- r.includes("drawer") && !((T = n == null ? void 0 : n.drawerConfig) != null && T.hidden) ? /* @__PURE__ */ a(
1698
+ r.includes("drawer") && !((w = n == null ? void 0 : n.drawerConfig) != null && w.hidden) ? /* @__PURE__ */ a(
1698
1699
  Ol,
1699
1700
  {
1700
1701
  disabled: t,
@@ -1707,7 +1708,7 @@ function Hl({ editor: e, disabled: t, bubbleMenu: n }) {
1707
1708
  return n != null && n.render ? n.render({ editor: e, disabled: t || !1, bubbleMenu: n }, i()) : i().filter(Boolean);
1708
1709
  }
1709
1710
  function Ul({ editor: e, disabled: t, toolbar: n }) {
1710
- const { t: r, lang: i } = D(), o = F(() => {
1711
+ const { t: r, lang: i } = D(), o = z(() => {
1711
1712
  const d = [...e.extensionManager.extensions].sort((u, h) => {
1712
1713
  const m = u.options.sort ?? -1, g = h.options.sort ?? -1;
1713
1714
  return m - g;
@@ -1728,14 +1729,14 @@ function Ul({ editor: e, disabled: t, toolbar: n }) {
1728
1729
  t: r
1729
1730
  });
1730
1731
  if (Array.isArray(x)) {
1731
- const A = x.map((_, E) => ({
1732
+ const S = x.map((_, N) => ({
1732
1733
  button: _,
1733
- divider: E === x.length - 1 ? m : !1,
1734
- spacer: E === 0 ? g : !1,
1734
+ divider: N === x.length - 1 ? m : !1,
1735
+ spacer: N === 0 ? g : !1,
1735
1736
  type: u.type,
1736
1737
  name: u.name
1737
1738
  }));
1738
- f = [...f, ...A];
1739
+ f = [...f, ...S];
1739
1740
  continue;
1740
1741
  }
1741
1742
  f.push({
@@ -1904,8 +1905,8 @@ function Yl(e) {
1904
1905
  componentProps: {
1905
1906
  tooltip: B.t(`editor.${r.replace("-", ".")}.tooltip`),
1906
1907
  icon: n[i],
1907
- action: () => e.commands.updateVideo({ width: Et[r] }),
1908
- isActive: () => e.isActive("video", { width: Et[r] })
1908
+ action: () => e.commands.updateVideo({ width: Nt[r] }),
1909
+ isActive: () => e.isActive("video", { width: Nt[r] })
1909
1910
  }
1910
1911
  }));
1911
1912
  }
@@ -2070,7 +2071,7 @@ function st(e, t, n) {
2070
2071
  return o.parent.forEach((c, l) => {
2071
2072
  const d = s + l, f = d + c.nodeSize;
2072
2073
  if (d < o.start || d >= o.end) return;
2073
- const u = new Nr(i.resolve(d), i.resolve(f));
2074
+ const u = new Er(i.resolve(d), i.resolve(f));
2074
2075
  r.push(u);
2075
2076
  }), r;
2076
2077
  }
@@ -2088,7 +2089,7 @@ class lt {
2088
2089
  return new H(n, r);
2089
2090
  }
2090
2091
  }
2091
- class H extends Er {
2092
+ class H extends Nr {
2092
2093
  constructor(n, r, i, o = 1) {
2093
2094
  const { doc: s } = n, c = n === r, l = n.pos === s.content.size && r.pos === s.content.size, d = c && !l ? s.resolve(r.pos + (o > 0 ? 1 : -1)) : r, f = c && l ? s.resolve(n.pos - (o > 0 ? 1 : -1)) : n, u = st(f.min(d), f.max(d), i);
2094
2095
  super(
@@ -2191,12 +2192,12 @@ function ic(e, t) {
2191
2192
  const { doc: n } = t.view.state, r = nr({ editor: t, x: e.clientX, y: e.clientY, direction: "right" });
2192
2193
  if (!r.resultNode || r.pos === null) return [];
2193
2194
  const i = e.clientX, o = function(f, u, h) {
2194
- const m = Number.parseInt(ve(f.dom, "paddingLeft"), 10), g = Number.parseInt(ve(f.dom, "paddingRight"), 10), y = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), x = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), A = f.dom.getBoundingClientRect();
2195
+ const m = Number.parseInt(ve(f.dom, "paddingLeft"), 10), g = Number.parseInt(ve(f.dom, "paddingRight"), 10), y = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), x = Number.parseInt(ve(f.dom, "borderLeftWidth"), 10), S = f.dom.getBoundingClientRect();
2195
2196
  return {
2196
2197
  left: rc(
2197
2198
  u,
2198
- A.left + m + y,
2199
- A.right - g - x
2199
+ S.left + m + y,
2200
+ S.right - g - x
2200
2201
  ),
2201
2202
  top: h
2202
2203
  };
@@ -2238,13 +2239,13 @@ function oc({
2238
2239
  return t.addEventListener("dragstart", (f) => {
2239
2240
  const { view: u } = n;
2240
2241
  if (!f.dataTransfer) return;
2241
- const { empty: h, $from: m, $to: g } = u.state.selection, y = ic(f, n), x = st(m, g, 0), A = x.some((M) => y.find((k) => k.$from === M.$from && k.$to === M.$to)), _ = h || !A ? y : x;
2242
+ const { empty: h, $from: m, $to: g } = u.state.selection, y = ic(f, n), x = st(m, g, 0), S = x.some((M) => y.find((k) => k.$from === M.$from && k.$to === M.$to)), _ = h || !S ? y : x;
2242
2243
  if (_.length === 0) return;
2243
- const { tr: E } = u.state, b = document.createElement("div"), v = _[0].$from.pos, T = _[_.length - 1].$to.pos, w = H.create(u.state.doc, v, T), P = w.content();
2244
+ const { tr: N } = u.state, b = document.createElement("div"), v = _[0].$from.pos, T = _[_.length - 1].$to.pos, w = H.create(u.state.doc, v, T), P = w.content();
2244
2245
  _.forEach((M) => {
2245
2246
  const k = nc(u.nodeDOM(M.$from.pos));
2246
2247
  b.append(k);
2247
- }), b.style.position = "absolute", b.style.top = "-10000px", document.body.append(b), f.dataTransfer.clearData(), f.dataTransfer.setDragImage(b, 0, 0), u.dragging = { slice: P, move: !0 }, E.setSelection(w), u.dispatch(E), document.addEventListener("drop", () => nn(b), { once: !0 }), setTimeout(() => {
2248
+ }), b.style.position = "absolute", b.style.top = "-10000px", document.body.append(b), f.dataTransfer.clearData(), f.dataTransfer.setDragImage(b, 0, 0), u.dragging = { slice: P, move: !0 }, N.setSelection(w), u.dispatch(N), document.addEventListener("drop", () => nn(b), { once: !0 }), setTimeout(() => {
2248
2249
  t && (t.style.pointerEvents = "none");
2249
2250
  }, 0);
2250
2251
  }), t.addEventListener("dragend", () => {
@@ -2273,10 +2274,10 @@ function oc({
2273
2274
  if (!g(t, s) || (t.draggable = !c, !y(b, v)))
2274
2275
  return;
2275
2276
  const T = x(b);
2276
- T && A(b, T);
2277
+ T && S(b, T);
2277
2278
  },
2278
2279
  destroy() {
2279
- E();
2280
+ N();
2280
2281
  }
2281
2282
  };
2282
2283
  function u() {
@@ -2326,7 +2327,7 @@ function oc({
2326
2327
  let v = b.nodeDOM(d);
2327
2328
  return v = an(b, v), v === b.dom || (v == null ? void 0 : v.nodeType) !== 1 ? null : v;
2328
2329
  }
2329
- function A(b, v) {
2330
+ function S(b, v) {
2330
2331
  const T = b.posAtDOM(v, 0), w = on(n.state.doc, T);
2331
2332
  if (w === l)
2332
2333
  return;
@@ -2342,7 +2343,7 @@ function oc({
2342
2343
  getReferenceClientRect: () => b.getBoundingClientRect()
2343
2344
  }), s.show();
2344
2345
  }
2345
- function E() {
2346
+ function N() {
2346
2347
  s == null || s.destroy(), t && nn(o);
2347
2348
  }
2348
2349
  },
@@ -2397,11 +2398,11 @@ function oc({
2397
2398
  }
2398
2399
  function ac(e) {
2399
2400
  var P, M, k;
2400
- const { pluginKey: t = rr } = e, { t: n } = D(), [r, i] = I(null), [o, s] = I(-1), c = ne(null), l = ne(null), [d, f] = I(!1), u = e.editor.extensionManager.extensions.some((S) => S.name === "textAlign"), h = e.editor.extensionManager.extensions.some((S) => S.name === "indent"), m = e.editor.extensionManager.extensions.some((S) => S.name === "clear");
2401
+ const { pluginKey: t = rr, onCopy: n = (A) => A } = e, { t: r } = D(), [i, o] = I(null), [s, c] = I(-1), l = ne(null), d = ne(null), [f, u] = I(!1), h = e.editor.extensionManager.extensions.some((A) => A.name === "textAlign"), m = e.editor.extensionManager.extensions.some((A) => A.name === "indent"), g = e.editor.extensionManager.extensions.some((A) => A.name === "clear");
2401
2402
  R(() => {
2402
- c.current && !e.editor.isDestroyed && (l.current = oc({
2403
+ l.current && !e.editor.isDestroyed && (d.current = oc({
2403
2404
  editor: e.editor,
2404
- element: c.current,
2405
+ element: l.current,
2405
2406
  pluginKey: "ContentItemMenu",
2406
2407
  tippyOptions: {
2407
2408
  offset: [-2, 16],
@@ -2409,62 +2410,59 @@ function ac(e) {
2409
2410
  moveTransition: "transform 0.15s ease-out"
2410
2411
  },
2411
2412
  onNodeChange: v
2412
- }), e.editor.registerPlugin(l.current));
2413
- }, [e.editor, c]);
2414
- function g() {
2415
- const S = e.editor.chain();
2416
- S.setNodeSelection(o).unsetAllMarks(), (r == null ? void 0 : r.type.name) !== "paragraph" && S.setParagraph(), S.run();
2417
- }
2413
+ }), e.editor.registerPlugin(d.current));
2414
+ }, [e.editor, l]);
2418
2415
  function y() {
2419
- e.editor.chain().focus().setNodeSelection(o).run(), document.execCommand("copy");
2416
+ const A = e.editor.chain();
2417
+ A.setNodeSelection(s).unsetAllMarks(), (i == null ? void 0 : i.type.name) !== "paragraph" && A.setParagraph(), A.run();
2420
2418
  }
2421
2419
  function x() {
2422
- e.editor.commands.setNodeSelection(o);
2423
- const { $anchor: S } = e.editor.state.selection, Ne = S.node(1) || e.editor.state.selection.node;
2424
- e.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(o + ((r == null ? void 0 : r.nodeSize) || 0), Ne.toJSON()).run();
2420
+ e.editor.commands.setNodeSelection(s);
2421
+ const { $anchor: A } = e.editor.state.selection, Ee = A.node(1) || e.editor.state.selection.node;
2422
+ e.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(s + ((i == null ? void 0 : i.nodeSize) || 0), n(Ee.toJSON())).run();
2425
2423
  }
2426
- function A(S) {
2427
- e.editor.commands.setTextAlign(S);
2424
+ function S(A) {
2425
+ e.editor.commands.setTextAlign(A);
2428
2426
  }
2429
2427
  function _() {
2430
- const S = St(e.editor.state.tr, o, 1);
2431
- S.setMeta("hideDragHandle", !0), e.editor.view.dispatch && e.editor.view.dispatch(S);
2428
+ const A = St(e.editor.state.tr, s, 1);
2429
+ A.setMeta("hideDragHandle", !0), e.editor.view.dispatch && e.editor.view.dispatch(A);
2432
2430
  }
2433
- function E() {
2434
- const S = St(e.editor.state.tr, o, -1);
2435
- e.editor.view.dispatch && e.editor.view.dispatch(S);
2431
+ function N() {
2432
+ const A = St(e.editor.state.tr, s, -1);
2433
+ e.editor.view.dispatch && e.editor.view.dispatch(A);
2436
2434
  }
2437
2435
  function b() {
2438
- e.editor.chain().setMeta("hideDragHandle", !0).setNodeSelection(o).deleteSelection().run();
2436
+ e.editor.chain().setMeta("hideDragHandle", !0).setNodeSelection(s).deleteSelection().run();
2439
2437
  }
2440
- function v(S) {
2441
- S.node && i(S.node), s(S.pos);
2438
+ function v(A) {
2439
+ A.node && o(A.node), c(A.pos);
2442
2440
  }
2443
2441
  function T() {
2444
- var S;
2445
- if (o !== -1) {
2446
- const Ne = (r == null ? void 0 : r.nodeSize) || 0, ht = o + Ne, mt = (r == null ? void 0 : r.type.name) === "paragraph" && ((S = r == null ? void 0 : r.content) == null ? void 0 : S.size) === 0, cr = mt ? o + 2 : ht + 2;
2447
- e.editor.chain().command(({ dispatch: gt, tr: Ee, state: pt }) => gt ? (mt ? Ee.insertText("/", o, o + 1) : Ee.insert(
2442
+ var A;
2443
+ if (s !== -1) {
2444
+ const Ee = (i == null ? void 0 : i.nodeSize) || 0, ht = s + Ee, mt = (i == null ? void 0 : i.type.name) === "paragraph" && ((A = i == null ? void 0 : i.content) == null ? void 0 : A.size) === 0, cr = mt ? s + 2 : ht + 2;
2445
+ e.editor.chain().command(({ dispatch: gt, tr: Ne, state: pt }) => gt ? (mt ? Ne.insertText("/", s, s + 1) : Ne.insert(
2448
2446
  ht,
2449
2447
  pt.schema.nodes.paragraph.create(null, [pt.schema.text("/")])
2450
- ), gt(Ee)) : !0).focus(cr).run();
2448
+ ), gt(Ne)) : !0).focus(cr).run();
2451
2449
  }
2452
2450
  }
2453
- R(() => (d ? e.editor.commands.setMeta("lockDragHandle", !0) : e.editor.commands.setMeta("lockDragHandle", !1), () => {
2451
+ R(() => (f ? e.editor.commands.setMeta("lockDragHandle", !0) : e.editor.commands.setMeta("lockDragHandle", !1), () => {
2454
2452
  e.editor.commands.setMeta("lockDragHandle", !1);
2455
- }), [d]), R(() => () => {
2456
- l.current && (e.editor.unregisterPlugin(t), l.current = null);
2453
+ }), [f]), R(() => () => {
2454
+ d.current && (e.editor.unregisterPlugin(t), d.current = null);
2457
2455
  }, []), R(() => {
2458
- var S;
2459
- (S = e.editor) != null && S.isDestroyed && l.current && (e.editor.unregisterPlugin(t), l.current = null);
2456
+ var A;
2457
+ (A = e.editor) != null && A.isDestroyed && d.current && (e.editor.unregisterPlugin(t), d.current = null);
2460
2458
  }, [(P = e.editor) == null ? void 0 : P.isDestroyed]);
2461
- const w = (S) => {
2462
- e != null && e.disabled || f(S);
2459
+ const w = (A) => {
2460
+ e != null && e.disabled || u(A);
2463
2461
  };
2464
2462
  return /* @__PURE__ */ a(
2465
2463
  "div",
2466
2464
  {
2467
- ref: c,
2465
+ ref: l,
2468
2466
  className: `drag-handle duration-200 ease-in-out [transition-property:top,_left] ${e == null ? void 0 : e.className}`,
2469
2467
  style: {
2470
2468
  opacity: e != null && e.disabled ? 0 : 1
@@ -2480,7 +2478,7 @@ function ac(e) {
2480
2478
  type: "button",
2481
2479
  variant: "ghost",
2482
2480
  children: /* @__PURE__ */ a(
2483
- z,
2481
+ j,
2484
2482
  {
2485
2483
  className: "text-lg text-neutral-600 dark:text-neutral-200",
2486
2484
  name: "Plus"
@@ -2492,7 +2490,7 @@ function ac(e) {
2492
2490
  Rr,
2493
2491
  {
2494
2492
  onOpenChange: w,
2495
- open: d,
2493
+ open: f,
2496
2494
  children: [
2497
2495
  /* @__PURE__ */ p("div", { className: "relative flex flex-col", children: [
2498
2496
  /* @__PURE__ */ p(Ir, { children: [
@@ -2509,11 +2507,11 @@ function ac(e) {
2509
2507
  size: "icon",
2510
2508
  type: "button",
2511
2509
  variant: "ghost",
2512
- onMouseUp: (S) => {
2513
- S.preventDefault(), !(e != null && e.disabled) && f(!0);
2510
+ onMouseUp: (A) => {
2511
+ A.preventDefault(), !(e != null && e.disabled) && u(!0);
2514
2512
  },
2515
2513
  children: /* @__PURE__ */ a(
2516
- z,
2514
+ j,
2517
2515
  {
2518
2516
  className: "text-sm text-neutral-600 dark:text-neutral-200",
2519
2517
  name: "Grip"
@@ -2523,7 +2521,7 @@ function ac(e) {
2523
2521
  )
2524
2522
  }
2525
2523
  ),
2526
- /* @__PURE__ */ a(Br, { children: n("editor.draghandle.tooltip") })
2524
+ /* @__PURE__ */ a(Br, { children: r("editor.draghandle.tooltip") })
2527
2525
  ] }),
2528
2526
  /* @__PURE__ */ a(Mr, { className: "absolute left-0 top-0 z-0 size-[28px]" })
2529
2527
  ] }),
@@ -2536,118 +2534,107 @@ function ac(e) {
2536
2534
  sideOffset: 0,
2537
2535
  children: [
2538
2536
  /* @__PURE__ */ p(
2539
- W,
2537
+ X,
2540
2538
  {
2541
2539
  className: "flex gap-3 bg-opacity-10 hover:bg-red-400 hover:bg-opacity-20 focus:bg-red-400 focus:bg-opacity-30 focus:text-red-500 dark:hover:bg-opacity-20 dark:hover:text-red-500",
2542
2540
  onClick: b,
2543
2541
  children: [
2544
- /* @__PURE__ */ a(z, { name: "Trash2" }),
2545
- /* @__PURE__ */ a("span", { children: n("editor.remove") })
2542
+ /* @__PURE__ */ a(j, { name: "Trash2" }),
2543
+ /* @__PURE__ */ a("span", { children: r("editor.remove") })
2546
2544
  ]
2547
2545
  }
2548
2546
  ),
2549
- m ? /* @__PURE__ */ p(
2550
- W,
2551
- {
2552
- className: "flex gap-3",
2553
- onClick: g,
2554
- children: [
2555
- /* @__PURE__ */ a(z, { name: "PaintRoller" }),
2556
- /* @__PURE__ */ a("span", { children: n("editor.clear.tooltip") })
2557
- ]
2558
- }
2559
- ) : null,
2560
- /* @__PURE__ */ p(
2561
- W,
2547
+ g ? /* @__PURE__ */ p(
2548
+ X,
2562
2549
  {
2563
2550
  className: "flex gap-3",
2564
2551
  onClick: y,
2565
2552
  children: [
2566
- /* @__PURE__ */ a(z, { name: "Clipboard" }),
2567
- /* @__PURE__ */ a("span", { children: n("editor.copyToClipboard") })
2553
+ /* @__PURE__ */ a(j, { name: "PaintRoller" }),
2554
+ /* @__PURE__ */ a("span", { children: r("editor.clear.tooltip") })
2568
2555
  ]
2569
2556
  }
2570
- ),
2557
+ ) : null,
2571
2558
  /* @__PURE__ */ p(
2572
- W,
2559
+ X,
2573
2560
  {
2574
2561
  className: "flex gap-3",
2575
2562
  onClick: x,
2576
2563
  children: [
2577
- /* @__PURE__ */ a(z, { name: "Copy" }),
2578
- /* @__PURE__ */ a("span", { children: n("editor.copy") })
2564
+ /* @__PURE__ */ a(j, { name: "Copy" }),
2565
+ /* @__PURE__ */ a("span", { children: r("editor.copy") })
2579
2566
  ]
2580
2567
  }
2581
2568
  ),
2582
- u || h ? /* @__PURE__ */ a(Lr, {}) : null,
2583
- u ? /* @__PURE__ */ p(xt, { children: [
2569
+ h || m ? /* @__PURE__ */ a(Lr, {}) : null,
2570
+ h ? /* @__PURE__ */ p(xt, { children: [
2584
2571
  /* @__PURE__ */ p(bt, { className: "flex gap-3", children: [
2585
- /* @__PURE__ */ a(z, { name: "AlignCenter" }),
2586
- /* @__PURE__ */ a("span", { children: n("editor.textalign.tooltip") })
2572
+ /* @__PURE__ */ a(j, { name: "AlignCenter" }),
2573
+ /* @__PURE__ */ a("span", { children: r("editor.textalign.tooltip") })
2587
2574
  ] }),
2588
2575
  /* @__PURE__ */ a(Ct, { children: /* @__PURE__ */ p(Tt, { children: [
2589
2576
  /* @__PURE__ */ p(
2590
- W,
2577
+ X,
2591
2578
  {
2592
2579
  className: "flex gap-3",
2593
- onClick: () => A("left"),
2580
+ onClick: () => S("left"),
2594
2581
  children: [
2595
- /* @__PURE__ */ a(z, { name: "AlignLeft" }),
2596
- /* @__PURE__ */ a("span", { children: n("editor.textalign.left.tooltip") })
2582
+ /* @__PURE__ */ a(j, { name: "AlignLeft" }),
2583
+ /* @__PURE__ */ a("span", { children: r("editor.textalign.left.tooltip") })
2597
2584
  ]
2598
2585
  }
2599
2586
  ),
2600
2587
  /* @__PURE__ */ p(
2601
- W,
2588
+ X,
2602
2589
  {
2603
2590
  className: "flex gap-3",
2604
- onClick: () => A("center"),
2591
+ onClick: () => S("center"),
2605
2592
  children: [
2606
- /* @__PURE__ */ a(z, { name: "AlignCenter" }),
2607
- /* @__PURE__ */ a("span", { children: n("editor.textalign.center.tooltip") })
2593
+ /* @__PURE__ */ a(j, { name: "AlignCenter" }),
2594
+ /* @__PURE__ */ a("span", { children: r("editor.textalign.center.tooltip") })
2608
2595
  ]
2609
2596
  }
2610
2597
  ),
2611
2598
  /* @__PURE__ */ p(
2612
- W,
2599
+ X,
2613
2600
  {
2614
2601
  className: "flex gap-3",
2615
- onClick: () => A("right"),
2602
+ onClick: () => S("right"),
2616
2603
  children: [
2617
- /* @__PURE__ */ a(z, { name: "AlignRight" }),
2618
- /* @__PURE__ */ a("span", { children: n("editor.textalign.right.tooltip") })
2604
+ /* @__PURE__ */ a(j, { name: "AlignRight" }),
2605
+ /* @__PURE__ */ a("span", { children: r("editor.textalign.right.tooltip") })
2619
2606
  ]
2620
2607
  }
2621
2608
  )
2622
2609
  ] }) })
2623
2610
  ] }) : null,
2624
- h ? /* @__PURE__ */ p(xt, { children: [
2611
+ m ? /* @__PURE__ */ p(xt, { children: [
2625
2612
  /* @__PURE__ */ p(bt, { className: "flex gap-3", children: [
2626
- /* @__PURE__ */ a(z, { name: "IndentIncrease" }),
2627
- /* @__PURE__ */ a("span", { children: n("editor.indent") })
2613
+ /* @__PURE__ */ a(j, { name: "IndentIncrease" }),
2614
+ /* @__PURE__ */ a("span", { children: r("editor.indent") })
2628
2615
  ] }),
2629
2616
  /* @__PURE__ */ a(Ct, { children: /* @__PURE__ */ p(Tt, { children: [
2630
2617
  /* @__PURE__ */ p(
2631
- W,
2618
+ X,
2632
2619
  {
2633
2620
  className: "flex gap-3",
2634
- disabled: ((M = r == null ? void 0 : r.attrs) == null ? void 0 : M.indent) >= At.max,
2621
+ disabled: ((M = i == null ? void 0 : i.attrs) == null ? void 0 : M.indent) >= At.max,
2635
2622
  onClick: _,
2636
2623
  children: [
2637
- /* @__PURE__ */ a(z, { name: "IndentIncrease" }),
2638
- /* @__PURE__ */ a("span", { children: n("editor.indent.tooltip") })
2624
+ /* @__PURE__ */ a(j, { name: "IndentIncrease" }),
2625
+ /* @__PURE__ */ a("span", { children: r("editor.indent.tooltip") })
2639
2626
  ]
2640
2627
  }
2641
2628
  ),
2642
2629
  /* @__PURE__ */ p(
2643
- W,
2630
+ X,
2644
2631
  {
2645
2632
  className: "flex gap-3",
2646
- disabled: ((k = r == null ? void 0 : r.attrs) == null ? void 0 : k.indent) <= At.min,
2647
- onClick: E,
2633
+ disabled: ((k = i == null ? void 0 : i.attrs) == null ? void 0 : k.indent) <= At.min,
2634
+ onClick: N,
2648
2635
  children: [
2649
- /* @__PURE__ */ a(z, { name: "IndentDecrease" }),
2650
- /* @__PURE__ */ a("span", { children: n("editor.outdent.tooltip") })
2636
+ /* @__PURE__ */ a(j, { name: "IndentDecrease" }),
2637
+ /* @__PURE__ */ a("span", { children: r("editor.outdent.tooltip") })
2651
2638
  ]
2652
2639
  }
2653
2640
  )
@@ -2673,14 +2660,14 @@ function ir({ item: e, disabled: t, editor: n }) {
2673
2660
  disabled: t || ((i = e == null ? void 0 : e.componentProps) == null ? void 0 : i.disabled),
2674
2661
  editor: n
2675
2662
  }
2676
- ) : /* @__PURE__ */ a(N, {});
2663
+ ) : /* @__PURE__ */ a(E, {});
2677
2664
  }
2678
2665
  function sc(e) {
2679
2666
  const { t, lang: n } = D(), r = (o) => {
2680
2667
  var f;
2681
2668
  const { editor: s } = o, { selection: c } = s.view.state, { $from: l, to: d } = c;
2682
2669
  return l.pos === d ? !1 : c instanceof pn || (((f = e.showShow) == null ? void 0 : f.call(e, o)) ?? !1);
2683
- }, i = F(() => e.disabled || !(e != null && e.editor) ? [] : tr(e.editor, t, e.items).filter((o) => e.filterItem ? e.filterItem(o, e.editor) : !0), [e.disabled, e.editor, e.items, e.filterItem, n, t]);
2670
+ }, i = z(() => e.disabled || !(e != null && e.editor) ? [] : tr(e.editor, t, e.items).filter((o) => e.filterItem ? e.filterItem(o, e.editor) : !0), [e.disabled, e.editor, e.items, e.filterItem, n, t]);
2684
2671
  return /* @__PURE__ */ a(
2685
2672
  L,
2686
2673
  {
@@ -2707,7 +2694,7 @@ function sc(e) {
2707
2694
  item: o
2708
2695
  },
2709
2696
  `bubbleMenu-text-${s}`
2710
- )) }) }) : /* @__PURE__ */ a(N, {})
2697
+ )) }) }) : /* @__PURE__ */ a(E, {})
2711
2698
  }
2712
2699
  );
2713
2700
  }
@@ -2860,10 +2847,10 @@ function cc({ editor: e, disabled: t }) {
2860
2847
  );
2861
2848
  }
2862
2849
  function dc({ editor: e, disabled: t, actions: n, ...r }) {
2863
- var y, x, A, _, E, b;
2850
+ var y, x, S, _, N, b;
2864
2851
  const i = ({ editor: v, view: T, state: w, from: P }) => {
2865
- const { selection: M } = v.view.state, { $from: k, to: S } = M;
2866
- return k.pos === S || !w || !P ? !1 : M instanceof pn || vn({ editor: v, view: T, state: w, from: P }) || yn({ editor: v, view: T, state: w, from: P });
2852
+ const { selection: M } = v.view.state, { $from: k, to: A } = M;
2853
+ return k.pos === A || !w || !P ? !1 : M instanceof pn || vn({ editor: v, view: T, state: w, from: P }) || yn({ editor: v, view: T, state: w, from: P });
2867
2854
  }, o = ({ editor: v }) => Fr(v.view.state, "table"), s = (v) => o(v) && !i(v), { t: c, lang: l } = D();
2868
2855
  function d() {
2869
2856
  e.chain().focus().mergeCells().run();
@@ -2889,7 +2876,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2889
2876
  return new DOMRect(-1e3, -1e3, 0, 0);
2890
2877
  const P = (k = w == null ? void 0 : w.closest) == null ? void 0 : k.call(w, ".tableWrapper");
2891
2878
  return P ? P.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
2892
- }, g = F(() => t || !e ? [] : tr(e, c, r.items || []), [t, e, r.items, l, c]);
2879
+ }, g = z(() => t || !e ? [] : tr(e, c, r.items || []), [t, e, r.items, l, c]);
2893
2880
  return t ? null : /* @__PURE__ */ a(
2894
2881
  L,
2895
2882
  {
@@ -2908,7 +2895,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2908
2895
  sticky: "popper"
2909
2896
  },
2910
2897
  children: /* @__PURE__ */ p(ct, { children: [
2911
- n && /* @__PURE__ */ p(N, { children: [
2898
+ n && /* @__PURE__ */ p(E, { children: [
2912
2899
  n.map((v, T) => /* @__PURE__ */ a(C, { ...v }, T)),
2913
2900
  /* @__PURE__ */ a(
2914
2901
  U,
@@ -2918,7 +2905,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2918
2905
  }
2919
2906
  )
2920
2907
  ] }),
2921
- r.items && /* @__PURE__ */ p(N, { children: [
2908
+ r.items && /* @__PURE__ */ p(E, { children: [
2922
2909
  g.map((v, T) => /* @__PURE__ */ a(
2923
2910
  ir,
2924
2911
  {
@@ -2952,7 +2939,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2952
2939
  C,
2953
2940
  {
2954
2941
  action: f,
2955
- disabled: !((_ = (A = e == null ? void 0 : e.can()) == null ? void 0 : A.splitCell) != null && _.call(A)),
2942
+ disabled: !((_ = (S = e == null ? void 0 : e.can()) == null ? void 0 : S.splitCell) != null && _.call(S)),
2956
2943
  icon: "TableCellsSplit",
2957
2944
  tooltip: c("editor.table.menu.splitCells"),
2958
2945
  "tooltip-options": {
@@ -2976,7 +2963,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2976
2963
  C,
2977
2964
  {
2978
2965
  action: u,
2979
- disabled: !((b = (E = e == null ? void 0 : e.can()) == null ? void 0 : E.deleteTable) != null && b.call(E)),
2966
+ disabled: !((b = (N = e == null ? void 0 : e.can()) == null ? void 0 : N.deleteTable) != null && b.call(N)),
2980
2967
  icon: "Trash2",
2981
2968
  tooltip: c("editor.table.menu.deleteTable"),
2982
2969
  "tooltip-options": {
@@ -2989,7 +2976,7 @@ function dc({ editor: e, disabled: t, actions: n, ...r }) {
2989
2976
  );
2990
2977
  }
2991
2978
  function uc(e) {
2992
- return /* @__PURE__ */ p(N, { children: [
2979
+ return /* @__PURE__ */ p(E, { children: [
2993
2980
  /* @__PURE__ */ a(dc, { ...e }),
2994
2981
  /* @__PURE__ */ a(lc, { ...e }),
2995
2982
  /* @__PURE__ */ a(cc, { ...e })
@@ -3039,7 +3026,7 @@ function fc(e) {
3039
3026
  ] });
3040
3027
  }
3041
3028
  function hc({ editor: e, disabled: t }) {
3042
- const [n, r] = I(!1), i = F(() => {
3029
+ const [n, r] = I(!1), i = z(() => {
3043
3030
  const { href: l } = e.getAttributes("link");
3044
3031
  return l;
3045
3032
  }, [e]), o = O(({ editor: l }) => l.isActive("link"), []), s = (l, d, f) => {
@@ -3059,7 +3046,7 @@ function hc({ editor: e, disabled: t }) {
3059
3046
  }, c = O(() => {
3060
3047
  e.chain().extendMarkRange("link").unsetLink().focus().run(), r(!1);
3061
3048
  }, [e]);
3062
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
3049
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
3063
3050
  L,
3064
3051
  {
3065
3052
  editor: e,
@@ -3075,7 +3062,7 @@ function hc({ editor: e, disabled: t }) {
3075
3062
  r(!1);
3076
3063
  }
3077
3064
  },
3078
- children: t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ a(N, { children: n ? /* @__PURE__ */ a(jr, { onSetLink: s, editor: e }) : /* @__PURE__ */ a(
3065
+ children: t ? /* @__PURE__ */ a(E, {}) : /* @__PURE__ */ a(E, { children: n ? /* @__PURE__ */ a(jr, { onSetLink: s, editor: e }) : /* @__PURE__ */ a(
3079
3066
  fc,
3080
3067
  {
3081
3068
  editor: e,
@@ -3111,7 +3098,7 @@ function ut({ item: e, disabled: t, editor: n }) {
3111
3098
  disabled: t || ((i = e == null ? void 0 : e.componentProps) == null ? void 0 : i.disabled),
3112
3099
  editor: n
3113
3100
  }
3114
- ) }) : /* @__PURE__ */ a(N, {});
3101
+ ) }) : /* @__PURE__ */ a(E, {});
3115
3102
  }
3116
3103
  function mc(e) {
3117
3104
  return e.type.name === hn.name;
@@ -3130,8 +3117,8 @@ function vc(e) {
3130
3117
  if (mc(d))
3131
3118
  return l = !0, !1;
3132
3119
  }), l;
3133
- }, r = F(() => e.disabled ? [] : Jl(e.editor), [e.disabled, e.editor, t]);
3134
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
3120
+ }, r = z(() => e.disabled ? [] : Jl(e.editor), [e.disabled, e.editor, t]);
3121
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
3135
3122
  L,
3136
3123
  {
3137
3124
  editor: e == null ? void 0 : e.editor,
@@ -3145,7 +3132,7 @@ function vc(e) {
3145
3132
  item: i
3146
3133
  },
3147
3134
  `bubbleMenu-image-${o}`
3148
- )) }) }) : /* @__PURE__ */ a(N, {})
3135
+ )) }) }) : /* @__PURE__ */ a(E, {})
3149
3136
  }
3150
3137
  ) });
3151
3138
  }
@@ -3157,8 +3144,8 @@ function yc(e) {
3157
3144
  if (gc(d))
3158
3145
  return l = !0, !1;
3159
3146
  }), l;
3160
- }, r = F(() => e.disabled ? [] : Zl(e.editor), [e.disabled, e.editor, t]);
3161
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
3147
+ }, r = z(() => e.disabled ? [] : Zl(e.editor), [e.disabled, e.editor, t]);
3148
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
3162
3149
  L,
3163
3150
  {
3164
3151
  editor: e == null ? void 0 : e.editor,
@@ -3172,7 +3159,7 @@ function yc(e) {
3172
3159
  item: i
3173
3160
  },
3174
3161
  `bubbleMenu-image-gif-${o}`
3175
- )) }) }) : /* @__PURE__ */ a(N, {})
3162
+ )) }) }) : /* @__PURE__ */ a(E, {})
3176
3163
  }
3177
3164
  ) });
3178
3165
  }
@@ -3184,8 +3171,8 @@ function wc(e) {
3184
3171
  if (pc(d))
3185
3172
  return l = !0, !1;
3186
3173
  }), l;
3187
- }, r = F(() => e.disabled ? [] : tc(e.editor), [e.editor, e.disabled, t]);
3188
- return /* @__PURE__ */ a(N, { children: /* @__PURE__ */ a(
3174
+ }, r = z(() => e.disabled ? [] : tc(e.editor), [e.editor, e.disabled, t]);
3175
+ return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(
3189
3176
  L,
3190
3177
  {
3191
3178
  editor: e == null ? void 0 : e.editor,
@@ -3199,7 +3186,7 @@ function wc(e) {
3199
3186
  item: i
3200
3187
  },
3201
3188
  `bubbleMenu-video-${o}`
3202
- )) }) }) : /* @__PURE__ */ a(N, {})
3189
+ )) }) }) : /* @__PURE__ */ a(E, {})
3203
3190
  }
3204
3191
  ) });
3205
3192
  }
@@ -3260,7 +3247,7 @@ function xc({ editor: e }) {
3260
3247
  );
3261
3248
  }
3262
3249
  function bc({ editor: e, extensions: t }) {
3263
- const { t: n } = D(), r = F(() => {
3250
+ const { t: n } = D(), r = z(() => {
3264
3251
  var i, o, s;
3265
3252
  return (s = (o = (i = t == null ? void 0 : t.find((c) => c.name === "base-kit")) == null ? void 0 : i.options) == null ? void 0 : o.characterCount) == null ? void 0 : s.limit;
3266
3253
  }, [t]);
@@ -3446,11 +3433,11 @@ div[data-tippy-root] {
3446
3433
  });
3447
3434
  };
3448
3435
  return R(() => {
3449
- const s = _t(Nt.EDIT(t), i), c = _t(Nt.UPDATE_THEME(t), o);
3436
+ const s = _t(Et.EDIT(t), i), c = _t(Et.UPDATE_THEME(t), o);
3450
3437
  return () => {
3451
3438
  s(), c();
3452
3439
  };
3453
- }, []), /* @__PURE__ */ a(N, { children: e });
3440
+ }, []), /* @__PURE__ */ a(E, { children: e });
3454
3441
  });
3455
3442
  function Sc({ children: e, id: t }) {
3456
3443
  return /* @__PURE__ */ a(Gr, { children: /* @__PURE__ */ a(Wr, { children: /* @__PURE__ */ a(Ac, { id: t, children: e }) }) });
@@ -3475,7 +3462,7 @@ function or({ mark: e } = {}) {
3475
3462
  function ft(e) {
3476
3463
  return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
3477
3464
  }
3478
- function Nc(e) {
3465
+ function Ec(e) {
3479
3466
  return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
3480
3467
  }
3481
3468
  function ar(e) {
@@ -3484,7 +3471,7 @@ function ar(e) {
3484
3471
  );
3485
3472
  }
3486
3473
  function sr(e, t = {}) {
3487
- const { csp: n, prepend: r, priority: i = 0 } = t, o = Nc(r), s = o === "prependQueue", c = document.createElement("style");
3474
+ const { csp: n, prepend: r, priority: i = 0 } = t, o = Ec(r), s = o === "prependQueue", c = document.createElement("style");
3488
3475
  c.setAttribute(sn, o), s && i && c.setAttribute(ln, `${i}`), n != null && n.nonce && (c.nonce = n == null ? void 0 : n.nonce), c.innerHTML = e;
3489
3476
  const l = ft(t), { firstChild: d } = l;
3490
3477
  if (r) {
@@ -3507,7 +3494,7 @@ function lr(e, t = {}) {
3507
3494
  const n = ft(t);
3508
3495
  return ar(n).find((r) => r.getAttribute(or(t)) === e);
3509
3496
  }
3510
- function Ec(e, t = {}) {
3497
+ function Nc(e, t = {}) {
3511
3498
  const n = lr(e, t);
3512
3499
  n && n.remove();
3513
3500
  }
@@ -3529,7 +3516,7 @@ function Oc(e, t, n = {}) {
3529
3516
  return o.setAttribute(or(n), t), o;
3530
3517
  }
3531
3518
  function Rc(e, t) {
3532
- const { content: n, extensions: r, useEditorOptions: i = {} } = e, o = mr(), s = F(() => {
3519
+ const { content: n, extensions: r, useEditorOptions: i = {} } = e, o = mr(), s = z(() => {
3533
3520
  const u = nl(r, r, "name");
3534
3521
  return [...r.map((m) => {
3535
3522
  const g = r.find((y) => y.name === m.name);
@@ -3554,7 +3541,7 @@ function Rc(e, t) {
3554
3541
  }, [e.dark]), R(() => {
3555
3542
  l == null || l.setEditable(!(e != null && e.disabled)), Jr.setDisable(o, !(e != null && e.disabled));
3556
3543
  }, [l, e == null ? void 0 : e.disabled]), R(() => ((e == null ? void 0 : e.resetCSS) !== !1 && Oc(Tc, "react-tiptap-reset"), () => {
3557
- Ec("react-tiptap-reset");
3544
+ Nc("react-tiptap-reset");
3558
3545
  }), [e == null ? void 0 : e.resetCSS]);
3559
3546
  function d(u, h) {
3560
3547
  return e != null && e.removeDefaultWrapper ? h === "html" ? u.isEmpty ? "" : u.getHTML() : h === "json" ? u.isEmpty ? {} : u.getJSON() : h === "text" ? u.isEmpty ? "" : u.getText() : "" : h === "html" ? u.getHTML() : h === "json" ? u.getJSON() : h === "text" ? u.getText() : "";
@@ -3613,7 +3600,7 @@ function Rc(e, t) {
3613
3600
  }
3614
3601
  ),
3615
3602
  /* @__PURE__ */ a(Cc, {})
3616
- ] }) : /* @__PURE__ */ a(N, {});
3603
+ ] }) : /* @__PURE__ */ a(E, {});
3617
3604
  }
3618
3605
  const Gc = hr(Rc);
3619
3606
  export {