@qualityunit/liveagent-components-editor 0.0.71 → 0.0.73

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.
Files changed (79) hide show
  1. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  2. package/dist/{af.umd-C27ZwHJ2.js → af.umd-BBObLzF1.js} +3 -3
  3. package/dist/{ar.umd-BLqp6CCu.js → ar.umd-BQViTPOQ.js} +3 -3
  4. package/dist/{ast.umd-C1rOWewa.js → ast.umd-Bg6PaFzl.js} +3 -3
  5. package/dist/{az.umd-CROTGXsE.js → az.umd-CaouW5iZ.js} +3 -3
  6. package/dist/{be.umd-Qd-Jcx0n.js → be.umd-BzIkA30P.js} +3 -3
  7. package/dist/{bg.umd-EeLCsCEB.js → bg.umd-uBmPqgyJ.js} +3 -3
  8. package/dist/{bn.umd-2LZ9jrjw.js → bn.umd-hN3SDLm7.js} +3 -3
  9. package/dist/{bs.umd-Iz0RgF_1.js → bs.umd-BCbvYm6U.js} +3 -3
  10. package/dist/{ca.umd-atSfUWFM.js → ca.umd-e6dlWUZS.js} +3 -3
  11. package/dist/ckeditor.js +1 -1
  12. package/dist/{ckeditor5-CuUFvpkZ.js → ckeditor5-CLjwNlSm.js} +28840 -28065
  13. package/dist/{cs.umd-IFA0pwhE.js → cs.umd-B9WFu8Q_.js} +15 -15
  14. package/dist/{da.umd-D2ZFFi34.js → da.umd-BsFoASnq.js} +3 -3
  15. package/dist/{de-ch.umd-CRQ4jf6E.js → de-ch.umd-Dqre3w4l.js} +3 -3
  16. package/dist/{de.umd-BHOpnqY0.js → de.umd-CBtZSMtH.js} +3 -3
  17. package/dist/editor-lib.js +305 -223
  18. package/dist/{el.umd-CflvwW2M.js → el.umd-CQLf_BdE.js} +3 -3
  19. package/dist/{en-au.umd-D1_HV9RF.js → en-au.umd-DoIPETMX.js} +3 -3
  20. package/dist/{en-gb.umd-DITv7FVz.js → en-gb.umd-BIHRceWg.js} +3 -3
  21. package/dist/{en.umd-CDqSUuQW.js → en.umd-BPvEN8TK.js} +3 -3
  22. package/dist/{eo.umd-Co6XmKvy.js → eo.umd-C8z3wGVR.js} +3 -3
  23. package/dist/{es-co.umd-yRqlp04o.js → es-co.umd-SnkjnX-y.js} +3 -3
  24. package/dist/{es.umd-BO21W2ls.js → es.umd-CuRrShuk.js} +15 -15
  25. package/dist/{et.umd-DS2Y5pWq.js → et.umd-C4qx6dHB.js} +3 -3
  26. package/dist/{eu.umd-U1tl_Z9e.js → eu.umd-DyqBMa0g.js} +3 -3
  27. package/dist/{fa.umd-B8sUrCnR.js → fa.umd-C1JCdzry.js} +3 -3
  28. package/dist/{fi.umd-BqknPWs9.js → fi.umd-8gQMfog4.js} +3 -3
  29. package/dist/{fr.umd-D23X1P0I.js → fr.umd-DWyOAq-t.js} +3 -3
  30. package/dist/{gl.umd-hHLljZA5.js → gl.umd-C-mNOTtJ.js} +3 -3
  31. package/dist/{gu.umd-C8U528M4.js → gu.umd-_SuGRhga.js} +3 -3
  32. package/dist/{he.umd-BOQOcM1n.js → he.umd-CZLQ_Qgf.js} +3 -3
  33. package/dist/{hi.umd-Ctr475eY.js → hi.umd-DfZda_fB.js} +3 -3
  34. package/dist/{hr.umd-w7vqWz2Z.js → hr.umd-ijHs0w9L.js} +3 -3
  35. package/dist/{hu.umd-CQjaOaCp.js → hu.umd-BdapSzii.js} +3 -3
  36. package/dist/{hy.umd-BF4x6itl.js → hy.umd-P_ZtATrt.js} +3 -3
  37. package/dist/{id.umd-CNb5wswI.js → id.umd-DTDOEU5E.js} +3 -3
  38. package/dist/{it.umd-D5PMLNGo.js → it.umd-CA0VOVAJ.js} +3 -3
  39. package/dist/{ja.umd-Dg5Ik2YZ.js → ja.umd-BouhEEJN.js} +3 -3
  40. package/dist/{jv.umd-BWiPxZjh.js → jv.umd-qn0vYgOA.js} +3 -3
  41. package/dist/{kk.umd-QWCeDj3y.js → kk.umd-HmorD17q.js} +3 -3
  42. package/dist/{km.umd-tukqX_Lu.js → km.umd-BSFKxLkR.js} +3 -3
  43. package/dist/{kn.umd-BSH4Bcln.js → kn.umd-DdfSyCeA.js} +3 -3
  44. package/dist/{ko.umd-WtTc6xzf.js → ko.umd--MFZycAu.js} +3 -3
  45. package/dist/{ku.umd-CeueRibs.js → ku.umd-D7Qp5xuL.js} +3 -3
  46. package/dist/liveagent-components-editor.css +1 -1
  47. package/dist/{lt.umd-oQ0FOVNf.js → lt.umd-DMlgaS2R.js} +3 -3
  48. package/dist/{lv.umd-_J3238CQ.js → lv.umd-hhTw_lzs.js} +15 -15
  49. package/dist/{ms.umd-DgNEyPk-.js → ms.umd-CLXIOTQc.js} +3 -3
  50. package/dist/{nb.umd-_MHIp5En.js → nb.umd-WtygHW7n.js} +3 -3
  51. package/dist/{ne.umd-BW5zcY9S.js → ne.umd-eGVoHQDp.js} +3 -3
  52. package/dist/{nl.umd-DYnGxMhY.js → nl.umd-9AOF1osZ.js} +3 -3
  53. package/dist/{no.umd-B0jmgjbP.js → no.umd-CQsGmvN9.js} +3 -3
  54. package/dist/{oc.umd-COQXoRyJ.js → oc.umd-BvjGkAQ4.js} +3 -3
  55. package/dist/{pl.umd-DnVNdQ7Q.js → pl.umd-CXbrv-6g.js} +3 -3
  56. package/dist/{pt-br.umd-BvBvIw8z.js → pt-br.umd-CMP_cp3m.js} +3 -3
  57. package/dist/{pt.umd-BfVbx6wK.js → pt.umd-C7UK6eA9.js} +3 -3
  58. package/dist/{ro.umd-DXX856qe.js → ro.umd-ClzltQIe.js} +15 -15
  59. package/dist/{ru.umd-D0vufQJu.js → ru.umd-C61MQddk.js} +3 -3
  60. package/dist/{si.umd-Boa1nqDY.js → si.umd-CfVEdMdb.js} +3 -3
  61. package/dist/{sk.umd-guuNudzi.js → sk.umd-DDL6D2M-.js} +15 -15
  62. package/dist/{sl.umd-CiM3fESL.js → sl.umd-BQNKhuyZ.js} +15 -15
  63. package/dist/{sq.umd-Dc7jGda3.js → sq.umd-En5urIay.js} +3 -3
  64. package/dist/{sr-latn.umd-BXMQGjVu.js → sr-latn.umd-Dq3e2RkH.js} +3 -3
  65. package/dist/{sr.umd-fiUwgjuB.js → sr.umd-DSwMWmLL.js} +3 -3
  66. package/dist/{sv.umd-CIn156_E.js → sv.umd-CINviyLc.js} +3 -3
  67. package/dist/{th.umd-DEw48tHD.js → th.umd-DalpTEsq.js} +3 -3
  68. package/dist/{ti.umd-BNvQsp3N.js → ti.umd-80TYL5O4.js} +3 -3
  69. package/dist/{tk.umd-B7UkQ7eG.js → tk.umd-BtsH5AGM.js} +3 -3
  70. package/dist/{tr.umd-BPtnVQce.js → tr.umd-DUfc-YeR.js} +3 -3
  71. package/dist/{tt.umd-DjpY-K4D.js → tt.umd-Bp2igUrV.js} +3 -3
  72. package/dist/{ug.umd-3fy2fG9G.js → ug.umd-Dz5Ly_CG.js} +3 -3
  73. package/dist/{uk.umd-UQjUeNAz.js → uk.umd-DXH3QnIS.js} +3 -3
  74. package/dist/{ur.umd-Cf0qVN-P.js → ur.umd-zyim_cMs.js} +3 -3
  75. package/dist/{uz.umd-tqNZF-B8.js → uz.umd-DZrGhXJY.js} +3 -3
  76. package/dist/{vi.umd-D6BXvM2I.js → vi.umd-CdLU1ET0.js} +3 -3
  77. package/dist/{zh-cn.umd-CbKYIaRD.js → zh-cn.umd-pCBgqBkC.js} +3 -3
  78. package/dist/{zh.umd-RKAzErpU.js → zh.umd-DVrcBwy5.js} +3 -3
  79. package/package.json +6 -6
@@ -1,165 +1,230 @@
1
- import { b as Q, E as oe, r as k, a as w, p as q, U as ve, h as g, c as W, d as $, H as ce, e as j, f as B, s as F, i as I, j as y, k as A, l as _e, I as U, m as ee, n as Z, o as he, q as de, t as z, u as be, v as ge, w as me, x as Ee, y as pe, z as Te, A as ye, B as Ae, C as Ie, D as Ne, N as Se, F as Me, G as He, J as ke, K as we, L as Re, M as Ce, O as te, P as ae, Q as Le, R as M, S as re, T as D, V, W as R, X as ne, Y as H, Z as C, _ as K, $ as L, a0 as De, a1 as Pe, a2 as Oe, a3 as Ue } from "./ckeditor5-CuUFvpkZ.js";
2
- function Ve(e, t, [a, r] = [0, 0]) {
3
- g && a === 0 && W();
4
- var n = e, l = null, f = null, o = ve, _ = a > 0 ? oe : 0, d = !1;
5
- const i = (u, s = !0) => {
6
- d = !0, c(s, u);
7
- }, c = (u, s) => {
8
- if (o === (o = u)) return;
1
+ import { b as ae, E as pe, c as te, a as D, d as S, U as ye, s as re, r as $, p as ne, h as y, e as se, f as le, H as ie, g as z, i as G, j as H, k as w, l as x, m as Te, n as Ae, o as Ne, q as j, t as fe, u as Me, v as xe, w as Ie, x as Se, I as Y, y as ue, z as we, A as Ce, B as He, C as De, D as Re, F as ke, G as Le, N as Pe, J as Oe, K as Fe, L as Ue, M as Ve, O as L, P as qe, Q as Be, R as ve, S as Ye, T as P, V as oe, W as q, X as K, Y as F, Z as ce, _ as de, $ as O, a0 as U, a1 as J, a2 as V, a3 as Ke, a4 as We, a5 as Xe, a6 as Ze } from "./ckeditor5-CLjwNlSm.js";
2
+ function ze(e, t, a = !1) {
3
+ y && se();
4
+ var r = e, n = null, f = null, s = ye, c = a ? pe : 0, o = !1;
5
+ const E = (u, i = !0) => {
6
+ o = !0, l(i, u);
7
+ };
8
+ var d = null;
9
+ function m() {
10
+ d !== null && (d.lastChild.remove(), r.before(d), d = null);
11
+ var u = s ? n : f, i = s ? f : n;
12
+ u && $(u), i && ne(i, () => {
13
+ s ? f = null : n = null;
14
+ });
15
+ }
16
+ const l = (u, i) => {
17
+ if (s === (s = u)) return;
9
18
  let v = !1;
10
- if (g && r !== -1) {
11
- if (a === 0) {
12
- const b = $(n);
13
- b === ce ? r = 0 : b === j ? r = 1 / 0 : (r = parseInt(b.substring(1)), r !== r && (r = o ? 1 / 0 : -1));
14
- }
15
- const m = r > a;
16
- !!o === m && (n = B(), F(n), I(!1), v = !0, r = -1);
19
+ if (y) {
20
+ const p = le(r) === ie;
21
+ !!s === p && (r = z(), G(r), H(!1), v = !0);
17
22
  }
18
- o ? (l ? k(l) : s && (l = w(() => s(n))), f && q(f, () => {
19
- f = null;
20
- })) : (f ? k(f) : s && (f = w(() => s(n, [a + 1, r]))), l && q(l, () => {
21
- l = null;
22
- })), v && I(!0);
23
+ var b = re(), N = r;
24
+ if (b && (d = document.createDocumentFragment(), d.append(N = te())), s ? n ??= i && D(() => i(N)) : f ??= i && D(() => i(N)), b) {
25
+ var g = (
26
+ /** @type {Batch} */
27
+ S
28
+ ), _ = s ? n : f, h = s ? f : n;
29
+ _ && g.skipped_effects.delete(_), h && g.skipped_effects.add(h), g.add_callback(m);
30
+ } else
31
+ m();
32
+ v && H(!0);
23
33
  };
24
- Q(() => {
25
- d = !1, t(i), d || c(null, null);
26
- }, _), g && (n = y);
34
+ ae(() => {
35
+ o = !1, t(E), o || l(null, null);
36
+ }, c), y && (r = w);
27
37
  }
28
- function xe(e, t) {
38
+ function Ge(e, t) {
29
39
  return t;
30
40
  }
31
- function Ye(e, t, a, r) {
32
- for (var n = [], l = t.length, f = 0; f < l; f++)
33
- me(t[f].e, n, !0);
34
- var o = l > 0 && n.length === 0 && a !== null;
35
- if (o) {
36
- var _ = (
41
+ function Je(e, t, a) {
42
+ for (var r = e.items, n = [], f = t.length, s = 0; s < f; s++)
43
+ Ce(t[s].e, n, !0);
44
+ var c = f > 0 && n.length === 0 && a !== null;
45
+ if (c) {
46
+ var o = (
37
47
  /** @type {Element} */
38
48
  /** @type {Element} */
39
49
  a.parentNode
40
50
  );
41
- Ee(_), _.append(
51
+ He(o), o.append(
42
52
  /** @type {Element} */
43
53
  a
44
- ), r.clear(), T(e, t[0].prev, t[l - 1].next);
54
+ ), r.clear(), M(e, t[0].prev, t[f - 1].next);
45
55
  }
46
- pe(n, () => {
47
- for (var d = 0; d < l; d++) {
48
- var i = t[d];
49
- o || (r.delete(i.k), T(e, i.prev, i.next)), Te(i.e, !o);
56
+ De(n, () => {
57
+ for (var E = 0; E < f; E++) {
58
+ var d = t[E];
59
+ c || (r.delete(d.k), M(e, d.prev, d.next)), ue(d.e, !c);
50
60
  }
51
61
  });
52
62
  }
53
- function qe(e, t, a, r, n, l = null) {
54
- var f = e, o = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
55
- g && W();
56
- var _ = null, d = !1, i = _e(() => {
57
- var c = a();
58
- return be(c) ? c : c == null ? [] : ee(c);
59
- });
60
- Q(() => {
61
- var c = A(i), u = c.length;
62
- if (d && u === 0)
63
+ function Qe(e, t, a, r, n, f = null) {
64
+ var s = e, c = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
65
+ y && se();
66
+ var o = null, E = !1, d = /* @__PURE__ */ new Map(), m = Te(() => {
67
+ var v = a();
68
+ return Me(v) ? v : v == null ? [] : fe(v);
69
+ }), l, u;
70
+ function i() {
71
+ $e(
72
+ u,
73
+ l,
74
+ c,
75
+ d,
76
+ s,
77
+ n,
78
+ t,
79
+ r,
80
+ a
81
+ ), f !== null && (l.length === 0 ? o ? $(o) : o = D(() => f(s)) : o !== null && ne(o, () => {
82
+ o = null;
83
+ }));
84
+ }
85
+ ae(() => {
86
+ u ??= /** @type {Effect} */
87
+ Re, l = x(m);
88
+ var v = l.length;
89
+ if (E && v === 0)
63
90
  return;
64
- d = u === 0;
65
- let s = !1;
66
- if (g) {
67
- var v = $(f) === j;
68
- v !== (u === 0) && (f = B(), F(f), I(!1), s = !0);
91
+ E = v === 0;
92
+ let b = !1;
93
+ if (y) {
94
+ var N = le(s) === ie;
95
+ N !== (v === 0) && (s = z(), G(s), H(!1), b = !0);
69
96
  }
70
- if (g) {
71
- for (var m = null, b, h = 0; h < u; h++) {
72
- if (y.nodeType === 8 && /** @type {Comment} */
73
- y.data === Ne) {
74
- f = /** @type {Comment} */
75
- y, s = !0, I(!1);
97
+ if (y) {
98
+ for (var g = null, _, h = 0; h < v; h++) {
99
+ if (w.nodeType === ke && /** @type {Comment} */
100
+ w.data === Le) {
101
+ s = /** @type {Comment} */
102
+ w, b = !0, H(!1);
76
103
  break;
77
104
  }
78
- var E = c[h], N = r(E, h);
79
- b = se(
80
- y,
81
- o,
82
- m,
105
+ var p = l[h], T = r(p, h);
106
+ _ = Q(
107
+ w,
108
+ c,
109
+ g,
83
110
  null,
84
- E,
85
- N,
111
+ p,
112
+ T,
86
113
  h,
87
114
  n,
88
115
  t,
89
116
  a
90
- ), o.items.set(N, b), m = b;
117
+ ), c.items.set(T, _), g = _;
91
118
  }
92
- u > 0 && F(B());
119
+ v > 0 && G(z());
93
120
  }
94
- g || Be(c, o, f, n, t, r, a), l !== null && (u === 0 ? _ ? k(_) : _ = w(() => l(f)) : _ !== null && q(_, () => {
95
- _ = null;
96
- })), s && I(!0), A(i);
97
- }), g && (f = y);
121
+ if (y)
122
+ v === 0 && f && (o = D(() => f(s)));
123
+ else if (re()) {
124
+ var R = /* @__PURE__ */ new Set(), I = (
125
+ /** @type {Batch} */
126
+ S
127
+ );
128
+ for (h = 0; h < v; h += 1) {
129
+ p = l[h], T = r(p, h);
130
+ var A = c.items.get(T) ?? d.get(T);
131
+ A ? _e(A, p, h) : (_ = Q(
132
+ null,
133
+ c,
134
+ null,
135
+ null,
136
+ p,
137
+ T,
138
+ h,
139
+ n,
140
+ t,
141
+ a,
142
+ !0
143
+ ), d.set(T, _)), R.add(T);
144
+ }
145
+ for (const [k, C] of c.items)
146
+ R.has(k) || I.skipped_effects.add(C.e);
147
+ I.add_callback(i);
148
+ } else
149
+ i();
150
+ b && H(!0), x(m);
151
+ }), y && (s = w);
98
152
  }
99
- function Be(e, t, a, r, n, l, f) {
100
- var o = e.length, _ = t.items, d = t.first, i = d, c, u = null, s = [], v = [], m, b, h, E;
101
- for (E = 0; E < o; E += 1) {
102
- if (m = e[E], b = l(m, E), h = _.get(b), h === void 0) {
103
- var N = i ? (
104
- /** @type {TemplateNode} */
105
- i.e.nodes_start
106
- ) : a;
107
- u = se(
108
- N,
109
- t,
110
- u,
111
- u === null ? t.first : u.next,
112
- m,
113
- b,
114
- E,
115
- r,
116
- n,
117
- f
118
- ), _.set(b, u), s = [], v = [], i = u.next;
153
+ function $e(e, t, a, r, n, f, s, c, o) {
154
+ var E = t.length, d = a.items, m = a.first, l = m, u, i = null, v = [], b = [], N, g, _, h;
155
+ for (h = 0; h < E; h += 1) {
156
+ if (N = t[h], g = c(N, h), _ = d.get(g), _ === void 0) {
157
+ var p = r.get(g);
158
+ if (p !== void 0) {
159
+ r.delete(g), d.set(g, p);
160
+ var T = i ? i.next : l;
161
+ M(a, i, p), M(a, p, T), W(p, T, n), i = p;
162
+ } else {
163
+ var R = l ? (
164
+ /** @type {TemplateNode} */
165
+ l.e.nodes_start
166
+ ) : n;
167
+ i = Q(
168
+ R,
169
+ a,
170
+ i,
171
+ i === null ? a.first : i.next,
172
+ N,
173
+ g,
174
+ h,
175
+ f,
176
+ s,
177
+ o
178
+ );
179
+ }
180
+ d.set(g, i), v = [], b = [], l = i.next;
119
181
  continue;
120
182
  }
121
- if (Fe(h, m, E), (h.e.f & U) !== 0 && k(h.e), h !== i) {
122
- if (c !== void 0 && c.has(h)) {
123
- if (s.length < v.length) {
124
- var S = v[0], p;
125
- u = S.prev;
126
- var X = s[0], P = s[s.length - 1];
127
- for (p = 0; p < s.length; p += 1)
128
- G(s[p], S, a);
129
- for (p = 0; p < v.length; p += 1)
130
- c.delete(v[p]);
131
- T(t, X.prev, P.next), T(t, u, X), T(t, P, S), i = S, u = P, E -= 1, s = [], v = [];
183
+ if (_e(_, N, h), (_.e.f & Y) !== 0 && $(_.e), _ !== l) {
184
+ if (u !== void 0 && u.has(_)) {
185
+ if (v.length < b.length) {
186
+ var I = b[0], A;
187
+ i = I.prev;
188
+ var k = v[0], C = v[v.length - 1];
189
+ for (A = 0; A < v.length; A += 1)
190
+ W(v[A], I, n);
191
+ for (A = 0; A < b.length; A += 1)
192
+ u.delete(b[A]);
193
+ M(a, k.prev, C.next), M(a, i, k), M(a, C, I), l = I, i = C, h -= 1, v = [], b = [];
132
194
  } else
133
- c.delete(h), G(h, i, a), T(t, h.prev, h.next), T(t, h, u === null ? t.first : u.next), T(t, u, h), u = h;
195
+ u.delete(_), W(_, l, n), M(a, _.prev, _.next), M(a, _, i === null ? a.first : i.next), M(a, i, _), i = _;
134
196
  continue;
135
197
  }
136
- for (s = [], v = []; i !== null && i.k !== b; )
137
- (i.e.f & U) === 0 && (c ?? (c = /* @__PURE__ */ new Set())).add(i), v.push(i), i = i.next;
138
- if (i === null)
198
+ for (v = [], b = []; l !== null && l.k !== g; )
199
+ (l.e.f & Y) === 0 && (u ??= /* @__PURE__ */ new Set()).add(l), b.push(l), l = l.next;
200
+ if (l === null)
139
201
  continue;
140
- h = i;
202
+ _ = l;
141
203
  }
142
- s.push(h), u = h, i = h.next;
204
+ v.push(_), i = _, l = _.next;
143
205
  }
144
- if (i !== null || c !== void 0) {
145
- for (var O = c === void 0 ? [] : ee(c); i !== null; )
146
- (i.e.f & U) === 0 && O.push(i), i = i.next;
147
- var ue = O.length;
148
- if (ue > 0) {
149
- var fe = null;
150
- Ye(t, O, fe, _);
206
+ if (l !== null || u !== void 0) {
207
+ for (var B = u === void 0 ? [] : fe(u); l !== null; )
208
+ (l.e.f & Y) === 0 && B.push(l), l = l.next;
209
+ var be = B.length;
210
+ if (be > 0) {
211
+ var Ee = null;
212
+ Je(a, B, Ee);
151
213
  }
152
214
  }
153
- Z.first = t.first && t.first.e, Z.last = u && u.e;
215
+ e.first = a.first && a.first.e, e.last = i && i.e;
216
+ for (var ge of r.values())
217
+ ue(ge.e);
218
+ r.clear();
154
219
  }
155
- function Fe(e, t, a, r) {
156
- he(e.v, t), e.i = a;
220
+ function _e(e, t, a, r) {
221
+ Ae(e.v, t), e.i = a;
157
222
  }
158
- function se(e, t, a, r, n, l, f, o, _, d) {
159
- var i = (_ & Ae) !== 0, c = (_ & Ie) === 0, u = i ? c ? de(n) : z(n) : n, s = (_ & ge) === 0 ? f : z(f), v = {
160
- i: s,
223
+ function Q(e, t, a, r, n, f, s, c, o, E, d) {
224
+ var m = (o & Ie) !== 0, l = (o & Se) === 0, u = m ? l ? Ne(n, !1, !1) : j(n) : n, i = (o & xe) === 0 ? s : j(s), v = {
225
+ i,
161
226
  v: u,
162
- k: l,
227
+ k: f,
163
228
  a: null,
164
229
  // @ts-expect-error
165
230
  e: null,
@@ -167,203 +232,220 @@ function se(e, t, a, r, n, l, f, o, _, d) {
167
232
  next: r
168
233
  };
169
234
  try {
170
- return v.e = w(() => o(e, u, s, d), g), v.e.prev = a && a.e, v.e.next = r && r.e, a === null ? t.first = v : (a.next = v, a.e.next = v.e), r !== null && (r.prev = v, r.e.prev = v.e), v;
235
+ if (e === null) {
236
+ var b = document.createDocumentFragment();
237
+ b.append(e = te());
238
+ }
239
+ return v.e = D(() => c(
240
+ /** @type {Node} */
241
+ e,
242
+ u,
243
+ i,
244
+ E
245
+ ), y), v.e.prev = a && a.e, v.e.next = r && r.e, a === null ? d || (t.first = v) : (a.next = v, a.e.next = v.e), r !== null && (r.prev = v, r.e.prev = v.e), v;
171
246
  } finally {
172
247
  }
173
248
  }
174
- function G(e, t, a) {
249
+ function W(e, t, a) {
175
250
  for (var r = e.next ? (
176
251
  /** @type {TemplateNode} */
177
252
  e.next.e.nodes_start
178
253
  ) : a, n = t ? (
179
254
  /** @type {TemplateNode} */
180
255
  t.e.nodes_start
181
- ) : a, l = (
256
+ ) : a, f = (
182
257
  /** @type {TemplateNode} */
183
258
  e.e.nodes_start
184
- ); l !== r; ) {
185
- var f = (
259
+ ); f !== null && f !== r; ) {
260
+ var s = (
186
261
  /** @type {TemplateNode} */
187
- ye(l)
262
+ we(f)
188
263
  );
189
- n.before(l), l = f;
264
+ n.before(f), f = s;
190
265
  }
191
266
  }
192
- function T(e, t, a) {
267
+ function M(e, t, a) {
193
268
  t === null ? e.first = a : (t.next = a, t.e.next = a && a.e), a !== null && (a.prev = t, a.e.prev = t && t.e);
194
269
  }
195
- function le(e) {
270
+ function he(e) {
196
271
  var t, a, r = "";
197
272
  if (typeof e == "string" || typeof e == "number") r += e;
198
273
  else if (typeof e == "object") if (Array.isArray(e)) {
199
274
  var n = e.length;
200
- for (t = 0; t < n; t++) e[t] && (a = le(e[t])) && (r && (r += " "), r += a);
275
+ for (t = 0; t < n; t++) e[t] && (a = he(e[t])) && (r && (r += " "), r += a);
201
276
  } else for (a in e) e[a] && (r && (r += " "), r += a);
202
277
  return r;
203
278
  }
204
- function Ke() {
205
- for (var e, t, a = 0, r = "", n = arguments.length; a < n; a++) (e = arguments[a]) && (t = le(e)) && (r && (r += " "), r += t);
279
+ function je() {
280
+ for (var e, t, a = 0, r = "", n = arguments.length; a < n; a++) (e = arguments[a]) && (t = he(e)) && (r && (r += " "), r += t);
206
281
  return r;
207
282
  }
208
- function Xe(e) {
209
- return typeof e == "object" ? Ke(e) : e ?? "";
283
+ function ea(e) {
284
+ return typeof e == "object" ? je(e) : e ?? "";
210
285
  }
211
- function Ze(e, t, a) {
286
+ function aa(e, t, a) {
212
287
  var r = e == null ? "" : "" + e;
213
288
  return r === "" ? null : r;
214
289
  }
215
- function ze(e, t, a, r, n, l) {
216
- var f = e.__className;
217
- if (g || f !== a || f === void 0) {
218
- var o = Ze(a);
219
- (!g || o !== e.getAttribute("class")) && (o == null ? e.removeAttribute("class") : e.className = o), e.__className = a;
290
+ function ta(e, t, a, r, n, f) {
291
+ var s = e.__className;
292
+ if (y || s !== a || s === void 0) {
293
+ var c = aa(a);
294
+ (!y || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = a;
220
295
  }
221
- return l;
296
+ return f;
222
297
  }
223
- const Ge = Symbol("is custom element"), Je = Symbol("is html");
224
- function Qe(e, t, a, r) {
225
- var n = We(e);
226
- g && (n[t] = e.getAttribute(t)), n[t] !== (n[t] = a) && (a == null ? e.removeAttribute(t) : typeof a != "string" && $e(e).includes(t) ? e[t] = a : e.setAttribute(t, a));
298
+ const ra = Symbol("is custom element"), na = Symbol("is html");
299
+ function sa(e, t, a, r) {
300
+ var n = la(e);
301
+ y && (n[t] = e.getAttribute(t)), n[t] !== (n[t] = a) && (a == null ? e.removeAttribute(t) : typeof a != "string" && ia(e).includes(t) ? e[t] = a : e.setAttribute(t, a));
227
302
  }
228
- function We(e) {
303
+ function la(e) {
229
304
  return (
230
305
  /** @type {Record<string | symbol, unknown>} **/
231
306
  // @ts-expect-error
232
- e.__attributes ?? (e.__attributes = {
233
- [Ge]: e.nodeName.includes("-"),
234
- [Je]: e.namespaceURI === Se
235
- })
307
+ e.__attributes ??= {
308
+ [ra]: e.nodeName.includes("-"),
309
+ [na]: e.namespaceURI === Pe
310
+ }
236
311
  );
237
312
  }
238
- var J = /* @__PURE__ */ new Map();
239
- function $e(e) {
240
- var t = J.get(e.nodeName);
313
+ var ee = /* @__PURE__ */ new Map();
314
+ function ia(e) {
315
+ var t = ee.get(e.nodeName);
241
316
  if (t) return t;
242
- J.set(e.nodeName, t = []);
317
+ ee.set(e.nodeName, t = []);
243
318
  for (var a, r = e, n = Element.prototype; n !== r; ) {
244
- a = He(r);
245
- for (var l in a)
246
- a[l].set && t.push(l);
247
- r = Me(r);
319
+ a = Fe(r);
320
+ for (var f in a)
321
+ a[f].set && t.push(f);
322
+ r = Oe(r);
248
323
  }
249
324
  return t;
250
325
  }
251
- function je(e, t, a = t) {
252
- var r = ke();
253
- we(e, "input", (n) => {
254
- var l = n ? e.defaultValue : e.value;
255
- if (l = x(e) ? Y(l) : l, a(l), r && l !== (l = t())) {
256
- var f = e.selectionStart, o = e.selectionEnd;
257
- e.value = l ?? "", o !== null && (e.selectionStart = f, e.selectionEnd = Math.min(o, e.value.length));
326
+ function fa(e, t, a = t) {
327
+ var r = Ue(), n = /* @__PURE__ */ new WeakSet();
328
+ Ve(e, "input", (f) => {
329
+ var s = f ? e.defaultValue : e.value;
330
+ if (s = X(e) ? Z(s) : s, a(s), S !== null && n.add(S), r && s !== (s = t())) {
331
+ var c = e.selectionStart, o = e.selectionEnd;
332
+ e.value = s ?? "", o !== null && (e.selectionStart = c, e.selectionEnd = Math.min(o, e.value.length));
258
333
  }
259
334
  }), // If we are hydrating and the value has since changed,
260
335
  // then use the updated value from the input instead.
261
- (g && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
336
+ (y && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
262
337
  // TODO Svelte 6: remove input.value check and set to empty string?
263
- Re(t) == null && e.value) && a(x(e) ? Y(e.value) : e.value), Ce(() => {
264
- var n = t();
265
- x(e) && n === Y(e.value) || e.type === "date" && !n && !e.value || n !== e.value && (e.value = n ?? "");
338
+ L(t) == null && e.value) && (a(X(e) ? Z(e.value) : e.value), S !== null && n.add(S)), qe(() => {
339
+ var f = t();
340
+ if (e === document.activeElement) {
341
+ var s = (
342
+ /** @type {Batch} */
343
+ Be ?? S
344
+ );
345
+ if (n.has(s))
346
+ return;
347
+ }
348
+ X(e) && f === Z(e.value) || e.type === "date" && !f && !e.value || f !== e.value && (e.value = f ?? "");
266
349
  });
267
350
  }
268
- function x(e) {
351
+ function X(e) {
269
352
  var t = e.type;
270
353
  return t === "number" || t === "range";
271
354
  }
272
- function Y(e) {
355
+ function Z(e) {
273
356
  return e === "" ? null : +e;
274
357
  }
275
- var et = D("<button> </button>"), tt = D('<div><button class="HTMLEditor">HTML</button> <button class="PlainEditor">Plain</button> <!></div>');
276
- function ie(e, t) {
277
- ae(t, !1);
278
- const a = Le();
279
- let r = M(t, "buttons", 28, () => []);
358
+ var ua = q("<button> </button>"), va = q('<div><button class="HTMLEditor">HTML</button> <button class="PlainEditor">Plain</button> <!></div>');
359
+ function me(e, t) {
360
+ de(t, !1);
361
+ const a = Ye();
362
+ let r = P(t, "buttons", 28, () => []);
280
363
  function n() {
281
364
  a("html", {});
282
365
  }
283
- function l() {
366
+ function f() {
284
367
  a("plain", {});
285
368
  }
286
- re();
287
- var f = tt(), o = C(f), _ = K(o, 2), d = K(_, 2);
288
- return qe(d, 1, r, xe, (i, c) => {
289
- var u = et(), s = C(u, !0);
290
- L(u), De(() => {
291
- ze(u, 1, Xe(A(c).style)), Qe(u, "title", A(c).text), Pe(s, A(c).text);
292
- }), V("click", u, function(...v) {
293
- var m;
294
- (m = A(c).handler) == null || m.apply(this, v);
295
- }), R(i, u);
296
- }), L(f), V("click", o, n), V("click", _, l), R(e, f), ne({
369
+ oe();
370
+ var s = va(), c = U(s), o = J(c, 2), E = J(o, 2);
371
+ return Qe(E, 1, r, Ge, (d, m) => {
372
+ var l = ua(), u = U(l, !0);
373
+ V(l), Ke(() => {
374
+ ta(l, 1, ea((x(m), L(() => x(m).style)))), sa(l, "title", (x(m), L(() => x(m).text))), We(u, (x(m), L(() => x(m).text)));
375
+ }), K("click", l, function(...i) {
376
+ x(m).handler?.apply(this, i);
377
+ }), F(d, l);
378
+ }), V(s), K("click", c, n), K("click", o, f), F(e, s), ce({
297
379
  get buttons() {
298
380
  return r();
299
381
  },
300
- set buttons(i) {
301
- r(i), H();
382
+ set buttons(d) {
383
+ r(d), O();
302
384
  }
303
385
  });
304
386
  }
305
- te(ie, { buttons: {} }, [], [], !0);
306
- var at = D("<textarea></textarea>"), rt = D('<main><div class="Editor"><!></div> <!></main>');
307
- function nt(e, t) {
308
- ae(t, !1);
309
- let a = M(t, "value", 12, ""), r = M(t, "buttons", 28, () => []), n = M(t, "html", 12, !0);
310
- function l() {
387
+ ve(me, { buttons: {} }, [], [], !0);
388
+ var oa = q("<textarea></textarea>"), ca = q('<main><div class="Editor"><!></div> <!></main>');
389
+ function da(e, t) {
390
+ de(t, !1);
391
+ let a = P(t, "value", 12, ""), r = P(t, "buttons", 28, () => []), n = P(t, "html", 12, !0);
392
+ function f() {
311
393
  n() || n(!0);
312
394
  }
313
- function f() {
395
+ function s() {
314
396
  n() && (a(a().replace(/<[^>]*>?/gm, "")), n(!1));
315
397
  }
316
- re();
317
- var o = rt(), _ = C(o), d = C(_);
398
+ oe();
399
+ var c = ca(), o = U(c), E = U(o);
318
400
  {
319
- var i = (s) => {
320
- Oe(s, {
401
+ var d = (u) => {
402
+ Xe(u, {
321
403
  get value() {
322
404
  return a();
323
405
  },
324
- set value(v) {
325
- a(v);
406
+ set value(i) {
407
+ a(i);
326
408
  },
327
409
  $$legacy: !0
328
410
  });
329
- }, c = (s) => {
330
- var v = at();
331
- Ue(v), je(v, a), R(s, v);
411
+ }, m = (u) => {
412
+ var i = oa();
413
+ Ze(i), fa(i, a), F(u, i);
332
414
  };
333
- Ve(d, (s) => {
334
- n() ? s(i) : s(c, !1);
415
+ ze(E, (u) => {
416
+ n() ? u(d) : u(m, !1);
335
417
  });
336
418
  }
337
- L(_);
338
- var u = K(_, 2);
339
- return ie(u, {
419
+ V(o);
420
+ var l = J(o, 2);
421
+ return me(l, {
340
422
  get buttons() {
341
423
  return r();
342
424
  },
343
- set buttons(s) {
344
- r(s);
425
+ set buttons(u) {
426
+ r(u);
345
427
  },
346
- $$events: { html: l, plain: f },
428
+ $$events: { html: f, plain: s },
347
429
  $$legacy: !0
348
- }), L(o), R(e, o), ne({
430
+ }), V(c), F(e, c), ce({
349
431
  get value() {
350
432
  return a();
351
433
  },
352
- set value(s) {
353
- a(s), H();
434
+ set value(u) {
435
+ a(u), O();
354
436
  },
355
437
  get buttons() {
356
438
  return r();
357
439
  },
358
- set buttons(s) {
359
- r(s), H();
440
+ set buttons(u) {
441
+ r(u), O();
360
442
  },
361
443
  get html() {
362
444
  return n();
363
445
  },
364
- set html(s) {
365
- n(s), H();
446
+ set html(u) {
447
+ n(u), O();
366
448
  }
367
449
  });
368
450
  }
369
- customElements.define("switchable-editor", te(nt, { value: {}, buttons: {}, html: {} }, [], [], !1));
451
+ customElements.define("switchable-editor", ve(da, { value: {}, buttons: {}, html: {} }, [], [], !1));