@mxmweb/rtext 1.4.2 → 1.4.3

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/index.js CHANGED
@@ -354,7 +354,7 @@ function k1() {
354
354
  function st(x) {
355
355
  return Ft(x);
356
356
  }
357
- function ar(x) {
357
+ function ur(x) {
358
358
  {
359
359
  var we = typeof Symbol == "function" && Symbol.toStringTag, fe = we && x[Symbol.toStringTag] || x.constructor.name || "Object";
360
360
  return fe;
@@ -372,7 +372,7 @@ function k1() {
372
372
  }
373
373
  function at(x) {
374
374
  if (cr(x))
375
- return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ar(x)), pt(x);
375
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ur(x)), pt(x);
376
376
  }
377
377
  var Ht = q.ReactCurrentOwner, Gt = {
378
378
  key: !0,
@@ -380,7 +380,7 @@ function k1() {
380
380
  __self: !0,
381
381
  __source: !0
382
382
  }, er, pr;
383
- function sr(x) {
383
+ function ar(x) {
384
384
  if (tt.call(x, "ref")) {
385
385
  var we = Object.getOwnPropertyDescriptor(x, "ref").get;
386
386
  if (we && we.isReactWarning)
@@ -453,7 +453,7 @@ function k1() {
453
453
  function hn(x, we, fe, Ue, dt) {
454
454
  {
455
455
  var ze, Xe = {}, W = null, Ae = null;
456
- fe !== void 0 && (at(fe), W = "" + fe), wt(we) && (at(we.key), W = "" + we.key), sr(we) && (Ae = we.ref, Me(we, dt));
456
+ fe !== void 0 && (at(fe), W = "" + fe), wt(we) && (at(we.key), W = "" + we.key), ar(we) && (Ae = we.ref, Me(we, dt));
457
457
  for (ze in we)
458
458
  tt.call(we, ze) && !Gt.hasOwnProperty(ze) && (Xe[ze] = we[ze]);
459
459
  if (x && x.defaultProps) {
@@ -481,7 +481,7 @@ function k1() {
481
481
  function pn(x) {
482
482
  return typeof x == "object" && x !== null && x.$$typeof === t;
483
483
  }
484
- function ir() {
484
+ function sr() {
485
485
  {
486
486
  if (Mr.current) {
487
487
  var x = se(Mr.current.type);
@@ -499,7 +499,7 @@ Check the render method of \`` + x + "`.";
499
499
  var Sr = {};
500
500
  function kn(x) {
501
501
  {
502
- var we = ir();
502
+ var we = sr();
503
503
  if (!we) {
504
504
  var fe = typeof x == "string" ? x : x.displayName || x.name;
505
505
  fe && (we = `
@@ -586,7 +586,7 @@ Check the top-level render call using <` + fe + ">.");
586
586
  var W = "";
587
587
  (x === void 0 || typeof x == "object" && x !== null && Object.keys(x).length === 0) && (W += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
588
588
  var Ae = mr();
589
- Ae ? W += Ae : W += ir();
589
+ Ae ? W += Ae : W += sr();
590
590
  var S;
591
591
  x === null ? S = "null" : st(x) ? S = "array" : x !== void 0 && x.$$typeof === t ? (S = "<" + (se(x.type) || "Unknown") + " />", W = " Did you accidentally export a JSX literal instead of a component?") : S = typeof x, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, W);
592
592
  }
@@ -1448,7 +1448,7 @@ var W1 = (e, t, r) => {
1448
1448
  else if (!We.isText(_) && !We.isText(z))
1449
1449
  z.children.push(..._.children);
1450
1450
  else
1451
- throw new Error('Cannot apply a "merge_node" operation at path ['.concat(q, "] to nodes of different interfaces: ").concat(ur.stringify(_), " ").concat(ur.stringify(z)));
1451
+ throw new Error('Cannot apply a "merge_node" operation at path ['.concat(q, "] to nodes of different interfaces: ").concat(lr.stringify(_), " ").concat(lr.stringify(z)));
1452
1452
  if (V.children.splice(U, 1), t)
1453
1453
  for (var [G, me] of he.points(t))
1454
1454
  t[me] = ft.transform(G, r);
@@ -1518,8 +1518,8 @@ var W1 = (e, t, r) => {
1518
1518
  for (var st in Pt) {
1519
1519
  if (st === "children" || st === "text")
1520
1520
  throw new Error('Cannot set the "'.concat(st, '" property of nodes!'));
1521
- var ar = Pt[st];
1522
- ar == null ? delete Ft[st] : Ft[st] = ar;
1521
+ var ur = Pt[st];
1522
+ ur == null ? delete Ft[st] : Ft[st] = ur;
1523
1523
  }
1524
1524
  for (var cr in bt)
1525
1525
  Pt.hasOwnProperty(cr) || delete Ft[cr];
@@ -1534,7 +1534,7 @@ var W1 = (e, t, r) => {
1534
1534
  else {
1535
1535
  if (t == null) {
1536
1536
  if (!he.isRange(pt))
1537
- throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(ur.stringify(pt), " when there is no current selection."));
1537
+ throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(lr.stringify(pt), " when there is no current selection."));
1538
1538
  t = wa({}, pt);
1539
1539
  }
1540
1540
  for (var at in pt) {
@@ -1557,15 +1557,15 @@ var W1 = (e, t, r) => {
1557
1557
  } = r;
1558
1558
  if (Gt.length === 0)
1559
1559
  throw new Error('Cannot apply a "split_node" operation at path ['.concat(Gt, "] because the root node cannot be split."));
1560
- var sr = Re.get(e, Gt), wt = Re.parent(e, Gt), Me = Gt[Gt.length - 1], tr;
1561
- if (We.isText(sr)) {
1562
- var Ir = sr.text.slice(0, er), fn = sr.text.slice(er);
1563
- sr.text = Ir, tr = wa(wa({}, pr), {}, {
1560
+ var ar = Re.get(e, Gt), wt = Re.parent(e, Gt), Me = Gt[Gt.length - 1], tr;
1561
+ if (We.isText(ar)) {
1562
+ var Ir = ar.text.slice(0, er), fn = ar.text.slice(er);
1563
+ ar.text = Ir, tr = wa(wa({}, pr), {}, {
1564
1564
  text: fn
1565
1565
  });
1566
1566
  } else {
1567
- var hn = sr.children.slice(0, er), Mr = sr.children.slice(er);
1568
- sr.children = hn, tr = wa(wa({}, pr), {}, {
1567
+ var hn = ar.children.slice(0, er), Mr = ar.children.slice(er);
1568
+ ar.children = hn, tr = wa(wa({}, pr), {}, {
1569
1569
  children: Mr
1570
1570
  });
1571
1571
  }
@@ -1803,7 +1803,7 @@ var he = {
1803
1803
  ancestor(e, t) {
1804
1804
  var r = Re.get(e, t);
1805
1805
  if (We.isText(r))
1806
- throw new Error("Cannot get the ancestor node at path [".concat(t, "] because it refers to a text node instead: ").concat(ur.stringify(r)));
1806
+ throw new Error("Cannot get the ancestor node at path [".concat(t, "] because it refers to a text node instead: ").concat(lr.stringify(r)));
1807
1807
  return r;
1808
1808
  },
1809
1809
  ancestors(e, t) {
@@ -1817,10 +1817,10 @@ var he = {
1817
1817
  },
1818
1818
  child(e, t) {
1819
1819
  if (We.isText(e))
1820
- throw new Error("Cannot get the child of a text node: ".concat(ur.stringify(e)));
1820
+ throw new Error("Cannot get the child of a text node: ".concat(lr.stringify(e)));
1821
1821
  var r = e.children[t];
1822
1822
  if (r == null)
1823
- throw new Error("Cannot get child at index `".concat(t, "` in node: ").concat(ur.stringify(e)));
1823
+ throw new Error("Cannot get child at index `".concat(t, "` in node: ").concat(lr.stringify(e)));
1824
1824
  return r;
1825
1825
  },
1826
1826
  children(e, t) {
@@ -1843,7 +1843,7 @@ var he = {
1843
1843
  descendant(e, t) {
1844
1844
  var r = Re.get(e, t);
1845
1845
  if (E.isEditor(r))
1846
- throw new Error("Cannot get the descendant node at path [".concat(t, "] because it refers to the root editor node instead: ").concat(ur.stringify(r)));
1846
+ throw new Error("Cannot get the descendant node at path [".concat(t, "] because it refers to the root editor node instead: ").concat(lr.stringify(r)));
1847
1847
  return r;
1848
1848
  },
1849
1849
  descendants(e) {
@@ -1876,7 +1876,7 @@ var he = {
1876
1876
  },
1877
1877
  fragment(e, t) {
1878
1878
  if (We.isText(e))
1879
- throw new Error("Cannot get a fragment starting from a root text node: ".concat(ur.stringify(e)));
1879
+ throw new Error("Cannot get a fragment starting from a root text node: ".concat(lr.stringify(e)));
1880
1880
  var r = g0({
1881
1881
  children: e.children
1882
1882
  }, (n) => {
@@ -1909,7 +1909,7 @@ var he = {
1909
1909
  for (var r = e, n = 0; n < t.length; n++) {
1910
1910
  var a = t[n];
1911
1911
  if (We.isText(r) || !r.children[a])
1912
- throw new Error("Cannot find a descendant at path [".concat(t, "] in node: ").concat(ur.stringify(e)));
1912
+ throw new Error("Cannot find a descendant at path [".concat(t, "] in node: ").concat(lr.stringify(e)));
1913
1913
  r = r.children[a];
1914
1914
  }
1915
1915
  return r;
@@ -1945,7 +1945,7 @@ var he = {
1945
1945
  leaf(e, t) {
1946
1946
  var r = Re.get(e, t);
1947
1947
  if (!We.isText(r))
1948
- throw new Error("Cannot get the leaf node at path [".concat(t, "] because it refers to a non-leaf node: ").concat(ur.stringify(r)));
1948
+ throw new Error("Cannot get the leaf node at path [".concat(t, "] because it refers to a non-leaf node: ").concat(lr.stringify(r)));
1949
1949
  return r;
1950
1950
  },
1951
1951
  levels(e, t) {
@@ -2431,7 +2431,7 @@ var ft = {
2431
2431
  }
2432
2432
  });
2433
2433
  }
2434
- }, ku = void 0, ur = {
2434
+ }, ku = void 0, lr = {
2435
2435
  setScrubber(e) {
2436
2436
  ku = e;
2437
2437
  },
@@ -4019,7 +4019,7 @@ var Om = (e, t) => {
4019
4019
  return;
4020
4020
  }
4021
4021
  if (!he.isRange(t))
4022
- throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(ur.stringify(t)));
4022
+ throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(lr.stringify(t)));
4023
4023
  e.apply({
4024
4024
  type: "set_selection",
4025
4025
  properties: r,
@@ -4299,7 +4299,7 @@ var Wm = function(t, r) {
4299
4299
  var ge = dn(T, Km);
4300
4300
  me = O.children.length, G = ge;
4301
4301
  } else
4302
- throw new Error("Cannot merge the node at path [".concat(R, "] with the previous sibling because it is not the same kind: ").concat(ur.stringify(T), " ").concat(ur.stringify(O)));
4302
+ throw new Error("Cannot merge the node at path [".concat(R, "] with the previous sibling because it is not the same kind: ").concat(lr.stringify(T), " ").concat(lr.stringify(O)));
4303
4303
  I || Te.moveNodes(t, {
4304
4304
  at: R,
4305
4305
  to: q,
@@ -6017,7 +6017,7 @@ var De = {
6017
6017
  break;
6018
6018
  r.unshift(l), n = a;
6019
6019
  }
6020
- throw new Error("Unable to find the path for Slate node: ".concat(ur.stringify(t)));
6020
+ throw new Error("Unable to find the path for Slate node: ".concat(lr.stringify(t)));
6021
6021
  },
6022
6022
  focus: function(t) {
6023
6023
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
@@ -6095,7 +6095,7 @@ var De = {
6095
6095
  toDOMNode: (e, t) => {
6096
6096
  var r = oi.get(e), n = E.isEditor(t) ? Ms.get(e) : r?.get(De.findKey(e, t));
6097
6097
  if (!n)
6098
- throw new Error("Cannot resolve a DOM node from Slate node: ".concat(ur.stringify(t)));
6098
+ throw new Error("Cannot resolve a DOM node from Slate node: ".concat(lr.stringify(t)));
6099
6099
  return n;
6100
6100
  },
6101
6101
  toDOMPoint: (e, t) => {
@@ -6134,7 +6134,7 @@ var De = {
6134
6134
  }
6135
6135
  }
6136
6136
  if (!a)
6137
- throw new Error("Cannot resolve a DOM point from Slate point: ".concat(ur.stringify(t)));
6137
+ throw new Error("Cannot resolve a DOM point from Slate point: ".concat(lr.stringify(t)));
6138
6138
  return a;
6139
6139
  },
6140
6140
  toDOMRange: (e, t) => {
@@ -6845,19 +6845,19 @@ function Eg(e) {
6845
6845
  at: K
6846
6846
  });
6847
6847
  if (H.equals(K.anchor.path, K.focus.path)) {
6848
- var [ar, cr] = he.edges(K), pt = {
6849
- start: ar.offset,
6848
+ var [ur, cr] = he.edges(K), pt = {
6849
+ start: ur.offset,
6850
6850
  end: cr.offset,
6851
6851
  text: st
6852
6852
  };
6853
6853
  if (st && p && X === "insertCompositionText") {
6854
6854
  var at = p.start + p.text.search(/\S|$/), Ht = pt.start + pt.text.search(/\S|$/);
6855
6855
  Ht === at + 1 && pt.end === p.start + p.text.length ? (pt.start -= 1, p = null, le()) : p = !1;
6856
- } else X === "insertText" ? p === null ? p = pt : p && he.isCollapsed(K) && p.end + p.text.length === ar.offset ? p = bs(bs({}, p), {}, {
6856
+ } else X === "insertText" ? p === null ? p = pt : p && he.isCollapsed(K) && p.end + p.text.length === ur.offset ? p = bs(bs({}, p), {}, {
6857
6857
  text: p.text + st
6858
6858
  }) : p = !1 : p = !1;
6859
6859
  if (j) {
6860
- m(ar.path, pt);
6860
+ m(ur.path, pt);
6861
6861
  return;
6862
6862
  }
6863
6863
  }
@@ -7559,8 +7559,8 @@ var u2 = (e) => /* @__PURE__ */ Ye.createElement(Ye.Fragment, null, uf(e)), Do =
7559
7559
  Pt.startContainer === lt ? bt = Ft.endContainer : bt = Pt.startContainer;
7560
7560
  } else
7561
7561
  bt = Se.anchorNode;
7562
- var st = Ms.get(m), ar = !1;
7563
- if (st.contains(bt) && st.contains(lt) && (ar = !0), et && ar && ie && !tt) {
7562
+ var st = Ms.get(m), ur = !1;
7563
+ if (st.contains(bt) && st.contains(lt) && (ur = !0), et && ur && ie && !tt) {
7564
7564
  var cr = De.toSlateRange(m, Se, {
7565
7565
  exactMatch: !0,
7566
7566
  // domSelection is not necessarily a valid Slate range
@@ -7646,10 +7646,10 @@ var u2 = (e) => /* @__PURE__ */ Ye.createElement(Ye.Fragment, null, uf(e)), Do =
7646
7646
  Be.anchor.offset !== 0 && (lt = !0, m.marks && (lt = !1), !aa.get(m))) {
7647
7647
  var bt, Pt, {
7648
7648
  anchor: Ft
7649
- } = Be, [st, ar] = De.toDOMPoint(m, Ft), cr = (bt = st.parentElement) === null || bt === void 0 ? void 0 : bt.closest("a"), pt = De.getWindow(m);
7649
+ } = Be, [st, ur] = De.toDOMPoint(m, Ft), cr = (bt = st.parentElement) === null || bt === void 0 ? void 0 : bt.closest("a"), pt = De.getWindow(m);
7650
7650
  if (lt && cr && De.hasDOMNode(m, cr)) {
7651
7651
  var at, Ht = pt?.document.createTreeWalker(cr, NodeFilter.SHOW_TEXT).lastChild();
7652
- Ht === st && ((at = Ht.textContent) === null || at === void 0 ? void 0 : at.length) === ar && (lt = !1);
7652
+ Ht === st && ((at = Ht.textContent) === null || at === void 0 ? void 0 : at.length) === ur && (lt = !1);
7653
7653
  }
7654
7654
  if (lt && st.parentElement && (pt == null || (Pt = pt.getComputedStyle(st.parentElement)) === null || Pt === void 0 ? void 0 : Pt.whiteSpace) === "pre") {
7655
7655
  var Gt = E.above(m, {
@@ -7668,8 +7668,8 @@ var u2 = (e) => /* @__PURE__ */ Ye.createElement(Ye.Fragment, null, uf(e)), Do =
7668
7668
  });
7669
7669
  if (!Be || !he.equals(Be, pr)) {
7670
7670
  lt = !1;
7671
- var sr = !et && m.selection && E.rangeRef(m, m.selection);
7672
- Te.select(m, pr), sr && Oa.set(m, sr);
7671
+ var ar = !et && m.selection && E.rangeRef(m, m.selection);
7672
+ Te.select(m, pr), ar && Oa.set(m, ar);
7673
7673
  }
7674
7674
  }
7675
7675
  }
@@ -8267,9 +8267,9 @@ var v2 = ["editor", "children", "onChange", "onSelectionChange", "onValueChange"
8267
8267
  initialValue: c
8268
8268
  } = e, d = sa(e, v2), [g, p] = Ye.useState(() => {
8269
8269
  if (!Re.isNodeList(c))
8270
- throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(ur.stringify(c)));
8270
+ throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(lr.stringify(c)));
8271
8271
  if (!E.isEditor(t))
8272
- throw new Error("[Slate] editor is invalid! You passed: ".concat(ur.stringify(t)));
8272
+ throw new Error("[Slate] editor is invalid! You passed: ".concat(lr.stringify(t)));
8273
8273
  return t.children = c, Object.assign(t, d), {
8274
8274
  v: 0,
8275
8275
  editor: t
@@ -10095,7 +10095,7 @@ var n5 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
10095
10095
  /* Z+1 */
10096
10096
  ), qt = "-ms-", Ra = "-moz-", Bt = "-webkit-", Ef = "comm", ci = "rule", j0 = "decl", s5 = "@import", kf = "@keyframes", i5 = "@layer", Bf = Math.abs, $0 = String.fromCharCode, a0 = Object.assign;
10097
10097
  function o5(e, t) {
10098
- return lr(e, 0) ^ 45 ? (((t << 2 ^ lr(e, 0)) << 2 ^ lr(e, 1)) << 2 ^ lr(e, 2)) << 2 ^ lr(e, 3) : 0;
10098
+ return or(e, 0) ^ 45 ? (((t << 2 ^ or(e, 0)) << 2 ^ or(e, 1)) << 2 ^ or(e, 2)) << 2 ^ or(e, 3) : 0;
10099
10099
  }
10100
10100
  function Sf(e) {
10101
10101
  return e.trim();
@@ -10109,7 +10109,7 @@ function ct(e, t, r) {
10109
10109
  function Rs(e, t, r) {
10110
10110
  return e.indexOf(t, r);
10111
10111
  }
10112
- function lr(e, t) {
10112
+ function or(e, t) {
10113
10113
  return e.charCodeAt(t) | 0;
10114
10114
  }
10115
10115
  function oa(e, t, r) {
@@ -10148,13 +10148,13 @@ function u5() {
10148
10148
  return Qt;
10149
10149
  }
10150
10150
  function c5() {
10151
- return Qt = $r > 0 ? lr(ha, --$r) : 0, la--, Qt === 10 && (la = 1, di--), Qt;
10151
+ return Qt = $r > 0 ? or(ha, --$r) : 0, la--, Qt === 10 && (la = 1, di--), Qt;
10152
10152
  }
10153
10153
  function _r() {
10154
- return Qt = $r < Tf ? lr(ha, $r++) : 0, la++, Qt === 10 && (la = 1, di++), Qt;
10154
+ return Qt = $r < Tf ? or(ha, $r++) : 0, la++, Qt === 10 && (la = 1, di++), Qt;
10155
10155
  }
10156
10156
  function jn() {
10157
- return lr(ha, $r);
10157
+ return or(ha, $r);
10158
10158
  }
10159
10159
  function Ps() {
10160
10160
  return $r;
@@ -10260,7 +10260,7 @@ function zs(e, t, r, n, a, l, c, d, g) {
10260
10260
  switch (R = _, _ = _r()) {
10261
10261
  // (
10262
10262
  case 40:
10263
- if (R != 108 && lr(G, D - 1) == 58) {
10263
+ if (R != 108 && or(G, D - 1) == 58) {
10264
10264
  Rs(G += ct(Ao(_), "&", "&\f"), "&\f", Bf(p ? d[p - 1] : 0)) != -1 && (q = -1);
10265
10265
  break;
10266
10266
  }
@@ -10317,7 +10317,7 @@ function zs(e, t, r, n, a, l, c, d, g) {
10317
10317
  if (y === 0)
10318
10318
  zs(G, t, U, U, z, l, D, d, V);
10319
10319
  else
10320
- switch (A === 99 && lr(G, 3) === 110 ? 100 : A) {
10320
+ switch (A === 99 && or(G, 3) === 110 ? 100 : A) {
10321
10321
  // d l m s
10322
10322
  case 100:
10323
10323
  case 108:
@@ -10420,7 +10420,7 @@ function Of(e, t, r) {
10420
10420
  return Bt + e + Ra + e + qt + e + e;
10421
10421
  // writing-mode
10422
10422
  case 5936:
10423
- switch (lr(e, t + 11)) {
10423
+ switch (or(e, t + 11)) {
10424
10424
  // vertical-l(r)
10425
10425
  case 114:
10426
10426
  return Bt + e + qt + ct(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
@@ -10510,14 +10510,14 @@ function Of(e, t, r) {
10510
10510
  case 5021:
10511
10511
  case 4765:
10512
10512
  if (Jr(e) - 1 - t > 6)
10513
- switch (lr(e, t + 1)) {
10513
+ switch (or(e, t + 1)) {
10514
10514
  // (m)ax-content, (m)in-content
10515
10515
  case 109:
10516
- if (lr(e, t + 4) !== 45)
10516
+ if (or(e, t + 4) !== 45)
10517
10517
  break;
10518
10518
  // (f)ill-available, (f)it-content
10519
10519
  case 102:
10520
- return ct(e, /(.+:)(.+)-([^]+)/, "$1" + Bt + "$2-$3$1" + Ra + (lr(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
10520
+ return ct(e, /(.+:)(.+)-([^]+)/, "$1" + Bt + "$2-$3$1" + Ra + (or(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
10521
10521
  // (s)tretch
10522
10522
  case 115:
10523
10523
  return ~Rs(e, "stretch", 0) ? Of(ct(e, "stretch", "fill-available"), t, r) + e : e;
@@ -10531,15 +10531,15 @@ function Of(e, t, r) {
10531
10531
  });
10532
10532
  // position: sticky
10533
10533
  case 4949:
10534
- if (lr(e, t + 6) === 121)
10534
+ if (or(e, t + 6) === 121)
10535
10535
  return ct(e, ":", ":" + Bt) + e;
10536
10536
  break;
10537
10537
  // display: (flex|inline-flex|grid|inline-grid)
10538
10538
  case 6444:
10539
- switch (lr(e, lr(e, 14) === 45 ? 18 : 11)) {
10539
+ switch (or(e, or(e, 14) === 45 ? 18 : 11)) {
10540
10540
  // (inline-)?fle(x)
10541
10541
  case 120:
10542
- return ct(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + Bt + (lr(e, 14) === 45 ? "inline-" : "") + "box$3$1" + Bt + "$2$3$1" + qt + "$2box$3") + e;
10542
+ return ct(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + Bt + (or(e, 14) === 45 ? "inline-" : "") + "box$3$1" + Bt + "$2$3$1" + qt + "$2box$3") + e;
10543
10543
  // (inline-)?gri(d)
10544
10544
  case 100:
10545
10545
  return ct(e, ":", ":" + qt) + e;
@@ -15476,7 +15476,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
15476
15476
  };
15477
15477
  }
15478
15478
  const st = {};
15479
- function ar(i) {
15479
+ function ur(i) {
15480
15480
  let s;
15481
15481
  if (i >= 5 ? s = 0 : i >= 3 ? s = 1 : s = 2, !st[s]) {
15482
15482
  const o = st[s] = {
@@ -15695,7 +15695,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
15695
15695
  * Return the font metrics for this size.
15696
15696
  */
15697
15697
  fontMetrics() {
15698
- return this._fontMetrics || (this._fontMetrics = ar(this.size)), this._fontMetrics;
15698
+ return this._fontMetrics || (this._fontMetrics = ur(this.size)), this._fontMetrics;
15699
15699
  }
15700
15700
  /**
15701
15701
  * Gets the CSS color of the current options object
@@ -15738,7 +15738,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
15738
15738
  ex: !0,
15739
15739
  em: !0,
15740
15740
  mu: !0
15741
- }, sr = function(i) {
15741
+ }, ar = function(i) {
15742
15742
  return typeof i != "string" && (i = i.unit), i in er || i in pr || i === "ex";
15743
15743
  }, wt = function(i, s) {
15744
15744
  let o;
@@ -15862,7 +15862,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
15862
15862
  // 'ī': '\u0131\u0304', // enable when we add Extended Latin
15863
15863
  \u00EC: "\u0131\u0300"
15864
15864
  };
15865
- class ir {
15865
+ class sr {
15866
15866
  constructor(s, o, u, f, b, w, k, N) {
15867
15867
  this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = s, this.height = o || 0, this.depth = u || 0, this.italic = f || 0, this.skew = b || 0, this.width = w || 0, this.classes = k || [], this.style = N || {}, this.maxFontSize = 0;
15868
15868
  const $ = Ee(this.text.charCodeAt(0));
@@ -15950,7 +15950,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
15950
15950
  }
15951
15951
  }
15952
15952
  function Hr(i) {
15953
- if (i instanceof ir)
15953
+ if (i instanceof sr)
15954
15954
  return i;
15955
15955
  throw new Error("Expected symbolNode but got " + String(i) + ".");
15956
15956
  }
@@ -16149,9 +16149,9 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
16149
16149
  let k;
16150
16150
  if (w) {
16151
16151
  let N = w.italic;
16152
- (o === "text" || u && u.font === "mathit") && (N = 0), k = new ir(i, w.height, w.depth, N, w.skew, w.width, f);
16152
+ (o === "text" || u && u.font === "mathit") && (N = 0), k = new sr(i, w.height, w.depth, N, w.skew, w.width, f);
16153
16153
  } else
16154
- typeof console < "u" && console.warn("No character metrics " + ("for '" + i + "' in style '" + s + "' and mode '" + o + "'")), k = new ir(i, 0, 0, 0, 0, 0, f);
16154
+ typeof console < "u" && console.warn("No character metrics " + ("for '" + i + "' in style '" + s + "' and mode '" + o + "'")), k = new sr(i, 0, 0, 0, 0, 0, f);
16155
16155
  if (u) {
16156
16156
  k.maxFontSize = u.sizeMultiplier, u.style.isTight() && k.classes.push("mtight");
16157
16157
  const N = u.getColor();
@@ -16222,7 +16222,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
16222
16222
  }, lh = (i) => {
16223
16223
  for (let s = 0; s < i.length - 1; s++) {
16224
16224
  const o = i[s], u = i[s + 1];
16225
- o instanceof ir && u instanceof ir && oh(o, u) && (o.text += u.text, o.height = Math.max(o.height, u.height), o.depth = Math.max(o.depth, u.depth), o.italic = u.italic, i.splice(s + 1, 1), s--);
16225
+ o instanceof sr && u instanceof sr && oh(o, u) && (o.text += u.text, o.height = Math.max(o.height, u.height), o.depth = Math.max(o.depth, u.depth), o.italic = u.italic, i.splice(s + 1, 1), s--);
16226
16226
  }
16227
16227
  return i;
16228
16228
  }, bi = function(i) {
@@ -16321,7 +16321,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
16321
16321
  if (k < 0) {
16322
16322
  const Fe = Dr([], []), qe = Dr(["vlist"], [Fe]);
16323
16323
  qe.style.height = Me(-k);
16324
- const Ge = Dr(["vlist-s"], [new ir("\u200B")]);
16324
+ const Ge = Dr(["vlist-s"], [new sr("\u200B")]);
16325
16325
  Z = [Dr(["vlist-r"], [Y, Ge]), Dr(["vlist-r"], [qe])];
16326
16326
  } else
16327
16327
  Z = [Dr(["vlist-r"], [Y])];
@@ -20011,7 +20011,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
20011
20011
  // sign + magnitude, cast to number
20012
20012
  unit: s[3]
20013
20013
  };
20014
- if (!sr(o))
20014
+ if (!ar(o))
20015
20015
  throw new l("Invalid unit: '" + o.unit + "' in \\includegraphics.");
20016
20016
  return o;
20017
20017
  }
@@ -20372,7 +20372,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
20372
20372
  }
20373
20373
  } else if (b.body) {
20374
20374
  const Z = rr(b.body, s, !0);
20375
- Z.length === 1 && Z[0] instanceof ir ? (N = Z[0], N.classes[0] = "mop") : N = re.makeSpan(["mop"], Z, s);
20375
+ Z.length === 1 && Z[0] instanceof sr ? (N = Z[0], N.classes[0] = "mop") : N = re.makeSpan(["mop"], Z, s);
20376
20376
  } else {
20377
20377
  const Z = [];
20378
20378
  for (let ue = 1; ue < b.name.length; ue++)
@@ -20380,7 +20380,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
20380
20380
  N = re.makeSpan(["mop"], Z, s);
20381
20381
  }
20382
20382
  let $ = 0, Y = 0;
20383
- return (N instanceof ir || b.name === "\\oiint" || b.name === "\\oiiint") && !b.suppressBaseShift && ($ = (N.height - N.depth) / 2 - s.fontMetrics().axisHeight, Y = N.italic), f ? Ol(N, o, u, s, w, Y, $) : ($ && (N.style.position = "relative", N.style.top = Me($)), N);
20383
+ return (N instanceof sr || b.name === "\\oiint" || b.name === "\\oiiint") && !b.suppressBaseShift && ($ = (N.height - N.depth) / 2 - s.fontMetrics().axisHeight, Y = N.italic), f ? Ol(N, o, u, s, w, Y, $) : ($ && (N.style.position = "relative", N.style.top = Me($)), N);
20384
20384
  }, ba = (i, s) => {
20385
20385
  let o;
20386
20386
  if (i.symbol)
@@ -20543,7 +20543,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
20543
20543
  }), N = rr(k, s.withFont("mathrm"), !0);
20544
20544
  for (let $ = 0; $ < N.length; $++) {
20545
20545
  const Y = N[$];
20546
- Y instanceof ir && (Y.text = Y.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
20546
+ Y instanceof sr && (Y.text = Y.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
20547
20547
  }
20548
20548
  w = re.makeSpan(["mop"], N, s);
20549
20549
  } else
@@ -21074,7 +21074,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
21074
21074
  let gt = null;
21075
21075
  if (N) {
21076
21076
  const Ct = i.base && i.base.type === "op" && i.base.name && (i.base.name === "\\oiint" || i.base.name === "\\oiiint");
21077
- (w instanceof ir || Ct) && (gt = Me(-w.italic));
21077
+ (w instanceof sr || Ct) && (gt = Me(-w.italic));
21078
21078
  }
21079
21079
  let ht;
21080
21080
  if (k && N) {
@@ -22979,7 +22979,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
22979
22979
  // sign + magnitude, cast to number
22980
22980
  unit: f[3]
22981
22981
  };
22982
- if (!sr(b))
22982
+ if (!ar(b))
22983
22983
  throw new l("Invalid unit: '" + b.unit + "'", o);
22984
22984
  return {
22985
22985
  type: "size",
@@ -23197,7 +23197,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
23197
23197
  }, Ql = function(i, s, o) {
23198
23198
  if (o.throwOnError || !(i instanceof l))
23199
23199
  throw i;
23200
- const u = re.makeSpan(["katex-error"], [new ir(s)]);
23200
+ const u = re.makeSpan(["katex-error"], [new sr(s)]);
23201
23201
  return u.setAttribute("title", i.toString()), u.setAttribute("style", "color:" + o.errorColor), u;
23202
23202
  }, Xi = function(i, s) {
23203
23203
  const o = new I(s);
@@ -23295,7 +23295,7 @@ l0,-` + (s + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
23295
23295
  __domTree: {
23296
23296
  Span: Dt,
23297
23297
  Anchor: Tt,
23298
- SymbolNode: ir,
23298
+ SymbolNode: sr,
23299
23299
  SvgNode: mr,
23300
23300
  PathNode: Sr,
23301
23301
  LineNode: kn
@@ -24161,25 +24161,25 @@ function bd(e, t) {
24161
24161
  case "p":
24162
24162
  a.push({
24163
24163
  type: "paragraph",
24164
- children: or(d, t)
24164
+ children: ir(d, t)
24165
24165
  });
24166
24166
  break;
24167
24167
  case "h1":
24168
24168
  a.push({
24169
24169
  type: "heading-one",
24170
- children: or(d, t)
24170
+ children: ir(d, t)
24171
24171
  });
24172
24172
  break;
24173
24173
  case "h2":
24174
24174
  a.push({
24175
24175
  type: "heading-two",
24176
- children: or(d, t)
24176
+ children: ir(d, t)
24177
24177
  });
24178
24178
  break;
24179
24179
  case "h3":
24180
24180
  a.push({
24181
24181
  type: "heading-three",
24182
- children: or(d, t)
24182
+ children: ir(d, t)
24183
24183
  });
24184
24184
  break;
24185
24185
  case "ul":
@@ -24188,7 +24188,7 @@ function bd(e, t) {
24188
24188
  children: Array.from(d.children).map(
24189
24189
  (p) => ({
24190
24190
  type: "list-item",
24191
- children: or(p)
24191
+ children: ir(p)
24192
24192
  })
24193
24193
  )
24194
24194
  });
@@ -24198,7 +24198,7 @@ function bd(e, t) {
24198
24198
  type: "numbered-list",
24199
24199
  children: Array.from(d.children).map((p) => ({
24200
24200
  type: "list-item",
24201
- children: or(p)
24201
+ children: ir(p)
24202
24202
  }))
24203
24203
  };
24204
24204
  a.push(g);
@@ -24206,29 +24206,29 @@ function bd(e, t) {
24206
24206
  case "li":
24207
24207
  a.push({
24208
24208
  type: "list-item",
24209
- children: or(d, t)
24209
+ children: ir(d, t)
24210
24210
  });
24211
24211
  break;
24212
24212
  case "pre": {
24213
24213
  const p = d.querySelector("code");
24214
24214
  p ? a.push({
24215
24215
  type: "code-block",
24216
- children: or(p)
24216
+ children: ir(p)
24217
24217
  }) : a.push({
24218
24218
  type: "code-block",
24219
- children: or(d, t)
24219
+ children: ir(d, t)
24220
24220
  });
24221
24221
  break;
24222
24222
  }
24223
24223
  case "code": {
24224
24224
  d.closest("pre") || a.push({
24225
24225
  type: "paragraph",
24226
- children: or(d, t)
24226
+ children: ir(d, t)
24227
24227
  });
24228
24228
  break;
24229
24229
  }
24230
24230
  case "retrive-tag": {
24231
- const p = or(d, t);
24231
+ const p = ir(d, t);
24232
24232
  p.length > 0 && a.push({
24233
24233
  type: "paragraph",
24234
24234
  children: p
@@ -24247,7 +24247,7 @@ function bd(e, t) {
24247
24247
  case "blockquote":
24248
24248
  a.push({
24249
24249
  type: "block-quote",
24250
- children: or(d, t)
24250
+ children: ir(d, t)
24251
24251
  });
24252
24252
  break;
24253
24253
  case "table":
@@ -24313,13 +24313,13 @@ function bd(e, t) {
24313
24313
  case "think-block":
24314
24314
  a.push({
24315
24315
  type: "think",
24316
- children: or(d)
24316
+ children: ir(d)
24317
24317
  });
24318
24318
  break;
24319
24319
  default:
24320
24320
  a.push({
24321
24321
  type: "paragraph",
24322
- children: or(d, t)
24322
+ children: ir(d, t)
24323
24323
  });
24324
24324
  break;
24325
24325
  }
@@ -24329,7 +24329,7 @@ function bd(e, t) {
24329
24329
  });
24330
24330
  }), a))(r, e.childNodes), r;
24331
24331
  }
24332
- function or(e, t) {
24332
+ function ir(e, t) {
24333
24333
  const r = [];
24334
24334
  function n(l) {
24335
24335
  const c = [];
@@ -24485,7 +24485,7 @@ function P3(e) {
24485
24485
  (l) => ({
24486
24486
  type: "table-cell",
24487
24487
  header: !0,
24488
- children: or(l)
24488
+ children: ir(l)
24489
24489
  })
24490
24490
  )
24491
24491
  }), a.slice(1).forEach((l) => {
@@ -24495,7 +24495,7 @@ function P3(e) {
24495
24495
  (c) => ({
24496
24496
  type: "table-cell",
24497
24497
  header: !1,
24498
- children: or(c)
24498
+ children: ir(c)
24499
24499
  })
24500
24500
  )
24501
24501
  });
@@ -24509,7 +24509,7 @@ function P3(e) {
24509
24509
  (l) => ({
24510
24510
  type: "table-cell",
24511
24511
  header: !0,
24512
- children: or(l)
24512
+ children: ir(l)
24513
24513
  })
24514
24514
  )
24515
24515
  });
@@ -24521,7 +24521,7 @@ function P3(e) {
24521
24521
  (l) => ({
24522
24522
  type: "table-cell",
24523
24523
  header: !1,
24524
- children: or(l)
24524
+ children: ir(l)
24525
24525
  })
24526
24526
  )
24527
24527
  });
@@ -25947,13 +25947,13 @@ function sh(e) {
25947
25947
  }
25948
25948
  function O6(e) {
25949
25949
  return !Array.isArray(e) || e.length === 0 ? [] : e.map((t, r) => {
25950
- const n = t.businessType || "plan", a = t.nodeStatus || 3;
25950
+ const n = t.businessType || "plan", a = t.nodeStatus || 2, l = t.content || t?.reply?.content || "";
25951
25951
  return {
25952
25952
  id: `${n}-${r}`,
25953
25953
  businessType: n,
25954
25954
  nodeStatus: a,
25955
25955
  title: sh(n),
25956
- content: t.content || "",
25956
+ content: l,
25957
25957
  rawContent: t
25958
25958
  };
25959
25959
  });
@@ -26573,7 +26573,7 @@ const H6 = Ke.div.attrs({
26573
26573
  ), te = ot(() => {
26574
26574
  const W = A || D || T;
26575
26575
  return !W || !R ? null : H3(W).format("YY-MM-DD HH:mm:ss");
26576
- }, [A, D, T, R]), [ie, ye] = mt([]), [Se, Pe] = mt(null), [_e, Be] = mt(!1), [He, tt] = mt(!1), [et, lt] = mt(!1), [bt, Pt] = mt(!1), [Ft, st] = mt(!1), ar = ot(() => {
26576
+ }, [A, D, T, R]), [ie, ye] = mt([]), [Se, Pe] = mt(null), [_e, Be] = mt(!1), [He, tt] = mt(!1), [et, lt] = mt(!1), [bt, Pt] = mt(!1), [Ft, st] = mt(!1), ur = ot(() => {
26577
26577
  if (!ce) return [];
26578
26578
  if (Ee === "v1") return [];
26579
26579
  if (Array.isArray(ke) && ke.length)
@@ -26627,13 +26627,13 @@ const H6 = Ke.div.attrs({
26627
26627
  )
26628
26628
  ] }) }) });
26629
26629
  }, pt = () => {
26630
- if (!ce || Ee === "v1" || g || !ar.length) return null;
26630
+ if (!ce || Ee === "v1" || g) return null;
26631
26631
  const W = c === "ready" ? 2 : 1;
26632
26632
  return /* @__PURE__ */ M.jsx("div", { className: "thought-chain-wrapper ml-[16px] mr-[16px] mt-2", children: /* @__PURE__ */ M.jsx(
26633
26633
  T6,
26634
26634
  {
26635
26635
  mode: a === "stream" ? "live" : "history",
26636
- nodes: ar,
26636
+ nodes: ur,
26637
26637
  status: W
26638
26638
  }
26639
26639
  ) });
@@ -26645,7 +26645,7 @@ const H6 = Ke.div.attrs({
26645
26645
  } catch {
26646
26646
  return [];
26647
26647
  }
26648
- }, [q]), sr = (W, Ae) => {
26648
+ }, [q]), ar = (W, Ae) => {
26649
26649
  const S = W?.metadata?.source || W?.file_path || W?.path || W?.convertedFilePath || W?.parsedFilePath || "", xe = W?.metadata?.title || W?.file_name || "", F = W?.metadata?.id || W?.id || W?.file_id || "", je = pr.find((Ne) => {
26650
26650
  const Ie = Ne?.metadata?.source || Ne?.file_path || Ne?.path || Ne?.convertedFilePath || Ne?.parsedFilePath || "", oe = Ne?.metadata?.title || Ne?.file_name || "", L = Ne?.metadata?.id || Ne?.id || "";
26651
26651
  return F && L && String(F) === String(L) || S && Ie && Ie === S || xe && oe && oe === xe;
@@ -26820,7 +26820,7 @@ const H6 = Ke.div.attrs({
26820
26820
  }
26821
26821
  },
26822
26822
  [Dt]
26823
- ), pn = ot(() => _6(Tt || []), [Tt]), ir = ot(() => {
26823
+ ), pn = ot(() => _6(Tt || []), [Tt]), sr = ot(() => {
26824
26824
  const W = {};
26825
26825
  return pn.forEach((Ae) => {
26826
26826
  Ae?.id && !W[Ae.id] && (W[Ae.id] = Ae.index);
@@ -27202,7 +27202,7 @@ const H6 = Ke.div.attrs({
27202
27202
  }
27203
27203
  }, Ae = (S, xe) => {
27204
27204
  if (!Array.isArray(S)) return [];
27205
- const F = xe?.id ? String(xe.id) : void 0, je = F ? dr(F) : void 0, Ne = F ? ir[F] : void 0, Ie = je ?? Ne ?? xe?.referenceIndex ?? void 0, oe = F && Ie !== void 0 ? [{ id: F, index: Ie }] : [];
27205
+ const F = xe?.id ? String(xe.id) : void 0, je = F ? dr(F) : void 0, Ne = F ? sr[F] : void 0, Ie = je ?? Ne ?? xe?.referenceIndex ?? void 0, oe = F && Ie !== void 0 ? [{ id: F, index: Ie }] : [];
27206
27206
  return S.map((L) => ({
27207
27207
  ...L,
27208
27208
  id: L.id || F || L.tableName,
@@ -27244,7 +27244,7 @@ const H6 = Ke.div.attrs({
27244
27244
  } else
27245
27245
  console.log("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] databaseReference \u4E0D\u5B58\u5728\uFF0C\u6E05\u7A7A databaseData");
27246
27246
  Ht([]);
27247
- }, [I, Ce, le, ir, dr]);
27247
+ }, [I, Ce, le, sr, dr]);
27248
27248
  const x = it(() => {
27249
27249
  try {
27250
27250
  const W = Array.isArray(Qr) ? Qr : [], Ae = Array.isArray(en) ? en : [], S = Array.isArray(wr) ? wr : [], xe = v, F = ea(Tt || []), je = (Je) => typeof Dt != "string" ? !1 : new RegExp(
@@ -27838,7 +27838,7 @@ const H6 = Ke.div.attrs({
27838
27838
  className: "w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",
27839
27839
  onClick: (Mt) => {
27840
27840
  Mt.stopPropagation();
27841
- const Nt = sr(L, Le.id), Wr = L.file_type === "video" ? "3" : "0";
27841
+ const Nt = ar(L, Le.id), Wr = L.file_type === "video" ? "3" : "0";
27842
27842
  pe?.("retrive_tag:click", {
27843
27843
  tagInfo: Nt || L,
27844
27844
  fromtype: Wr,
@@ -28030,7 +28030,7 @@ const H6 = Ke.div.attrs({
28030
28030
  className: "w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",
28031
28031
  onClick: (Mt) => {
28032
28032
  Mt.stopPropagation();
28033
- const Nt = sr(L, Le.id);
28033
+ const Nt = ar(L, Le.id);
28034
28034
  pe?.("retrive_tag:click", {
28035
28035
  tagInfo: Nt || L,
28036
28036
  fromtype: "1",