davis-components 0.2.76 → 0.2.78
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/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1 -32
- package/package.json +1 -1
- package/dist/html-to-draftjs-B9AEVXud.cjs +0 -3
- package/dist/html-to-draftjs-RFZV05xC.js +0 -175
- package/dist/immutable-1xGvJqMq.cjs +0 -1
- package/dist/immutable-rR_5sPGm.js +0 -2632
- package/dist/main-6LokR9lF.cjs +0 -75
- package/dist/main-BPyH3ZgY.cjs +0 -9
- package/dist/main-BmaRtLds.js +0 -19154
- package/dist/main-DCskLi4i.js +0 -569
- package/dist/main.css +0 -1
- package/dist/react-draft-wysiwyg-Cv7mdYFM.js +0 -4056
- package/dist/react-draft-wysiwyg-RPH5IU8c.cjs +0 -9
|
@@ -1,4056 +0,0 @@
|
|
|
1
|
-
import { g as ni, D as oi } from "./main-BmaRtLds.js";
|
|
2
|
-
import ri from "react";
|
|
3
|
-
import { r as ii } from "./immutable-rR_5sPGm.js";
|
|
4
|
-
function ai(Ge, rt) {
|
|
5
|
-
for (var Ze = 0; Ze < rt.length; Ze++) {
|
|
6
|
-
const ze = rt[Ze];
|
|
7
|
-
if (typeof ze != "string" && !Array.isArray(ze)) {
|
|
8
|
-
for (const Qe in ze)
|
|
9
|
-
if (Qe !== "default" && !(Qe in Ge)) {
|
|
10
|
-
const pe = Object.getOwnPropertyDescriptor(ze, Qe);
|
|
11
|
-
pe && Object.defineProperty(Ge, Qe, pe.get ? pe : {
|
|
12
|
-
enumerable: !0,
|
|
13
|
-
get: () => ze[Qe]
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return Object.freeze(Object.defineProperty(Ge, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
-
}
|
|
20
|
-
var Mo = { exports: {} };
|
|
21
|
-
(function(Ge, rt) {
|
|
22
|
-
(function(Ze, ze) {
|
|
23
|
-
Ge.exports = ze(ri, oi, ii());
|
|
24
|
-
})(window, function(Ze, ze, Qe) {
|
|
25
|
-
return Je = {}, pe.m = Rt = [function(S, A, E) {
|
|
26
|
-
S.exports = E(10)();
|
|
27
|
-
}, function(S, A) {
|
|
28
|
-
S.exports = Ze;
|
|
29
|
-
}, function(S, A, E) {
|
|
30
|
-
var C;
|
|
31
|
-
/*!
|
|
32
|
-
Copyright (c) 2017 Jed Watson.
|
|
33
|
-
Licensed under the MIT License (MIT), see
|
|
34
|
-
http://jedwatson.github.io/classnames
|
|
35
|
-
*/
|
|
36
|
-
(function() {
|
|
37
|
-
var s = {}.hasOwnProperty;
|
|
38
|
-
function ce() {
|
|
39
|
-
for (var d = [], L = 0; L < arguments.length; L++) {
|
|
40
|
-
var g = arguments[L];
|
|
41
|
-
if (g) {
|
|
42
|
-
var w = typeof g;
|
|
43
|
-
if (w == "string" || w == "number") d.push(g);
|
|
44
|
-
else if (Array.isArray(g) && g.length) {
|
|
45
|
-
var y = ce.apply(null, g);
|
|
46
|
-
y && d.push(y);
|
|
47
|
-
} else if (w == "object") for (var P in g) s.call(g, P) && g[P] && d.push(P);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return d.join(" ");
|
|
51
|
-
}
|
|
52
|
-
S.exports ? (ce.default = ce, S.exports = ce) : (C = function() {
|
|
53
|
-
return ce;
|
|
54
|
-
}.apply(A, [])) === void 0 || (S.exports = C);
|
|
55
|
-
})();
|
|
56
|
-
}, function(S, A) {
|
|
57
|
-
S.exports = ze;
|
|
58
|
-
}, function(S, A, E) {
|
|
59
|
-
function C(g) {
|
|
60
|
-
if (L[g]) return L[g].exports;
|
|
61
|
-
var w = L[g] = { i: g, l: !1, exports: {} };
|
|
62
|
-
return d[g].call(w.exports, w, w.exports, C), w.l = !0, w.exports;
|
|
63
|
-
}
|
|
64
|
-
var s, ce, d, L;
|
|
65
|
-
S.exports = (s = E(3), ce = E(5), L = {}, C.m = d = [function(g, w) {
|
|
66
|
-
g.exports = s;
|
|
67
|
-
}, function(g, w) {
|
|
68
|
-
g.exports = ce;
|
|
69
|
-
}, function(g, w, y) {
|
|
70
|
-
g.exports = y(3);
|
|
71
|
-
}, function(g, w, y) {
|
|
72
|
-
y.r(w);
|
|
73
|
-
var P = y(0), K = y(1);
|
|
74
|
-
function xe(h) {
|
|
75
|
-
var M = h.getSelection(), D = h.getCurrentContent(), O = M.getStartKey(), k = M.getEndKey(), F = D.getBlockMap();
|
|
76
|
-
return F.toSeq().skipUntil(function(Z, B) {
|
|
77
|
-
return B === O;
|
|
78
|
-
}).takeUntil(function(Z, B) {
|
|
79
|
-
return B === k;
|
|
80
|
-
}).concat([[k, F.get(k)]]);
|
|
81
|
-
}
|
|
82
|
-
function je(h) {
|
|
83
|
-
return xe(h).toList();
|
|
84
|
-
}
|
|
85
|
-
function ne(h) {
|
|
86
|
-
if (h) return je(h).get(0);
|
|
87
|
-
}
|
|
88
|
-
function j(h) {
|
|
89
|
-
if (h) {
|
|
90
|
-
var M = ne(h), D = h.getCurrentContent().getBlockMap().toSeq().toList(), O = 0;
|
|
91
|
-
if (D.forEach(function(k, F) {
|
|
92
|
-
k.get("key") === M.get("key") && (O = F - 1);
|
|
93
|
-
}), -1 < O) return D.get(O);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function x(h) {
|
|
97
|
-
return h ? h.getCurrentContent().getBlockMap().toList() : new K.List();
|
|
98
|
-
}
|
|
99
|
-
function I(h) {
|
|
100
|
-
var M = je(h);
|
|
101
|
-
if (!M.some(function(D) {
|
|
102
|
-
return D.type !== M.get(0).type;
|
|
103
|
-
})) return M.get(0).type;
|
|
104
|
-
}
|
|
105
|
-
function Q(h) {
|
|
106
|
-
var M = P.RichUtils.tryToRemoveBlockStyle(h);
|
|
107
|
-
return M ? P.EditorState.push(h, M, "change-block-type") : h;
|
|
108
|
-
}
|
|
109
|
-
function de(h) {
|
|
110
|
-
var M = "", D = h.getSelection(), O = D.getAnchorOffset(), k = D.getFocusOffset(), F = je(h);
|
|
111
|
-
if (0 < F.size) {
|
|
112
|
-
if (D.getIsBackward()) {
|
|
113
|
-
var Z = O;
|
|
114
|
-
O = k, k = Z;
|
|
115
|
-
}
|
|
116
|
-
for (var B = 0; B < F.size; B += 1) {
|
|
117
|
-
var G = B === 0 ? O : 0, X = B === F.size - 1 ? k : F.get(B).getText().length;
|
|
118
|
-
M += F.get(B).getText().slice(G, X);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return M;
|
|
122
|
-
}
|
|
123
|
-
function le(h) {
|
|
124
|
-
var M = h.getCurrentContent(), D = h.getSelection(), O = P.Modifier.removeRange(M, D, "forward"), k = O.getSelectionAfter(), F = O.getBlockForKey(k.getStartKey());
|
|
125
|
-
return O = P.Modifier.insertText(O, k, `
|
|
126
|
-
`, F.getInlineStyleAt(k.getStartOffset()), null), P.EditorState.push(h, O, "insert-fragment");
|
|
127
|
-
}
|
|
128
|
-
function Ne(h) {
|
|
129
|
-
var M = P.Modifier.splitBlock(h.getCurrentContent(), h.getSelection());
|
|
130
|
-
return Q(P.EditorState.push(h, M, "split-block"));
|
|
131
|
-
}
|
|
132
|
-
function ge(h) {
|
|
133
|
-
var M = h.getCurrentContent().getBlockMap().toList(), D = h.getSelection().merge({ anchorKey: M.first().get("key"), anchorOffset: 0, focusKey: M.last().get("key"), focusOffset: M.last().getLength() }), O = P.Modifier.removeRange(h.getCurrentContent(), D, "forward");
|
|
134
|
-
return P.EditorState.push(h, O, "remove-range");
|
|
135
|
-
}
|
|
136
|
-
function V(h, M) {
|
|
137
|
-
var D = P.Modifier.setBlockData(h.getCurrentContent(), h.getSelection(), M);
|
|
138
|
-
return P.EditorState.push(h, D, "change-block-data");
|
|
139
|
-
}
|
|
140
|
-
function te(h) {
|
|
141
|
-
var M = new K.Map({}), D = je(h);
|
|
142
|
-
if (D && 0 < D.size) for (var O = function(F) {
|
|
143
|
-
var Z = D.get(F).getData();
|
|
144
|
-
if (!Z || Z.size === 0) return M = M.clear(), "break";
|
|
145
|
-
if (F === 0) M = Z;
|
|
146
|
-
else if (M.forEach(function(B, G) {
|
|
147
|
-
Z.get(G) && Z.get(G) === B || (M = M.delete(G));
|
|
148
|
-
}), M.size === 0) return M = M.clear(), "break";
|
|
149
|
-
}, k = 0; k < D.size && O(k) !== "break"; k += 1) ;
|
|
150
|
-
return M;
|
|
151
|
-
}
|
|
152
|
-
var Se = Object(K.Map)({ code: { element: "pre" } }), De = P.DefaultDraftBlockRenderMap.merge(Se);
|
|
153
|
-
function H(h) {
|
|
154
|
-
if (h) {
|
|
155
|
-
var M = h.getType();
|
|
156
|
-
return M === "unordered-list-item" || M === "ordered-list-item";
|
|
157
|
-
}
|
|
158
|
-
return !1;
|
|
159
|
-
}
|
|
160
|
-
function ie(h, M, D) {
|
|
161
|
-
var O, k = h.getSelection();
|
|
162
|
-
O = k.getIsBackward() ? k.getFocusKey() : k.getAnchorKey();
|
|
163
|
-
var F = h.getCurrentContent(), Z = F.getBlockForKey(O), B = Z.getType();
|
|
164
|
-
if (B !== "unordered-list-item" && B !== "ordered-list-item") return h;
|
|
165
|
-
var G = F.getBlockBefore(O);
|
|
166
|
-
if (!G || G.getType() !== B) return h;
|
|
167
|
-
var X = Z.getDepth();
|
|
168
|
-
if (M === 1 && X === D) return h;
|
|
169
|
-
var $, ae, he, se, Me, ee, ue, Le = Math.min(G.getDepth() + 1, D), Oe = (ae = M, he = Le, se = ($ = h).getSelection(), Me = $.getCurrentContent(), ee = Me.getBlockMap(), ue = xe($).map(function(Ue) {
|
|
170
|
-
var Be = Ue.getDepth() + ae;
|
|
171
|
-
return Be = Math.max(0, Math.min(Be, he)), Ue.set("depth", Be);
|
|
172
|
-
}), ee = ee.merge(ue), Me.merge({ blockMap: ee, selectionBefore: se, selectionAfter: se }));
|
|
173
|
-
return P.EditorState.push(h, Oe, "adjust-depth");
|
|
174
|
-
}
|
|
175
|
-
function oe(h, M) {
|
|
176
|
-
var D;
|
|
177
|
-
return (D = M).which === 13 && (D.getModifierState("Shift") || D.getModifierState("Alt") || D.getModifierState("Control")) ? h.getSelection().isCollapsed() ? P.RichUtils.insertSoftNewline(h) : le(h) : function(O) {
|
|
178
|
-
var k = O.getSelection();
|
|
179
|
-
if (k.isCollapsed()) {
|
|
180
|
-
var F = O.getCurrentContent(), Z = k.getStartKey(), B = F.getBlockForKey(Z);
|
|
181
|
-
if (!H(B) && B.getType() !== "unstyled" && B.getLength() === k.getStartOffset()) return Ne(O);
|
|
182
|
-
if (H(B) && B.getLength() === 0) {
|
|
183
|
-
var G = B.getDepth();
|
|
184
|
-
if (G === 0) return Q(O);
|
|
185
|
-
if (0 < G) return ie(O, -1, G);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}(h);
|
|
189
|
-
}
|
|
190
|
-
function ke(h, M) {
|
|
191
|
-
var D = Object.keys(h);
|
|
192
|
-
if (Object.getOwnPropertySymbols) {
|
|
193
|
-
var O = Object.getOwnPropertySymbols(h);
|
|
194
|
-
M && (O = O.filter(function(k) {
|
|
195
|
-
return Object.getOwnPropertyDescriptor(h, k).enumerable;
|
|
196
|
-
})), D.push.apply(D, O);
|
|
197
|
-
}
|
|
198
|
-
return D;
|
|
199
|
-
}
|
|
200
|
-
function Ce(h, M, D) {
|
|
201
|
-
return M in h ? Object.defineProperty(h, M, { value: D, enumerable: !0, configurable: !0, writable: !0 }) : h[M] = D, h;
|
|
202
|
-
}
|
|
203
|
-
function _e(h) {
|
|
204
|
-
return (_e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(M) {
|
|
205
|
-
return typeof M;
|
|
206
|
-
} : function(M) {
|
|
207
|
-
return M && typeof Symbol == "function" && M.constructor === Symbol && M !== Symbol.prototype ? "symbol" : typeof M;
|
|
208
|
-
})(h);
|
|
209
|
-
}
|
|
210
|
-
function fe(h) {
|
|
211
|
-
var M = h.getSelection();
|
|
212
|
-
if (M.isCollapsed()) {
|
|
213
|
-
var D = {}, O = h.getCurrentInlineStyle().toList().toJS();
|
|
214
|
-
if (O) return ["BOLD", "ITALIC", "UNDERLINE", "STRIKETHROUGH", "CODE", "SUPERSCRIPT", "SUBSCRIPT"].forEach(function(G) {
|
|
215
|
-
D[G] = 0 <= O.indexOf(G);
|
|
216
|
-
}), D;
|
|
217
|
-
}
|
|
218
|
-
var k = M.getStartOffset(), F = M.getEndOffset(), Z = je(h);
|
|
219
|
-
if (0 < Z.size) {
|
|
220
|
-
var B = function() {
|
|
221
|
-
for (var G = { BOLD: !0, ITALIC: !0, UNDERLINE: !0, STRIKETHROUGH: !0, CODE: !0, SUPERSCRIPT: !0, SUBSCRIPT: !0 }, X = 0; X < Z.size; X += 1) {
|
|
222
|
-
var $ = X === 0 ? k : 0, ae = X === Z.size - 1 ? F : Z.get(X).getText().length;
|
|
223
|
-
$ === ae && $ === 0 ? ($ = 1, ae = 2) : $ === ae && --$;
|
|
224
|
-
for (var he = function(Me) {
|
|
225
|
-
var ee = Z.get(X).getInlineStyleAt(Me);
|
|
226
|
-
["BOLD", "ITALIC", "UNDERLINE", "STRIKETHROUGH", "CODE", "SUPERSCRIPT", "SUBSCRIPT"].forEach(function(ue) {
|
|
227
|
-
G[ue] = G[ue] && ee.get(ue) === ue;
|
|
228
|
-
});
|
|
229
|
-
}, se = $; se < ae; se += 1) he(se);
|
|
230
|
-
}
|
|
231
|
-
return { v: G };
|
|
232
|
-
}();
|
|
233
|
-
if (_e(B) === "object") return B.v;
|
|
234
|
-
}
|
|
235
|
-
return {};
|
|
236
|
-
}
|
|
237
|
-
function Pe(h) {
|
|
238
|
-
var M, D = h.getSelection(), O = D.getStartOffset(), k = D.getEndOffset();
|
|
239
|
-
O === k && O === 0 ? k = 1 : O === k && --O;
|
|
240
|
-
for (var F = ne(h), Z = O; Z < k; Z += 1) {
|
|
241
|
-
var B = F.getEntityAt(Z);
|
|
242
|
-
if (!B) {
|
|
243
|
-
M = void 0;
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
if (Z === O) M = B;
|
|
247
|
-
else if (M !== B) {
|
|
248
|
-
M = void 0;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return M;
|
|
253
|
-
}
|
|
254
|
-
function q(h, M) {
|
|
255
|
-
var D, O = ne(h);
|
|
256
|
-
return O.findEntityRanges(function(k) {
|
|
257
|
-
return k.get("entity") === M;
|
|
258
|
-
}, function(k, F) {
|
|
259
|
-
D = { start: k, end: F, text: O.get("text").slice(k, F) };
|
|
260
|
-
}), D;
|
|
261
|
-
}
|
|
262
|
-
function be(h, M, D) {
|
|
263
|
-
re[h]["".concat(h.toLowerCase(), "-").concat(D)] = Ce({}, "".concat(M), D);
|
|
264
|
-
}
|
|
265
|
-
function U() {
|
|
266
|
-
return function(h) {
|
|
267
|
-
for (var M = 1; M < arguments.length; M++) {
|
|
268
|
-
var D = arguments[M] != null ? arguments[M] : {};
|
|
269
|
-
M % 2 ? ke(Object(D), !0).forEach(function(O) {
|
|
270
|
-
Ce(h, O, D[O]);
|
|
271
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(D)) : ke(Object(D)).forEach(function(O) {
|
|
272
|
-
Object.defineProperty(h, O, Object.getOwnPropertyDescriptor(D, O));
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
return h;
|
|
276
|
-
}({}, re.color, {}, re.bgcolor, {}, re.fontSize, {}, re.fontFamily, { CODE: re.CODE, SUPERSCRIPT: re.SUPERSCRIPT, SUBSCRIPT: re.SUBSCRIPT });
|
|
277
|
-
}
|
|
278
|
-
var re = { color: {}, bgcolor: {}, fontSize: {}, fontFamily: {}, CODE: { fontFamily: "monospace", wordWrap: "break-word", background: "#f1f1f1", borderRadius: 3, padding: "1px 3px" }, SUPERSCRIPT: { fontSize: 11, position: "relative", top: -8, display: "inline-flex" }, SUBSCRIPT: { fontSize: 11, position: "relative", bottom: -8, display: "inline-flex" } };
|
|
279
|
-
function Ie(h, M, D) {
|
|
280
|
-
var O = h.getSelection(), k = Object.keys(re[M]).reduce(function(G, X) {
|
|
281
|
-
return P.Modifier.removeInlineStyle(G, O, X);
|
|
282
|
-
}, h.getCurrentContent()), F = P.EditorState.push(h, k, "changeinline-style"), Z = h.getCurrentInlineStyle();
|
|
283
|
-
if (O.isCollapsed() && (F = Z.reduce(function(G, X) {
|
|
284
|
-
return P.RichUtils.toggleInlineStyle(G, X);
|
|
285
|
-
}, F)), M === "SUPERSCRIPT" || M == "SUBSCRIPT") Z.has(D) || (F = P.RichUtils.toggleInlineStyle(F, D));
|
|
286
|
-
else {
|
|
287
|
-
var B = M === "bgcolor" ? "backgroundColor" : M;
|
|
288
|
-
Z.has("".concat(B, "-").concat(D)) || (F = P.RichUtils.toggleInlineStyle(F, "".concat(M.toLowerCase(), "-").concat(D)), be(M, B, D));
|
|
289
|
-
}
|
|
290
|
-
return F;
|
|
291
|
-
}
|
|
292
|
-
function we(h) {
|
|
293
|
-
h && h.getCurrentContent().getBlockMap().map(function(M) {
|
|
294
|
-
return M.get("characterList");
|
|
295
|
-
}).toList().flatten().forEach(function(M) {
|
|
296
|
-
M && M.indexOf("color-") === 0 ? be("color", "color", M.substr(6)) : M && M.indexOf("bgcolor-") === 0 ? be("bgcolor", "backgroundColor", M.substr(8)) : M && M.indexOf("fontsize-") === 0 ? be("fontSize", "fontSize", +M.substr(9)) : M && M.indexOf("fontfamily-") === 0 && be("fontFamily", "fontFamily", M.substr(11));
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
function ve(h, M, D) {
|
|
300
|
-
var O = h.getInlineStyleAt(D).toList().filter(function(k) {
|
|
301
|
-
return k.startsWith(M.toLowerCase());
|
|
302
|
-
});
|
|
303
|
-
if (O && 0 < O.size) return O.get(0);
|
|
304
|
-
}
|
|
305
|
-
function Te(h, M) {
|
|
306
|
-
if (h && M && 0 < M.length) {
|
|
307
|
-
var D = function() {
|
|
308
|
-
var O = h.getSelection(), k = {};
|
|
309
|
-
if (O.isCollapsed()) return M.forEach(function($) {
|
|
310
|
-
k[$] = function(ae, he) {
|
|
311
|
-
var se = ae.getCurrentInlineStyle().toList().filter(function(Me) {
|
|
312
|
-
return Me.startsWith(he.toLowerCase());
|
|
313
|
-
});
|
|
314
|
-
if (se && 0 < se.size) return se.get(0);
|
|
315
|
-
}(h, $);
|
|
316
|
-
}), { v: k };
|
|
317
|
-
var F = O.getStartOffset(), Z = O.getEndOffset(), B = je(h);
|
|
318
|
-
if (0 < B.size) {
|
|
319
|
-
for (var G = function($) {
|
|
320
|
-
var ae = $ === 0 ? F : 0, he = $ === B.size - 1 ? Z : B.get($).getText().length;
|
|
321
|
-
ae === he && ae === 0 ? (ae = 1, he = 2) : ae === he && --ae;
|
|
322
|
-
for (var se = function(ee) {
|
|
323
|
-
ee === ae ? M.forEach(function(ue) {
|
|
324
|
-
k[ue] = ve(B.get($), ue, ee);
|
|
325
|
-
}) : M.forEach(function(ue) {
|
|
326
|
-
k[ue] && k[ue] !== ve(B.get($), ue, ee) && (k[ue] = void 0);
|
|
327
|
-
});
|
|
328
|
-
}, Me = ae; Me < he; Me += 1) se(Me);
|
|
329
|
-
}, X = 0; X < B.size; X += 1) G(X);
|
|
330
|
-
return { v: k };
|
|
331
|
-
}
|
|
332
|
-
}();
|
|
333
|
-
if (_e(D) === "object") return D.v;
|
|
334
|
-
}
|
|
335
|
-
return {};
|
|
336
|
-
}
|
|
337
|
-
function me(h) {
|
|
338
|
-
var M = h.getCurrentInlineStyle(), D = h.getCurrentContent();
|
|
339
|
-
return M.forEach(function(O) {
|
|
340
|
-
D = P.Modifier.removeInlineStyle(D, h.getSelection(), O);
|
|
341
|
-
}), P.EditorState.push(h, D, "change-inline-style");
|
|
342
|
-
}
|
|
343
|
-
y.d(w, "isListBlock", function() {
|
|
344
|
-
return H;
|
|
345
|
-
}), y.d(w, "changeDepth", function() {
|
|
346
|
-
return ie;
|
|
347
|
-
}), y.d(w, "handleNewLine", function() {
|
|
348
|
-
return oe;
|
|
349
|
-
}), y.d(w, "getEntityRange", function() {
|
|
350
|
-
return q;
|
|
351
|
-
}), y.d(w, "getCustomStyleMap", function() {
|
|
352
|
-
return U;
|
|
353
|
-
}), y.d(w, "toggleCustomInlineStyle", function() {
|
|
354
|
-
return Ie;
|
|
355
|
-
}), y.d(w, "getSelectionEntity", function() {
|
|
356
|
-
return Pe;
|
|
357
|
-
}), y.d(w, "extractInlineStyle", function() {
|
|
358
|
-
return we;
|
|
359
|
-
}), y.d(w, "removeAllInlineStyles", function() {
|
|
360
|
-
return me;
|
|
361
|
-
}), y.d(w, "getSelectionInlineStyle", function() {
|
|
362
|
-
return fe;
|
|
363
|
-
}), y.d(w, "getSelectionCustomInlineStyle", function() {
|
|
364
|
-
return Te;
|
|
365
|
-
}), y.d(w, "getSelectedBlocksMap", function() {
|
|
366
|
-
return xe;
|
|
367
|
-
}), y.d(w, "getSelectedBlocksList", function() {
|
|
368
|
-
return je;
|
|
369
|
-
}), y.d(w, "getSelectedBlock", function() {
|
|
370
|
-
return ne;
|
|
371
|
-
}), y.d(w, "getBlockBeforeSelectedBlock", function() {
|
|
372
|
-
return j;
|
|
373
|
-
}), y.d(w, "getAllBlocks", function() {
|
|
374
|
-
return x;
|
|
375
|
-
}), y.d(w, "getSelectedBlocksType", function() {
|
|
376
|
-
return I;
|
|
377
|
-
}), y.d(w, "removeSelectedBlocksStyle", function() {
|
|
378
|
-
return Q;
|
|
379
|
-
}), y.d(w, "getSelectionText", function() {
|
|
380
|
-
return de;
|
|
381
|
-
}), y.d(w, "addLineBreakRemovingSelection", function() {
|
|
382
|
-
return le;
|
|
383
|
-
}), y.d(w, "insertNewUnstyledBlock", function() {
|
|
384
|
-
return Ne;
|
|
385
|
-
}), y.d(w, "clearEditorContent", function() {
|
|
386
|
-
return ge;
|
|
387
|
-
}), y.d(w, "setBlockData", function() {
|
|
388
|
-
return V;
|
|
389
|
-
}), y.d(w, "getSelectedBlocksMetadata", function() {
|
|
390
|
-
return te;
|
|
391
|
-
}), y.d(w, "blockRenderMap", function() {
|
|
392
|
-
return De;
|
|
393
|
-
});
|
|
394
|
-
}], C.c = L, C.d = function(g, w, y) {
|
|
395
|
-
C.o(g, w) || Object.defineProperty(g, w, { enumerable: !0, get: y });
|
|
396
|
-
}, C.r = function(g) {
|
|
397
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(g, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(g, "__esModule", { value: !0 });
|
|
398
|
-
}, C.t = function(g, w) {
|
|
399
|
-
if (1 & w && (g = C(g)), 8 & w || 4 & w && typeof g == "object" && g && g.__esModule) return g;
|
|
400
|
-
var y = /* @__PURE__ */ Object.create(null);
|
|
401
|
-
if (C.r(y), Object.defineProperty(y, "default", { enumerable: !0, value: g }), 2 & w && typeof g != "string") for (var P in g) C.d(y, P, function(K) {
|
|
402
|
-
return g[K];
|
|
403
|
-
}.bind(null, P));
|
|
404
|
-
return y;
|
|
405
|
-
}, C.n = function(g) {
|
|
406
|
-
var w = g && g.__esModule ? function() {
|
|
407
|
-
return g.default;
|
|
408
|
-
} : function() {
|
|
409
|
-
return g;
|
|
410
|
-
};
|
|
411
|
-
return C.d(w, "a", w), w;
|
|
412
|
-
}, C.o = function(g, w) {
|
|
413
|
-
return Object.prototype.hasOwnProperty.call(g, w);
|
|
414
|
-
}, C.p = "", C(C.s = 2));
|
|
415
|
-
}, function(S, A) {
|
|
416
|
-
S.exports = Qe;
|
|
417
|
-
}, function(S, A, E) {
|
|
418
|
-
function C(g) {
|
|
419
|
-
if (L[g]) return L[g].exports;
|
|
420
|
-
var w = L[g] = { i: g, l: !1, exports: {} };
|
|
421
|
-
return d[g].call(w.exports, w, w.exports, C), w.l = !0, w.exports;
|
|
422
|
-
}
|
|
423
|
-
var s, ce, d, L;
|
|
424
|
-
S.exports = (s = E(5), ce = E(3), L = {}, C.m = d = [function(g, w) {
|
|
425
|
-
g.exports = s;
|
|
426
|
-
}, function(g, w) {
|
|
427
|
-
g.exports = ce;
|
|
428
|
-
}, function(g, w, y) {
|
|
429
|
-
g.exports = y(3);
|
|
430
|
-
}, function(g, w, y) {
|
|
431
|
-
y.r(w);
|
|
432
|
-
var P = y(1), K = y(0), xe = function(H, ie, oe) {
|
|
433
|
-
var ke, Ce = H.textContent;
|
|
434
|
-
return Ce.trim() === "" ? { chunk: (ke = oe, { text: " ", inlines: [new K.OrderedSet()], entities: [ke], blocks: [] }) } : { chunk: { text: Ce, inlines: Array(Ce.length).fill(ie), entities: Array(Ce.length).fill(oe), blocks: [] } };
|
|
435
|
-
}, je = function() {
|
|
436
|
-
return { text: `
|
|
437
|
-
`, inlines: [new K.OrderedSet()], entities: new Array(1), blocks: [] };
|
|
438
|
-
}, ne = function() {
|
|
439
|
-
return { text: "", inlines: [], entities: [], blocks: [] };
|
|
440
|
-
}, j = function(H, ie) {
|
|
441
|
-
return { text: "", inlines: [], entities: [], blocks: [{ type: H, depth: 0, data: ie || new K.Map({}) }] };
|
|
442
|
-
}, x = function(H, ie, oe) {
|
|
443
|
-
return { text: "\r", inlines: [], entities: [], blocks: [{ type: H, depth: Math.max(0, Math.min(4, ie)), data: oe || new K.Map({}) }] };
|
|
444
|
-
}, I = function(H) {
|
|
445
|
-
return { text: "\r ", inlines: [new K.OrderedSet()], entities: [H], blocks: [{ type: "atomic", depth: 0, data: new K.Map({}) }] };
|
|
446
|
-
}, Q = function(H, ie) {
|
|
447
|
-
return { text: H.text + ie.text, inlines: H.inlines.concat(ie.inlines), entities: H.entities.concat(ie.entities), blocks: H.blocks.concat(ie.blocks) };
|
|
448
|
-
}, de = new K.Map({ "header-one": { element: "h1" }, "header-two": { element: "h2" }, "header-three": { element: "h3" }, "header-four": { element: "h4" }, "header-five": { element: "h5" }, "header-six": { element: "h6" }, "unordered-list-item": { element: "li", wrapper: "ul" }, "ordered-list-item": { element: "li", wrapper: "ol" }, blockquote: { element: "blockquote" }, code: { element: "pre" }, atomic: { element: "figure" }, unstyled: { element: "p", aliasedElements: ["div"] } }), le = { code: "CODE", del: "STRIKETHROUGH", em: "ITALIC", strong: "BOLD", ins: "UNDERLINE", sub: "SUBSCRIPT", sup: "SUPERSCRIPT" };
|
|
449
|
-
function Ne(H) {
|
|
450
|
-
return H.style.textAlign ? new K.Map({ "text-align": H.style.textAlign }) : H.style.marginLeft ? new K.Map({ "margin-left": H.style.marginLeft }) : void 0;
|
|
451
|
-
}
|
|
452
|
-
var ge = function(H) {
|
|
453
|
-
var ie = void 0;
|
|
454
|
-
if (H instanceof HTMLAnchorElement) {
|
|
455
|
-
var oe = {};
|
|
456
|
-
ie = H.dataset && H.dataset.mention !== void 0 ? (oe.url = H.href, oe.text = H.innerHTML, oe.value = H.dataset.value, P.Entity.__create("MENTION", "IMMUTABLE", oe)) : (oe.url = H.getAttribute && H.getAttribute("href") || H.href, oe.title = H.innerHTML, oe.targetOption = H.target, P.Entity.__create("LINK", "MUTABLE", oe));
|
|
457
|
-
}
|
|
458
|
-
return ie;
|
|
459
|
-
};
|
|
460
|
-
y.d(w, "default", function() {
|
|
461
|
-
return De;
|
|
462
|
-
});
|
|
463
|
-
var V = " ", te = new RegExp(" ", "g"), Se = !0;
|
|
464
|
-
function De(H, ie) {
|
|
465
|
-
var oe, ke, Ce, _e = (oe = ie, ke = H.trim().replace(te, V), (Ce = function(be) {
|
|
466
|
-
var U, re = null;
|
|
467
|
-
return document.implementation && document.implementation.createHTMLDocument && ((U = document.implementation.createHTMLDocument("foo")).documentElement.innerHTML = be, re = U.getElementsByTagName("body")[0]), re;
|
|
468
|
-
}(ke)) ? (Se = !0, { chunk: function be(U, re, Ie, we, ve, Te) {
|
|
469
|
-
var me = U.nodeName.toLowerCase();
|
|
470
|
-
if (Te) {
|
|
471
|
-
var h = Te(me, U);
|
|
472
|
-
if (h) {
|
|
473
|
-
var M = P.Entity.__create(h.type, h.mutability, h.data || {});
|
|
474
|
-
return { chunk: I(M) };
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
if (me === "#text" && U.textContent !== `
|
|
478
|
-
`) return xe(U, re, ve);
|
|
479
|
-
if (me === "br") return { chunk: je() };
|
|
480
|
-
if (me === "img" && U instanceof HTMLImageElement) {
|
|
481
|
-
var D = {};
|
|
482
|
-
D.src = U.getAttribute && U.getAttribute("src") || U.src, D.alt = U.alt, D.height = U.style.height, D.width = U.style.width, U.style.float && (D.alignment = U.style.float);
|
|
483
|
-
var O = P.Entity.__create("IMAGE", "MUTABLE", D);
|
|
484
|
-
return { chunk: I(O) };
|
|
485
|
-
}
|
|
486
|
-
if (me === "video" && U instanceof HTMLVideoElement) {
|
|
487
|
-
var k = {};
|
|
488
|
-
k.src = U.getAttribute && U.getAttribute("src") || U.src, k.alt = U.alt, k.height = U.style.height, k.width = U.style.width, U.style.float && (k.alignment = U.style.float);
|
|
489
|
-
var F = P.Entity.__create("VIDEO", "MUTABLE", k);
|
|
490
|
-
return { chunk: I(F) };
|
|
491
|
-
}
|
|
492
|
-
if (me === "iframe" && U instanceof HTMLIFrameElement) {
|
|
493
|
-
var Z = {};
|
|
494
|
-
Z.src = U.getAttribute && U.getAttribute("src") || U.src, Z.height = U.height, Z.width = U.width;
|
|
495
|
-
var B = P.Entity.__create("EMBEDDED_LINK", "MUTABLE", Z);
|
|
496
|
-
return { chunk: I(B) };
|
|
497
|
-
}
|
|
498
|
-
var G, X = function(he, se) {
|
|
499
|
-
var Me = de.filter(function(ee) {
|
|
500
|
-
return ee.element === he && (!ee.wrapper || ee.wrapper === se) || ee.wrapper === he || ee.aliasedElements && -1 < ee.aliasedElements.indexOf(he);
|
|
501
|
-
}).keySeq().toSet().toArray();
|
|
502
|
-
if (Me.length === 1) return Me[0];
|
|
503
|
-
}(me, we);
|
|
504
|
-
X && (me === "ul" || me === "ol" ? (we = me, Ie += 1) : (X !== "unordered-list-item" && X !== "ordered-list-item" && (we = "", Ie = -1), Se ? (G = j(X, Ne(U)), Se = !1) : G = x(X, Ie, Ne(U)))), G = G || ne(), re = function(he, se, Me) {
|
|
505
|
-
var ee, ue = le[he];
|
|
506
|
-
if (ue) ee = Me.add(ue).toOrderedSet();
|
|
507
|
-
else if (se instanceof HTMLElement) {
|
|
508
|
-
var Le = se;
|
|
509
|
-
ee = (ee = Me).withMutations(function(Oe) {
|
|
510
|
-
var Ue = Le.style.color, Be = Le.style.backgroundColor, We = Le.style.fontSize, Ve = Le.style.fontFamily.replace(/^"|"$/g, ""), it = Le.style.fontWeight, $e = Le.style.textDecoration, at = Le.style.fontStyle;
|
|
511
|
-
Ue && Oe.add("color-".concat(Ue.replace(/ /g, ""))), Be && Oe.add("bgcolor-".concat(Be.replace(/ /g, ""))), We && Oe.add("fontsize-".concat(We.replace(/px$/g, ""))), Ve && Oe.add("fontfamily-".concat(Ve)), it === "bold" && Oe.add(le.strong), $e === "underline" && Oe.add(le.ins), at === "italic" && Oe.add(le.em);
|
|
512
|
-
}).toOrderedSet();
|
|
513
|
-
}
|
|
514
|
-
return ee;
|
|
515
|
-
}(me, U, re);
|
|
516
|
-
for (var $ = U.firstChild; $; ) {
|
|
517
|
-
var ae = be($, re, Ie, we, ge($) || ve, Te).chunk;
|
|
518
|
-
G = Q(G, ae), $ = $.nextSibling;
|
|
519
|
-
}
|
|
520
|
-
return { chunk: G };
|
|
521
|
-
}(Ce, new K.OrderedSet(), -1, "", void 0, oe).chunk }) : null);
|
|
522
|
-
if (_e) {
|
|
523
|
-
var fe = _e.chunk, Pe = new K.OrderedMap({});
|
|
524
|
-
fe.entities && fe.entities.forEach(function(be) {
|
|
525
|
-
be && (Pe = Pe.set(be, P.Entity.__get(be)));
|
|
526
|
-
});
|
|
527
|
-
var q = 0;
|
|
528
|
-
return { contentBlocks: fe.text.split("\r").map(function(be, U) {
|
|
529
|
-
var re = q + be.length, Ie = fe && fe.inlines.slice(q, re), we = fe && fe.entities.slice(q, re), ve = new K.List(Ie.map(function(Te, me) {
|
|
530
|
-
var h = { style: Te, entity: null };
|
|
531
|
-
return we[me] && (h.entity = we[me]), P.CharacterMetadata.create(h);
|
|
532
|
-
}));
|
|
533
|
-
return q = re, new P.ContentBlock({ key: Object(P.genKey)(), type: fe && fe.blocks[U] && fe.blocks[U].type || "unstyled", depth: fe && fe.blocks[U] && fe.blocks[U].depth, data: fe && fe.blocks[U] && fe.blocks[U].data || new K.Map({}), text: be, characterList: ve });
|
|
534
|
-
}), entityMap: Pe };
|
|
535
|
-
}
|
|
536
|
-
return null;
|
|
537
|
-
}
|
|
538
|
-
}], C.c = L, C.d = function(g, w, y) {
|
|
539
|
-
C.o(g, w) || Object.defineProperty(g, w, { enumerable: !0, get: y });
|
|
540
|
-
}, C.r = function(g) {
|
|
541
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(g, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(g, "__esModule", { value: !0 });
|
|
542
|
-
}, C.t = function(g, w) {
|
|
543
|
-
if (1 & w && (g = C(g)), 8 & w || 4 & w && typeof g == "object" && g && g.__esModule) return g;
|
|
544
|
-
var y = /* @__PURE__ */ Object.create(null);
|
|
545
|
-
if (C.r(y), Object.defineProperty(y, "default", { enumerable: !0, value: g }), 2 & w && typeof g != "string") for (var P in g) C.d(y, P, function(K) {
|
|
546
|
-
return g[K];
|
|
547
|
-
}.bind(null, P));
|
|
548
|
-
return y;
|
|
549
|
-
}, C.n = function(g) {
|
|
550
|
-
var w = g && g.__esModule ? function() {
|
|
551
|
-
return g.default;
|
|
552
|
-
} : function() {
|
|
553
|
-
return g;
|
|
554
|
-
};
|
|
555
|
-
return C.d(w, "a", w), w;
|
|
556
|
-
}, C.o = function(g, w) {
|
|
557
|
-
return Object.prototype.hasOwnProperty.call(g, w);
|
|
558
|
-
}, C.p = "", C(C.s = 2));
|
|
559
|
-
}, function(S, A, E) {
|
|
560
|
-
function C(j) {
|
|
561
|
-
return Array.prototype.slice.call(arguments, 1).forEach(function(x) {
|
|
562
|
-
x && Object.keys(x).forEach(function(I) {
|
|
563
|
-
j[I] = x[I];
|
|
564
|
-
});
|
|
565
|
-
}), j;
|
|
566
|
-
}
|
|
567
|
-
function s(j) {
|
|
568
|
-
return Object.prototype.toString.call(j);
|
|
569
|
-
}
|
|
570
|
-
function ce(j) {
|
|
571
|
-
return s(j) === "[object Function]";
|
|
572
|
-
}
|
|
573
|
-
function d(j) {
|
|
574
|
-
return j.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
575
|
-
}
|
|
576
|
-
var L = { fuzzyLink: !0, fuzzyEmail: !0, fuzzyIP: !1 }, g = { "http:": { validate: function(j, x, I) {
|
|
577
|
-
var Q = j.slice(x);
|
|
578
|
-
return I.re.http || (I.re.http = new RegExp("^\\/\\/" + I.re.src_auth + I.re.src_host_port_strict + I.re.src_path, "i")), I.re.http.test(Q) ? Q.match(I.re.http)[0].length : 0;
|
|
579
|
-
} }, "https:": "http:", "ftp:": "http:", "//": { validate: function(j, x, I) {
|
|
580
|
-
var Q = j.slice(x);
|
|
581
|
-
return I.re.no_http || (I.re.no_http = new RegExp("^" + I.re.src_auth + "(?:localhost|(?:(?:" + I.re.src_domain + ")\\.)+" + I.re.src_domain_root + ")" + I.re.src_port + I.re.src_host_terminator + I.re.src_path, "i")), I.re.no_http.test(Q) ? 3 <= x && j[x - 3] === ":" || 3 <= x && j[x - 3] === "/" ? 0 : Q.match(I.re.no_http)[0].length : 0;
|
|
582
|
-
} }, "mailto:": { validate: function(j, x, I) {
|
|
583
|
-
var Q = j.slice(x);
|
|
584
|
-
return I.re.mailto || (I.re.mailto = new RegExp("^" + I.re.src_email_name + "@" + I.re.src_host_strict, "i")), I.re.mailto.test(Q) ? Q.match(I.re.mailto)[0].length : 0;
|
|
585
|
-
} } }, w = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]", y = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
|
|
586
|
-
function P() {
|
|
587
|
-
return function(j, x) {
|
|
588
|
-
x.normalize(j);
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function K(j) {
|
|
592
|
-
var x = j.re = E(21)(j.__opts__), I = j.__tlds__.slice();
|
|
593
|
-
function Q(V) {
|
|
594
|
-
return V.replace("%TLDS%", x.src_tlds);
|
|
595
|
-
}
|
|
596
|
-
j.onCompile(), j.__tlds_replaced__ || I.push(w), I.push(x.src_xn), x.src_tlds = I.join("|"), x.email_fuzzy = RegExp(Q(x.tpl_email_fuzzy), "i"), x.link_fuzzy = RegExp(Q(x.tpl_link_fuzzy), "i"), x.link_no_ip_fuzzy = RegExp(Q(x.tpl_link_no_ip_fuzzy), "i"), x.host_fuzzy_test = RegExp(Q(x.tpl_host_fuzzy_test), "i");
|
|
597
|
-
var de = [];
|
|
598
|
-
function le(V, te) {
|
|
599
|
-
throw new Error('(LinkifyIt) Invalid schema "' + V + '": ' + te);
|
|
600
|
-
}
|
|
601
|
-
j.__compiled__ = {}, Object.keys(j.__schemas__).forEach(function(V) {
|
|
602
|
-
var te = j.__schemas__[V];
|
|
603
|
-
if (te !== null) {
|
|
604
|
-
var Se, De = { validate: null, link: null };
|
|
605
|
-
if (j.__compiled__[V] = De, s(te) === "[object Object]") return s(te.validate) === "[object RegExp]" ? De.validate = (Se = te.validate, function(H, ie) {
|
|
606
|
-
var oe = H.slice(ie);
|
|
607
|
-
return Se.test(oe) ? oe.match(Se)[0].length : 0;
|
|
608
|
-
}) : ce(te.validate) ? De.validate = te.validate : le(V, te), void (ce(te.normalize) ? De.normalize = te.normalize : te.normalize ? le(V, te) : De.normalize = P());
|
|
609
|
-
s(te) !== "[object String]" ? le(V, te) : de.push(V);
|
|
610
|
-
}
|
|
611
|
-
}), de.forEach(function(V) {
|
|
612
|
-
j.__compiled__[j.__schemas__[V]] && (j.__compiled__[V].validate = j.__compiled__[j.__schemas__[V]].validate, j.__compiled__[V].normalize = j.__compiled__[j.__schemas__[V]].normalize);
|
|
613
|
-
}), j.__compiled__[""] = { validate: null, normalize: P() };
|
|
614
|
-
var Ne, ge = Object.keys(j.__compiled__).filter(function(V) {
|
|
615
|
-
return 0 < V.length && j.__compiled__[V];
|
|
616
|
-
}).map(d).join("|");
|
|
617
|
-
j.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + x.src_ZPCc + "))(" + ge + ")", "i"), j.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + x.src_ZPCc + "))(" + ge + ")", "ig"), j.re.pretest = RegExp("(" + j.re.schema_test.source + ")|(" + j.re.host_fuzzy_test.source + ")|@", "i"), (Ne = j).__index__ = -1, Ne.__text_cache__ = "";
|
|
618
|
-
}
|
|
619
|
-
function xe(j, x) {
|
|
620
|
-
var I = j.__index__, Q = j.__last_index__, de = j.__text_cache__.slice(I, Q);
|
|
621
|
-
this.schema = j.__schema__.toLowerCase(), this.index = I + x, this.lastIndex = Q + x, this.raw = de, this.text = de, this.url = de;
|
|
622
|
-
}
|
|
623
|
-
function je(j, x) {
|
|
624
|
-
var I = new xe(j, x);
|
|
625
|
-
return j.__compiled__[I.schema].normalize(I, j), I;
|
|
626
|
-
}
|
|
627
|
-
function ne(j, x) {
|
|
628
|
-
if (!(this instanceof ne)) return new ne(j, x);
|
|
629
|
-
var I;
|
|
630
|
-
x || (I = j, Object.keys(I || {}).reduce(function(Q, de) {
|
|
631
|
-
return Q || L.hasOwnProperty(de);
|
|
632
|
-
}, !1) && (x = j, j = {})), this.__opts__ = C({}, L, x), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = C({}, g, j), this.__compiled__ = {}, this.__tlds__ = y, this.__tlds_replaced__ = !1, this.re = {}, K(this);
|
|
633
|
-
}
|
|
634
|
-
ne.prototype.add = function(j, x) {
|
|
635
|
-
return this.__schemas__[j] = x, K(this), this;
|
|
636
|
-
}, ne.prototype.set = function(j) {
|
|
637
|
-
return this.__opts__ = C(this.__opts__, j), this;
|
|
638
|
-
}, ne.prototype.test = function(j) {
|
|
639
|
-
if (this.__text_cache__ = j, this.__index__ = -1, !j.length) return !1;
|
|
640
|
-
var x, I, Q, de, le, Ne, ge, V;
|
|
641
|
-
if (this.re.schema_test.test(j)) {
|
|
642
|
-
for ((ge = this.re.schema_search).lastIndex = 0; (x = ge.exec(j)) !== null; ) if (de = this.testSchemaAt(j, x[2], ge.lastIndex)) {
|
|
643
|
-
this.__schema__ = x[2], this.__index__ = x.index + x[1].length, this.__last_index__ = x.index + x[0].length + de;
|
|
644
|
-
break;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && 0 <= (V = j.search(this.re.host_fuzzy_test)) && (this.__index__ < 0 || V < this.__index__) && (I = j.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (le = I.index + I[1].length, (this.__index__ < 0 || le < this.__index__) && (this.__schema__ = "", this.__index__ = le, this.__last_index__ = I.index + I[0].length)), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && 0 <= j.indexOf("@") && (Q = j.match(this.re.email_fuzzy)) !== null && (le = Q.index + Q[1].length, Ne = Q.index + Q[0].length, (this.__index__ < 0 || le < this.__index__ || le === this.__index__ && Ne > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = le, this.__last_index__ = Ne)), 0 <= this.__index__;
|
|
648
|
-
}, ne.prototype.pretest = function(j) {
|
|
649
|
-
return this.re.pretest.test(j);
|
|
650
|
-
}, ne.prototype.testSchemaAt = function(j, x, I) {
|
|
651
|
-
return this.__compiled__[x.toLowerCase()] ? this.__compiled__[x.toLowerCase()].validate(j, I, this) : 0;
|
|
652
|
-
}, ne.prototype.match = function(j) {
|
|
653
|
-
var x = 0, I = [];
|
|
654
|
-
0 <= this.__index__ && this.__text_cache__ === j && (I.push(je(this, x)), x = this.__last_index__);
|
|
655
|
-
for (var Q = x ? j.slice(x) : j; this.test(Q); ) I.push(je(this, x)), Q = Q.slice(this.__last_index__), x += this.__last_index__;
|
|
656
|
-
return I.length ? I : null;
|
|
657
|
-
}, ne.prototype.tlds = function(j, x) {
|
|
658
|
-
return j = Array.isArray(j) ? j : [j], x ? this.__tlds__ = this.__tlds__.concat(j).sort().filter(function(I, Q, de) {
|
|
659
|
-
return I !== de[Q - 1];
|
|
660
|
-
}).reverse() : (this.__tlds__ = j.slice(), this.__tlds_replaced__ = !0), K(this), this;
|
|
661
|
-
}, ne.prototype.normalize = function(j) {
|
|
662
|
-
j.schema || (j.url = "http://" + j.url), j.schema !== "mailto:" || /^mailto:/i.test(j.url) || (j.url = "mailto:" + j.url);
|
|
663
|
-
}, ne.prototype.onCompile = function() {
|
|
664
|
-
}, S.exports = ne;
|
|
665
|
-
}, function(S, A, E) {
|
|
666
|
-
S.exports = E(40);
|
|
667
|
-
}, function(S, A, E) {
|
|
668
|
-
}, function(S, A, E) {
|
|
669
|
-
var C = E(11);
|
|
670
|
-
function s() {
|
|
671
|
-
}
|
|
672
|
-
function ce() {
|
|
673
|
-
}
|
|
674
|
-
ce.resetWarningCache = s, S.exports = function() {
|
|
675
|
-
function d(w, y, P, K, xe, je) {
|
|
676
|
-
if (je !== C) {
|
|
677
|
-
var ne = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
678
|
-
throw ne.name = "Invariant Violation", ne;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
function L() {
|
|
682
|
-
return d;
|
|
683
|
-
}
|
|
684
|
-
var g = { array: d.isRequired = d, bigint: d, bool: d, func: d, number: d, object: d, string: d, symbol: d, any: d, arrayOf: L, element: d, elementType: d, instanceOf: L, node: d, objectOf: L, oneOf: L, oneOfType: L, shape: L, exact: L, checkPropTypes: ce, resetWarningCache: s };
|
|
685
|
-
return g.PropTypes = g;
|
|
686
|
-
};
|
|
687
|
-
}, function(S, A, E) {
|
|
688
|
-
S.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
689
|
-
}, function(S, A, E) {
|
|
690
|
-
}, function(S, A, E) {
|
|
691
|
-
}, function(S, A, E) {
|
|
692
|
-
}, function(S, A, E) {
|
|
693
|
-
}, function(S, A, E) {
|
|
694
|
-
}, function(S, A, E) {
|
|
695
|
-
}, function(S, A, E) {
|
|
696
|
-
}, function(S, A, E) {
|
|
697
|
-
}, function(S, A, E) {
|
|
698
|
-
}, function(S, A, E) {
|
|
699
|
-
S.exports = function(C) {
|
|
700
|
-
var s = {};
|
|
701
|
-
s.src_Any = E(22).source, s.src_Cc = E(23).source, s.src_Z = E(24).source, s.src_P = E(25).source, s.src_ZPCc = [s.src_Z, s.src_P, s.src_Cc].join("|"), s.src_ZCc = [s.src_Z, s.src_Cc].join("|");
|
|
702
|
-
var ce = "[><|]";
|
|
703
|
-
return s.src_pseudo_letter = "(?:(?![><|]|" + s.src_ZPCc + ")" + s.src_Any + ")", s.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", s.src_auth = "(?:(?:(?!" + s.src_ZCc + "|[@/\\[\\]()]).)+@)?", s.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", s.src_host_terminator = "(?=$|[><|]|" + s.src_ZPCc + ")(?!-|_|:\\d|\\.-|\\.(?!$|" + s.src_ZPCc + "))", s.src_path = "(?:[/?#](?:(?!" + s.src_ZCc + "|" + ce + `|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!` + s.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + s.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + s.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + s.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + s.src_ZCc + "|[']).)+\\'|\\'(?=" + s.src_pseudo_letter + "|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!" + s.src_ZCc + "|[.]).|" + (C && C["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + "\\,(?!" + s.src_ZCc + ").|\\!(?!" + s.src_ZCc + "|[!]).|\\?(?!" + s.src_ZCc + "|[?]).)+|\\/)?", s.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', s.src_xn = "xn--[a-z0-9\\-]{1,59}", s.src_domain_root = "(?:" + s.src_xn + "|" + s.src_pseudo_letter + "{1,63})", s.src_domain = "(?:" + s.src_xn + "|(?:" + s.src_pseudo_letter + ")|(?:" + s.src_pseudo_letter + "(?:-|" + s.src_pseudo_letter + "){0,61}" + s.src_pseudo_letter + "))", s.src_host = "(?:(?:(?:(?:" + s.src_domain + ")\\.)*" + s.src_domain + "))", s.tpl_host_fuzzy = "(?:" + s.src_ip4 + "|(?:(?:(?:" + s.src_domain + ")\\.)+(?:%TLDS%)))", s.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + s.src_domain + ")\\.)+(?:%TLDS%))", s.src_host_strict = s.src_host + s.src_host_terminator, s.tpl_host_fuzzy_strict = s.tpl_host_fuzzy + s.src_host_terminator, s.src_host_port_strict = s.src_host + s.src_port + s.src_host_terminator, s.tpl_host_port_fuzzy_strict = s.tpl_host_fuzzy + s.src_port + s.src_host_terminator, s.tpl_host_port_no_ip_fuzzy_strict = s.tpl_host_no_ip_fuzzy + s.src_port + s.src_host_terminator, s.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + s.src_ZPCc + "|>|$))", s.tpl_email_fuzzy = '(^|[><|]|"|\\(|' + s.src_ZCc + ")(" + s.src_email_name + "@" + s.tpl_host_fuzzy_strict + ")", s.tpl_link_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + s.src_ZPCc + "))((?![$+<=>^`||])" + s.tpl_host_port_fuzzy_strict + s.src_path + ")", s.tpl_link_no_ip_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + s.src_ZPCc + "))((?![$+<=>^`||])" + s.tpl_host_port_no_ip_fuzzy_strict + s.src_path + ")", s;
|
|
704
|
-
};
|
|
705
|
-
}, function(S, A) {
|
|
706
|
-
S.exports = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
707
|
-
}, function(S, A) {
|
|
708
|
-
S.exports = /[\0-\x1F\x7F-\x9F]/;
|
|
709
|
-
}, function(S, A) {
|
|
710
|
-
S.exports = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
|
711
|
-
}, function(S, A) {
|
|
712
|
-
S.exports = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;
|
|
713
|
-
}, function(S, A, E) {
|
|
714
|
-
}, function(S, A, E) {
|
|
715
|
-
}, function(S, A, E) {
|
|
716
|
-
}, function(S, A, E) {
|
|
717
|
-
}, function(S, A, E) {
|
|
718
|
-
}, function(S, A, E) {
|
|
719
|
-
}, function(S, A, E) {
|
|
720
|
-
}, function(S, A, E) {
|
|
721
|
-
}, function(S, A, E) {
|
|
722
|
-
}, function(S, A, E) {
|
|
723
|
-
}, function(S, A, E) {
|
|
724
|
-
}, function(S, A, E) {
|
|
725
|
-
}, function(S, A, E) {
|
|
726
|
-
}, function(S, A, E) {
|
|
727
|
-
}, function(S, A, E) {
|
|
728
|
-
E.r(A), E.d(A, "Editor", function() {
|
|
729
|
-
return $r;
|
|
730
|
-
});
|
|
731
|
-
var C = E(1), s = E.n(C), ce = E(0), d = E.n(ce), L = E(3), g = E(4), w = E(2), y = E.n(w);
|
|
732
|
-
function P(i, t, r) {
|
|
733
|
-
return Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
734
|
-
}
|
|
735
|
-
var K = P(function i() {
|
|
736
|
-
var t = this;
|
|
737
|
-
(function(r, o) {
|
|
738
|
-
if (!(r instanceof o)) throw new TypeError("Cannot call a class as a function");
|
|
739
|
-
})(this, i), this.callBacks = [], this.suggestionCallback = void 0, this.editorFlag = !1, this.suggestionFlag = !1, this.closeAllModals = function(r) {
|
|
740
|
-
t.callBacks.forEach(function(o) {
|
|
741
|
-
o(r);
|
|
742
|
-
});
|
|
743
|
-
}, this.init = function(r) {
|
|
744
|
-
var o = document.getElementById(r);
|
|
745
|
-
o && o.addEventListener("click", function() {
|
|
746
|
-
t.editorFlag = !0;
|
|
747
|
-
}), document && (document.addEventListener("click", function() {
|
|
748
|
-
t.editorFlag ? t.editorFlag = !1 : (t.closeAllModals(), t.suggestionCallback && t.suggestionCallback());
|
|
749
|
-
}), document.addEventListener("keydown", function(n) {
|
|
750
|
-
n.key === "Escape" && t.closeAllModals();
|
|
751
|
-
}));
|
|
752
|
-
}, this.onEditorClick = function() {
|
|
753
|
-
t.closeModals(), !t.suggestionFlag && t.suggestionCallback ? t.suggestionCallback() : t.suggestionFlag = !1;
|
|
754
|
-
}, this.closeModals = function(r) {
|
|
755
|
-
t.closeAllModals(r);
|
|
756
|
-
}, this.registerCallBack = function(r) {
|
|
757
|
-
t.callBacks.push(r);
|
|
758
|
-
}, this.deregisterCallBack = function(r) {
|
|
759
|
-
t.callBacks = t.callBacks.filter(function(o) {
|
|
760
|
-
return o !== r;
|
|
761
|
-
});
|
|
762
|
-
}, this.setSuggestionCallback = function(r) {
|
|
763
|
-
t.suggestionCallback = r;
|
|
764
|
-
}, this.removeSuggestionCallback = function() {
|
|
765
|
-
t.suggestionCallback = void 0;
|
|
766
|
-
}, this.onSuggestionClick = function() {
|
|
767
|
-
t.suggestionFlag = !0;
|
|
768
|
-
};
|
|
769
|
-
});
|
|
770
|
-
function xe(i, t, r) {
|
|
771
|
-
return Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
772
|
-
}
|
|
773
|
-
var je, ne = xe(function i() {
|
|
774
|
-
var t = this;
|
|
775
|
-
(function(r, o) {
|
|
776
|
-
if (!(r instanceof o)) throw new TypeError("Cannot call a class as a function");
|
|
777
|
-
})(this, i), this.inputFocused = !1, this.editorMouseDown = !1, this.onEditorMouseDown = function() {
|
|
778
|
-
t.editorFocused = !0;
|
|
779
|
-
}, this.onInputMouseDown = function() {
|
|
780
|
-
t.inputFocused = !0;
|
|
781
|
-
}, this.isEditorBlur = function(r) {
|
|
782
|
-
return r.target.tagName !== "INPUT" && r.target.tagName !== "LABEL" && r.target.tagName !== "TEXTAREA" || t.editorFocused ? !(r.target.tagName === "INPUT" && r.target.tagName === "LABEL" && r.target.tagName === "TEXTAREA" || t.inputFocused) && !(t.editorFocused = !1) : !(t.inputFocused = !1);
|
|
783
|
-
}, this.isEditorFocused = function() {
|
|
784
|
-
return !t.inputFocused || (t.inputFocused = !1);
|
|
785
|
-
}, this.isToolbarFocused = function() {
|
|
786
|
-
return !t.editorFocused || (t.editorFocused = !1);
|
|
787
|
-
}, this.isInputFocused = function() {
|
|
788
|
-
return t.inputFocused;
|
|
789
|
-
};
|
|
790
|
-
}), j = [], x = { onKeyDown: function(i) {
|
|
791
|
-
j.forEach(function(t) {
|
|
792
|
-
t(i);
|
|
793
|
-
});
|
|
794
|
-
}, registerCallBack: function(i) {
|
|
795
|
-
j.push(i);
|
|
796
|
-
}, deregisterCallBack: function(i) {
|
|
797
|
-
j = j.filter(function(t) {
|
|
798
|
-
return t !== i;
|
|
799
|
-
});
|
|
800
|
-
} }, I = function() {
|
|
801
|
-
je = !0;
|
|
802
|
-
}, Q = function() {
|
|
803
|
-
je = !1;
|
|
804
|
-
}, de = function() {
|
|
805
|
-
return je;
|
|
806
|
-
};
|
|
807
|
-
function le(i) {
|
|
808
|
-
var t = i.getData() && i.getData().get("text-align");
|
|
809
|
-
return t ? "rdw-".concat(t, "-aligned-block") : "";
|
|
810
|
-
}
|
|
811
|
-
function Ne(i, t) {
|
|
812
|
-
if (i) for (var r in i) !{}.hasOwnProperty.call(i, r) || t(r, i[r]);
|
|
813
|
-
}
|
|
814
|
-
function ge(i, t) {
|
|
815
|
-
var r = !1;
|
|
816
|
-
if (i) {
|
|
817
|
-
for (var o in i) if ({}.hasOwnProperty.call(i, o) && t === o) {
|
|
818
|
-
r = !0;
|
|
819
|
-
break;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return r;
|
|
823
|
-
}
|
|
824
|
-
function V(i) {
|
|
825
|
-
i.stopPropagation();
|
|
826
|
-
}
|
|
827
|
-
function te(i) {
|
|
828
|
-
return i[i.options[0]].icon;
|
|
829
|
-
}
|
|
830
|
-
function Se(i, t) {
|
|
831
|
-
if (i && t === void 0) return i;
|
|
832
|
-
var r = {};
|
|
833
|
-
return Ne(i, function(o, n) {
|
|
834
|
-
var e;
|
|
835
|
-
e = n, Object.prototype.toString.call(e) === "[object Object]" ? r[o] = Se(n, t[o]) : r[o] = t[o] !== void 0 ? t[o] : n;
|
|
836
|
-
}), r;
|
|
837
|
-
}
|
|
838
|
-
var De = E(6), H = E.n(De), ie = E(5);
|
|
839
|
-
E(9);
|
|
840
|
-
function oe(i) {
|
|
841
|
-
return (oe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
842
|
-
return typeof t;
|
|
843
|
-
} : function(t) {
|
|
844
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
845
|
-
})(i);
|
|
846
|
-
}
|
|
847
|
-
function ke(i, t, r) {
|
|
848
|
-
return t in i ? Object.defineProperty(i, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = r, i;
|
|
849
|
-
}
|
|
850
|
-
function Ce(i, t) {
|
|
851
|
-
for (var r = 0; r < t.length; r++) {
|
|
852
|
-
var o = t[r];
|
|
853
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
function _e(i, t) {
|
|
857
|
-
return (_e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
858
|
-
return r.__proto__ = o, r;
|
|
859
|
-
})(i, t);
|
|
860
|
-
}
|
|
861
|
-
function fe(i) {
|
|
862
|
-
var t = function() {
|
|
863
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
864
|
-
if (typeof Proxy == "function") return !0;
|
|
865
|
-
try {
|
|
866
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
867
|
-
})), !0;
|
|
868
|
-
} catch {
|
|
869
|
-
return !1;
|
|
870
|
-
}
|
|
871
|
-
}();
|
|
872
|
-
return function() {
|
|
873
|
-
var r, o = Pe(i);
|
|
874
|
-
if (t) {
|
|
875
|
-
var n = Pe(this).constructor;
|
|
876
|
-
r = Reflect.construct(o, arguments, n);
|
|
877
|
-
} else r = o.apply(this, arguments);
|
|
878
|
-
return function(e, a) {
|
|
879
|
-
{
|
|
880
|
-
if (a && (oe(a) === "object" || typeof a == "function")) return a;
|
|
881
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
882
|
-
}
|
|
883
|
-
return function(c) {
|
|
884
|
-
if (c !== void 0) return c;
|
|
885
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
886
|
-
}(e);
|
|
887
|
-
}(this, r);
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
|
-
function Pe(i) {
|
|
891
|
-
return (Pe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
892
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
893
|
-
})(i);
|
|
894
|
-
}
|
|
895
|
-
var q = function() {
|
|
896
|
-
(function(n, e) {
|
|
897
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
898
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && _e(n, e);
|
|
899
|
-
})(o, C.Component);
|
|
900
|
-
var i, t, r = fe(o);
|
|
901
|
-
function o() {
|
|
902
|
-
var n;
|
|
903
|
-
(function(u, l) {
|
|
904
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
905
|
-
})(this, o);
|
|
906
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
907
|
-
return (n = r.call.apply(r, [this].concat(a))).onClick = function() {
|
|
908
|
-
var u = n.props, l = u.disabled, p = u.onClick, f = u.value;
|
|
909
|
-
l || p(f);
|
|
910
|
-
}, n;
|
|
911
|
-
}
|
|
912
|
-
return i = o, (t = [{ key: "render", value: function() {
|
|
913
|
-
var n, e = this.props, a = e.children, c = e.className, u = e.activeClassName, l = e.active, p = e.disabled, f = e.title;
|
|
914
|
-
return s.a.createElement("div", { className: y()("rdw-option-wrapper", c, (ke(n = {}, "rdw-option-active ".concat(u), l), ke(n, "rdw-option-disabled", p), n)), onClick: this.onClick, "aria-selected": l, title: f }, a);
|
|
915
|
-
} }]) && Ce(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
916
|
-
}();
|
|
917
|
-
q.propTypes = { onClick: d.a.func.isRequired, children: d.a.any, value: d.a.string, className: d.a.string, activeClassName: d.a.string, active: d.a.bool, disabled: d.a.bool, title: d.a.string }, q.defaultProps = { activeClassName: "" }, E(12);
|
|
918
|
-
function be(i) {
|
|
919
|
-
return (be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
920
|
-
return typeof t;
|
|
921
|
-
} : function(t) {
|
|
922
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
923
|
-
})(i);
|
|
924
|
-
}
|
|
925
|
-
function U(i, t) {
|
|
926
|
-
for (var r = 0; r < t.length; r++) {
|
|
927
|
-
var o = t[r];
|
|
928
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
function re(i, t) {
|
|
932
|
-
return (re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
933
|
-
return r.__proto__ = o, r;
|
|
934
|
-
})(i, t);
|
|
935
|
-
}
|
|
936
|
-
function Ie(i) {
|
|
937
|
-
var t = function() {
|
|
938
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
939
|
-
if (typeof Proxy == "function") return !0;
|
|
940
|
-
try {
|
|
941
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
942
|
-
})), !0;
|
|
943
|
-
} catch {
|
|
944
|
-
return !1;
|
|
945
|
-
}
|
|
946
|
-
}();
|
|
947
|
-
return function() {
|
|
948
|
-
var r, o = we(i);
|
|
949
|
-
if (t) {
|
|
950
|
-
var n = we(this).constructor;
|
|
951
|
-
r = Reflect.construct(o, arguments, n);
|
|
952
|
-
} else r = o.apply(this, arguments);
|
|
953
|
-
return function(e, a) {
|
|
954
|
-
{
|
|
955
|
-
if (a && (be(a) === "object" || typeof a == "function")) return a;
|
|
956
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
957
|
-
}
|
|
958
|
-
return function(c) {
|
|
959
|
-
if (c !== void 0) return c;
|
|
960
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
961
|
-
}(e);
|
|
962
|
-
}(this, r);
|
|
963
|
-
};
|
|
964
|
-
}
|
|
965
|
-
function we(i) {
|
|
966
|
-
return (we = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
967
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
968
|
-
})(i);
|
|
969
|
-
}
|
|
970
|
-
var ve = function() {
|
|
971
|
-
(function(n, e) {
|
|
972
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
973
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && re(n, e);
|
|
974
|
-
})(o, C.Component);
|
|
975
|
-
var i, t, r = Ie(o);
|
|
976
|
-
function o() {
|
|
977
|
-
var n;
|
|
978
|
-
(function(u, l) {
|
|
979
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
980
|
-
})(this, o);
|
|
981
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
982
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { highlighted: -1 }, n.onChange = function(u) {
|
|
983
|
-
var l = n.props.onChange;
|
|
984
|
-
l && l(u), n.toggleExpansion();
|
|
985
|
-
}, n.setHighlighted = function(u) {
|
|
986
|
-
n.setState({ highlighted: u });
|
|
987
|
-
}, n.toggleExpansion = function() {
|
|
988
|
-
var u = n.props, l = u.doExpand, p = u.doCollapse;
|
|
989
|
-
u.expanded ? p() : l();
|
|
990
|
-
}, n;
|
|
991
|
-
}
|
|
992
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
993
|
-
var e = this.props.expanded;
|
|
994
|
-
n.expanded && !e && this.setState({ highlighted: -1 });
|
|
995
|
-
} }, { key: "render", value: function() {
|
|
996
|
-
var n = this, e = this.props, a = e.expanded, c = e.children, u = e.className, l = e.optionWrapperClassName, p = e.ariaLabel, f = e.onExpandEvent, m = e.title, b = this.state.highlighted, v = c.slice(1, c.length);
|
|
997
|
-
return s.a.createElement("div", { className: y()("rdw-dropdown-wrapper", u), "aria-expanded": a, "aria-label": p || "rdw-dropdown" }, s.a.createElement("a", { className: "rdw-dropdown-selectedtext", onClick: f, title: m }, c[0], s.a.createElement("div", { className: y()({ "rdw-dropdown-carettoclose": a, "rdw-dropdown-carettoopen": !a }) })), a ? s.a.createElement("ul", { className: y()("rdw-dropdown-optionwrapper", l), onClick: V }, s.a.Children.map(v, function(_, T) {
|
|
998
|
-
return _ && s.a.cloneElement(_, { onSelect: n.onChange, highlighted: b === T, setHighlighted: n.setHighlighted, index: T });
|
|
999
|
-
})) : void 0);
|
|
1000
|
-
} }]) && U(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1001
|
-
}();
|
|
1002
|
-
ve.propTypes = { children: d.a.any, onChange: d.a.func, className: d.a.string, expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, optionWrapperClassName: d.a.string, ariaLabel: d.a.string, title: d.a.string }, E(13);
|
|
1003
|
-
function Te(i) {
|
|
1004
|
-
return (Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1005
|
-
return typeof t;
|
|
1006
|
-
} : function(t) {
|
|
1007
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1008
|
-
})(i);
|
|
1009
|
-
}
|
|
1010
|
-
function me(i, t, r) {
|
|
1011
|
-
return t in i ? Object.defineProperty(i, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = r, i;
|
|
1012
|
-
}
|
|
1013
|
-
function h(i, t) {
|
|
1014
|
-
for (var r = 0; r < t.length; r++) {
|
|
1015
|
-
var o = t[r];
|
|
1016
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
function M(i, t) {
|
|
1020
|
-
return (M = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1021
|
-
return r.__proto__ = o, r;
|
|
1022
|
-
})(i, t);
|
|
1023
|
-
}
|
|
1024
|
-
function D(i) {
|
|
1025
|
-
var t = function() {
|
|
1026
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1027
|
-
if (typeof Proxy == "function") return !0;
|
|
1028
|
-
try {
|
|
1029
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1030
|
-
})), !0;
|
|
1031
|
-
} catch {
|
|
1032
|
-
return !1;
|
|
1033
|
-
}
|
|
1034
|
-
}();
|
|
1035
|
-
return function() {
|
|
1036
|
-
var r, o = O(i);
|
|
1037
|
-
if (t) {
|
|
1038
|
-
var n = O(this).constructor;
|
|
1039
|
-
r = Reflect.construct(o, arguments, n);
|
|
1040
|
-
} else r = o.apply(this, arguments);
|
|
1041
|
-
return function(e, a) {
|
|
1042
|
-
{
|
|
1043
|
-
if (a && (Te(a) === "object" || typeof a == "function")) return a;
|
|
1044
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1045
|
-
}
|
|
1046
|
-
return function(c) {
|
|
1047
|
-
if (c !== void 0) return c;
|
|
1048
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1049
|
-
}(e);
|
|
1050
|
-
}(this, r);
|
|
1051
|
-
};
|
|
1052
|
-
}
|
|
1053
|
-
function O(i) {
|
|
1054
|
-
return (O = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1055
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1056
|
-
})(i);
|
|
1057
|
-
}
|
|
1058
|
-
var k = function() {
|
|
1059
|
-
(function(n, e) {
|
|
1060
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1061
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && M(n, e);
|
|
1062
|
-
})(o, C.Component);
|
|
1063
|
-
var i, t, r = D(o);
|
|
1064
|
-
function o() {
|
|
1065
|
-
var n;
|
|
1066
|
-
(function(u, l) {
|
|
1067
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1068
|
-
})(this, o);
|
|
1069
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
1070
|
-
return (n = r.call.apply(r, [this].concat(a))).onClick = function(u) {
|
|
1071
|
-
var l = n.props, p = l.onSelect, f = l.onClick, m = l.value;
|
|
1072
|
-
l.disabled || (p && p(m), f && (u.stopPropagation(), f(m)));
|
|
1073
|
-
}, n.setHighlighted = function() {
|
|
1074
|
-
var u = n.props;
|
|
1075
|
-
(0, u.setHighlighted)(u.index);
|
|
1076
|
-
}, n.resetHighlighted = function() {
|
|
1077
|
-
(0, n.props.setHighlighted)(-1);
|
|
1078
|
-
}, n;
|
|
1079
|
-
}
|
|
1080
|
-
return i = o, (t = [{ key: "render", value: function() {
|
|
1081
|
-
var n, e = this.props, a = e.children, c = e.active, u = e.disabled, l = e.highlighted, p = e.className, f = e.activeClassName, m = e.disabledClassName, b = e.highlightedClassName, v = e.title;
|
|
1082
|
-
return s.a.createElement("li", { className: y()("rdw-dropdownoption-default", p, (me(n = {}, "rdw-dropdownoption-active ".concat(f), c), me(n, "rdw-dropdownoption-highlighted ".concat(b), l), me(n, "rdw-dropdownoption-disabled ".concat(m), u), n)), onMouseEnter: this.setHighlighted, onMouseLeave: this.resetHighlighted, onClick: this.onClick, title: v }, a);
|
|
1083
|
-
} }]) && h(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1084
|
-
}();
|
|
1085
|
-
k.propTypes = { children: d.a.any, value: d.a.any, onClick: d.a.func, onSelect: d.a.func, setHighlighted: d.a.func, index: d.a.number, disabled: d.a.bool, active: d.a.bool, highlighted: d.a.bool, className: d.a.string, activeClassName: d.a.string, disabledClassName: d.a.string, highlightedClassName: d.a.string, title: d.a.string }, k.defaultProps = { activeClassName: "", disabledClassName: "", highlightedClassName: "" }, E(14);
|
|
1086
|
-
function F(i) {
|
|
1087
|
-
return (F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1088
|
-
return typeof t;
|
|
1089
|
-
} : function(t) {
|
|
1090
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1091
|
-
})(i);
|
|
1092
|
-
}
|
|
1093
|
-
function Z(i, t) {
|
|
1094
|
-
for (var r = 0; r < t.length; r++) {
|
|
1095
|
-
var o = t[r];
|
|
1096
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
function B(i, t) {
|
|
1100
|
-
return (B = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1101
|
-
return r.__proto__ = o, r;
|
|
1102
|
-
})(i, t);
|
|
1103
|
-
}
|
|
1104
|
-
function G(i) {
|
|
1105
|
-
var t = function() {
|
|
1106
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1107
|
-
if (typeof Proxy == "function") return !0;
|
|
1108
|
-
try {
|
|
1109
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1110
|
-
})), !0;
|
|
1111
|
-
} catch {
|
|
1112
|
-
return !1;
|
|
1113
|
-
}
|
|
1114
|
-
}();
|
|
1115
|
-
return function() {
|
|
1116
|
-
var r, o = X(i);
|
|
1117
|
-
if (t) {
|
|
1118
|
-
var n = X(this).constructor;
|
|
1119
|
-
r = Reflect.construct(o, arguments, n);
|
|
1120
|
-
} else r = o.apply(this, arguments);
|
|
1121
|
-
return function(e, a) {
|
|
1122
|
-
{
|
|
1123
|
-
if (a && (F(a) === "object" || typeof a == "function")) return a;
|
|
1124
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1125
|
-
}
|
|
1126
|
-
return function(c) {
|
|
1127
|
-
if (c !== void 0) return c;
|
|
1128
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1129
|
-
}(e);
|
|
1130
|
-
}(this, r);
|
|
1131
|
-
};
|
|
1132
|
-
}
|
|
1133
|
-
function X(i) {
|
|
1134
|
-
return (X = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1135
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1136
|
-
})(i);
|
|
1137
|
-
}
|
|
1138
|
-
var $ = function() {
|
|
1139
|
-
(function(n, e) {
|
|
1140
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1141
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && B(n, e);
|
|
1142
|
-
})(o, C.Component);
|
|
1143
|
-
var i, t, r = G(o);
|
|
1144
|
-
function o() {
|
|
1145
|
-
return function(n, e) {
|
|
1146
|
-
if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
1147
|
-
}(this, o), r.apply(this, arguments);
|
|
1148
|
-
}
|
|
1149
|
-
return i = o, (t = [{ key: "renderInFlatList", value: function() {
|
|
1150
|
-
var n = this.props, e = n.config, a = n.currentState, c = n.onChange, u = n.translations;
|
|
1151
|
-
return s.a.createElement("div", { className: y()("rdw-inline-wrapper", e.className), "aria-label": "rdw-inline-control" }, e.options.map(function(l, p) {
|
|
1152
|
-
return s.a.createElement(q, { key: p, value: l, onClick: c, className: y()(e[l].className), active: a[l] === !0 || l === "MONOSPACE" && a.CODE, title: e[l].title || u["components.controls.inline.".concat(l)] }, s.a.createElement("img", { alt: "", src: e[l].icon }));
|
|
1153
|
-
}));
|
|
1154
|
-
} }, { key: "renderInDropDown", value: function() {
|
|
1155
|
-
var n = this.props, e = n.config, a = n.expanded, c = n.doExpand, u = n.onExpandEvent, l = n.doCollapse, p = n.currentState, f = n.onChange, m = n.translations, b = e.className, v = e.dropdownClassName, _ = e.title;
|
|
1156
|
-
return s.a.createElement(ve, { className: y()("rdw-inline-dropdown", b), optionWrapperClassName: y()(v), onChange: f, expanded: a, doExpand: c, doCollapse: l, onExpandEvent: u, "aria-label": "rdw-inline-control", title: _ }, s.a.createElement("img", { src: te(e), alt: "" }), e.options.map(function(T, N) {
|
|
1157
|
-
return s.a.createElement(k, { key: N, value: T, className: y()("rdw-inline-dropdownoption", e[T].className), active: p[T] === !0 || T === "MONOSPACE" && p.CODE, title: e[T].title || m["components.controls.inline.".concat(T)] }, s.a.createElement("img", { src: e[T].icon, alt: "" }));
|
|
1158
|
-
}));
|
|
1159
|
-
} }, { key: "render", value: function() {
|
|
1160
|
-
return this.props.config.inDropdown ? this.renderInDropDown() : this.renderInFlatList();
|
|
1161
|
-
} }]) && Z(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1162
|
-
}();
|
|
1163
|
-
function ae(i) {
|
|
1164
|
-
return (ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1165
|
-
return typeof t;
|
|
1166
|
-
} : function(t) {
|
|
1167
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1168
|
-
})(i);
|
|
1169
|
-
}
|
|
1170
|
-
function he(i, t) {
|
|
1171
|
-
for (var r = 0; r < t.length; r++) {
|
|
1172
|
-
var o = t[r];
|
|
1173
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
function se(i, t) {
|
|
1177
|
-
return (se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1178
|
-
return r.__proto__ = o, r;
|
|
1179
|
-
})(i, t);
|
|
1180
|
-
}
|
|
1181
|
-
function Me(i) {
|
|
1182
|
-
var t = function() {
|
|
1183
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1184
|
-
if (typeof Proxy == "function") return !0;
|
|
1185
|
-
try {
|
|
1186
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1187
|
-
})), !0;
|
|
1188
|
-
} catch {
|
|
1189
|
-
return !1;
|
|
1190
|
-
}
|
|
1191
|
-
}();
|
|
1192
|
-
return function() {
|
|
1193
|
-
var r, o = ee(i);
|
|
1194
|
-
if (t) {
|
|
1195
|
-
var n = ee(this).constructor;
|
|
1196
|
-
r = Reflect.construct(o, arguments, n);
|
|
1197
|
-
} else r = o.apply(this, arguments);
|
|
1198
|
-
return function(e, a) {
|
|
1199
|
-
{
|
|
1200
|
-
if (a && (ae(a) === "object" || typeof a == "function")) return a;
|
|
1201
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1202
|
-
}
|
|
1203
|
-
return function(c) {
|
|
1204
|
-
if (c !== void 0) return c;
|
|
1205
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1206
|
-
}(e);
|
|
1207
|
-
}(this, r);
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
function ee(i) {
|
|
1211
|
-
return (ee = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1212
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1213
|
-
})(i);
|
|
1214
|
-
}
|
|
1215
|
-
$.propTypes = { expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, config: d.a.object, onChange: d.a.func, currentState: d.a.object, translations: d.a.object };
|
|
1216
|
-
var ue = function() {
|
|
1217
|
-
(function(n, e) {
|
|
1218
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1219
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && se(n, e);
|
|
1220
|
-
})(o, C.Component);
|
|
1221
|
-
var i, t, r = Me(o);
|
|
1222
|
-
function o(n) {
|
|
1223
|
-
var e;
|
|
1224
|
-
(function(l, p) {
|
|
1225
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
1226
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
1227
|
-
e.signalExpanded = !e.state.expanded;
|
|
1228
|
-
}, e.expandCollapse = function() {
|
|
1229
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
1230
|
-
}, e.toggleInlineStyle = function(l) {
|
|
1231
|
-
var p = l === "monospace" ? "CODE" : l.toUpperCase(), f = e.props, m = f.editorState, b = f.onChange, v = L.RichUtils.toggleInlineStyle(m, p);
|
|
1232
|
-
if (l === "subscript" || l === "superscript") {
|
|
1233
|
-
var _ = l === "subscript" ? "SUPERSCRIPT" : "SUBSCRIPT", T = L.Modifier.removeInlineStyle(v.getCurrentContent(), v.getSelection(), _);
|
|
1234
|
-
v = L.EditorState.push(v, T, "change-inline-style");
|
|
1235
|
-
}
|
|
1236
|
-
v && b(v);
|
|
1237
|
-
}, e.changeKeys = function(l) {
|
|
1238
|
-
if (l) {
|
|
1239
|
-
var p = {};
|
|
1240
|
-
return Ne(l, function(f, m) {
|
|
1241
|
-
p[f === "CODE" ? "monospace" : f.toLowerCase()] = m;
|
|
1242
|
-
}), p;
|
|
1243
|
-
}
|
|
1244
|
-
}, e.doExpand = function() {
|
|
1245
|
-
e.setState({ expanded: !0 });
|
|
1246
|
-
}, e.doCollapse = function() {
|
|
1247
|
-
e.setState({ expanded: !1 });
|
|
1248
|
-
};
|
|
1249
|
-
var a = e.props, c = a.editorState, u = a.modalHandler;
|
|
1250
|
-
return e.state = { currentStyles: c ? e.changeKeys(Object(g.getSelectionInlineStyle)(c)) : {} }, u.registerCallBack(e.expandCollapse), e;
|
|
1251
|
-
}
|
|
1252
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1253
|
-
var e = this.props.editorState;
|
|
1254
|
-
e && e !== n.editorState && this.setState({ currentStyles: this.changeKeys(Object(g.getSelectionInlineStyle)(e)) });
|
|
1255
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1256
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
1257
|
-
} }, { key: "render", value: function() {
|
|
1258
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.expanded, l = c.currentStyles, p = e.component || $;
|
|
1259
|
-
return s.a.createElement(p, { config: e, translations: a, currentState: l, expanded: u, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, onChange: this.toggleInlineStyle });
|
|
1260
|
-
} }]) && he(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1261
|
-
}();
|
|
1262
|
-
ue.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object }, E(15);
|
|
1263
|
-
function Le(i) {
|
|
1264
|
-
return (Le = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1265
|
-
return typeof t;
|
|
1266
|
-
} : function(t) {
|
|
1267
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1268
|
-
})(i);
|
|
1269
|
-
}
|
|
1270
|
-
function Oe(i, t) {
|
|
1271
|
-
for (var r = 0; r < t.length; r++) {
|
|
1272
|
-
var o = t[r];
|
|
1273
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
function Ue(i, t) {
|
|
1277
|
-
return (Ue = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1278
|
-
return r.__proto__ = o, r;
|
|
1279
|
-
})(i, t);
|
|
1280
|
-
}
|
|
1281
|
-
function Be(i) {
|
|
1282
|
-
var t = function() {
|
|
1283
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1284
|
-
if (typeof Proxy == "function") return !0;
|
|
1285
|
-
try {
|
|
1286
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1287
|
-
})), !0;
|
|
1288
|
-
} catch {
|
|
1289
|
-
return !1;
|
|
1290
|
-
}
|
|
1291
|
-
}();
|
|
1292
|
-
return function() {
|
|
1293
|
-
var r, o = We(i);
|
|
1294
|
-
if (t) {
|
|
1295
|
-
var n = We(this).constructor;
|
|
1296
|
-
r = Reflect.construct(o, arguments, n);
|
|
1297
|
-
} else r = o.apply(this, arguments);
|
|
1298
|
-
return function(e, a) {
|
|
1299
|
-
{
|
|
1300
|
-
if (a && (Le(a) === "object" || typeof a == "function")) return a;
|
|
1301
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1302
|
-
}
|
|
1303
|
-
return function(c) {
|
|
1304
|
-
if (c !== void 0) return c;
|
|
1305
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1306
|
-
}(e);
|
|
1307
|
-
}(this, r);
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
function We(i) {
|
|
1311
|
-
return (We = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1312
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1313
|
-
})(i);
|
|
1314
|
-
}
|
|
1315
|
-
var Ve = function() {
|
|
1316
|
-
(function(n, e) {
|
|
1317
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1318
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Ue(n, e);
|
|
1319
|
-
})(o, C.Component);
|
|
1320
|
-
var i, t, r = Be(o);
|
|
1321
|
-
function o(n) {
|
|
1322
|
-
var e;
|
|
1323
|
-
return function(a, c) {
|
|
1324
|
-
if (!(a instanceof c)) throw new TypeError("Cannot call a class as a function");
|
|
1325
|
-
}(this, o), (e = r.call(this, n)).getBlockTypes = function(a) {
|
|
1326
|
-
return [{ label: "Normal", displayName: a["components.controls.blocktype.normal"] }, { label: "H1", displayName: a["components.controls.blocktype.h1"] }, { label: "H2", displayName: a["components.controls.blocktype.h2"] }, { label: "H3", displayName: a["components.controls.blocktype.h3"] }, { label: "H4", displayName: a["components.controls.blocktype.h4"] }, { label: "H5", displayName: a["components.controls.blocktype.h5"] }, { label: "H6", displayName: a["components.controls.blocktype.h6"] }, { label: "Blockquote", displayName: a["components.controls.blocktype.blockquote"] }, { label: "Code", displayName: a["components.controls.blocktype.code"] }];
|
|
1327
|
-
}, e.state = { blockTypes: e.getBlockTypes(n.translations) }, e;
|
|
1328
|
-
}
|
|
1329
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1330
|
-
var e = this.props.translations;
|
|
1331
|
-
e !== n.translations && this.setState({ blockTypes: this.getBlockTypes(e) });
|
|
1332
|
-
} }, { key: "renderFlat", value: function(n) {
|
|
1333
|
-
var e = this.props, a = e.config.className, c = e.onChange, u = e.currentState.blockType;
|
|
1334
|
-
return s.a.createElement("div", { className: y()("rdw-inline-wrapper", a) }, n.map(function(l, p) {
|
|
1335
|
-
return s.a.createElement(q, { key: p, value: l.label, active: u === l.label, onClick: c }, l.displayName);
|
|
1336
|
-
}));
|
|
1337
|
-
} }, { key: "renderInDropdown", value: function(n) {
|
|
1338
|
-
var e = this.props, a = e.config, c = a.className, u = a.dropdownClassName, l = a.title, p = e.currentState.blockType, f = e.expanded, m = e.doExpand, b = e.onExpandEvent, v = e.doCollapse, _ = e.onChange, T = e.translations, N = this.state.blockTypes.filter(function(R) {
|
|
1339
|
-
return R.label === p;
|
|
1340
|
-
}), z = N && N[0] && N[0].displayName;
|
|
1341
|
-
return s.a.createElement("div", { className: "rdw-block-wrapper", "aria-label": "rdw-block-control" }, s.a.createElement(ve, { className: y()("rdw-block-dropdown", c), optionWrapperClassName: y()(u), onChange: _, expanded: f, doExpand: m, doCollapse: v, onExpandEvent: b, title: l || T["components.controls.blocktype.blocktype"] }, s.a.createElement("span", null, z || T["components.controls.blocktype.blocktype"]), n.map(function(R, Y) {
|
|
1342
|
-
return s.a.createElement(k, { active: p === R.label, value: R.label, key: Y }, R.displayName);
|
|
1343
|
-
})));
|
|
1344
|
-
} }, { key: "render", value: function() {
|
|
1345
|
-
var n = this.props.config, e = n.inDropdown, a = this.state.blockTypes.filter(function(c) {
|
|
1346
|
-
var u = c.label;
|
|
1347
|
-
return -1 < n.options.indexOf(u);
|
|
1348
|
-
});
|
|
1349
|
-
return e ? this.renderInDropdown(a) : this.renderFlat(a);
|
|
1350
|
-
} }]) && Oe(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1351
|
-
}();
|
|
1352
|
-
Ve.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, doExpand: d.a.func, doCollapse: d.a.func, onChange: d.a.func, config: d.a.object, currentState: d.a.object, translations: d.a.object };
|
|
1353
|
-
var it = Ve;
|
|
1354
|
-
function $e(i) {
|
|
1355
|
-
return ($e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1356
|
-
return typeof t;
|
|
1357
|
-
} : function(t) {
|
|
1358
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1359
|
-
})(i);
|
|
1360
|
-
}
|
|
1361
|
-
function at(i, t) {
|
|
1362
|
-
for (var r = 0; r < t.length; r++) {
|
|
1363
|
-
var o = t[r];
|
|
1364
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
function Ut(i, t) {
|
|
1368
|
-
return (Ut = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1369
|
-
return r.__proto__ = o, r;
|
|
1370
|
-
})(i, t);
|
|
1371
|
-
}
|
|
1372
|
-
function vo(i) {
|
|
1373
|
-
var t = function() {
|
|
1374
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1375
|
-
if (typeof Proxy == "function") return !0;
|
|
1376
|
-
try {
|
|
1377
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1378
|
-
})), !0;
|
|
1379
|
-
} catch {
|
|
1380
|
-
return !1;
|
|
1381
|
-
}
|
|
1382
|
-
}();
|
|
1383
|
-
return function() {
|
|
1384
|
-
var r, o = ct(i);
|
|
1385
|
-
if (t) {
|
|
1386
|
-
var n = ct(this).constructor;
|
|
1387
|
-
r = Reflect.construct(o, arguments, n);
|
|
1388
|
-
} else r = o.apply(this, arguments);
|
|
1389
|
-
return function(e, a) {
|
|
1390
|
-
{
|
|
1391
|
-
if (a && ($e(a) === "object" || typeof a == "function")) return a;
|
|
1392
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1393
|
-
}
|
|
1394
|
-
return function(c) {
|
|
1395
|
-
if (c !== void 0) return c;
|
|
1396
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1397
|
-
}(e);
|
|
1398
|
-
}(this, r);
|
|
1399
|
-
};
|
|
1400
|
-
}
|
|
1401
|
-
function ct(i) {
|
|
1402
|
-
return (ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1403
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1404
|
-
})(i);
|
|
1405
|
-
}
|
|
1406
|
-
var Bt = function() {
|
|
1407
|
-
(function(n, e) {
|
|
1408
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1409
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Ut(n, e);
|
|
1410
|
-
})(o, C.Component);
|
|
1411
|
-
var i, t, r = vo(o);
|
|
1412
|
-
function o(n) {
|
|
1413
|
-
var e;
|
|
1414
|
-
(function(u, l) {
|
|
1415
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1416
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
1417
|
-
e.signalExpanded = !e.state.expanded;
|
|
1418
|
-
}, e.expandCollapse = function() {
|
|
1419
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
1420
|
-
}, e.blocksTypes = [{ label: "Normal", style: "unstyled" }, { label: "H1", style: "header-one" }, { label: "H2", style: "header-two" }, { label: "H3", style: "header-three" }, { label: "H4", style: "header-four" }, { label: "H5", style: "header-five" }, { label: "H6", style: "header-six" }, { label: "Blockquote", style: "blockquote" }, { label: "Code", style: "code" }], e.doExpand = function() {
|
|
1421
|
-
e.setState({ expanded: !0 });
|
|
1422
|
-
}, e.doCollapse = function() {
|
|
1423
|
-
e.setState({ expanded: !1 });
|
|
1424
|
-
}, e.toggleBlockType = function(u) {
|
|
1425
|
-
var l = e.blocksTypes.find(function(v) {
|
|
1426
|
-
return v.label === u;
|
|
1427
|
-
}).style, p = e.props, f = p.editorState, m = p.onChange, b = L.RichUtils.toggleBlockType(f, l);
|
|
1428
|
-
b && m(b);
|
|
1429
|
-
};
|
|
1430
|
-
var a = n.editorState, c = n.modalHandler;
|
|
1431
|
-
return e.state = { expanded: !1, currentBlockType: a ? Object(g.getSelectedBlocksType)(a) : "unstyled" }, c.registerCallBack(e.expandCollapse), e;
|
|
1432
|
-
}
|
|
1433
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1434
|
-
var e = this.props.editorState;
|
|
1435
|
-
e && e !== n.editorState && this.setState({ currentBlockType: Object(g.getSelectedBlocksType)(e) });
|
|
1436
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1437
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
1438
|
-
} }, { key: "render", value: function() {
|
|
1439
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.expanded, l = c.currentBlockType, p = e.component || it, f = this.blocksTypes.find(function(m) {
|
|
1440
|
-
return m.style === l;
|
|
1441
|
-
});
|
|
1442
|
-
return s.a.createElement(p, { config: e, translations: a, currentState: { blockType: f && f.label }, onChange: this.toggleBlockType, expanded: u, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse });
|
|
1443
|
-
} }]) && at(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1444
|
-
}();
|
|
1445
|
-
Bt.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
1446
|
-
var No = Bt;
|
|
1447
|
-
E(16);
|
|
1448
|
-
function Ft(i) {
|
|
1449
|
-
return (Ft = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1450
|
-
return typeof t;
|
|
1451
|
-
} : function(t) {
|
|
1452
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1453
|
-
})(i);
|
|
1454
|
-
}
|
|
1455
|
-
function Eo(i, t) {
|
|
1456
|
-
for (var r = 0; r < t.length; r++) {
|
|
1457
|
-
var o = t[r];
|
|
1458
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
function Yt(i, t) {
|
|
1462
|
-
return (Yt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1463
|
-
return r.__proto__ = o, r;
|
|
1464
|
-
})(i, t);
|
|
1465
|
-
}
|
|
1466
|
-
function So(i) {
|
|
1467
|
-
var t = function() {
|
|
1468
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1469
|
-
if (typeof Proxy == "function") return !0;
|
|
1470
|
-
try {
|
|
1471
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1472
|
-
})), !0;
|
|
1473
|
-
} catch {
|
|
1474
|
-
return !1;
|
|
1475
|
-
}
|
|
1476
|
-
}();
|
|
1477
|
-
return function() {
|
|
1478
|
-
var r, o = lt(i);
|
|
1479
|
-
if (t) {
|
|
1480
|
-
var n = lt(this).constructor;
|
|
1481
|
-
r = Reflect.construct(o, arguments, n);
|
|
1482
|
-
} else r = o.apply(this, arguments);
|
|
1483
|
-
return function(e, a) {
|
|
1484
|
-
{
|
|
1485
|
-
if (a && (Ft(a) === "object" || typeof a == "function")) return a;
|
|
1486
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1487
|
-
}
|
|
1488
|
-
return function(c) {
|
|
1489
|
-
if (c !== void 0) return c;
|
|
1490
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1491
|
-
}(e);
|
|
1492
|
-
}(this, r);
|
|
1493
|
-
};
|
|
1494
|
-
}
|
|
1495
|
-
function lt(i) {
|
|
1496
|
-
return (lt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1497
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1498
|
-
})(i);
|
|
1499
|
-
}
|
|
1500
|
-
var Qt = function() {
|
|
1501
|
-
(function(n, e) {
|
|
1502
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1503
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Yt(n, e);
|
|
1504
|
-
})(o, C.Component);
|
|
1505
|
-
var i, t, r = So(o);
|
|
1506
|
-
function o() {
|
|
1507
|
-
var n;
|
|
1508
|
-
(function(u, l) {
|
|
1509
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1510
|
-
})(this, o);
|
|
1511
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
1512
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { defaultFontSize: void 0 }, n;
|
|
1513
|
-
}
|
|
1514
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
1515
|
-
var n = document.getElementsByClassName("DraftEditor-root");
|
|
1516
|
-
if (n && 0 < n.length) {
|
|
1517
|
-
var e = window.getComputedStyle(n[0]).getPropertyValue("font-size");
|
|
1518
|
-
e = e.substring(0, e.length - 2), this.setState({ defaultFontSize: e });
|
|
1519
|
-
}
|
|
1520
|
-
} }, { key: "render", value: function() {
|
|
1521
|
-
var n = this.props, e = n.config, a = e.icon, c = e.className, u = e.dropdownClassName, l = e.options, p = e.title, f = n.onChange, m = n.expanded, b = n.doCollapse, v = n.onExpandEvent, _ = n.doExpand, T = n.translations, N = this.props.currentState.fontSize, z = this.state.defaultFontSize;
|
|
1522
|
-
return z = Number(z), N = N || l && 0 <= l.indexOf(z) && z, s.a.createElement("div", { className: "rdw-fontsize-wrapper", "aria-label": "rdw-font-size-control" }, s.a.createElement(ve, { className: y()("rdw-fontsize-dropdown", c), optionWrapperClassName: y()(u), onChange: f, expanded: m, doExpand: _, doCollapse: b, onExpandEvent: v, title: p || T["components.controls.fontsize.fontsize"] }, N ? s.a.createElement("span", null, N) : s.a.createElement("img", { src: a, alt: "" }), l.map(function(R, Y) {
|
|
1523
|
-
return s.a.createElement(k, { className: "rdw-fontsize-option", active: N === R, value: R, key: Y }, R);
|
|
1524
|
-
})));
|
|
1525
|
-
} }]) && Eo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1526
|
-
}();
|
|
1527
|
-
function Ht(i) {
|
|
1528
|
-
return (Ht = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1529
|
-
return typeof t;
|
|
1530
|
-
} : function(t) {
|
|
1531
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1532
|
-
})(i);
|
|
1533
|
-
}
|
|
1534
|
-
function wo(i, t) {
|
|
1535
|
-
for (var r = 0; r < t.length; r++) {
|
|
1536
|
-
var o = t[r];
|
|
1537
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
function Zt(i, t) {
|
|
1541
|
-
return (Zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1542
|
-
return r.__proto__ = o, r;
|
|
1543
|
-
})(i, t);
|
|
1544
|
-
}
|
|
1545
|
-
function Co(i) {
|
|
1546
|
-
var t = function() {
|
|
1547
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1548
|
-
if (typeof Proxy == "function") return !0;
|
|
1549
|
-
try {
|
|
1550
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1551
|
-
})), !0;
|
|
1552
|
-
} catch {
|
|
1553
|
-
return !1;
|
|
1554
|
-
}
|
|
1555
|
-
}();
|
|
1556
|
-
return function() {
|
|
1557
|
-
var r, o = st(i);
|
|
1558
|
-
if (t) {
|
|
1559
|
-
var n = st(this).constructor;
|
|
1560
|
-
r = Reflect.construct(o, arguments, n);
|
|
1561
|
-
} else r = o.apply(this, arguments);
|
|
1562
|
-
return function(e, a) {
|
|
1563
|
-
{
|
|
1564
|
-
if (a && (Ht(a) === "object" || typeof a == "function")) return a;
|
|
1565
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1566
|
-
}
|
|
1567
|
-
return function(c) {
|
|
1568
|
-
if (c !== void 0) return c;
|
|
1569
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1570
|
-
}(e);
|
|
1571
|
-
}(this, r);
|
|
1572
|
-
};
|
|
1573
|
-
}
|
|
1574
|
-
function st(i) {
|
|
1575
|
-
return (st = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1576
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1577
|
-
})(i);
|
|
1578
|
-
}
|
|
1579
|
-
Qt.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, doExpand: d.a.func, doCollapse: d.a.func, onChange: d.a.func, config: d.a.object, currentState: d.a.object, translations: d.a.object };
|
|
1580
|
-
var Wt = function() {
|
|
1581
|
-
(function(n, e) {
|
|
1582
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1583
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Zt(n, e);
|
|
1584
|
-
})(o, C.Component);
|
|
1585
|
-
var i, t, r = Co(o);
|
|
1586
|
-
function o(n) {
|
|
1587
|
-
var e;
|
|
1588
|
-
(function(u, l) {
|
|
1589
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1590
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
1591
|
-
e.signalExpanded = !e.state.expanded;
|
|
1592
|
-
}, e.expandCollapse = function() {
|
|
1593
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
1594
|
-
}, e.doExpand = function() {
|
|
1595
|
-
e.setState({ expanded: !0 });
|
|
1596
|
-
}, e.doCollapse = function() {
|
|
1597
|
-
e.setState({ expanded: !1 });
|
|
1598
|
-
}, e.toggleFontSize = function(u) {
|
|
1599
|
-
var l = e.props, p = l.editorState, f = l.onChange, m = Object(g.toggleCustomInlineStyle)(p, "fontSize", u);
|
|
1600
|
-
m && f(m);
|
|
1601
|
-
};
|
|
1602
|
-
var a = n.editorState, c = n.modalHandler;
|
|
1603
|
-
return e.state = { expanded: void 0, currentFontSize: a ? Object(g.getSelectionCustomInlineStyle)(a, ["FONTSIZE"]).FONTSIZE : void 0 }, c.registerCallBack(e.expandCollapse), e;
|
|
1604
|
-
}
|
|
1605
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1606
|
-
var e = this.props.editorState;
|
|
1607
|
-
e && e !== n.editorState && this.setState({ currentFontSize: Object(g.getSelectionCustomInlineStyle)(e, ["FONTSIZE"]).FONTSIZE });
|
|
1608
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1609
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
1610
|
-
} }, { key: "render", value: function() {
|
|
1611
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.expanded, l = c.currentFontSize, p = e.component || Qt, f = l && Number(l.substring(9));
|
|
1612
|
-
return s.a.createElement(p, { config: e, translations: a, currentState: { fontSize: f }, onChange: this.toggleFontSize, expanded: u, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse });
|
|
1613
|
-
} }]) && wo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1614
|
-
}();
|
|
1615
|
-
Wt.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object, modalHandler: d.a.object, config: d.a.object, translations: d.a.object }, E(17);
|
|
1616
|
-
function Gt(i) {
|
|
1617
|
-
return (Gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1618
|
-
return typeof t;
|
|
1619
|
-
} : function(t) {
|
|
1620
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1621
|
-
})(i);
|
|
1622
|
-
}
|
|
1623
|
-
function Lo(i, t) {
|
|
1624
|
-
for (var r = 0; r < t.length; r++) {
|
|
1625
|
-
var o = t[r];
|
|
1626
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
function Jt(i, t) {
|
|
1630
|
-
return (Jt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1631
|
-
return r.__proto__ = o, r;
|
|
1632
|
-
})(i, t);
|
|
1633
|
-
}
|
|
1634
|
-
function Do(i) {
|
|
1635
|
-
var t = function() {
|
|
1636
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1637
|
-
if (typeof Proxy == "function") return !0;
|
|
1638
|
-
try {
|
|
1639
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1640
|
-
})), !0;
|
|
1641
|
-
} catch {
|
|
1642
|
-
return !1;
|
|
1643
|
-
}
|
|
1644
|
-
}();
|
|
1645
|
-
return function() {
|
|
1646
|
-
var r, o = ut(i);
|
|
1647
|
-
if (t) {
|
|
1648
|
-
var n = ut(this).constructor;
|
|
1649
|
-
r = Reflect.construct(o, arguments, n);
|
|
1650
|
-
} else r = o.apply(this, arguments);
|
|
1651
|
-
return function(e, a) {
|
|
1652
|
-
{
|
|
1653
|
-
if (a && (Gt(a) === "object" || typeof a == "function")) return a;
|
|
1654
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1655
|
-
}
|
|
1656
|
-
return function(c) {
|
|
1657
|
-
if (c !== void 0) return c;
|
|
1658
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1659
|
-
}(e);
|
|
1660
|
-
}(this, r);
|
|
1661
|
-
};
|
|
1662
|
-
}
|
|
1663
|
-
function ut(i) {
|
|
1664
|
-
return (ut = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1665
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1666
|
-
})(i);
|
|
1667
|
-
}
|
|
1668
|
-
var Vt = function() {
|
|
1669
|
-
(function(n, e) {
|
|
1670
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1671
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Jt(n, e);
|
|
1672
|
-
})(o, C.Component);
|
|
1673
|
-
var i, t, r = Do(o);
|
|
1674
|
-
function o() {
|
|
1675
|
-
var n;
|
|
1676
|
-
(function(u, l) {
|
|
1677
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1678
|
-
})(this, o);
|
|
1679
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
1680
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { defaultFontFamily: void 0 }, n;
|
|
1681
|
-
}
|
|
1682
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
1683
|
-
var n = document.getElementsByClassName("DraftEditor-root");
|
|
1684
|
-
if (n && 0 < n.length) {
|
|
1685
|
-
var e = window.getComputedStyle(n[0]).getPropertyValue("font-family");
|
|
1686
|
-
this.setState({ defaultFontFamily: e });
|
|
1687
|
-
}
|
|
1688
|
-
} }, { key: "render", value: function() {
|
|
1689
|
-
var n = this.state.defaultFontFamily, e = this.props, a = e.config, c = a.className, u = a.dropdownClassName, l = a.options, p = a.title, f = e.translations, m = e.onChange, b = e.expanded, v = e.doCollapse, _ = e.onExpandEvent, T = e.doExpand, N = this.props.currentState.fontFamily;
|
|
1690
|
-
return N = N || l && n && l.some(function(z) {
|
|
1691
|
-
return z.toLowerCase() === n.toLowerCase();
|
|
1692
|
-
}) && n, s.a.createElement("div", { className: "rdw-fontfamily-wrapper", "aria-label": "rdw-font-family-control" }, s.a.createElement(ve, { className: y()("rdw-fontfamily-dropdown", c), optionWrapperClassName: y()("rdw-fontfamily-optionwrapper", u), onChange: m, expanded: b, doExpand: T, doCollapse: v, onExpandEvent: _, title: p || f["components.controls.fontfamily.fontfamily"] }, s.a.createElement("span", { className: "rdw-fontfamily-placeholder" }, N || f["components.controls.fontfamily.fontfamily"]), l.map(function(z, R) {
|
|
1693
|
-
return s.a.createElement(k, { active: N === z, value: z, key: R }, z);
|
|
1694
|
-
})));
|
|
1695
|
-
} }]) && Lo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1696
|
-
}();
|
|
1697
|
-
Vt.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, doExpand: d.a.func, doCollapse: d.a.func, onChange: d.a.func, config: d.a.object, currentState: d.a.object, translations: d.a.object };
|
|
1698
|
-
var ko = Vt;
|
|
1699
|
-
function qt(i) {
|
|
1700
|
-
return (qt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1701
|
-
return typeof t;
|
|
1702
|
-
} : function(t) {
|
|
1703
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1704
|
-
})(i);
|
|
1705
|
-
}
|
|
1706
|
-
function Oo(i, t) {
|
|
1707
|
-
for (var r = 0; r < t.length; r++) {
|
|
1708
|
-
var o = t[r];
|
|
1709
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
function Kt(i, t) {
|
|
1713
|
-
return (Kt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1714
|
-
return r.__proto__ = o, r;
|
|
1715
|
-
})(i, t);
|
|
1716
|
-
}
|
|
1717
|
-
function xo(i) {
|
|
1718
|
-
var t = function() {
|
|
1719
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1720
|
-
if (typeof Proxy == "function") return !0;
|
|
1721
|
-
try {
|
|
1722
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1723
|
-
})), !0;
|
|
1724
|
-
} catch {
|
|
1725
|
-
return !1;
|
|
1726
|
-
}
|
|
1727
|
-
}();
|
|
1728
|
-
return function() {
|
|
1729
|
-
var r, o = pt(i);
|
|
1730
|
-
if (t) {
|
|
1731
|
-
var n = pt(this).constructor;
|
|
1732
|
-
r = Reflect.construct(o, arguments, n);
|
|
1733
|
-
} else r = o.apply(this, arguments);
|
|
1734
|
-
return function(e, a) {
|
|
1735
|
-
{
|
|
1736
|
-
if (a && (qt(a) === "object" || typeof a == "function")) return a;
|
|
1737
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1738
|
-
}
|
|
1739
|
-
return function(c) {
|
|
1740
|
-
if (c !== void 0) return c;
|
|
1741
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1742
|
-
}(e);
|
|
1743
|
-
}(this, r);
|
|
1744
|
-
};
|
|
1745
|
-
}
|
|
1746
|
-
function pt(i) {
|
|
1747
|
-
return (pt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1748
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1749
|
-
})(i);
|
|
1750
|
-
}
|
|
1751
|
-
var Xt = function() {
|
|
1752
|
-
(function(n, e) {
|
|
1753
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1754
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Kt(n, e);
|
|
1755
|
-
})(o, C.Component);
|
|
1756
|
-
var i, t, r = xo(o);
|
|
1757
|
-
function o(n) {
|
|
1758
|
-
var e;
|
|
1759
|
-
(function(u, l) {
|
|
1760
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1761
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
1762
|
-
e.signalExpanded = !e.state.expanded;
|
|
1763
|
-
}, e.expandCollapse = function() {
|
|
1764
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
1765
|
-
}, e.doExpand = function() {
|
|
1766
|
-
e.setState({ expanded: !0 });
|
|
1767
|
-
}, e.doCollapse = function() {
|
|
1768
|
-
e.setState({ expanded: !1 });
|
|
1769
|
-
}, e.toggleFontFamily = function(u) {
|
|
1770
|
-
var l = e.props, p = l.editorState, f = l.onChange, m = Object(g.toggleCustomInlineStyle)(p, "fontFamily", u);
|
|
1771
|
-
m && f(m);
|
|
1772
|
-
};
|
|
1773
|
-
var a = n.editorState, c = n.modalHandler;
|
|
1774
|
-
return e.state = { expanded: void 0, currentFontFamily: a ? Object(g.getSelectionCustomInlineStyle)(a, ["FONTFAMILY"]).FONTFAMILY : void 0 }, c.registerCallBack(e.expandCollapse), e;
|
|
1775
|
-
}
|
|
1776
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1777
|
-
var e = this.props.editorState;
|
|
1778
|
-
e && e !== n.editorState && this.setState({ currentFontFamily: Object(g.getSelectionCustomInlineStyle)(e, ["FONTFAMILY"]).FONTFAMILY });
|
|
1779
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1780
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
1781
|
-
} }, { key: "render", value: function() {
|
|
1782
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.expanded, l = c.currentFontFamily, p = e.component || ko, f = l && l.substring(11);
|
|
1783
|
-
return s.a.createElement(p, { translations: a, config: e, currentState: { fontFamily: f }, onChange: this.toggleFontFamily, expanded: u, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse });
|
|
1784
|
-
} }]) && Oo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1785
|
-
}();
|
|
1786
|
-
Xt.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object, modalHandler: d.a.object, config: d.a.object, translations: d.a.object }, E(18);
|
|
1787
|
-
function $t(i) {
|
|
1788
|
-
return ($t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1789
|
-
return typeof t;
|
|
1790
|
-
} : function(t) {
|
|
1791
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1792
|
-
})(i);
|
|
1793
|
-
}
|
|
1794
|
-
function Io(i, t) {
|
|
1795
|
-
for (var r = 0; r < t.length; r++) {
|
|
1796
|
-
var o = t[r];
|
|
1797
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
function en(i, t) {
|
|
1801
|
-
return (en = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1802
|
-
return r.__proto__ = o, r;
|
|
1803
|
-
})(i, t);
|
|
1804
|
-
}
|
|
1805
|
-
function To(i) {
|
|
1806
|
-
var t = function() {
|
|
1807
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1808
|
-
if (typeof Proxy == "function") return !0;
|
|
1809
|
-
try {
|
|
1810
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1811
|
-
})), !0;
|
|
1812
|
-
} catch {
|
|
1813
|
-
return !1;
|
|
1814
|
-
}
|
|
1815
|
-
}();
|
|
1816
|
-
return function() {
|
|
1817
|
-
var r, o = dt(i);
|
|
1818
|
-
if (t) {
|
|
1819
|
-
var n = dt(this).constructor;
|
|
1820
|
-
r = Reflect.construct(o, arguments, n);
|
|
1821
|
-
} else r = o.apply(this, arguments);
|
|
1822
|
-
return function(e, a) {
|
|
1823
|
-
{
|
|
1824
|
-
if (a && ($t(a) === "object" || typeof a == "function")) return a;
|
|
1825
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1826
|
-
}
|
|
1827
|
-
return function(c) {
|
|
1828
|
-
if (c !== void 0) return c;
|
|
1829
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1830
|
-
}(e);
|
|
1831
|
-
}(this, r);
|
|
1832
|
-
};
|
|
1833
|
-
}
|
|
1834
|
-
function dt(i) {
|
|
1835
|
-
return (dt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1836
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1837
|
-
})(i);
|
|
1838
|
-
}
|
|
1839
|
-
var tn = function() {
|
|
1840
|
-
(function(n, e) {
|
|
1841
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1842
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && en(n, e);
|
|
1843
|
-
})(o, C.Component);
|
|
1844
|
-
var i, t, r = To(o);
|
|
1845
|
-
function o() {
|
|
1846
|
-
var n;
|
|
1847
|
-
(function(u, l) {
|
|
1848
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
1849
|
-
})(this, o);
|
|
1850
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
1851
|
-
return (n = r.call.apply(r, [this].concat(a))).options = ["unordered", "ordered", "indent", "outdent"], n.toggleBlockType = function(u) {
|
|
1852
|
-
(0, n.props.onChange)(u);
|
|
1853
|
-
}, n.indent = function() {
|
|
1854
|
-
(0, n.props.onChange)("indent");
|
|
1855
|
-
}, n.outdent = function() {
|
|
1856
|
-
(0, n.props.onChange)("outdent");
|
|
1857
|
-
}, n;
|
|
1858
|
-
}
|
|
1859
|
-
return i = o, (t = [{ key: "renderInFlatList", value: function() {
|
|
1860
|
-
var n = this.props, e = n.config, a = n.currentState.listType, c = n.translations, u = n.indentDisabled, l = n.outdentDisabled, p = e.options, f = e.unordered, m = e.ordered, b = e.indent, v = e.outdent, _ = e.className;
|
|
1861
|
-
return s.a.createElement("div", { className: y()("rdw-list-wrapper", _), "aria-label": "rdw-list-control" }, 0 <= p.indexOf("unordered") && s.a.createElement(q, { value: "unordered", onClick: this.toggleBlockType, className: y()(f.className), active: a === "unordered", title: f.title || c["components.controls.list.unordered"] }, s.a.createElement("img", { src: f.icon, alt: "" })), 0 <= p.indexOf("ordered") && s.a.createElement(q, { value: "ordered", onClick: this.toggleBlockType, className: y()(m.className), active: a === "ordered", title: m.title || c["components.controls.list.ordered"] }, s.a.createElement("img", { src: m.icon, alt: "" })), 0 <= p.indexOf("indent") && s.a.createElement(q, { onClick: this.indent, disabled: u, className: y()(b.className), title: b.title || c["components.controls.list.indent"] }, s.a.createElement("img", { src: b.icon, alt: "" })), 0 <= p.indexOf("outdent") && s.a.createElement(q, { onClick: this.outdent, disabled: l, className: y()(v.className), title: v.title || c["components.controls.list.outdent"] }, s.a.createElement("img", { src: v.icon, alt: "" })));
|
|
1862
|
-
} }, { key: "renderInDropDown", value: function() {
|
|
1863
|
-
var n = this, e = this.props, a = e.config, c = e.expanded, u = e.doCollapse, l = e.doExpand, p = e.onExpandEvent, f = e.onChange, m = e.currentState.listType, b = e.translations, v = a.options, _ = a.className, T = a.dropdownClassName, N = a.title;
|
|
1864
|
-
return s.a.createElement(ve, { className: y()("rdw-list-dropdown", _), optionWrapperClassName: y()(T), onChange: f, expanded: c, doExpand: l, doCollapse: u, onExpandEvent: p, "aria-label": "rdw-list-control", title: N || b["components.controls.list.list"] }, s.a.createElement("img", { src: te(a), alt: "" }), this.options.filter(function(z) {
|
|
1865
|
-
return 0 <= v.indexOf(z);
|
|
1866
|
-
}).map(function(z, R) {
|
|
1867
|
-
return s.a.createElement(k, { key: R, value: z, disabled: n.props["".concat(z, "Disabled")], className: y()("rdw-list-dropdownOption", a[z].className), active: m === z, title: a[z].title || b["components.controls.list.".concat(z)] }, s.a.createElement("img", { src: a[z].icon, alt: "" }));
|
|
1868
|
-
}));
|
|
1869
|
-
} }, { key: "render", value: function() {
|
|
1870
|
-
return this.props.config.inDropdown ? this.renderInDropDown() : this.renderInFlatList();
|
|
1871
|
-
} }]) && Io(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1872
|
-
}();
|
|
1873
|
-
function nn(i) {
|
|
1874
|
-
return (nn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1875
|
-
return typeof t;
|
|
1876
|
-
} : function(t) {
|
|
1877
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1878
|
-
})(i);
|
|
1879
|
-
}
|
|
1880
|
-
function Ao(i, t) {
|
|
1881
|
-
for (var r = 0; r < t.length; r++) {
|
|
1882
|
-
var o = t[r];
|
|
1883
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
function on(i, t) {
|
|
1887
|
-
return (on = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1888
|
-
return r.__proto__ = o, r;
|
|
1889
|
-
})(i, t);
|
|
1890
|
-
}
|
|
1891
|
-
function zo(i) {
|
|
1892
|
-
var t = function() {
|
|
1893
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1894
|
-
if (typeof Proxy == "function") return !0;
|
|
1895
|
-
try {
|
|
1896
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1897
|
-
})), !0;
|
|
1898
|
-
} catch {
|
|
1899
|
-
return !1;
|
|
1900
|
-
}
|
|
1901
|
-
}();
|
|
1902
|
-
return function() {
|
|
1903
|
-
var r, o = ft(i);
|
|
1904
|
-
if (t) {
|
|
1905
|
-
var n = ft(this).constructor;
|
|
1906
|
-
r = Reflect.construct(o, arguments, n);
|
|
1907
|
-
} else r = o.apply(this, arguments);
|
|
1908
|
-
return function(e, a) {
|
|
1909
|
-
{
|
|
1910
|
-
if (a && (nn(a) === "object" || typeof a == "function")) return a;
|
|
1911
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1912
|
-
}
|
|
1913
|
-
return function(c) {
|
|
1914
|
-
if (c !== void 0) return c;
|
|
1915
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1916
|
-
}(e);
|
|
1917
|
-
}(this, r);
|
|
1918
|
-
};
|
|
1919
|
-
}
|
|
1920
|
-
function ft(i) {
|
|
1921
|
-
return (ft = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
1922
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1923
|
-
})(i);
|
|
1924
|
-
}
|
|
1925
|
-
tn.propTypes = { expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, config: d.a.object, onChange: d.a.func, currentState: d.a.object, translations: d.a.object, indentDisabled: d.a.bool, outdentDisabled: d.a.bool };
|
|
1926
|
-
var rn = function() {
|
|
1927
|
-
(function(n, e) {
|
|
1928
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
1929
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && on(n, e);
|
|
1930
|
-
})(o, C.Component);
|
|
1931
|
-
var i, t, r = zo(o);
|
|
1932
|
-
function o(n) {
|
|
1933
|
-
var e;
|
|
1934
|
-
(function(l, p) {
|
|
1935
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
1936
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
1937
|
-
e.signalExpanded = !e.state.expanded;
|
|
1938
|
-
}, e.onChange = function(l) {
|
|
1939
|
-
l === "unordered" ? e.toggleBlockType("unordered-list-item") : l === "ordered" ? e.toggleBlockType("ordered-list-item") : l === "indent" ? e.adjustDepth(1) : e.adjustDepth(-1);
|
|
1940
|
-
}, e.expandCollapse = function() {
|
|
1941
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
1942
|
-
}, e.doExpand = function() {
|
|
1943
|
-
e.setState({ expanded: !0 });
|
|
1944
|
-
}, e.doCollapse = function() {
|
|
1945
|
-
e.setState({ expanded: !1 });
|
|
1946
|
-
}, e.toggleBlockType = function(l) {
|
|
1947
|
-
var p = e.props, f = p.onChange, m = p.editorState, b = L.RichUtils.toggleBlockType(m, l);
|
|
1948
|
-
b && f(b);
|
|
1949
|
-
}, e.adjustDepth = function(l) {
|
|
1950
|
-
var p = e.props, f = p.onChange, m = p.editorState, b = Object(g.changeDepth)(m, l, 4);
|
|
1951
|
-
b && f(b);
|
|
1952
|
-
}, e.isIndentDisabled = function() {
|
|
1953
|
-
var l = e.props.editorState, p = e.state.currentBlock, f = Object(g.getBlockBeforeSelectedBlock)(l);
|
|
1954
|
-
return !f || !Object(g.isListBlock)(p) || f.get("type") !== p.get("type") || f.get("depth") < p.get("depth");
|
|
1955
|
-
}, e.isOutdentDisabled = function() {
|
|
1956
|
-
var l = e.state.currentBlock;
|
|
1957
|
-
return !l || !Object(g.isListBlock)(l) || l.get("depth") <= 0;
|
|
1958
|
-
};
|
|
1959
|
-
var a = e.props, c = a.editorState, u = a.modalHandler;
|
|
1960
|
-
return e.state = { expanded: !1, currentBlock: c ? Object(g.getSelectedBlock)(c) : void 0 }, u.registerCallBack(e.expandCollapse), e;
|
|
1961
|
-
}
|
|
1962
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
1963
|
-
var e = this.props.editorState;
|
|
1964
|
-
e && e !== n.editorState && this.setState({ currentBlock: Object(g.getSelectedBlock)(e) });
|
|
1965
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
1966
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
1967
|
-
} }, { key: "render", value: function() {
|
|
1968
|
-
var n, e = this.props, a = e.config, c = e.translations, u = this.state, l = u.expanded, p = u.currentBlock, f = a.component || tn;
|
|
1969
|
-
p.get("type") === "unordered-list-item" ? n = "unordered" : p.get("type") === "ordered-list-item" && (n = "ordered");
|
|
1970
|
-
var m = this.isIndentDisabled(), b = this.isOutdentDisabled();
|
|
1971
|
-
return s.a.createElement(f, { config: a, translations: c, currentState: { listType: n }, expanded: l, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, onChange: this.onChange, indentDisabled: m, outdentDisabled: b });
|
|
1972
|
-
} }]) && Ao(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
1973
|
-
}();
|
|
1974
|
-
rn.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object }, E(19);
|
|
1975
|
-
function an(i) {
|
|
1976
|
-
return (an = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1977
|
-
return typeof t;
|
|
1978
|
-
} : function(t) {
|
|
1979
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1980
|
-
})(i);
|
|
1981
|
-
}
|
|
1982
|
-
function _o(i, t) {
|
|
1983
|
-
for (var r = 0; r < t.length; r++) {
|
|
1984
|
-
var o = t[r];
|
|
1985
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
function cn(i, t) {
|
|
1989
|
-
return (cn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1990
|
-
return r.__proto__ = o, r;
|
|
1991
|
-
})(i, t);
|
|
1992
|
-
}
|
|
1993
|
-
function Po(i) {
|
|
1994
|
-
var t = function() {
|
|
1995
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1996
|
-
if (typeof Proxy == "function") return !0;
|
|
1997
|
-
try {
|
|
1998
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1999
|
-
})), !0;
|
|
2000
|
-
} catch {
|
|
2001
|
-
return !1;
|
|
2002
|
-
}
|
|
2003
|
-
}();
|
|
2004
|
-
return function() {
|
|
2005
|
-
var r, o = mt(i);
|
|
2006
|
-
if (t) {
|
|
2007
|
-
var n = mt(this).constructor;
|
|
2008
|
-
r = Reflect.construct(o, arguments, n);
|
|
2009
|
-
} else r = o.apply(this, arguments);
|
|
2010
|
-
return function(e, a) {
|
|
2011
|
-
{
|
|
2012
|
-
if (a && (an(a) === "object" || typeof a == "function")) return a;
|
|
2013
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2014
|
-
}
|
|
2015
|
-
return function(c) {
|
|
2016
|
-
if (c !== void 0) return c;
|
|
2017
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2018
|
-
}(e);
|
|
2019
|
-
}(this, r);
|
|
2020
|
-
};
|
|
2021
|
-
}
|
|
2022
|
-
function mt(i) {
|
|
2023
|
-
return (mt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2024
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2025
|
-
})(i);
|
|
2026
|
-
}
|
|
2027
|
-
var ln = function() {
|
|
2028
|
-
(function(n, e) {
|
|
2029
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2030
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && cn(n, e);
|
|
2031
|
-
})(o, C.Component);
|
|
2032
|
-
var i, t, r = Po(o);
|
|
2033
|
-
function o() {
|
|
2034
|
-
return function(n, e) {
|
|
2035
|
-
if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
2036
|
-
}(this, o), r.apply(this, arguments);
|
|
2037
|
-
}
|
|
2038
|
-
return i = o, (t = [{ key: "renderInFlatList", value: function() {
|
|
2039
|
-
var n = this.props, e = n.config, a = e.options, c = e.left, u = e.center, l = e.right, p = e.justify, f = e.className, m = n.onChange, b = n.currentState.textAlignment, v = n.translations;
|
|
2040
|
-
return s.a.createElement("div", { className: y()("rdw-text-align-wrapper", f), "aria-label": "rdw-textalign-control" }, 0 <= a.indexOf("left") && s.a.createElement(q, { value: "left", className: y()(c.className), active: b === "left", onClick: m, title: c.title || v["components.controls.textalign.left"] }, s.a.createElement("img", { src: c.icon, alt: "" })), 0 <= a.indexOf("center") && s.a.createElement(q, { value: "center", className: y()(u.className), active: b === "center", onClick: m, title: u.title || v["components.controls.textalign.center"] }, s.a.createElement("img", { src: u.icon, alt: "" })), 0 <= a.indexOf("right") && s.a.createElement(q, { value: "right", className: y()(l.className), active: b === "right", onClick: m, title: l.title || v["components.controls.textalign.right"] }, s.a.createElement("img", { src: l.icon, alt: "" })), 0 <= a.indexOf("justify") && s.a.createElement(q, { value: "justify", className: y()(p.className), active: b === "justify", onClick: m, title: p.title || v["components.controls.textalign.justify"] }, s.a.createElement("img", { src: p.icon, alt: "" })));
|
|
2041
|
-
} }, { key: "renderInDropDown", value: function() {
|
|
2042
|
-
var n = this.props, e = n.config, a = n.expanded, c = n.doExpand, u = n.onExpandEvent, l = n.doCollapse, p = n.currentState.textAlignment, f = n.onChange, m = n.translations, b = e.options, v = e.left, _ = e.center, T = e.right, N = e.justify, z = e.className, R = e.dropdownClassName, Y = e.title;
|
|
2043
|
-
return s.a.createElement(ve, { className: y()("rdw-text-align-dropdown", z), optionWrapperClassName: y()(R), onChange: f, expanded: a, doExpand: c, doCollapse: l, onExpandEvent: u, "aria-label": "rdw-textalign-control", title: Y || m["components.controls.textalign.textalign"] }, s.a.createElement("img", { src: p && e[p] && e[p].icon || te(e), alt: "" }), 0 <= b.indexOf("left") && s.a.createElement(k, { value: "left", active: p === "left", className: y()("rdw-text-align-dropdownOption", v.className), title: v.title || m["components.controls.textalign.left"] }, s.a.createElement("img", { src: v.icon, alt: "" })), 0 <= b.indexOf("center") && s.a.createElement(k, { value: "center", active: p === "center", className: y()("rdw-text-align-dropdownOption", _.className), title: _.title || m["components.controls.textalign.center"] }, s.a.createElement("img", { src: _.icon, alt: "" })), 0 <= b.indexOf("right") && s.a.createElement(k, { value: "right", active: p === "right", className: y()("rdw-text-align-dropdownOption", T.className), title: T.title || m["components.controls.textalign.right"] }, s.a.createElement("img", { src: T.icon, alt: "" })), 0 <= b.indexOf("justify") && s.a.createElement(k, { value: "justify", active: p === "justify", className: y()("rdw-text-align-dropdownOption", N.className), title: N.title || m["components.controls.textalign.justify"] }, s.a.createElement("img", { src: N.icon, alt: "" })));
|
|
2044
|
-
} }, { key: "render", value: function() {
|
|
2045
|
-
return this.props.config.inDropdown ? this.renderInDropDown() : this.renderInFlatList();
|
|
2046
|
-
} }]) && _o(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2047
|
-
}();
|
|
2048
|
-
function sn(i) {
|
|
2049
|
-
return (sn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2050
|
-
return typeof t;
|
|
2051
|
-
} : function(t) {
|
|
2052
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2053
|
-
})(i);
|
|
2054
|
-
}
|
|
2055
|
-
function Ro(i, t) {
|
|
2056
|
-
for (var r = 0; r < t.length; r++) {
|
|
2057
|
-
var o = t[r];
|
|
2058
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
function un(i, t) {
|
|
2062
|
-
return (un = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2063
|
-
return r.__proto__ = o, r;
|
|
2064
|
-
})(i, t);
|
|
2065
|
-
}
|
|
2066
|
-
function Uo(i) {
|
|
2067
|
-
var t = function() {
|
|
2068
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2069
|
-
if (typeof Proxy == "function") return !0;
|
|
2070
|
-
try {
|
|
2071
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2072
|
-
})), !0;
|
|
2073
|
-
} catch {
|
|
2074
|
-
return !1;
|
|
2075
|
-
}
|
|
2076
|
-
}();
|
|
2077
|
-
return function() {
|
|
2078
|
-
var r, o = yt(i);
|
|
2079
|
-
if (t) {
|
|
2080
|
-
var n = yt(this).constructor;
|
|
2081
|
-
r = Reflect.construct(o, arguments, n);
|
|
2082
|
-
} else r = o.apply(this, arguments);
|
|
2083
|
-
return function(e, a) {
|
|
2084
|
-
{
|
|
2085
|
-
if (a && (sn(a) === "object" || typeof a == "function")) return a;
|
|
2086
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2087
|
-
}
|
|
2088
|
-
return function(c) {
|
|
2089
|
-
if (c !== void 0) return c;
|
|
2090
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2091
|
-
}(e);
|
|
2092
|
-
}(this, r);
|
|
2093
|
-
};
|
|
2094
|
-
}
|
|
2095
|
-
function yt(i) {
|
|
2096
|
-
return (yt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2097
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2098
|
-
})(i);
|
|
2099
|
-
}
|
|
2100
|
-
ln.propTypes = { expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, config: d.a.object, onChange: d.a.func, currentState: d.a.object, translations: d.a.object };
|
|
2101
|
-
var pn = function() {
|
|
2102
|
-
(function(n, e) {
|
|
2103
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2104
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && un(n, e);
|
|
2105
|
-
})(o, C.Component);
|
|
2106
|
-
var i, t, r = Uo(o);
|
|
2107
|
-
function o(n) {
|
|
2108
|
-
var e;
|
|
2109
|
-
(function(c, u) {
|
|
2110
|
-
if (!(c instanceof u)) throw new TypeError("Cannot call a class as a function");
|
|
2111
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
2112
|
-
e.signalExpanded = !e.state.expanded;
|
|
2113
|
-
}, e.expandCollapse = function() {
|
|
2114
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
2115
|
-
}, e.doExpand = function() {
|
|
2116
|
-
e.setState({ expanded: !0 });
|
|
2117
|
-
}, e.doCollapse = function() {
|
|
2118
|
-
e.setState({ expanded: !1 });
|
|
2119
|
-
}, e.addBlockAlignmentData = function(c) {
|
|
2120
|
-
var u = e.props, l = u.editorState, p = u.onChange;
|
|
2121
|
-
p(e.state.currentTextAlignment !== c ? Object(g.setBlockData)(l, { "text-align": c }) : Object(g.setBlockData)(l, { "text-align": void 0 }));
|
|
2122
|
-
};
|
|
2123
|
-
var a = e.props.modalHandler;
|
|
2124
|
-
return e.state = { currentTextAlignment: void 0 }, a.registerCallBack(e.expandCollapse), e;
|
|
2125
|
-
}
|
|
2126
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2127
|
-
var e = this.props.editorState;
|
|
2128
|
-
e !== n.editorState && this.setState({ currentTextAlignment: Object(g.getSelectedBlocksMetadata)(e).get("text-align") });
|
|
2129
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2130
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
2131
|
-
} }, { key: "render", value: function() {
|
|
2132
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.expanded, l = c.currentTextAlignment, p = e.component || ln;
|
|
2133
|
-
return s.a.createElement(p, { config: e, translations: a, expanded: u, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, currentState: { textAlignment: l }, onChange: this.addBlockAlignmentData });
|
|
2134
|
-
} }]) && Ro(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2135
|
-
}();
|
|
2136
|
-
pn.propTypes = { editorState: d.a.object.isRequired, onChange: d.a.func.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object }, E(20);
|
|
2137
|
-
function dn(i) {
|
|
2138
|
-
return (dn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2139
|
-
return typeof t;
|
|
2140
|
-
} : function(t) {
|
|
2141
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2142
|
-
})(i);
|
|
2143
|
-
}
|
|
2144
|
-
function Bo(i, t) {
|
|
2145
|
-
for (var r = 0; r < t.length; r++) {
|
|
2146
|
-
var o = t[r];
|
|
2147
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
function fn(i, t) {
|
|
2151
|
-
return (fn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2152
|
-
return r.__proto__ = o, r;
|
|
2153
|
-
})(i, t);
|
|
2154
|
-
}
|
|
2155
|
-
function Fo(i) {
|
|
2156
|
-
var t = function() {
|
|
2157
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2158
|
-
if (typeof Proxy == "function") return !0;
|
|
2159
|
-
try {
|
|
2160
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2161
|
-
})), !0;
|
|
2162
|
-
} catch {
|
|
2163
|
-
return !1;
|
|
2164
|
-
}
|
|
2165
|
-
}();
|
|
2166
|
-
return function() {
|
|
2167
|
-
var r, o = gt(i);
|
|
2168
|
-
if (t) {
|
|
2169
|
-
var n = gt(this).constructor;
|
|
2170
|
-
r = Reflect.construct(o, arguments, n);
|
|
2171
|
-
} else r = o.apply(this, arguments);
|
|
2172
|
-
return function(e, a) {
|
|
2173
|
-
{
|
|
2174
|
-
if (a && (dn(a) === "object" || typeof a == "function")) return a;
|
|
2175
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2176
|
-
}
|
|
2177
|
-
return function(c) {
|
|
2178
|
-
if (c !== void 0) return c;
|
|
2179
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2180
|
-
}(e);
|
|
2181
|
-
}(this, r);
|
|
2182
|
-
};
|
|
2183
|
-
}
|
|
2184
|
-
function gt(i) {
|
|
2185
|
-
return (gt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2186
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2187
|
-
})(i);
|
|
2188
|
-
}
|
|
2189
|
-
var mn = function() {
|
|
2190
|
-
(function(n, e) {
|
|
2191
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2192
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && fn(n, e);
|
|
2193
|
-
})(o, C.Component);
|
|
2194
|
-
var i, t, r = Fo(o);
|
|
2195
|
-
function o() {
|
|
2196
|
-
var n;
|
|
2197
|
-
(function(u, l) {
|
|
2198
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2199
|
-
})(this, o);
|
|
2200
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2201
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { currentStyle: "color" }, n.onChange = function(u) {
|
|
2202
|
-
(0, n.props.onChange)(n.state.currentStyle, u);
|
|
2203
|
-
}, n.setCurrentStyleColor = function() {
|
|
2204
|
-
n.setState({ currentStyle: "color" });
|
|
2205
|
-
}, n.setCurrentStyleBgcolor = function() {
|
|
2206
|
-
n.setState({ currentStyle: "bgcolor" });
|
|
2207
|
-
}, n.renderModal = function() {
|
|
2208
|
-
var u = n.props, l = u.config, p = l.popupClassName, f = l.colors, m = u.currentState, b = m.color, v = m.bgColor, _ = u.translations, T = n.state.currentStyle, N = T === "color" ? b : v;
|
|
2209
|
-
return s.a.createElement("div", { className: y()("rdw-colorpicker-modal", p), onClick: V }, s.a.createElement("span", { className: "rdw-colorpicker-modal-header" }, s.a.createElement("span", { className: y()("rdw-colorpicker-modal-style-label", { "rdw-colorpicker-modal-style-label-active": T === "color" }), onClick: n.setCurrentStyleColor }, _["components.controls.colorpicker.text"]), s.a.createElement("span", { className: y()("rdw-colorpicker-modal-style-label", { "rdw-colorpicker-modal-style-label-active": T === "bgcolor" }), onClick: n.setCurrentStyleBgcolor }, _["components.controls.colorpicker.background"])), s.a.createElement("span", { className: "rdw-colorpicker-modal-options" }, f.map(function(z, R) {
|
|
2210
|
-
return s.a.createElement(q, { value: z, key: R, className: "rdw-colorpicker-option", activeClassName: "rdw-colorpicker-option-active", active: N === z, onClick: n.onChange }, s.a.createElement("span", { style: { backgroundColor: z }, className: "rdw-colorpicker-cube" }));
|
|
2211
|
-
})));
|
|
2212
|
-
}, n;
|
|
2213
|
-
}
|
|
2214
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2215
|
-
this.props.expanded && !n.expanded && this.setState({ currentStyle: "color" });
|
|
2216
|
-
} }, { key: "render", value: function() {
|
|
2217
|
-
var n = this.props, e = n.config, a = e.icon, c = e.className, u = e.title, l = n.expanded, p = n.onExpandEvent, f = n.translations;
|
|
2218
|
-
return s.a.createElement("div", { className: "rdw-colorpicker-wrapper", "aria-haspopup": "true", "aria-expanded": l, "aria-label": "rdw-color-picker", title: u || f["components.controls.colorpicker.colorpicker"] }, s.a.createElement(q, { onClick: p, className: y()(c) }, s.a.createElement("img", { src: a, alt: "" })), l ? this.renderModal() : void 0);
|
|
2219
|
-
} }]) && Bo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2220
|
-
}();
|
|
2221
|
-
mn.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, onChange: d.a.func, config: d.a.object, currentState: d.a.object, translations: d.a.object };
|
|
2222
|
-
var Yo = mn;
|
|
2223
|
-
function yn(i) {
|
|
2224
|
-
return (yn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2225
|
-
return typeof t;
|
|
2226
|
-
} : function(t) {
|
|
2227
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2228
|
-
})(i);
|
|
2229
|
-
}
|
|
2230
|
-
function Qo(i, t) {
|
|
2231
|
-
for (var r = 0; r < t.length; r++) {
|
|
2232
|
-
var o = t[r];
|
|
2233
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
function gn(i, t) {
|
|
2237
|
-
return (gn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2238
|
-
return r.__proto__ = o, r;
|
|
2239
|
-
})(i, t);
|
|
2240
|
-
}
|
|
2241
|
-
function Ho(i) {
|
|
2242
|
-
var t = function() {
|
|
2243
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2244
|
-
if (typeof Proxy == "function") return !0;
|
|
2245
|
-
try {
|
|
2246
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2247
|
-
})), !0;
|
|
2248
|
-
} catch {
|
|
2249
|
-
return !1;
|
|
2250
|
-
}
|
|
2251
|
-
}();
|
|
2252
|
-
return function() {
|
|
2253
|
-
var r, o = bt(i);
|
|
2254
|
-
if (t) {
|
|
2255
|
-
var n = bt(this).constructor;
|
|
2256
|
-
r = Reflect.construct(o, arguments, n);
|
|
2257
|
-
} else r = o.apply(this, arguments);
|
|
2258
|
-
return function(e, a) {
|
|
2259
|
-
{
|
|
2260
|
-
if (a && (yn(a) === "object" || typeof a == "function")) return a;
|
|
2261
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2262
|
-
}
|
|
2263
|
-
return function(c) {
|
|
2264
|
-
if (c !== void 0) return c;
|
|
2265
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2266
|
-
}(e);
|
|
2267
|
-
}(this, r);
|
|
2268
|
-
};
|
|
2269
|
-
}
|
|
2270
|
-
function bt(i) {
|
|
2271
|
-
return (bt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2272
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2273
|
-
})(i);
|
|
2274
|
-
}
|
|
2275
|
-
var bn = function() {
|
|
2276
|
-
(function(n, e) {
|
|
2277
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2278
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && gn(n, e);
|
|
2279
|
-
})(o, C.Component);
|
|
2280
|
-
var i, t, r = Ho(o);
|
|
2281
|
-
function o(n) {
|
|
2282
|
-
var e;
|
|
2283
|
-
(function(l, p) {
|
|
2284
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
2285
|
-
})(this, o), (e = r.call(this, n)).state = { expanded: !1, currentColor: void 0, currentBgColor: void 0 }, e.onExpandEvent = function() {
|
|
2286
|
-
e.signalExpanded = !e.state.expanded;
|
|
2287
|
-
}, e.expandCollapse = function() {
|
|
2288
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
2289
|
-
}, e.doExpand = function() {
|
|
2290
|
-
e.setState({ expanded: !0 });
|
|
2291
|
-
}, e.doCollapse = function() {
|
|
2292
|
-
e.setState({ expanded: !1 });
|
|
2293
|
-
}, e.toggleColor = function(l, p) {
|
|
2294
|
-
var f = e.props, m = f.editorState, b = f.onChange, v = Object(g.toggleCustomInlineStyle)(m, l, p);
|
|
2295
|
-
v && b(v), e.doCollapse();
|
|
2296
|
-
};
|
|
2297
|
-
var a = n.editorState, c = n.modalHandler, u = { expanded: !1, currentColor: void 0, currentBgColor: void 0 };
|
|
2298
|
-
return a && (u.currentColor = Object(g.getSelectionCustomInlineStyle)(a, ["COLOR"]).COLOR, u.currentBgColor = Object(g.getSelectionCustomInlineStyle)(a, ["BGCOLOR"]).BGCOLOR), e.state = u, c.registerCallBack(e.expandCollapse), e;
|
|
2299
|
-
}
|
|
2300
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2301
|
-
var e = this.props.editorState;
|
|
2302
|
-
e && e !== n.editorState && this.setState({ currentColor: Object(g.getSelectionCustomInlineStyle)(e, ["COLOR"]).COLOR, currentBgColor: Object(g.getSelectionCustomInlineStyle)(e, ["BGCOLOR"]).BGCOLOR });
|
|
2303
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2304
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
2305
|
-
} }, { key: "render", value: function() {
|
|
2306
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.currentColor, l = c.currentBgColor, p = c.expanded, f = e.component || Yo, m = u && u.substring(6), b = l && l.substring(8);
|
|
2307
|
-
return s.a.createElement(f, { config: e, translations: a, onChange: this.toggleColor, expanded: p, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, currentState: { color: m, bgColor: b } });
|
|
2308
|
-
} }]) && Qo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2309
|
-
}();
|
|
2310
|
-
bn.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
2311
|
-
var Zo = bn, Wo = E(7), Go = E.n(Wo);
|
|
2312
|
-
E(26);
|
|
2313
|
-
function hn(i) {
|
|
2314
|
-
return (hn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2315
|
-
return typeof t;
|
|
2316
|
-
} : function(t) {
|
|
2317
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2318
|
-
})(i);
|
|
2319
|
-
}
|
|
2320
|
-
function Jo(i, t) {
|
|
2321
|
-
for (var r = 0; r < t.length; r++) {
|
|
2322
|
-
var o = t[r];
|
|
2323
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
function Mn(i, t) {
|
|
2327
|
-
return (Mn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2328
|
-
return r.__proto__ = o, r;
|
|
2329
|
-
})(i, t);
|
|
2330
|
-
}
|
|
2331
|
-
function Vo(i) {
|
|
2332
|
-
var t = function() {
|
|
2333
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2334
|
-
if (typeof Proxy == "function") return !0;
|
|
2335
|
-
try {
|
|
2336
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2337
|
-
})), !0;
|
|
2338
|
-
} catch {
|
|
2339
|
-
return !1;
|
|
2340
|
-
}
|
|
2341
|
-
}();
|
|
2342
|
-
return function() {
|
|
2343
|
-
var r, o = ht(i);
|
|
2344
|
-
if (t) {
|
|
2345
|
-
var n = ht(this).constructor;
|
|
2346
|
-
r = Reflect.construct(o, arguments, n);
|
|
2347
|
-
} else r = o.apply(this, arguments);
|
|
2348
|
-
return function(e, a) {
|
|
2349
|
-
{
|
|
2350
|
-
if (a && (hn(a) === "object" || typeof a == "function")) return a;
|
|
2351
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2352
|
-
}
|
|
2353
|
-
return function(c) {
|
|
2354
|
-
if (c !== void 0) return c;
|
|
2355
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2356
|
-
}(e);
|
|
2357
|
-
}(this, r);
|
|
2358
|
-
};
|
|
2359
|
-
}
|
|
2360
|
-
function ht(i) {
|
|
2361
|
-
return (ht = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2362
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2363
|
-
})(i);
|
|
2364
|
-
}
|
|
2365
|
-
var jn = function() {
|
|
2366
|
-
(function(n, e) {
|
|
2367
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2368
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Mn(n, e);
|
|
2369
|
-
})(o, C.Component);
|
|
2370
|
-
var i, t, r = Vo(o);
|
|
2371
|
-
function o() {
|
|
2372
|
-
var n;
|
|
2373
|
-
(function(u, l) {
|
|
2374
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2375
|
-
})(this, o);
|
|
2376
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2377
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { showModal: !1, linkTarget: "", linkTitle: "", linkTargetOption: n.props.config.defaultTargetOption }, n.removeLink = function() {
|
|
2378
|
-
(0, n.props.onChange)("unlink");
|
|
2379
|
-
}, n.addLink = function() {
|
|
2380
|
-
var u = n.props.onChange, l = n.state;
|
|
2381
|
-
u("link", l.linkTitle, l.linkTarget, l.linkTargetOption);
|
|
2382
|
-
}, n.updateValue = function(u) {
|
|
2383
|
-
var l, p, f;
|
|
2384
|
-
n.setState((l = {}, p = "".concat(u.target.name), f = u.target.value, p in l ? Object.defineProperty(l, p, { value: f, enumerable: !0, configurable: !0, writable: !0 }) : l[p] = f, l));
|
|
2385
|
-
}, n.updateTargetOption = function(u) {
|
|
2386
|
-
n.setState({ linkTargetOption: u.target.checked ? "_blank" : "_self" });
|
|
2387
|
-
}, n.hideModal = function() {
|
|
2388
|
-
n.setState({ showModal: !1 });
|
|
2389
|
-
}, n.signalExpandShowModal = function() {
|
|
2390
|
-
var u = n.props, l = u.onExpandEvent, p = u.currentState, f = p.link, m = p.selectionText, b = n.state.linkTargetOption;
|
|
2391
|
-
l(), n.setState({ showModal: !0, linkTarget: f && f.target || "", linkTargetOption: f && f.targetOption || b, linkTitle: f && f.title || m });
|
|
2392
|
-
}, n.forceExpandAndShowModal = function() {
|
|
2393
|
-
var u = n.props, l = u.doExpand, p = u.currentState, f = p.link, m = p.selectionText, b = n.state.linkTargetOption;
|
|
2394
|
-
l(), n.setState({ showModal: !0, linkTarget: f && f.target, linkTargetOption: f && f.targetOption || b, linkTitle: f && f.title || m });
|
|
2395
|
-
}, n;
|
|
2396
|
-
}
|
|
2397
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2398
|
-
n.expanded && !this.props.expanded && this.setState({ showModal: !1, linkTarget: "", linkTitle: "", linkTargetOption: this.props.config.defaultTargetOption });
|
|
2399
|
-
} }, { key: "renderAddLinkModal", value: function() {
|
|
2400
|
-
var n = this.props, e = n.config.popupClassName, a = n.doCollapse, c = n.translations, u = this.state, l = u.linkTitle, p = u.linkTarget, f = u.linkTargetOption;
|
|
2401
|
-
return s.a.createElement("div", { className: y()("rdw-link-modal", e), onClick: V }, s.a.createElement("label", { className: "rdw-link-modal-label", htmlFor: "linkTitle" }, c["components.controls.link.linkTitle"]), s.a.createElement("input", { id: "linkTitle", className: "rdw-link-modal-input", onChange: this.updateValue, onBlur: this.updateValue, name: "linkTitle", value: l }), s.a.createElement("label", { className: "rdw-link-modal-label", htmlFor: "linkTarget" }, c["components.controls.link.linkTarget"]), s.a.createElement("input", { id: "linkTarget", className: "rdw-link-modal-input", onChange: this.updateValue, onBlur: this.updateValue, name: "linkTarget", value: p }), s.a.createElement("label", { className: "rdw-link-modal-target-option", htmlFor: "openLinkInNewWindow" }, s.a.createElement("input", { id: "openLinkInNewWindow", type: "checkbox", defaultChecked: f === "_blank", value: "_blank", onChange: this.updateTargetOption }), s.a.createElement("span", null, c["components.controls.link.linkTargetOption"])), s.a.createElement("span", { className: "rdw-link-modal-buttonsection" }, s.a.createElement("button", { className: "rdw-link-modal-btn", onClick: this.addLink, disabled: !p || !l }, c["generic.add"]), s.a.createElement("button", { className: "rdw-link-modal-btn", onClick: a }, c["generic.cancel"])));
|
|
2402
|
-
} }, { key: "renderInFlatList", value: function() {
|
|
2403
|
-
var n = this.props, e = n.config, a = e.options, c = e.link, u = e.unlink, l = e.className, p = n.currentState, f = n.expanded, m = n.translations, b = this.state.showModal;
|
|
2404
|
-
return s.a.createElement("div", { className: y()("rdw-link-wrapper", l), "aria-label": "rdw-link-control" }, 0 <= a.indexOf("link") && s.a.createElement(q, { value: "unordered-list-item", className: y()(c.className), onClick: this.signalExpandShowModal, "aria-haspopup": "true", "aria-expanded": b, title: c.title || m["components.controls.link.link"] }, s.a.createElement("img", { src: c.icon, alt: "" })), 0 <= a.indexOf("unlink") && s.a.createElement(q, { disabled: !p.link, value: "ordered-list-item", className: y()(u.className), onClick: this.removeLink, title: u.title || m["components.controls.link.unlink"] }, s.a.createElement("img", { src: u.icon, alt: "" })), f && b ? this.renderAddLinkModal() : void 0);
|
|
2405
|
-
} }, { key: "renderInDropDown", value: function() {
|
|
2406
|
-
var n = this.props, e = n.expanded, a = n.onExpandEvent, c = n.doCollapse, u = n.doExpand, l = n.onChange, p = n.config, f = n.currentState, m = n.translations, b = p.options, v = p.link, _ = p.unlink, T = p.className, N = p.dropdownClassName, z = p.title, R = this.state.showModal;
|
|
2407
|
-
return s.a.createElement("div", { className: "rdw-link-wrapper", "aria-haspopup": "true", "aria-label": "rdw-link-control", "aria-expanded": e, title: z }, s.a.createElement(ve, { className: y()("rdw-link-dropdown", T), optionWrapperClassName: y()(N), onChange: l, expanded: e && !R, doExpand: u, doCollapse: c, onExpandEvent: a }, s.a.createElement("img", { src: te(p), alt: "" }), 0 <= b.indexOf("link") && s.a.createElement(k, { onClick: this.forceExpandAndShowModal, className: y()("rdw-link-dropdownoption", v.className), title: v.title || m["components.controls.link.link"] }, s.a.createElement("img", { src: v.icon, alt: "" })), 0 <= b.indexOf("unlink") && s.a.createElement(k, { onClick: this.removeLink, disabled: !f.link, className: y()("rdw-link-dropdownoption", _.className), title: _.title || m["components.controls.link.unlink"] }, s.a.createElement("img", { src: _.icon, alt: "" }))), e && R ? this.renderAddLinkModal() : void 0);
|
|
2408
|
-
} }, { key: "render", value: function() {
|
|
2409
|
-
return this.props.config.inDropdown ? this.renderInDropDown() : this.renderInFlatList();
|
|
2410
|
-
} }]) && Jo(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2411
|
-
}();
|
|
2412
|
-
jn.propTypes = { expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, config: d.a.object, onChange: d.a.func, currentState: d.a.object, translations: d.a.object };
|
|
2413
|
-
var qo = jn;
|
|
2414
|
-
function vn(i) {
|
|
2415
|
-
return (vn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2416
|
-
return typeof t;
|
|
2417
|
-
} : function(t) {
|
|
2418
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2419
|
-
})(i);
|
|
2420
|
-
}
|
|
2421
|
-
function Ko(i, t) {
|
|
2422
|
-
for (var r = 0; r < t.length; r++) {
|
|
2423
|
-
var o = t[r];
|
|
2424
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
function Nn(i, t) {
|
|
2428
|
-
return (Nn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2429
|
-
return r.__proto__ = o, r;
|
|
2430
|
-
})(i, t);
|
|
2431
|
-
}
|
|
2432
|
-
function Xo(i) {
|
|
2433
|
-
var t = function() {
|
|
2434
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2435
|
-
if (typeof Proxy == "function") return !0;
|
|
2436
|
-
try {
|
|
2437
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2438
|
-
})), !0;
|
|
2439
|
-
} catch {
|
|
2440
|
-
return !1;
|
|
2441
|
-
}
|
|
2442
|
-
}();
|
|
2443
|
-
return function() {
|
|
2444
|
-
var r, o = Mt(i);
|
|
2445
|
-
if (t) {
|
|
2446
|
-
var n = Mt(this).constructor;
|
|
2447
|
-
r = Reflect.construct(o, arguments, n);
|
|
2448
|
-
} else r = o.apply(this, arguments);
|
|
2449
|
-
return function(e, a) {
|
|
2450
|
-
{
|
|
2451
|
-
if (a && (vn(a) === "object" || typeof a == "function")) return a;
|
|
2452
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2453
|
-
}
|
|
2454
|
-
return function(c) {
|
|
2455
|
-
if (c !== void 0) return c;
|
|
2456
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2457
|
-
}(e);
|
|
2458
|
-
}(this, r);
|
|
2459
|
-
};
|
|
2460
|
-
}
|
|
2461
|
-
function Mt(i) {
|
|
2462
|
-
return (Mt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2463
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2464
|
-
})(i);
|
|
2465
|
-
}
|
|
2466
|
-
function En(i, t) {
|
|
2467
|
-
var r = Object.keys(i);
|
|
2468
|
-
if (Object.getOwnPropertySymbols) {
|
|
2469
|
-
var o = Object.getOwnPropertySymbols(i);
|
|
2470
|
-
t && (o = o.filter(function(n) {
|
|
2471
|
-
return Object.getOwnPropertyDescriptor(i, n).enumerable;
|
|
2472
|
-
})), r.push.apply(r, o);
|
|
2473
|
-
}
|
|
2474
|
-
return r;
|
|
2475
|
-
}
|
|
2476
|
-
function Sn(i) {
|
|
2477
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
2478
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
2479
|
-
t % 2 ? En(Object(r), !0).forEach(function(o) {
|
|
2480
|
-
$o(i, o, r[o]);
|
|
2481
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(r)) : En(Object(r)).forEach(function(o) {
|
|
2482
|
-
Object.defineProperty(i, o, Object.getOwnPropertyDescriptor(r, o));
|
|
2483
|
-
});
|
|
2484
|
-
}
|
|
2485
|
-
return i;
|
|
2486
|
-
}
|
|
2487
|
-
function $o(i, t, r) {
|
|
2488
|
-
return t in i ? Object.defineProperty(i, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = r, i;
|
|
2489
|
-
}
|
|
2490
|
-
function er(i) {
|
|
2491
|
-
var t = tr.match(i.target);
|
|
2492
|
-
return Sn(Sn({}, i), {}, { target: t && t[0] && t[0].url || i.target });
|
|
2493
|
-
}
|
|
2494
|
-
var tr = Go()(), wn = function() {
|
|
2495
|
-
(function(n, e) {
|
|
2496
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2497
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Nn(n, e);
|
|
2498
|
-
})(o, C.Component);
|
|
2499
|
-
var i, t, r = Xo(o);
|
|
2500
|
-
function o(n) {
|
|
2501
|
-
var e;
|
|
2502
|
-
(function(l, p) {
|
|
2503
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
2504
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
2505
|
-
e.signalExpanded = !e.state.expanded;
|
|
2506
|
-
}, e.onChange = function(l, p, f, m) {
|
|
2507
|
-
var b = e.props.config.linkCallback;
|
|
2508
|
-
if (l === "link") {
|
|
2509
|
-
var v = (b || er)({ title: p, target: f, targetOption: m });
|
|
2510
|
-
e.addLink(v.title, v.target, v.targetOption);
|
|
2511
|
-
} else e.removeLink();
|
|
2512
|
-
}, e.getCurrentValues = function() {
|
|
2513
|
-
var l = e.props.editorState, p = e.state.currentEntity, f = l.getCurrentContent(), m = {};
|
|
2514
|
-
if (p && f.getEntity(p).get("type") === "LINK") {
|
|
2515
|
-
m.link = {};
|
|
2516
|
-
var b = p && Object(g.getEntityRange)(l, p);
|
|
2517
|
-
m.link.target = p && f.getEntity(p).get("data").url, m.link.targetOption = p && f.getEntity(p).get("data").targetOption, m.link.title = b && b.text;
|
|
2518
|
-
}
|
|
2519
|
-
return m.selectionText = Object(g.getSelectionText)(l), m;
|
|
2520
|
-
}, e.doExpand = function() {
|
|
2521
|
-
e.setState({ expanded: !0 });
|
|
2522
|
-
}, e.expandCollapse = function() {
|
|
2523
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
2524
|
-
}, e.doCollapse = function() {
|
|
2525
|
-
e.setState({ expanded: !1 });
|
|
2526
|
-
}, e.removeLink = function() {
|
|
2527
|
-
var l = e.props, p = l.editorState, f = l.onChange, m = e.state.currentEntity, b = p.getSelection();
|
|
2528
|
-
if (m) {
|
|
2529
|
-
var v = Object(g.getEntityRange)(p, m);
|
|
2530
|
-
b = b.getIsBackward() ? b.merge({ anchorOffset: v.end, focusOffset: v.start }) : b.merge({ anchorOffset: v.start, focusOffset: v.end }), f(L.RichUtils.toggleLink(p, b, null));
|
|
2531
|
-
}
|
|
2532
|
-
}, e.addLink = function(l, p, f) {
|
|
2533
|
-
var m = e.props, b = m.editorState, v = m.onChange, _ = e.state.currentEntity, T = b.getSelection();
|
|
2534
|
-
if (_) {
|
|
2535
|
-
var N = Object(g.getEntityRange)(b, _);
|
|
2536
|
-
T = T.getIsBackward() ? T.merge({ anchorOffset: N.end, focusOffset: N.start }) : T.merge({ anchorOffset: N.start, focusOffset: N.end });
|
|
2537
|
-
}
|
|
2538
|
-
var z = b.getCurrentContent().createEntity("LINK", "MUTABLE", { url: p, targetOption: f }).getLastCreatedEntityKey(), R = L.Modifier.replaceText(b.getCurrentContent(), T, "".concat(l), b.getCurrentInlineStyle(), z), Y = L.EditorState.push(b, R, "insert-characters");
|
|
2539
|
-
T = Y.getSelection().merge({ anchorOffset: T.get("anchorOffset") + l.length, focusOffset: T.get("anchorOffset") + l.length }), Y = L.EditorState.acceptSelection(Y, T), R = L.Modifier.insertText(Y.getCurrentContent(), T, " ", Y.getCurrentInlineStyle(), void 0), v(L.EditorState.push(Y, R, "insert-characters")), e.doCollapse();
|
|
2540
|
-
};
|
|
2541
|
-
var a = e.props, c = a.editorState, u = a.modalHandler;
|
|
2542
|
-
return e.state = { expanded: !1, link: void 0, selectionText: void 0, currentEntity: c ? Object(g.getSelectionEntity)(c) : void 0 }, u.registerCallBack(e.expandCollapse), e;
|
|
2543
|
-
}
|
|
2544
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2545
|
-
var e = this.props.editorState;
|
|
2546
|
-
e && e !== n.editorState && this.setState({ currentEntity: Object(g.getSelectionEntity)(e) });
|
|
2547
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2548
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
2549
|
-
} }, { key: "render", value: function() {
|
|
2550
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state.expanded, u = this.getCurrentValues(), l = u.link, p = u.selectionText, f = e.component || qo;
|
|
2551
|
-
return s.a.createElement(f, { config: e, translations: a, expanded: c, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, currentState: { link: l, selectionText: p }, onChange: this.onChange });
|
|
2552
|
-
} }]) && Ko(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2553
|
-
}();
|
|
2554
|
-
wn.propTypes = { editorState: d.a.object.isRequired, onChange: d.a.func.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
2555
|
-
var nr = wn;
|
|
2556
|
-
E(27);
|
|
2557
|
-
function Cn(i) {
|
|
2558
|
-
return (Cn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2559
|
-
return typeof t;
|
|
2560
|
-
} : function(t) {
|
|
2561
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2562
|
-
})(i);
|
|
2563
|
-
}
|
|
2564
|
-
function or(i, t) {
|
|
2565
|
-
for (var r = 0; r < t.length; r++) {
|
|
2566
|
-
var o = t[r];
|
|
2567
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
function Ln(i, t) {
|
|
2571
|
-
return (Ln = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2572
|
-
return r.__proto__ = o, r;
|
|
2573
|
-
})(i, t);
|
|
2574
|
-
}
|
|
2575
|
-
function rr(i) {
|
|
2576
|
-
var t = function() {
|
|
2577
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2578
|
-
if (typeof Proxy == "function") return !0;
|
|
2579
|
-
try {
|
|
2580
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2581
|
-
})), !0;
|
|
2582
|
-
} catch {
|
|
2583
|
-
return !1;
|
|
2584
|
-
}
|
|
2585
|
-
}();
|
|
2586
|
-
return function() {
|
|
2587
|
-
var r, o = jt(i);
|
|
2588
|
-
if (t) {
|
|
2589
|
-
var n = jt(this).constructor;
|
|
2590
|
-
r = Reflect.construct(o, arguments, n);
|
|
2591
|
-
} else r = o.apply(this, arguments);
|
|
2592
|
-
return function(e, a) {
|
|
2593
|
-
{
|
|
2594
|
-
if (a && (Cn(a) === "object" || typeof a == "function")) return a;
|
|
2595
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2596
|
-
}
|
|
2597
|
-
return function(c) {
|
|
2598
|
-
if (c !== void 0) return c;
|
|
2599
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2600
|
-
}(e);
|
|
2601
|
-
}(this, r);
|
|
2602
|
-
};
|
|
2603
|
-
}
|
|
2604
|
-
function jt(i) {
|
|
2605
|
-
return (jt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2606
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2607
|
-
})(i);
|
|
2608
|
-
}
|
|
2609
|
-
var Dn = function() {
|
|
2610
|
-
(function(n, e) {
|
|
2611
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2612
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Ln(n, e);
|
|
2613
|
-
})(o, C.Component);
|
|
2614
|
-
var i, t, r = rr(o);
|
|
2615
|
-
function o() {
|
|
2616
|
-
var n;
|
|
2617
|
-
(function(u, l) {
|
|
2618
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2619
|
-
})(this, o);
|
|
2620
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2621
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { embeddedLink: "", height: n.props.config.defaultSize.height, width: n.props.config.defaultSize.width }, n.onChange = function() {
|
|
2622
|
-
var u = n.props.onChange, l = n.state;
|
|
2623
|
-
u(l.embeddedLink, l.height, l.width);
|
|
2624
|
-
}, n.updateValue = function(u) {
|
|
2625
|
-
var l, p, f;
|
|
2626
|
-
n.setState((l = {}, p = "".concat(u.target.name), f = u.target.value, p in l ? Object.defineProperty(l, p, { value: f, enumerable: !0, configurable: !0, writable: !0 }) : l[p] = f, l));
|
|
2627
|
-
}, n;
|
|
2628
|
-
}
|
|
2629
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
2630
|
-
var e = this.props, a = e.expanded, c = e.config;
|
|
2631
|
-
if (!a && n.expanded) {
|
|
2632
|
-
var u = c.defaultSize, l = u.height, p = u.width;
|
|
2633
|
-
this.setState({ embeddedLink: "", height: l, width: p });
|
|
2634
|
-
}
|
|
2635
|
-
} }, { key: "rendeEmbeddedLinkModal", value: function() {
|
|
2636
|
-
var n = this.state, e = n.embeddedLink, a = n.height, c = n.width, u = this.props, l = u.config.popupClassName, p = u.doCollapse, f = u.translations;
|
|
2637
|
-
return s.a.createElement("div", { className: y()("rdw-embedded-modal", l), onClick: V }, s.a.createElement("div", { className: "rdw-embedded-modal-header" }, s.a.createElement("span", { className: "rdw-embedded-modal-header-option" }, f["components.controls.embedded.embeddedlink"], s.a.createElement("span", { className: "rdw-embedded-modal-header-label" }))), s.a.createElement("div", { className: "rdw-embedded-modal-link-section" }, s.a.createElement("span", { className: "rdw-embedded-modal-link-input-wrapper" }, s.a.createElement("input", { className: "rdw-embedded-modal-link-input", placeholder: f["components.controls.embedded.enterlink"], onChange: this.updateValue, onBlur: this.updateValue, value: e, name: "embeddedLink" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*")), s.a.createElement("div", { className: "rdw-embedded-modal-size" }, s.a.createElement("span", null, s.a.createElement("input", { onChange: this.updateValue, onBlur: this.updateValue, value: a, name: "height", className: "rdw-embedded-modal-size-input", placeholder: "Height" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*")), s.a.createElement("span", null, s.a.createElement("input", { onChange: this.updateValue, onBlur: this.updateValue, value: c, name: "width", className: "rdw-embedded-modal-size-input", placeholder: "Width" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*")))), s.a.createElement("span", { className: "rdw-embedded-modal-btn-section" }, s.a.createElement("button", { type: "button", className: "rdw-embedded-modal-btn", onClick: this.onChange, disabled: !e || !a || !c }, f["generic.add"]), s.a.createElement("button", { type: "button", className: "rdw-embedded-modal-btn", onClick: p }, f["generic.cancel"])));
|
|
2638
|
-
} }, { key: "render", value: function() {
|
|
2639
|
-
var n = this.props, e = n.config, a = e.icon, c = e.className, u = e.title, l = n.expanded, p = n.onExpandEvent, f = n.translations;
|
|
2640
|
-
return s.a.createElement("div", { className: "rdw-embedded-wrapper", "aria-haspopup": "true", "aria-expanded": l, "aria-label": "rdw-embedded-control" }, s.a.createElement(q, { className: y()(c), value: "unordered-list-item", onClick: p, title: u || f["components.controls.embedded.embedded"] }, s.a.createElement("img", { src: a, alt: "" })), l ? this.rendeEmbeddedLinkModal() : void 0);
|
|
2641
|
-
} }]) && or(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2642
|
-
}();
|
|
2643
|
-
Dn.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, onChange: d.a.func, config: d.a.object, translations: d.a.object, doCollapse: d.a.func };
|
|
2644
|
-
var ir = Dn;
|
|
2645
|
-
function kn(i) {
|
|
2646
|
-
return (kn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2647
|
-
return typeof t;
|
|
2648
|
-
} : function(t) {
|
|
2649
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2650
|
-
})(i);
|
|
2651
|
-
}
|
|
2652
|
-
function ar(i, t) {
|
|
2653
|
-
for (var r = 0; r < t.length; r++) {
|
|
2654
|
-
var o = t[r];
|
|
2655
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
function On(i, t) {
|
|
2659
|
-
return (On = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2660
|
-
return r.__proto__ = o, r;
|
|
2661
|
-
})(i, t);
|
|
2662
|
-
}
|
|
2663
|
-
function cr(i) {
|
|
2664
|
-
var t = function() {
|
|
2665
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2666
|
-
if (typeof Proxy == "function") return !0;
|
|
2667
|
-
try {
|
|
2668
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2669
|
-
})), !0;
|
|
2670
|
-
} catch {
|
|
2671
|
-
return !1;
|
|
2672
|
-
}
|
|
2673
|
-
}();
|
|
2674
|
-
return function() {
|
|
2675
|
-
var r, o = vt(i);
|
|
2676
|
-
if (t) {
|
|
2677
|
-
var n = vt(this).constructor;
|
|
2678
|
-
r = Reflect.construct(o, arguments, n);
|
|
2679
|
-
} else r = o.apply(this, arguments);
|
|
2680
|
-
return function(e, a) {
|
|
2681
|
-
{
|
|
2682
|
-
if (a && (kn(a) === "object" || typeof a == "function")) return a;
|
|
2683
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2684
|
-
}
|
|
2685
|
-
return function(c) {
|
|
2686
|
-
if (c !== void 0) return c;
|
|
2687
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2688
|
-
}(e);
|
|
2689
|
-
}(this, r);
|
|
2690
|
-
};
|
|
2691
|
-
}
|
|
2692
|
-
function vt(i) {
|
|
2693
|
-
return (vt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2694
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2695
|
-
})(i);
|
|
2696
|
-
}
|
|
2697
|
-
var xn = function() {
|
|
2698
|
-
(function(n, e) {
|
|
2699
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2700
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && On(n, e);
|
|
2701
|
-
})(o, C.Component);
|
|
2702
|
-
var i, t, r = cr(o);
|
|
2703
|
-
function o() {
|
|
2704
|
-
var n;
|
|
2705
|
-
(function(u, l) {
|
|
2706
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2707
|
-
})(this, o);
|
|
2708
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2709
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { expanded: !1 }, n.onExpandEvent = function() {
|
|
2710
|
-
n.signalExpanded = !n.state.expanded;
|
|
2711
|
-
}, n.expandCollapse = function() {
|
|
2712
|
-
n.setState({ expanded: n.signalExpanded }), n.signalExpanded = !1;
|
|
2713
|
-
}, n.doExpand = function() {
|
|
2714
|
-
n.setState({ expanded: !0 });
|
|
2715
|
-
}, n.doCollapse = function() {
|
|
2716
|
-
n.setState({ expanded: !1 });
|
|
2717
|
-
}, n.addEmbeddedLink = function(u, l, p) {
|
|
2718
|
-
var f = n.props, m = f.editorState, b = f.onChange, v = f.config.embedCallback, _ = v ? v(u) : u, T = m.getCurrentContent().createEntity("EMBEDDED_LINK", "MUTABLE", { src: _, height: l, width: p }).getLastCreatedEntityKey();
|
|
2719
|
-
b(L.AtomicBlockUtils.insertAtomicBlock(m, T, " ")), n.doCollapse();
|
|
2720
|
-
}, n;
|
|
2721
|
-
}
|
|
2722
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
2723
|
-
this.props.modalHandler.registerCallBack(this.expandCollapse);
|
|
2724
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2725
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
2726
|
-
} }, { key: "render", value: function() {
|
|
2727
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state.expanded, u = e.component || ir;
|
|
2728
|
-
return s.a.createElement(u, { config: e, translations: a, onChange: this.addEmbeddedLink, expanded: c, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse });
|
|
2729
|
-
} }]) && ar(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2730
|
-
}();
|
|
2731
|
-
xn.propTypes = { editorState: d.a.object.isRequired, onChange: d.a.func.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
2732
|
-
var lr = xn;
|
|
2733
|
-
E(28);
|
|
2734
|
-
function In(i) {
|
|
2735
|
-
return (In = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2736
|
-
return typeof t;
|
|
2737
|
-
} : function(t) {
|
|
2738
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2739
|
-
})(i);
|
|
2740
|
-
}
|
|
2741
|
-
function sr(i, t) {
|
|
2742
|
-
for (var r = 0; r < t.length; r++) {
|
|
2743
|
-
var o = t[r];
|
|
2744
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2745
|
-
}
|
|
2746
|
-
}
|
|
2747
|
-
function Tn(i, t) {
|
|
2748
|
-
return (Tn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2749
|
-
return r.__proto__ = o, r;
|
|
2750
|
-
})(i, t);
|
|
2751
|
-
}
|
|
2752
|
-
function ur(i) {
|
|
2753
|
-
var t = function() {
|
|
2754
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2755
|
-
if (typeof Proxy == "function") return !0;
|
|
2756
|
-
try {
|
|
2757
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2758
|
-
})), !0;
|
|
2759
|
-
} catch {
|
|
2760
|
-
return !1;
|
|
2761
|
-
}
|
|
2762
|
-
}();
|
|
2763
|
-
return function() {
|
|
2764
|
-
var r, o = Nt(i);
|
|
2765
|
-
if (t) {
|
|
2766
|
-
var n = Nt(this).constructor;
|
|
2767
|
-
r = Reflect.construct(o, arguments, n);
|
|
2768
|
-
} else r = o.apply(this, arguments);
|
|
2769
|
-
return function(e, a) {
|
|
2770
|
-
{
|
|
2771
|
-
if (a && (In(a) === "object" || typeof a == "function")) return a;
|
|
2772
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2773
|
-
}
|
|
2774
|
-
return function(c) {
|
|
2775
|
-
if (c !== void 0) return c;
|
|
2776
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2777
|
-
}(e);
|
|
2778
|
-
}(this, r);
|
|
2779
|
-
};
|
|
2780
|
-
}
|
|
2781
|
-
function Nt(i) {
|
|
2782
|
-
return (Nt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2783
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2784
|
-
})(i);
|
|
2785
|
-
}
|
|
2786
|
-
var An = function() {
|
|
2787
|
-
(function(n, e) {
|
|
2788
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2789
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Tn(n, e);
|
|
2790
|
-
})(o, C.Component);
|
|
2791
|
-
var i, t, r = ur(o);
|
|
2792
|
-
function o() {
|
|
2793
|
-
var n;
|
|
2794
|
-
(function(u, l) {
|
|
2795
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2796
|
-
})(this, o);
|
|
2797
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2798
|
-
return (n = r.call.apply(r, [this].concat(a))).onChange = function(u) {
|
|
2799
|
-
(0, n.props.onChange)(u.target.innerHTML);
|
|
2800
|
-
}, n;
|
|
2801
|
-
}
|
|
2802
|
-
return i = o, (t = [{ key: "renderEmojiModal", value: function() {
|
|
2803
|
-
var n = this, e = this.props.config, a = e.popupClassName, c = e.emojis;
|
|
2804
|
-
return s.a.createElement("div", { className: y()("rdw-emoji-modal", a), onClick: V }, c.map(function(u, l) {
|
|
2805
|
-
return s.a.createElement("span", { key: l, className: "rdw-emoji-icon", alt: "", onClick: n.onChange }, u);
|
|
2806
|
-
}));
|
|
2807
|
-
} }, { key: "render", value: function() {
|
|
2808
|
-
var n = this.props, e = n.config, a = e.icon, c = e.className, u = e.title, l = n.expanded, p = n.onExpandEvent, f = n.translations;
|
|
2809
|
-
return s.a.createElement("div", { className: "rdw-emoji-wrapper", "aria-haspopup": "true", "aria-label": "rdw-emoji-control", "aria-expanded": l, title: u || f["components.controls.emoji.emoji"] }, s.a.createElement(q, { className: y()(c), value: "unordered-list-item", onClick: p }, s.a.createElement("img", { src: a, alt: "" })), l ? this.renderEmojiModal() : void 0);
|
|
2810
|
-
} }]) && sr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2811
|
-
}();
|
|
2812
|
-
An.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, onChange: d.a.func, config: d.a.object, translations: d.a.object };
|
|
2813
|
-
var pr = An;
|
|
2814
|
-
function zn(i) {
|
|
2815
|
-
return (zn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2816
|
-
return typeof t;
|
|
2817
|
-
} : function(t) {
|
|
2818
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2819
|
-
})(i);
|
|
2820
|
-
}
|
|
2821
|
-
function dr(i, t) {
|
|
2822
|
-
for (var r = 0; r < t.length; r++) {
|
|
2823
|
-
var o = t[r];
|
|
2824
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
|
-
function _n(i, t) {
|
|
2828
|
-
return (_n = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2829
|
-
return r.__proto__ = o, r;
|
|
2830
|
-
})(i, t);
|
|
2831
|
-
}
|
|
2832
|
-
function fr(i) {
|
|
2833
|
-
var t = function() {
|
|
2834
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2835
|
-
if (typeof Proxy == "function") return !0;
|
|
2836
|
-
try {
|
|
2837
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2838
|
-
})), !0;
|
|
2839
|
-
} catch {
|
|
2840
|
-
return !1;
|
|
2841
|
-
}
|
|
2842
|
-
}();
|
|
2843
|
-
return function() {
|
|
2844
|
-
var r, o = Et(i);
|
|
2845
|
-
if (t) {
|
|
2846
|
-
var n = Et(this).constructor;
|
|
2847
|
-
r = Reflect.construct(o, arguments, n);
|
|
2848
|
-
} else r = o.apply(this, arguments);
|
|
2849
|
-
return function(e, a) {
|
|
2850
|
-
{
|
|
2851
|
-
if (a && (zn(a) === "object" || typeof a == "function")) return a;
|
|
2852
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2853
|
-
}
|
|
2854
|
-
return function(c) {
|
|
2855
|
-
if (c !== void 0) return c;
|
|
2856
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2857
|
-
}(e);
|
|
2858
|
-
}(this, r);
|
|
2859
|
-
};
|
|
2860
|
-
}
|
|
2861
|
-
function Et(i) {
|
|
2862
|
-
return (Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2863
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2864
|
-
})(i);
|
|
2865
|
-
}
|
|
2866
|
-
var Pn = function() {
|
|
2867
|
-
(function(n, e) {
|
|
2868
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2869
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && _n(n, e);
|
|
2870
|
-
})(o, C.Component);
|
|
2871
|
-
var i, t, r = fr(o);
|
|
2872
|
-
function o() {
|
|
2873
|
-
var n;
|
|
2874
|
-
(function(u, l) {
|
|
2875
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2876
|
-
})(this, o);
|
|
2877
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2878
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { expanded: !1 }, n.onExpandEvent = function() {
|
|
2879
|
-
n.signalExpanded = !n.state.expanded;
|
|
2880
|
-
}, n.expandCollapse = function() {
|
|
2881
|
-
n.setState({ expanded: n.signalExpanded }), n.signalExpanded = !1;
|
|
2882
|
-
}, n.doExpand = function() {
|
|
2883
|
-
n.setState({ expanded: !0 });
|
|
2884
|
-
}, n.doCollapse = function() {
|
|
2885
|
-
n.setState({ expanded: !1 });
|
|
2886
|
-
}, n.addEmoji = function(u) {
|
|
2887
|
-
var l = n.props, p = l.editorState, f = l.onChange, m = L.Modifier.replaceText(p.getCurrentContent(), p.getSelection(), u, p.getCurrentInlineStyle());
|
|
2888
|
-
f(L.EditorState.push(p, m, "insert-characters")), n.doCollapse();
|
|
2889
|
-
}, n;
|
|
2890
|
-
}
|
|
2891
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
2892
|
-
this.props.modalHandler.registerCallBack(this.expandCollapse);
|
|
2893
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
2894
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
2895
|
-
} }, { key: "render", value: function() {
|
|
2896
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state.expanded, u = e.component || pr;
|
|
2897
|
-
return s.a.createElement(u, { config: e, translations: a, onChange: this.addEmoji, expanded: c, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, onCollpase: this.closeModal });
|
|
2898
|
-
} }]) && dr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
2899
|
-
}();
|
|
2900
|
-
Pn.propTypes = { editorState: d.a.object.isRequired, onChange: d.a.func.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
2901
|
-
function mr() {
|
|
2902
|
-
return s.a.createElement("div", { className: "rdw-spinner" }, s.a.createElement("div", { className: "rdw-bounce1" }), s.a.createElement("div", { className: "rdw-bounce2" }), s.a.createElement("div", { className: "rdw-bounce3" }));
|
|
2903
|
-
}
|
|
2904
|
-
E(29), E(30);
|
|
2905
|
-
function Rn(i) {
|
|
2906
|
-
return (Rn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2907
|
-
return typeof t;
|
|
2908
|
-
} : function(t) {
|
|
2909
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2910
|
-
})(i);
|
|
2911
|
-
}
|
|
2912
|
-
function yr(i, t) {
|
|
2913
|
-
for (var r = 0; r < t.length; r++) {
|
|
2914
|
-
var o = t[r];
|
|
2915
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
|
-
function Un(i, t) {
|
|
2919
|
-
return (Un = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
2920
|
-
return r.__proto__ = o, r;
|
|
2921
|
-
})(i, t);
|
|
2922
|
-
}
|
|
2923
|
-
function gr(i) {
|
|
2924
|
-
var t = function() {
|
|
2925
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
2926
|
-
if (typeof Proxy == "function") return !0;
|
|
2927
|
-
try {
|
|
2928
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
2929
|
-
})), !0;
|
|
2930
|
-
} catch {
|
|
2931
|
-
return !1;
|
|
2932
|
-
}
|
|
2933
|
-
}();
|
|
2934
|
-
return function() {
|
|
2935
|
-
var r, o = St(i);
|
|
2936
|
-
if (t) {
|
|
2937
|
-
var n = St(this).constructor;
|
|
2938
|
-
r = Reflect.construct(o, arguments, n);
|
|
2939
|
-
} else r = o.apply(this, arguments);
|
|
2940
|
-
return function(e, a) {
|
|
2941
|
-
{
|
|
2942
|
-
if (a && (Rn(a) === "object" || typeof a == "function")) return a;
|
|
2943
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2944
|
-
}
|
|
2945
|
-
return function(c) {
|
|
2946
|
-
if (c !== void 0) return c;
|
|
2947
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2948
|
-
}(e);
|
|
2949
|
-
}(this, r);
|
|
2950
|
-
};
|
|
2951
|
-
}
|
|
2952
|
-
function St(i) {
|
|
2953
|
-
return (St = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2954
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2955
|
-
})(i);
|
|
2956
|
-
}
|
|
2957
|
-
var Bn = function() {
|
|
2958
|
-
(function(n, e) {
|
|
2959
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2960
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Un(n, e);
|
|
2961
|
-
})(o, C.Component);
|
|
2962
|
-
var i, t, r = gr(o);
|
|
2963
|
-
function o() {
|
|
2964
|
-
var n;
|
|
2965
|
-
(function(u, l) {
|
|
2966
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
2967
|
-
})(this, o);
|
|
2968
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
2969
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { imgSrc: "", dragEnter: !1, uploadHighlighted: n.props.config.uploadEnabled && !!n.props.config.uploadCallback, showImageLoading: !1, height: n.props.config.defaultSize.height, width: n.props.config.defaultSize.width, alt: "" }, n.onDragEnter = function(u) {
|
|
2970
|
-
n.stopPropagation(u), n.setState({ dragEnter: !0 });
|
|
2971
|
-
}, n.onImageDrop = function(u) {
|
|
2972
|
-
var l, p;
|
|
2973
|
-
u.preventDefault(), u.stopPropagation(), n.setState({ dragEnter: !1 }), p = u.dataTransfer.items ? (l = u.dataTransfer.items, !0) : (l = u.dataTransfer.files, !1);
|
|
2974
|
-
for (var f = 0; f < l.length; f += 1) if ((!p || l[f].kind === "file") && l[f].type.match("^image/")) {
|
|
2975
|
-
var m = p ? l[f].getAsFile() : l[f];
|
|
2976
|
-
n.uploadImage(m);
|
|
2977
|
-
}
|
|
2978
|
-
}, n.showImageUploadOption = function() {
|
|
2979
|
-
n.setState({ uploadHighlighted: !0 });
|
|
2980
|
-
}, n.addImageFromState = function() {
|
|
2981
|
-
var u = n.state, l = u.imgSrc, p = u.alt, f = n.state, m = f.height, b = f.width, v = n.props.onChange;
|
|
2982
|
-
isNaN(m) || (m += "px"), isNaN(b) || (b += "px"), v(l, m, b, p);
|
|
2983
|
-
}, n.showImageURLOption = function() {
|
|
2984
|
-
n.setState({ uploadHighlighted: !1 });
|
|
2985
|
-
}, n.toggleShowImageLoading = function() {
|
|
2986
|
-
var u = !n.state.showImageLoading;
|
|
2987
|
-
n.setState({ showImageLoading: u });
|
|
2988
|
-
}, n.updateValue = function(u) {
|
|
2989
|
-
var l, p, f;
|
|
2990
|
-
n.setState((l = {}, p = "".concat(u.target.name), f = u.target.value, p in l ? Object.defineProperty(l, p, { value: f, enumerable: !0, configurable: !0, writable: !0 }) : l[p] = f, l));
|
|
2991
|
-
}, n.selectImage = function(u) {
|
|
2992
|
-
u.target.files && 0 < u.target.files.length && n.uploadImage(u.target.files[0]);
|
|
2993
|
-
}, n.uploadImage = function(u) {
|
|
2994
|
-
n.toggleShowImageLoading(), (0, n.props.config.uploadCallback)(u).then(function(l) {
|
|
2995
|
-
var p = l.data;
|
|
2996
|
-
n.setState({ showImageLoading: !1, dragEnter: !1, imgSrc: p.link || p.url }), n.fileUpload = !1;
|
|
2997
|
-
}).catch(function() {
|
|
2998
|
-
n.setState({ showImageLoading: !1, dragEnter: !1 });
|
|
2999
|
-
});
|
|
3000
|
-
}, n.fileUploadClick = function(u) {
|
|
3001
|
-
n.fileUpload = !0, u.stopPropagation();
|
|
3002
|
-
}, n.stopPropagation = function(u) {
|
|
3003
|
-
n.fileUpload ? n.fileUpload = !1 : (u.preventDefault(), u.stopPropagation());
|
|
3004
|
-
}, n;
|
|
3005
|
-
}
|
|
3006
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
3007
|
-
var e = this.props.config;
|
|
3008
|
-
n.expanded && !this.props.expanded ? this.setState({ imgSrc: "", dragEnter: !1, uploadHighlighted: e.uploadEnabled && !!e.uploadCallback, showImageLoading: !1, height: e.defaultSize.height, width: e.defaultSize.width, alt: "" }) : e.uploadCallback === n.config.uploadCallback && e.uploadEnabled === n.config.uploadEnabled || this.setState({ uploadHighlighted: e.uploadEnabled && !!e.uploadCallback });
|
|
3009
|
-
} }, { key: "renderAddImageModal", value: function() {
|
|
3010
|
-
var n = this.state, e = n.imgSrc, a = n.uploadHighlighted, c = n.showImageLoading, u = n.dragEnter, l = n.height, p = n.width, f = n.alt, m = this.props, b = m.config, v = b.popupClassName, _ = b.uploadCallback, T = b.uploadEnabled, N = b.urlEnabled, z = b.previewImage, R = b.inputAccept, Y = b.alt, J = m.doCollapse, W = m.translations;
|
|
3011
|
-
return s.a.createElement("div", { className: y()("rdw-image-modal", v), onClick: this.stopPropagation }, s.a.createElement("div", { className: "rdw-image-modal-header" }, T && _ && s.a.createElement("span", { onClick: this.showImageUploadOption, className: "rdw-image-modal-header-option" }, W["components.controls.image.fileUpload"], s.a.createElement("span", { className: y()("rdw-image-modal-header-label", { "rdw-image-modal-header-label-highlighted": a }) })), N && s.a.createElement("span", { onClick: this.showImageURLOption, className: "rdw-image-modal-header-option" }, W["components.controls.image.byURL"], s.a.createElement("span", { className: y()("rdw-image-modal-header-label", { "rdw-image-modal-header-label-highlighted": !a }) }))), a ? s.a.createElement("div", { onClick: this.fileUploadClick }, s.a.createElement("div", { onDragEnter: this.onDragEnter, onDragOver: this.stopPropagation, onDrop: this.onImageDrop, className: y()("rdw-image-modal-upload-option", { "rdw-image-modal-upload-option-highlighted": u }) }, s.a.createElement("label", { htmlFor: "file", className: "rdw-image-modal-upload-option-label" }, z && e ? s.a.createElement("img", { src: e, alt: e, className: "rdw-image-modal-upload-option-image-preview" }) : e || W["components.controls.image.dropFileText"])), s.a.createElement("input", { type: "file", id: "file", accept: R, onChange: this.selectImage, className: "rdw-image-modal-upload-option-input" })) : s.a.createElement("div", { className: "rdw-image-modal-url-section" }, s.a.createElement("input", { className: "rdw-image-modal-url-input", placeholder: W["components.controls.image.enterlink"], name: "imgSrc", onChange: this.updateValue, onBlur: this.updateValue, value: e }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*")), Y.present && s.a.createElement("div", { className: "rdw-image-modal-size" }, s.a.createElement("span", { className: "rdw-image-modal-alt-lbl" }, "Alt Text"), s.a.createElement("input", { onChange: this.updateValue, onBlur: this.updateValue, value: f, name: "alt", className: "rdw-image-modal-alt-input", placeholder: "alt" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, Y.mandatory && "*")), s.a.createElement("div", { className: "rdw-image-modal-size" }, "↕ ", s.a.createElement("input", { onChange: this.updateValue, onBlur: this.updateValue, value: l, name: "height", className: "rdw-image-modal-size-input", placeholder: "Height" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*"), " ↔ ", s.a.createElement("input", { onChange: this.updateValue, onBlur: this.updateValue, value: p, name: "width", className: "rdw-image-modal-size-input", placeholder: "Width" }), s.a.createElement("span", { className: "rdw-image-mandatory-sign" }, "*")), s.a.createElement("span", { className: "rdw-image-modal-btn-section" }, s.a.createElement("button", { className: "rdw-image-modal-btn", onClick: this.addImageFromState, disabled: !e || !l || !p || Y.mandatory && !f }, W["generic.add"]), s.a.createElement("button", { className: "rdw-image-modal-btn", onClick: J }, W["generic.cancel"])), c ? s.a.createElement("div", { className: "rdw-image-modal-spinner" }, s.a.createElement(mr, null)) : void 0);
|
|
3012
|
-
} }, { key: "render", value: function() {
|
|
3013
|
-
var n = this.props, e = n.config, a = e.icon, c = e.className, u = e.title, l = n.expanded, p = n.onExpandEvent, f = n.translations;
|
|
3014
|
-
return s.a.createElement("div", { className: "rdw-image-wrapper", "aria-haspopup": "true", "aria-expanded": l, "aria-label": "rdw-image-control" }, s.a.createElement(q, { className: y()(c), value: "unordered-list-item", onClick: p, title: u || f["components.controls.image.image"] }, s.a.createElement("img", { src: a, alt: "" })), l ? this.renderAddImageModal() : void 0);
|
|
3015
|
-
} }]) && yr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
3016
|
-
}();
|
|
3017
|
-
Bn.propTypes = { expanded: d.a.bool, onExpandEvent: d.a.func, doCollapse: d.a.func, onChange: d.a.func, config: d.a.object, translations: d.a.object };
|
|
3018
|
-
var br = Bn;
|
|
3019
|
-
function Fn(i) {
|
|
3020
|
-
return (Fn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3021
|
-
return typeof t;
|
|
3022
|
-
} : function(t) {
|
|
3023
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3024
|
-
})(i);
|
|
3025
|
-
}
|
|
3026
|
-
function hr(i, t) {
|
|
3027
|
-
for (var r = 0; r < t.length; r++) {
|
|
3028
|
-
var o = t[r];
|
|
3029
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
function Yn(i, t) {
|
|
3033
|
-
return (Yn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3034
|
-
return r.__proto__ = o, r;
|
|
3035
|
-
})(i, t);
|
|
3036
|
-
}
|
|
3037
|
-
function Mr(i) {
|
|
3038
|
-
var t = function() {
|
|
3039
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3040
|
-
if (typeof Proxy == "function") return !0;
|
|
3041
|
-
try {
|
|
3042
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3043
|
-
})), !0;
|
|
3044
|
-
} catch {
|
|
3045
|
-
return !1;
|
|
3046
|
-
}
|
|
3047
|
-
}();
|
|
3048
|
-
return function() {
|
|
3049
|
-
var r, o = wt(i);
|
|
3050
|
-
if (t) {
|
|
3051
|
-
var n = wt(this).constructor;
|
|
3052
|
-
r = Reflect.construct(o, arguments, n);
|
|
3053
|
-
} else r = o.apply(this, arguments);
|
|
3054
|
-
return function(e, a) {
|
|
3055
|
-
{
|
|
3056
|
-
if (a && (Fn(a) === "object" || typeof a == "function")) return a;
|
|
3057
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3058
|
-
}
|
|
3059
|
-
return function(c) {
|
|
3060
|
-
if (c !== void 0) return c;
|
|
3061
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3062
|
-
}(e);
|
|
3063
|
-
}(this, r);
|
|
3064
|
-
};
|
|
3065
|
-
}
|
|
3066
|
-
function wt(i) {
|
|
3067
|
-
return (wt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3068
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3069
|
-
})(i);
|
|
3070
|
-
}
|
|
3071
|
-
var Qn = function() {
|
|
3072
|
-
(function(n, e) {
|
|
3073
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3074
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Yn(n, e);
|
|
3075
|
-
})(o, C.Component);
|
|
3076
|
-
var i, t, r = Mr(o);
|
|
3077
|
-
function o(n) {
|
|
3078
|
-
var e;
|
|
3079
|
-
(function(c, u) {
|
|
3080
|
-
if (!(c instanceof u)) throw new TypeError("Cannot call a class as a function");
|
|
3081
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
3082
|
-
e.signalExpanded = !e.state.expanded;
|
|
3083
|
-
}, e.doExpand = function() {
|
|
3084
|
-
e.setState({ expanded: !0 });
|
|
3085
|
-
}, e.doCollapse = function() {
|
|
3086
|
-
e.setState({ expanded: !1 });
|
|
3087
|
-
}, e.expandCollapse = function() {
|
|
3088
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
3089
|
-
}, e.addImage = function(c, u, l, p) {
|
|
3090
|
-
var f = e.props, m = f.editorState, b = f.onChange, v = { src: c, height: u, width: l };
|
|
3091
|
-
f.config.alt.present && (v.alt = p);
|
|
3092
|
-
var _ = m.getCurrentContent().createEntity("IMAGE", "MUTABLE", v).getLastCreatedEntityKey();
|
|
3093
|
-
b(L.AtomicBlockUtils.insertAtomicBlock(m, _, " ")), e.doCollapse();
|
|
3094
|
-
};
|
|
3095
|
-
var a = e.props.modalHandler;
|
|
3096
|
-
return e.state = { expanded: !1 }, a.registerCallBack(e.expandCollapse), e;
|
|
3097
|
-
}
|
|
3098
|
-
return i = o, (t = [{ key: "componentWillUnmount", value: function() {
|
|
3099
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
3100
|
-
} }, { key: "render", value: function() {
|
|
3101
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state.expanded, u = e.component || br;
|
|
3102
|
-
return s.a.createElement(u, { config: e, translations: a, onChange: this.addImage, expanded: c, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse });
|
|
3103
|
-
} }]) && hr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
3104
|
-
}();
|
|
3105
|
-
Qn.propTypes = { editorState: d.a.object.isRequired, onChange: d.a.func.isRequired, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
3106
|
-
function Hn(i) {
|
|
3107
|
-
var t = i.config, r = i.onChange, o = i.translations, n = t.icon, e = t.className, a = t.title;
|
|
3108
|
-
return s.a.createElement("div", { className: "rdw-remove-wrapper", "aria-label": "rdw-remove-control" }, s.a.createElement(q, { className: y()(e), onClick: r, title: a || o["components.controls.remove.remove"] }, s.a.createElement("img", { src: n, alt: "" })));
|
|
3109
|
-
}
|
|
3110
|
-
var jr = Qn;
|
|
3111
|
-
E(31), Hn.propTypes = { onChange: d.a.func, config: d.a.object, translations: d.a.object };
|
|
3112
|
-
var vr = Hn;
|
|
3113
|
-
function Zn(i) {
|
|
3114
|
-
return (Zn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3115
|
-
return typeof t;
|
|
3116
|
-
} : function(t) {
|
|
3117
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3118
|
-
})(i);
|
|
3119
|
-
}
|
|
3120
|
-
function Nr(i, t) {
|
|
3121
|
-
for (var r = 0; r < t.length; r++) {
|
|
3122
|
-
var o = t[r];
|
|
3123
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
function Wn(i, t) {
|
|
3127
|
-
return (Wn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3128
|
-
return r.__proto__ = o, r;
|
|
3129
|
-
})(i, t);
|
|
3130
|
-
}
|
|
3131
|
-
function Er(i) {
|
|
3132
|
-
var t = function() {
|
|
3133
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3134
|
-
if (typeof Proxy == "function") return !0;
|
|
3135
|
-
try {
|
|
3136
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3137
|
-
})), !0;
|
|
3138
|
-
} catch {
|
|
3139
|
-
return !1;
|
|
3140
|
-
}
|
|
3141
|
-
}();
|
|
3142
|
-
return function() {
|
|
3143
|
-
var r, o = Ct(i);
|
|
3144
|
-
if (t) {
|
|
3145
|
-
var n = Ct(this).constructor;
|
|
3146
|
-
r = Reflect.construct(o, arguments, n);
|
|
3147
|
-
} else r = o.apply(this, arguments);
|
|
3148
|
-
return function(e, a) {
|
|
3149
|
-
{
|
|
3150
|
-
if (a && (Zn(a) === "object" || typeof a == "function")) return a;
|
|
3151
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3152
|
-
}
|
|
3153
|
-
return function(c) {
|
|
3154
|
-
if (c !== void 0) return c;
|
|
3155
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3156
|
-
}(e);
|
|
3157
|
-
}(this, r);
|
|
3158
|
-
};
|
|
3159
|
-
}
|
|
3160
|
-
function Ct(i) {
|
|
3161
|
-
return (Ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3162
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3163
|
-
})(i);
|
|
3164
|
-
}
|
|
3165
|
-
var Gn = function() {
|
|
3166
|
-
(function(n, e) {
|
|
3167
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3168
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Wn(n, e);
|
|
3169
|
-
})(o, C.Component);
|
|
3170
|
-
var i, t, r = Er(o);
|
|
3171
|
-
function o() {
|
|
3172
|
-
var n;
|
|
3173
|
-
(function(u, l) {
|
|
3174
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
3175
|
-
})(this, o);
|
|
3176
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
3177
|
-
return (n = r.call.apply(r, [this].concat(a))).state = { expanded: !1 }, n.onExpandEvent = function() {
|
|
3178
|
-
n.signalExpanded = !n.state.expanded;
|
|
3179
|
-
}, n.expandCollapse = function() {
|
|
3180
|
-
n.setState({ expanded: n.signalExpanded }), n.signalExpanded = !1;
|
|
3181
|
-
}, n.removeInlineStyles = function() {
|
|
3182
|
-
var u = n.props, l = u.editorState;
|
|
3183
|
-
(0, u.onChange)(n.removeAllInlineStyles(l));
|
|
3184
|
-
}, n.removeAllInlineStyles = function(u) {
|
|
3185
|
-
var l = u.getCurrentContent();
|
|
3186
|
-
return ["BOLD", "ITALIC", "UNDERLINE", "STRIKETHROUGH", "MONOSPACE", "SUPERSCRIPT", "SUBSCRIPT"].forEach(function(p) {
|
|
3187
|
-
l = L.Modifier.removeInlineStyle(l, u.getSelection(), p);
|
|
3188
|
-
}), Ne(Object(g.getSelectionCustomInlineStyle)(u, ["FONTSIZE", "FONTFAMILY", "COLOR", "BGCOLOR"]), function(p, f) {
|
|
3189
|
-
f && (l = L.Modifier.removeInlineStyle(l, u.getSelection(), f));
|
|
3190
|
-
}), L.EditorState.push(u, l, "change-inline-style");
|
|
3191
|
-
}, n.doExpand = function() {
|
|
3192
|
-
n.setState({ expanded: !0 });
|
|
3193
|
-
}, n.doCollapse = function() {
|
|
3194
|
-
n.setState({ expanded: !1 });
|
|
3195
|
-
}, n;
|
|
3196
|
-
}
|
|
3197
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
3198
|
-
this.props.modalHandler.registerCallBack(this.expandCollapse);
|
|
3199
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
3200
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
3201
|
-
} }, { key: "render", value: function() {
|
|
3202
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state.expanded, u = e.component || vr;
|
|
3203
|
-
return s.a.createElement(u, { config: e, translations: a, expanded: c, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, onChange: this.removeInlineStyles });
|
|
3204
|
-
} }]) && Nr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
3205
|
-
}();
|
|
3206
|
-
Gn.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object.isRequired, config: d.a.object, translations: d.a.object, modalHandler: d.a.object }, E(32);
|
|
3207
|
-
function Jn(i) {
|
|
3208
|
-
return (Jn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3209
|
-
return typeof t;
|
|
3210
|
-
} : function(t) {
|
|
3211
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3212
|
-
})(i);
|
|
3213
|
-
}
|
|
3214
|
-
function Sr(i, t) {
|
|
3215
|
-
for (var r = 0; r < t.length; r++) {
|
|
3216
|
-
var o = t[r];
|
|
3217
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
function Vn(i, t) {
|
|
3221
|
-
return (Vn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3222
|
-
return r.__proto__ = o, r;
|
|
3223
|
-
})(i, t);
|
|
3224
|
-
}
|
|
3225
|
-
function wr(i) {
|
|
3226
|
-
var t = function() {
|
|
3227
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3228
|
-
if (typeof Proxy == "function") return !0;
|
|
3229
|
-
try {
|
|
3230
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3231
|
-
})), !0;
|
|
3232
|
-
} catch {
|
|
3233
|
-
return !1;
|
|
3234
|
-
}
|
|
3235
|
-
}();
|
|
3236
|
-
return function() {
|
|
3237
|
-
var r, o = Lt(i);
|
|
3238
|
-
if (t) {
|
|
3239
|
-
var n = Lt(this).constructor;
|
|
3240
|
-
r = Reflect.construct(o, arguments, n);
|
|
3241
|
-
} else r = o.apply(this, arguments);
|
|
3242
|
-
return function(e, a) {
|
|
3243
|
-
{
|
|
3244
|
-
if (a && (Jn(a) === "object" || typeof a == "function")) return a;
|
|
3245
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3246
|
-
}
|
|
3247
|
-
return function(c) {
|
|
3248
|
-
if (c !== void 0) return c;
|
|
3249
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3250
|
-
}(e);
|
|
3251
|
-
}(this, r);
|
|
3252
|
-
};
|
|
3253
|
-
}
|
|
3254
|
-
function Lt(i) {
|
|
3255
|
-
return (Lt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3256
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3257
|
-
})(i);
|
|
3258
|
-
}
|
|
3259
|
-
var qn = function() {
|
|
3260
|
-
(function(n, e) {
|
|
3261
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3262
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Vn(n, e);
|
|
3263
|
-
})(o, C.Component);
|
|
3264
|
-
var i, t, r = wr(o);
|
|
3265
|
-
function o() {
|
|
3266
|
-
var n;
|
|
3267
|
-
(function(u, l) {
|
|
3268
|
-
if (!(u instanceof l)) throw new TypeError("Cannot call a class as a function");
|
|
3269
|
-
})(this, o);
|
|
3270
|
-
for (var e = arguments.length, a = new Array(e), c = 0; c < e; c++) a[c] = arguments[c];
|
|
3271
|
-
return (n = r.call.apply(r, [this].concat(a))).onChange = function(u) {
|
|
3272
|
-
(0, n.props.onChange)(u);
|
|
3273
|
-
}, n;
|
|
3274
|
-
}
|
|
3275
|
-
return i = o, (t = [{ key: "renderInDropDown", value: function() {
|
|
3276
|
-
var n = this.props, e = n.config, a = n.expanded, c = n.doExpand, u = n.onExpandEvent, l = n.doCollapse, p = n.currentState, f = p.undoDisabled, m = p.redoDisabled, b = n.translations, v = e.options, _ = e.undo, T = e.redo, N = e.className, z = e.dropdownClassName, R = e.title;
|
|
3277
|
-
return s.a.createElement(ve, { className: y()("rdw-history-dropdown", N), optionWrapperClassName: y()(z), expanded: a, doExpand: c, doCollapse: l, onExpandEvent: u, "aria-label": "rdw-history-control", title: R || b["components.controls.history.history"] }, s.a.createElement("img", { src: te(e), alt: "" }), 0 <= v.indexOf("undo") && s.a.createElement(k, { value: "undo", onClick: this.onChange, disabled: f, className: y()("rdw-history-dropdownoption", _.className), title: _.title || b["components.controls.history.undo"] }, s.a.createElement("img", { src: _.icon, alt: "" })), 0 <= v.indexOf("redo") && s.a.createElement(k, { value: "redo", onClick: this.onChange, disabled: m, className: y()("rdw-history-dropdownoption", T.className), title: T.title || b["components.controls.history.redo"] }, s.a.createElement("img", { src: T.icon, alt: "" })));
|
|
3278
|
-
} }, { key: "renderInFlatList", value: function() {
|
|
3279
|
-
var n = this.props, e = n.config, a = e.options, c = e.undo, u = e.redo, l = e.className, p = n.currentState, f = p.undoDisabled, m = p.redoDisabled, b = n.translations;
|
|
3280
|
-
return s.a.createElement("div", { className: y()("rdw-history-wrapper", l), "aria-label": "rdw-history-control" }, 0 <= a.indexOf("undo") && s.a.createElement(q, { value: "undo", onClick: this.onChange, className: y()(c.className), disabled: f, title: c.title || b["components.controls.history.undo"] }, s.a.createElement("img", { src: c.icon, alt: "" })), 0 <= a.indexOf("redo") && s.a.createElement(q, { value: "redo", onClick: this.onChange, className: y()(u.className), disabled: m, title: u.title || b["components.controls.history.redo"] }, s.a.createElement("img", { src: u.icon, alt: "" })));
|
|
3281
|
-
} }, { key: "render", value: function() {
|
|
3282
|
-
return this.props.config.inDropdown ? this.renderInDropDown() : this.renderInFlatList();
|
|
3283
|
-
} }]) && Sr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
3284
|
-
}();
|
|
3285
|
-
function Kn(i) {
|
|
3286
|
-
return (Kn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3287
|
-
return typeof t;
|
|
3288
|
-
} : function(t) {
|
|
3289
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3290
|
-
})(i);
|
|
3291
|
-
}
|
|
3292
|
-
function Cr(i, t) {
|
|
3293
|
-
for (var r = 0; r < t.length; r++) {
|
|
3294
|
-
var o = t[r];
|
|
3295
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3296
|
-
}
|
|
3297
|
-
}
|
|
3298
|
-
function Xn(i, t) {
|
|
3299
|
-
return (Xn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3300
|
-
return r.__proto__ = o, r;
|
|
3301
|
-
})(i, t);
|
|
3302
|
-
}
|
|
3303
|
-
function Lr(i) {
|
|
3304
|
-
var t = function() {
|
|
3305
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3306
|
-
if (typeof Proxy == "function") return !0;
|
|
3307
|
-
try {
|
|
3308
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3309
|
-
})), !0;
|
|
3310
|
-
} catch {
|
|
3311
|
-
return !1;
|
|
3312
|
-
}
|
|
3313
|
-
}();
|
|
3314
|
-
return function() {
|
|
3315
|
-
var r, o = Dt(i);
|
|
3316
|
-
if (t) {
|
|
3317
|
-
var n = Dt(this).constructor;
|
|
3318
|
-
r = Reflect.construct(o, arguments, n);
|
|
3319
|
-
} else r = o.apply(this, arguments);
|
|
3320
|
-
return function(e, a) {
|
|
3321
|
-
{
|
|
3322
|
-
if (a && (Kn(a) === "object" || typeof a == "function")) return a;
|
|
3323
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3324
|
-
}
|
|
3325
|
-
return function(c) {
|
|
3326
|
-
if (c !== void 0) return c;
|
|
3327
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3328
|
-
}(e);
|
|
3329
|
-
}(this, r);
|
|
3330
|
-
};
|
|
3331
|
-
}
|
|
3332
|
-
function Dt(i) {
|
|
3333
|
-
return (Dt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3334
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3335
|
-
})(i);
|
|
3336
|
-
}
|
|
3337
|
-
qn.propTypes = { expanded: d.a.bool, doExpand: d.a.func, doCollapse: d.a.func, onExpandEvent: d.a.func, config: d.a.object, onChange: d.a.func, currentState: d.a.object, translations: d.a.object };
|
|
3338
|
-
var $n = function() {
|
|
3339
|
-
(function(n, e) {
|
|
3340
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3341
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && Xn(n, e);
|
|
3342
|
-
})(o, C.Component);
|
|
3343
|
-
var i, t, r = Lr(o);
|
|
3344
|
-
function o(n) {
|
|
3345
|
-
var e;
|
|
3346
|
-
(function(l, p) {
|
|
3347
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
3348
|
-
})(this, o), (e = r.call(this, n)).onExpandEvent = function() {
|
|
3349
|
-
e.signalExpanded = !e.state.expanded;
|
|
3350
|
-
}, e.onChange = function(l) {
|
|
3351
|
-
var p = e.props, f = p.editorState, m = p.onChange, b = L.EditorState[l](f);
|
|
3352
|
-
b && m(b);
|
|
3353
|
-
}, e.doExpand = function() {
|
|
3354
|
-
e.setState({ expanded: !0 });
|
|
3355
|
-
}, e.doCollapse = function() {
|
|
3356
|
-
e.setState({ expanded: !1 });
|
|
3357
|
-
};
|
|
3358
|
-
var a = { expanded: !(e.expandCollapse = function() {
|
|
3359
|
-
e.setState({ expanded: e.signalExpanded }), e.signalExpanded = !1;
|
|
3360
|
-
}), undoDisabled: !1, redoDisabled: !1 }, c = n.editorState, u = n.modalHandler;
|
|
3361
|
-
return c && (a.undoDisabled = c.getUndoStack().size === 0, a.redoDisabled = c.getRedoStack().size === 0), e.state = a, u.registerCallBack(e.expandCollapse), e;
|
|
3362
|
-
}
|
|
3363
|
-
return i = o, (t = [{ key: "componentDidUpdate", value: function(n) {
|
|
3364
|
-
var e = this.props.editorState;
|
|
3365
|
-
e && n.editorState !== e && this.setState({ undoDisabled: e.getUndoStack().size === 0, redoDisabled: e.getRedoStack().size === 0 });
|
|
3366
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
3367
|
-
this.props.modalHandler.deregisterCallBack(this.expandCollapse);
|
|
3368
|
-
} }, { key: "render", value: function() {
|
|
3369
|
-
var n = this.props, e = n.config, a = n.translations, c = this.state, u = c.undoDisabled, l = c.redoDisabled, p = c.expanded, f = e.component || qn;
|
|
3370
|
-
return s.a.createElement(f, { config: e, translations: a, currentState: { undoDisabled: u, redoDisabled: l }, expanded: p, onExpandEvent: this.onExpandEvent, doExpand: this.doExpand, doCollapse: this.doCollapse, onChange: this.onChange });
|
|
3371
|
-
} }]) && Cr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
3372
|
-
}();
|
|
3373
|
-
$n.propTypes = { onChange: d.a.func.isRequired, editorState: d.a.object, modalHandler: d.a.object, config: d.a.object, translations: d.a.object };
|
|
3374
|
-
var Dr = { inline: ue, blockType: No, fontSize: Wt, fontFamily: Xt, list: rn, textAlign: pn, colorPicker: Zo, link: nr, embedded: lr, emoji: Pn, image: jr, remove: Gn, history: $n }, kr = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g, Or = /^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;
|
|
3375
|
-
function eo(i) {
|
|
3376
|
-
return String(i).replace(kr, "").match(Or) ? i : "#";
|
|
3377
|
-
}
|
|
3378
|
-
E(33);
|
|
3379
|
-
function to(i) {
|
|
3380
|
-
return (to = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3381
|
-
return typeof t;
|
|
3382
|
-
} : function(t) {
|
|
3383
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3384
|
-
})(i);
|
|
3385
|
-
}
|
|
3386
|
-
function xr(i, t) {
|
|
3387
|
-
for (var r = 0; r < t.length; r++) {
|
|
3388
|
-
var o = t[r];
|
|
3389
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3390
|
-
}
|
|
3391
|
-
}
|
|
3392
|
-
function no(i, t) {
|
|
3393
|
-
return (no = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3394
|
-
return r.__proto__ = o, r;
|
|
3395
|
-
})(i, t);
|
|
3396
|
-
}
|
|
3397
|
-
function Ir(i) {
|
|
3398
|
-
var t = function() {
|
|
3399
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3400
|
-
if (typeof Proxy == "function") return !0;
|
|
3401
|
-
try {
|
|
3402
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3403
|
-
})), !0;
|
|
3404
|
-
} catch {
|
|
3405
|
-
return !1;
|
|
3406
|
-
}
|
|
3407
|
-
}();
|
|
3408
|
-
return function() {
|
|
3409
|
-
var r, o = kt(i);
|
|
3410
|
-
if (t) {
|
|
3411
|
-
var n = kt(this).constructor;
|
|
3412
|
-
r = Reflect.construct(o, arguments, n);
|
|
3413
|
-
} else r = o.apply(this, arguments);
|
|
3414
|
-
return function(e, a) {
|
|
3415
|
-
{
|
|
3416
|
-
if (a && (to(a) === "object" || typeof a == "function")) return a;
|
|
3417
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3418
|
-
}
|
|
3419
|
-
return function(c) {
|
|
3420
|
-
if (c !== void 0) return c;
|
|
3421
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3422
|
-
}(e);
|
|
3423
|
-
}(this, r);
|
|
3424
|
-
};
|
|
3425
|
-
}
|
|
3426
|
-
function kt(i) {
|
|
3427
|
-
return (kt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3428
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3429
|
-
})(i);
|
|
3430
|
-
}
|
|
3431
|
-
function Tr(i, t, r) {
|
|
3432
|
-
i.findEntityRanges(function(o) {
|
|
3433
|
-
var n = o.getEntity();
|
|
3434
|
-
return n !== null && r.getEntity(n).getType() === "LINK";
|
|
3435
|
-
}, t);
|
|
3436
|
-
}
|
|
3437
|
-
function Ar(i) {
|
|
3438
|
-
var t, r = i.showOpenOptionOnHover;
|
|
3439
|
-
return (t = function() {
|
|
3440
|
-
(function(c, u) {
|
|
3441
|
-
if (typeof u != "function" && u !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3442
|
-
c.prototype = Object.create(u && u.prototype, { constructor: { value: c, writable: !0, configurable: !0 } }), Object.defineProperty(c, "prototype", { writable: !1 }), u && no(c, u);
|
|
3443
|
-
})(a, C.Component);
|
|
3444
|
-
var o, n, e = Ir(a);
|
|
3445
|
-
function a() {
|
|
3446
|
-
var c;
|
|
3447
|
-
(function(f, m) {
|
|
3448
|
-
if (!(f instanceof m)) throw new TypeError("Cannot call a class as a function");
|
|
3449
|
-
})(this, a);
|
|
3450
|
-
for (var u = arguments.length, l = new Array(u), p = 0; p < u; p++) l[p] = arguments[p];
|
|
3451
|
-
return (c = e.call.apply(e, [this].concat(l))).state = { showPopOver: !1 }, c.openLink = function() {
|
|
3452
|
-
var f = c.props, m = f.entityKey, b = f.contentState.getEntity(m).getData().url, v = window.open(eo(b), "blank");
|
|
3453
|
-
v && v.focus();
|
|
3454
|
-
}, c.toggleShowPopOver = function() {
|
|
3455
|
-
var f = !c.state.showPopOver;
|
|
3456
|
-
c.setState({ showPopOver: f });
|
|
3457
|
-
}, c;
|
|
3458
|
-
}
|
|
3459
|
-
return o = a, (n = [{ key: "render", value: function() {
|
|
3460
|
-
var c = this.props, u = c.children, l = c.entityKey, p = c.contentState.getEntity(l).getData(), f = p.url, m = p.targetOption, b = this.state.showPopOver;
|
|
3461
|
-
return s.a.createElement("span", { className: "rdw-link-decorator-wrapper", onMouseEnter: this.toggleShowPopOver, onMouseLeave: this.toggleShowPopOver }, s.a.createElement("a", { href: eo(f), target: m }, u), b && r ? s.a.createElement("img", { src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=", alt: "", onClick: this.openLink, className: "rdw-link-decorator-icon" }) : void 0);
|
|
3462
|
-
} }]) && xr(o.prototype, n), Object.defineProperty(o, "prototype", { writable: !1 }), a;
|
|
3463
|
-
}()).propTypes = { entityKey: d.a.string.isRequired, children: d.a.array, contentState: d.a.object }, t;
|
|
3464
|
-
}
|
|
3465
|
-
E(34);
|
|
3466
|
-
function zr(i, t, r) {
|
|
3467
|
-
return Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
3468
|
-
}
|
|
3469
|
-
var oo = zr(function i(t) {
|
|
3470
|
-
var r = this;
|
|
3471
|
-
(function(o, n) {
|
|
3472
|
-
if (!(o instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
3473
|
-
})(this, i), this.getMentionComponent = function() {
|
|
3474
|
-
function o(e) {
|
|
3475
|
-
var a = e.entityKey, c = e.children, u = e.contentState.getEntity(a).getData(), l = u.url, p = u.value;
|
|
3476
|
-
return s.a.createElement("a", { href: l || p, className: y()("rdw-mention-link", n) }, c);
|
|
3477
|
-
}
|
|
3478
|
-
var n = r.className;
|
|
3479
|
-
return o.propTypes = { entityKey: d.a.number, children: d.a.array, contentState: d.a.object }, o;
|
|
3480
|
-
}, this.getMentionDecorator = function() {
|
|
3481
|
-
return { strategy: r.findMentionEntities, component: r.getMentionComponent() };
|
|
3482
|
-
}, this.className = t;
|
|
3483
|
-
});
|
|
3484
|
-
oo.prototype.findMentionEntities = function(i, t, r) {
|
|
3485
|
-
i.findEntityRanges(function(o) {
|
|
3486
|
-
var n = o.getEntity();
|
|
3487
|
-
return n !== null && r.getEntity(n).getType() === "MENTION";
|
|
3488
|
-
}, t);
|
|
3489
|
-
};
|
|
3490
|
-
var _r = oo;
|
|
3491
|
-
E(35);
|
|
3492
|
-
function ro(i) {
|
|
3493
|
-
return (ro = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3494
|
-
return typeof t;
|
|
3495
|
-
} : function(t) {
|
|
3496
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3497
|
-
})(i);
|
|
3498
|
-
}
|
|
3499
|
-
function io(i, t) {
|
|
3500
|
-
return (io = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3501
|
-
return r.__proto__ = o, r;
|
|
3502
|
-
})(i, t);
|
|
3503
|
-
}
|
|
3504
|
-
function Pr(i) {
|
|
3505
|
-
var t = function() {
|
|
3506
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3507
|
-
if (typeof Proxy == "function") return !0;
|
|
3508
|
-
try {
|
|
3509
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3510
|
-
})), !0;
|
|
3511
|
-
} catch {
|
|
3512
|
-
return !1;
|
|
3513
|
-
}
|
|
3514
|
-
}();
|
|
3515
|
-
return function() {
|
|
3516
|
-
var r, o = Ot(i);
|
|
3517
|
-
if (t) {
|
|
3518
|
-
var n = Ot(this).constructor;
|
|
3519
|
-
r = Reflect.construct(o, arguments, n);
|
|
3520
|
-
} else r = o.apply(this, arguments);
|
|
3521
|
-
return function(e, a) {
|
|
3522
|
-
{
|
|
3523
|
-
if (a && (ro(a) === "object" || typeof a == "function")) return a;
|
|
3524
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3525
|
-
}
|
|
3526
|
-
return function(c) {
|
|
3527
|
-
if (c !== void 0) return c;
|
|
3528
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3529
|
-
}(e);
|
|
3530
|
-
}(this, r);
|
|
3531
|
-
};
|
|
3532
|
-
}
|
|
3533
|
-
function Ot(i) {
|
|
3534
|
-
return (Ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3535
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3536
|
-
})(i);
|
|
3537
|
-
}
|
|
3538
|
-
function Rr(i, t) {
|
|
3539
|
-
for (var r = 0; r < t.length; r++) {
|
|
3540
|
-
var o = t[r];
|
|
3541
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3542
|
-
}
|
|
3543
|
-
}
|
|
3544
|
-
function ao(i, t, r) {
|
|
3545
|
-
return t && Rr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
3546
|
-
}
|
|
3547
|
-
function co(i, t) {
|
|
3548
|
-
if (!(i instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
3549
|
-
}
|
|
3550
|
-
var Ur = ao(function i(t) {
|
|
3551
|
-
var r = this;
|
|
3552
|
-
co(this, i), this.findSuggestionEntities = function(b, v) {
|
|
3553
|
-
if (r.config.getEditorState()) {
|
|
3554
|
-
var _ = r.config, T = _.separator, N = _.trigger, z = _.getSuggestions, R = (0, _.getEditorState)().getSelection();
|
|
3555
|
-
if (R.get("anchorKey") === b.get("key") && R.get("anchorKey") === R.get("focusKey")) {
|
|
3556
|
-
var Y = b.getText(), J = (Y = Y.substr(0, R.get("focusOffset") === Y.length - 1 ? Y.length : R.get("focusOffset") + 1)).lastIndexOf(T + N), W = T + N;
|
|
3557
|
-
if ((J === void 0 || J < 0) && Y[0] === N && (J = 0, W = N), 0 <= J) {
|
|
3558
|
-
var ye = Y.substr(J + W.length, Y.length);
|
|
3559
|
-
z().some(function(Ee) {
|
|
3560
|
-
return !!Ee.value && (r.config.caseSensitive ? 0 <= Ee.value.indexOf(ye) : 0 <= Ee.value.toLowerCase().indexOf(ye && ye.toLowerCase()));
|
|
3561
|
-
}) && v(J === 0 ? 0 : J + 1, Y.length);
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
}
|
|
3565
|
-
}, this.getSuggestionComponent = function() {
|
|
3566
|
-
var b, v = this.config;
|
|
3567
|
-
return (b = function() {
|
|
3568
|
-
(function(N, z) {
|
|
3569
|
-
if (typeof z != "function" && z !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3570
|
-
N.prototype = Object.create(z && z.prototype, { constructor: { value: N, writable: !0, configurable: !0 } }), Object.defineProperty(N, "prototype", { writable: !1 }), z && io(N, z);
|
|
3571
|
-
})(T, C.Component);
|
|
3572
|
-
var _ = Pr(T);
|
|
3573
|
-
function T() {
|
|
3574
|
-
var N;
|
|
3575
|
-
co(this, T);
|
|
3576
|
-
for (var z = arguments.length, R = new Array(z), Y = 0; Y < z; Y++) R[Y] = arguments[Y];
|
|
3577
|
-
return (N = _.call.apply(_, [this].concat(R))).state = { style: { left: 15 }, activeOption: -1, showSuggestions: !0 }, N.onEditorKeyDown = function(J) {
|
|
3578
|
-
var W = N.state.activeOption, ye = {};
|
|
3579
|
-
J.key === "ArrowDown" ? (J.preventDefault(), W === N.filteredSuggestions.length - 1 ? ye.activeOption = 0 : ye.activeOption = W + 1) : J.key === "ArrowUp" ? ye.activeOption = W <= 0 ? N.filteredSuggestions.length - 1 : W - 1 : J.key === "Escape" ? (ye.showSuggestions = !1, Q()) : J.key === "Enter" && N.addMention(), N.setState(ye);
|
|
3580
|
-
}, N.onOptionMouseEnter = function(J) {
|
|
3581
|
-
var W = J.target.getAttribute("data-index");
|
|
3582
|
-
N.setState({ activeOption: W });
|
|
3583
|
-
}, N.onOptionMouseLeave = function() {
|
|
3584
|
-
N.setState({ activeOption: -1 });
|
|
3585
|
-
}, N.setSuggestionReference = function(J) {
|
|
3586
|
-
N.suggestion = J;
|
|
3587
|
-
}, N.setDropdownReference = function(J) {
|
|
3588
|
-
N.dropdown = J;
|
|
3589
|
-
}, N.closeSuggestionDropdown = function() {
|
|
3590
|
-
N.setState({ showSuggestions: !1 });
|
|
3591
|
-
}, N.filteredSuggestions = [], N.filterSuggestions = function(J) {
|
|
3592
|
-
var W = J.children[0].props.text.substr(1), ye = v.getSuggestions();
|
|
3593
|
-
N.filteredSuggestions = ye && ye.filter(function(Ee) {
|
|
3594
|
-
return !W || W.length === 0 || (v.caseSensitive ? 0 <= Ee.value.indexOf(W) : 0 <= Ee.value.toLowerCase().indexOf(W && W.toLowerCase()));
|
|
3595
|
-
});
|
|
3596
|
-
}, N.addMention = function() {
|
|
3597
|
-
var J = N.state.activeOption, W = v.getEditorState(), ye = v.onChange, Ee = v.separator, He = v.trigger, Ye = N.filteredSuggestions[J];
|
|
3598
|
-
Ye && function(Re, _t, et, qe, bo) {
|
|
3599
|
-
var Ke = bo.value, ei = bo.url, ti = Re.getCurrentContent().createEntity("MENTION", "IMMUTABLE", { text: "".concat(qe).concat(Ke), value: Ke, url: ei }).getLastCreatedEntityKey(), tt = Object(g.getSelectedBlock)(Re).getText(), nt = Re.getSelection().focusOffset, ot = (tt.lastIndexOf(et + qe, nt) || 0) + 1, ho = !1;
|
|
3600
|
-
tt.length === ot + 1 && (nt = tt.length), tt[nt] === " " && (ho = !0);
|
|
3601
|
-
var Xe = Re.getSelection().merge({ anchorOffset: ot, focusOffset: nt }), Ae = L.EditorState.acceptSelection(Re, Xe), Pt = L.Modifier.replaceText(Ae.getCurrentContent(), Xe, "".concat(qe).concat(Ke), Ae.getCurrentInlineStyle(), ti);
|
|
3602
|
-
Ae = L.EditorState.push(Ae, Pt, "insert-characters"), ho || (Xe = Ae.getSelection().merge({ anchorOffset: ot + Ke.length + qe.length, focusOffset: ot + Ke.length + qe.length }), Ae = L.EditorState.acceptSelection(Ae, Xe), Pt = L.Modifier.insertText(Ae.getCurrentContent(), Xe, " ", Ae.getCurrentInlineStyle(), void 0)), _t(L.EditorState.push(Ae, Pt, "insert-characters"));
|
|
3603
|
-
}(W, ye, Ee, He, Ye);
|
|
3604
|
-
}, N;
|
|
3605
|
-
}
|
|
3606
|
-
return ao(T, [{ key: "componentDidMount", value: function() {
|
|
3607
|
-
var N, z, R, Y = v.getWrapperRef().getBoundingClientRect(), J = this.suggestion.getBoundingClientRect(), W = this.dropdown.getBoundingClientRect();
|
|
3608
|
-
Y.width < J.left - Y.left + W.width ? z = 15 : N = 15, Y.bottom < W.bottom && (R = 0), this.setState({ style: { left: N, right: z, bottom: R } }), x.registerCallBack(this.onEditorKeyDown), I(), v.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown), this.filterSuggestions(this.props);
|
|
3609
|
-
} }, { key: "componentDidUpdate", value: function(N) {
|
|
3610
|
-
this.props.children !== N.children && (this.filterSuggestions(N), this.setState({ showSuggestions: !0 }));
|
|
3611
|
-
} }, { key: "componentWillUnmount", value: function() {
|
|
3612
|
-
x.deregisterCallBack(this.onEditorKeyDown), Q(), v.modalHandler.removeSuggestionCallback();
|
|
3613
|
-
} }, { key: "render", value: function() {
|
|
3614
|
-
var N = this, z = this.props.children, R = this.state, Y = R.activeOption, J = R.showSuggestions, W = v.dropdownClassName, ye = v.optionClassName;
|
|
3615
|
-
return s.a.createElement("span", { className: "rdw-suggestion-wrapper", ref: this.setSuggestionReference, onClick: v.modalHandler.onSuggestionClick, "aria-haspopup": "true", "aria-label": "rdw-suggestion-popup" }, s.a.createElement("span", null, z), J && s.a.createElement("span", { className: y()("rdw-suggestion-dropdown", W), contentEditable: "false", suppressContentEditableWarning: !0, style: this.state.style, ref: this.setDropdownReference }, this.filteredSuggestions.map(function(Ee, He) {
|
|
3616
|
-
return s.a.createElement("span", { key: He, spellCheck: !1, onClick: N.addMention, "data-index": He, onMouseEnter: N.onOptionMouseEnter, onMouseLeave: N.onOptionMouseLeave, className: y()("rdw-suggestion-option", ye, { "rdw-suggestion-option-active": He === Y }) }, Ee.text);
|
|
3617
|
-
})));
|
|
3618
|
-
} }]), T;
|
|
3619
|
-
}()).propTypes = { children: d.a.array }, b;
|
|
3620
|
-
}.bind(this), this.getSuggestionDecorator = function() {
|
|
3621
|
-
return { strategy: r.findSuggestionEntities, component: r.getSuggestionComponent() };
|
|
3622
|
-
};
|
|
3623
|
-
var o = t.separator, n = t.trigger, e = t.getSuggestions, a = t.onChange, c = t.getEditorState, u = t.getWrapperRef, l = t.caseSensitive, p = t.dropdownClassName, f = t.optionClassName, m = t.modalHandler;
|
|
3624
|
-
this.config = { separator: o, trigger: n, getSuggestions: e, onChange: a, getEditorState: c, getWrapperRef: u, caseSensitive: l, dropdownClassName: p, optionClassName: f, modalHandler: m };
|
|
3625
|
-
}), Br = function(i) {
|
|
3626
|
-
return [new _r(i.mentionClassName).getMentionDecorator(), new Ur(i).getSuggestionDecorator()];
|
|
3627
|
-
};
|
|
3628
|
-
E(36);
|
|
3629
|
-
function Fr(i, t, r) {
|
|
3630
|
-
return Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
3631
|
-
}
|
|
3632
|
-
function lo(i) {
|
|
3633
|
-
var t = i.block, r = i.contentState.getEntity(t.getEntityAt(0)).getData(), o = r.src, n = r.height, e = r.width;
|
|
3634
|
-
return s.a.createElement("iframe", { height: n, width: e, src: o, frameBorder: "0", allowFullScreen: !0, title: "Wysiwyg Embedded Content" });
|
|
3635
|
-
}
|
|
3636
|
-
var Yr = Fr(function i(t) {
|
|
3637
|
-
var r = this;
|
|
3638
|
-
(function(o, n) {
|
|
3639
|
-
if (!(o instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
3640
|
-
})(this, i), this.getHashtagComponent = function() {
|
|
3641
|
-
function o(e) {
|
|
3642
|
-
var a = e.children, c = a[0].props.text;
|
|
3643
|
-
return s.a.createElement("a", { href: c, className: y()("rdw-hashtag-link", n) }, a);
|
|
3644
|
-
}
|
|
3645
|
-
var n = r.className;
|
|
3646
|
-
return o.propTypes = { children: d.a.object }, o;
|
|
3647
|
-
}, this.findHashtagEntities = function(o, n) {
|
|
3648
|
-
for (var e = o.getText(), a = 0, c = 0; 0 < e.length && 0 <= a; ) if (e[0] === r.hashCharacter ? (c = a = 0, e = e.substr(r.hashCharacter.length)) : 0 <= (a = e.indexOf(r.separator + r.hashCharacter)) && (e = e.substr(a + (r.separator + r.hashCharacter).length), c += a + r.separator.length), 0 <= a) {
|
|
3649
|
-
var u = 0 <= e.indexOf(r.separator) ? e.indexOf(r.separator) : e.length, l = e.substr(0, u);
|
|
3650
|
-
l && 0 < l.length && (n(c, c + l.length + r.hashCharacter.length), c += r.hashCharacter.length);
|
|
3651
|
-
}
|
|
3652
|
-
}, this.getHashtagDecorator = function() {
|
|
3653
|
-
return { strategy: r.findHashtagEntities, component: r.getHashtagComponent() };
|
|
3654
|
-
}, this.className = t.className, this.hashCharacter = t.hashCharacter || "#", this.separator = t.separator || " ";
|
|
3655
|
-
}), Qr = function(i) {
|
|
3656
|
-
return new Yr(i).getHashtagDecorator();
|
|
3657
|
-
};
|
|
3658
|
-
lo.propTypes = { block: d.a.object, contentState: d.a.object };
|
|
3659
|
-
var Hr = lo;
|
|
3660
|
-
E(37);
|
|
3661
|
-
function so(i) {
|
|
3662
|
-
return (so = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3663
|
-
return typeof t;
|
|
3664
|
-
} : function(t) {
|
|
3665
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3666
|
-
})(i);
|
|
3667
|
-
}
|
|
3668
|
-
function Zr(i, t) {
|
|
3669
|
-
for (var r = 0; r < t.length; r++) {
|
|
3670
|
-
var o = t[r];
|
|
3671
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
function uo(i, t) {
|
|
3675
|
-
return (uo = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3676
|
-
return r.__proto__ = o, r;
|
|
3677
|
-
})(i, t);
|
|
3678
|
-
}
|
|
3679
|
-
function Wr(i) {
|
|
3680
|
-
var t = function() {
|
|
3681
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3682
|
-
if (typeof Proxy == "function") return !0;
|
|
3683
|
-
try {
|
|
3684
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3685
|
-
})), !0;
|
|
3686
|
-
} catch {
|
|
3687
|
-
return !1;
|
|
3688
|
-
}
|
|
3689
|
-
}();
|
|
3690
|
-
return function() {
|
|
3691
|
-
var r, o = xt(i);
|
|
3692
|
-
if (t) {
|
|
3693
|
-
var n = xt(this).constructor;
|
|
3694
|
-
r = Reflect.construct(o, arguments, n);
|
|
3695
|
-
} else r = o.apply(this, arguments);
|
|
3696
|
-
return function(e, a) {
|
|
3697
|
-
{
|
|
3698
|
-
if (a && (so(a) === "object" || typeof a == "function")) return a;
|
|
3699
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3700
|
-
}
|
|
3701
|
-
return function(c) {
|
|
3702
|
-
if (c !== void 0) return c;
|
|
3703
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3704
|
-
}(e);
|
|
3705
|
-
}(this, r);
|
|
3706
|
-
};
|
|
3707
|
-
}
|
|
3708
|
-
function xt(i) {
|
|
3709
|
-
return (xt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3710
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3711
|
-
})(i);
|
|
3712
|
-
}
|
|
3713
|
-
var Gr = function(i) {
|
|
3714
|
-
var t;
|
|
3715
|
-
return (t = function() {
|
|
3716
|
-
(function(a, c) {
|
|
3717
|
-
if (typeof c != "function" && c !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3718
|
-
a.prototype = Object.create(c && c.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), c && uo(a, c);
|
|
3719
|
-
})(e, C.Component);
|
|
3720
|
-
var r, o, n = Wr(e);
|
|
3721
|
-
function e() {
|
|
3722
|
-
var a;
|
|
3723
|
-
(function(p, f) {
|
|
3724
|
-
if (!(p instanceof f)) throw new TypeError("Cannot call a class as a function");
|
|
3725
|
-
})(this, e);
|
|
3726
|
-
for (var c = arguments.length, u = new Array(c), l = 0; l < c; l++) u[l] = arguments[l];
|
|
3727
|
-
return (a = n.call.apply(n, [this].concat(u))).state = { hovered: !1 }, a.setEntityAlignmentLeft = function() {
|
|
3728
|
-
a.setEntityAlignment("left");
|
|
3729
|
-
}, a.setEntityAlignmentRight = function() {
|
|
3730
|
-
a.setEntityAlignment("right");
|
|
3731
|
-
}, a.setEntityAlignmentCenter = function() {
|
|
3732
|
-
a.setEntityAlignment("none");
|
|
3733
|
-
}, a.setEntityAlignment = function(p) {
|
|
3734
|
-
var f = a.props, m = f.block, b = f.contentState, v = m.getEntityAt(0);
|
|
3735
|
-
b.mergeEntityData(v, { alignment: p }), i.onChange(L.EditorState.push(i.getEditorState(), b, "change-block-data")), a.setState({ dummy: !0 });
|
|
3736
|
-
}, a.toggleHovered = function() {
|
|
3737
|
-
var p = !a.state.hovered;
|
|
3738
|
-
a.setState({ hovered: p });
|
|
3739
|
-
}, a;
|
|
3740
|
-
}
|
|
3741
|
-
return r = e, (o = [{ key: "renderAlignmentOptions", value: function(a) {
|
|
3742
|
-
return s.a.createElement("div", { className: y()("rdw-image-alignment-options-popup", { "rdw-image-alignment-options-popup-right": a === "right" }) }, s.a.createElement(q, { onClick: this.setEntityAlignmentLeft, className: "rdw-image-alignment-option" }, "L"), s.a.createElement(q, { onClick: this.setEntityAlignmentCenter, className: "rdw-image-alignment-option" }, "C"), s.a.createElement(q, { onClick: this.setEntityAlignmentRight, className: "rdw-image-alignment-option" }, "R"));
|
|
3743
|
-
} }, { key: "render", value: function() {
|
|
3744
|
-
var a = this.props, c = a.block, u = a.contentState, l = this.state.hovered, p = i.isReadOnly, f = i.isImageAlignmentEnabled, m = u.getEntity(c.getEntityAt(0)).getData(), b = m.src, v = m.alignment, _ = m.height, T = m.width, N = m.alt;
|
|
3745
|
-
return s.a.createElement("span", { onMouseEnter: this.toggleHovered, onMouseLeave: this.toggleHovered, className: y()("rdw-image-alignment", { "rdw-image-left": v === "left", "rdw-image-right": v === "right", "rdw-image-center": !v || v === "none" }) }, s.a.createElement("span", { className: "rdw-image-imagewrapper" }, s.a.createElement("img", { src: b, alt: N, style: { height: _, width: T } }), !p() && l && f() ? this.renderAlignmentOptions(v) : void 0));
|
|
3746
|
-
} }]) && Zr(r.prototype, o), Object.defineProperty(r, "prototype", { writable: !1 }), e;
|
|
3747
|
-
}()).propTypes = { block: d.a.object, contentState: d.a.object }, t;
|
|
3748
|
-
}, Jr = function(i, t) {
|
|
3749
|
-
return function(r) {
|
|
3750
|
-
if (typeof t == "function") {
|
|
3751
|
-
var o = t(r, i, i.getEditorState);
|
|
3752
|
-
if (o) return o;
|
|
3753
|
-
}
|
|
3754
|
-
if (r.getType() === "atomic") {
|
|
3755
|
-
var n = i.getEditorState().getCurrentContent().getEntity(r.getEntityAt(0));
|
|
3756
|
-
if (n && n.type === "IMAGE") return { component: Gr(i), editable: !1 };
|
|
3757
|
-
if (n && n.type === "EMBEDDED_LINK") return { component: Hr, editable: !1 };
|
|
3758
|
-
}
|
|
3759
|
-
};
|
|
3760
|
-
}, po = { options: ["inline", "blockType", "fontSize", "fontFamily", "list", "textAlign", "colorPicker", "link", "embedded", "emoji", "image", "remove", "history"], inline: { inDropdown: !1, className: void 0, component: void 0, dropdownClassName: void 0, options: ["bold", "italic", "underline", "strikethrough", "monospace", "superscript", "subscript"], bold: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==", className: void 0, title: void 0 }, italic: { icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+", className: void 0, title: void 0 }, underline: { icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+", className: void 0, title: void 0 }, strikethrough: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==", className: void 0, title: void 0 }, monospace: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=", className: void 0, title: void 0 }, superscript: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=", className: void 0, title: void 0 }, subscript: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==", className: void 0, title: void 0 } }, blockType: { inDropdown: !0, options: ["Normal", "H1", "H2", "H3", "H4", "H5", "H6", "Blockquote", "Code"], className: void 0, component: void 0, dropdownClassName: void 0, title: void 0 }, fontSize: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=", options: [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 36, 48, 60, 72, 96], className: void 0, component: void 0, dropdownClassName: void 0, title: void 0 }, fontFamily: { options: ["Arial", "Georgia", "Impact", "Tahoma", "Times New Roman", "Verdana"], className: void 0, component: void 0, dropdownClassName: void 0, title: void 0 }, list: { inDropdown: !1, className: void 0, component: void 0, dropdownClassName: void 0, options: ["unordered", "ordered", "indent", "outdent"], unordered: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=", className: void 0, title: void 0 }, ordered: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=", className: void 0, title: void 0 }, indent: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+", className: void 0, title: void 0 }, outdent: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+", className: void 0, title: void 0 }, title: void 0 }, textAlign: { inDropdown: !1, className: void 0, component: void 0, dropdownClassName: void 0, options: ["left", "center", "right", "justify"], left: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+", className: void 0, title: void 0 }, center: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==", className: void 0, title: void 0 }, right: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=", className: void 0, title: void 0 }, justify: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==", className: void 0, title: void 0 }, title: void 0 }, colorPicker: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+", className: void 0, component: void 0, popupClassName: void 0, colors: ["rgb(97,189,109)", "rgb(26,188,156)", "rgb(84,172,210)", "rgb(44,130,201)", "rgb(147,101,184)", "rgb(71,85,119)", "rgb(204,204,204)", "rgb(65,168,95)", "rgb(0,168,133)", "rgb(61,142,185)", "rgb(41,105,176)", "rgb(85,57,130)", "rgb(40,50,78)", "rgb(0,0,0)", "rgb(247,218,100)", "rgb(251,160,38)", "rgb(235,107,86)", "rgb(226,80,65)", "rgb(163,143,132)", "rgb(239,239,239)", "rgb(255,255,255)", "rgb(250,197,28)", "rgb(243,121,52)", "rgb(209,72,65)", "rgb(184,49,47)", "rgb(124,112,107)", "rgb(209,213,216)"], title: void 0 }, link: { inDropdown: !1, className: void 0, component: void 0, popupClassName: void 0, dropdownClassName: void 0, showOpenOptionOnHover: !0, defaultTargetOption: "_self", options: ["link", "unlink"], link: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=", className: void 0, title: void 0 }, unlink: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+", className: void 0, title: void 0 }, linkCallback: void 0 }, emoji: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=", className: void 0, component: void 0, popupClassName: void 0, emojis: ["😀", "😁", "😂", "😃", "😉", "😋", "😎", "😍", "😗", "🤗", "🤔", "😣", "😫", "😴", "😌", "🤓", "😛", "😜", "😠", "😇", "😷", "😈", "👻", "😺", "😸", "😹", "😻", "😼", "😽", "🙀", "🙈", "🙉", "🙊", "👼", "👮", "🕵", "💂", "👳", "🎅", "👸", "👰", "👲", "🙍", "🙇", "🚶", "🏃", "💃", "⛷", "🏂", "🏌", "🏄", "🚣", "🏊", "⛹", "🏋", "🚴", "👫", "💪", "👈", "👉", "👆", "🖕", "👇", "🖖", "🤘", "🖐", "👌", "👍", "👎", "✊", "👊", "👏", "🙌", "🙏", "🐵", "🐶", "🐇", "🐥", "🐸", "🐌", "🐛", "🐜", "🐝", "🍉", "🍄", "🍔", "🍤", "🍨", "🍪", "🎂", "🍰", "🍾", "🍷", "🍸", "🍺", "🌍", "🚑", "⏰", "🌙", "🌝", "🌞", "⭐", "🌟", "🌠", "🌨", "🌩", "⛄", "🔥", "🎄", "🎈", "🎉", "🎊", "🎁", "🎗", "🏀", "🏈", "🎲", "🔇", "🔈", "📣", "🔔", "🎵", "🎷", "💰", "🖊", "📅", "✅", "❎", "💯"], title: void 0 }, embedded: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=", className: void 0, component: void 0, popupClassName: void 0, embedCallback: void 0, defaultSize: { height: "auto", width: "auto" }, title: void 0 }, image: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=", className: void 0, component: void 0, popupClassName: void 0, urlEnabled: !0, uploadEnabled: !0, previewImage: !1, alignmentEnabled: !0, uploadCallback: void 0, inputAccept: "image/gif,image/jpeg,image/jpg,image/png,image/svg", alt: { present: !1, mandatory: !1 }, defaultSize: { height: "auto", width: "auto" }, title: void 0 }, remove: { icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=", className: void 0, component: void 0, title: void 0 }, history: { inDropdown: !1, className: void 0, component: void 0, dropdownClassName: void 0, options: ["undo", "redo"], undo: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==", className: void 0, title: void 0 }, redo: { icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+", className: void 0, title: void 0 }, title: void 0 } }, Vr = { en: { "generic.add": "Add", "generic.cancel": "Cancel", "components.controls.blocktype.h1": "H1", "components.controls.blocktype.h2": "H2", "components.controls.blocktype.h3": "H3", "components.controls.blocktype.h4": "H4", "components.controls.blocktype.h5": "H5", "components.controls.blocktype.h6": "H6", "components.controls.blocktype.blockquote": "Blockquote", "components.controls.blocktype.code": "Code", "components.controls.blocktype.blocktype": "Block Type", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Color Picker", "components.controls.colorpicker.text": "Text", "components.controls.colorpicker.background": "Highlight", "components.controls.embedded.embedded": "Embedded", "components.controls.embedded.embeddedlink": "Embedded Link", "components.controls.embedded.enterlink": "Enter link", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Font", "components.controls.fontsize.fontsize": "Font Size", "components.controls.history.history": "History", "components.controls.history.undo": "Undo", "components.controls.history.redo": "Redo", "components.controls.image.image": "Image", "components.controls.image.fileUpload": "File Upload", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Drop the file or click to upload", "components.controls.inline.bold": "Bold", "components.controls.inline.italic": "Italic", "components.controls.inline.underline": "Underline", "components.controls.inline.strikethrough": "Strikethrough", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Superscript", "components.controls.inline.subscript": "Subscript", "components.controls.link.linkTitle": "Link Title", "components.controls.link.linkTarget": "Link Target", "components.controls.link.linkTargetOption": "Open link in new window", "components.controls.link.link": "Link", "components.controls.link.unlink": "Unlink", "components.controls.list.list": "List", "components.controls.list.unordered": "Unordered", "components.controls.list.ordered": "Ordered", "components.controls.list.indent": "Indent", "components.controls.list.outdent": "Outdent", "components.controls.remove.remove": "Remove", "components.controls.textalign.textalign": "Text Align", "components.controls.textalign.left": "Left", "components.controls.textalign.center": "Center", "components.controls.textalign.right": "Right", "components.controls.textalign.justify": "Justify" }, fr: { "generic.add": "Ok", "generic.cancel": "Annuler", "components.controls.blocktype.h1": "Titre 1", "components.controls.blocktype.h2": "Titre 2", "components.controls.blocktype.h3": "Titre 3", "components.controls.blocktype.h4": "Titre 4", "components.controls.blocktype.h5": "Titre 5", "components.controls.blocktype.h6": "Titre 6", "components.controls.blocktype.blockquote": "Citation", "components.controls.blocktype.code": "Code", "components.controls.blocktype.blocktype": "Type bloc", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Palette de couleur", "components.controls.colorpicker.text": "Texte", "components.controls.colorpicker.background": "Fond", "components.controls.embedded.embedded": "Embedded", "components.controls.embedded.embeddedlink": "Lien iFrame", "components.controls.embedded.enterlink": "Entrer le lien", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Police", "components.controls.fontsize.fontsize": "Taille de police", "components.controls.history.history": "Historique", "components.controls.history.undo": "Précédent", "components.controls.history.redo": "Suivant", "components.controls.image.image": "Image", "components.controls.image.fileUpload": "Téléchargement", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Glisser une image ou cliquer pour télécharger", "components.controls.inline.bold": "Gras", "components.controls.inline.italic": "Italique", "components.controls.inline.underline": "Souligner", "components.controls.inline.strikethrough": "Barrer", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Exposant", "components.controls.inline.subscript": "Indice", "components.controls.link.linkTitle": "Titre du lien", "components.controls.link.linkTarget": "Cible du lien", "components.controls.link.linkTargetOption": "Ouvrir le lien dans une nouvelle fenêtre", "components.controls.link.link": "Lier", "components.controls.link.unlink": "Délier", "components.controls.list.list": "Liste", "components.controls.list.unordered": "Désordonnée", "components.controls.list.ordered": "Ordonnée", "components.controls.list.indent": "Augmenter le retrait", "components.controls.list.outdent": "Diminuer le retrait", "components.controls.remove.remove": "Supprimer", "components.controls.textalign.textalign": "Alignement du texte", "components.controls.textalign.left": "Gauche", "components.controls.textalign.center": "Centre", "components.controls.textalign.right": "Droite", "components.controls.textalign.justify": "Justifier" }, zh: { "generic.add": "添加", "generic.cancel": "取消", "components.controls.blocktype.h1": "标题1", "components.controls.blocktype.h2": "标题2", "components.controls.blocktype.h3": "标题3", "components.controls.blocktype.h4": "标题4", "components.controls.blocktype.h5": "标题5", "components.controls.blocktype.h6": "标题6", "components.controls.blocktype.blockquote": "引用", "components.controls.blocktype.code": "源码", "components.controls.blocktype.blocktype": "样式", "components.controls.blocktype.normal": "正文", "components.controls.colorpicker.colorpicker": "选色器", "components.controls.colorpicker.text": "文字", "components.controls.colorpicker.background": "背景", "components.controls.embedded.embedded": "内嵌", "components.controls.embedded.embeddedlink": "内嵌网页", "components.controls.embedded.enterlink": "输入网页地址", "components.controls.emoji.emoji": "表情符号", "components.controls.fontfamily.fontfamily": "字体", "components.controls.fontsize.fontsize": "字号", "components.controls.history.history": "历史", "components.controls.history.undo": "撤销", "components.controls.history.redo": "恢复", "components.controls.image.image": "图片", "components.controls.image.fileUpload": "来自文件", "components.controls.image.byURL": "在线图片", "components.controls.image.dropFileText": "点击或者拖拽文件上传", "components.controls.inline.bold": "粗体", "components.controls.inline.italic": "斜体", "components.controls.inline.underline": "下划线", "components.controls.inline.strikethrough": "删除线", "components.controls.inline.monospace": "等宽字体", "components.controls.inline.superscript": "上标", "components.controls.inline.subscript": "下标", "components.controls.link.linkTitle": "超链接", "components.controls.link.linkTarget": "输入链接地址", "components.controls.link.linkTargetOption": "在新窗口中打开链接", "components.controls.link.link": "链接", "components.controls.link.unlink": "删除链接", "components.controls.list.list": "列表", "components.controls.list.unordered": "项目符号", "components.controls.list.ordered": "编号", "components.controls.list.indent": "增加缩进量", "components.controls.list.outdent": "减少缩进量", "components.controls.remove.remove": "清除格式", "components.controls.textalign.textalign": "文本对齐", "components.controls.textalign.left": "文本左对齐", "components.controls.textalign.center": "居中", "components.controls.textalign.right": "文本右对齐", "components.controls.textalign.justify": "两端对齐" }, ru: { "generic.add": "Добавить", "generic.cancel": "Отменить", "components.controls.blocktype.h1": "Заголовок 1", "components.controls.blocktype.h2": "Заголовок 2", "components.controls.blocktype.h3": "Заголовок 3", "components.controls.blocktype.h4": "Заголовок 4", "components.controls.blocktype.h5": "Заголовок 5", "components.controls.blocktype.h6": "Заголовок 6", "components.controls.blocktype.blockquote": "Цитата", "components.controls.blocktype.code": "Код", "components.controls.blocktype.blocktype": "Форматирование", "components.controls.blocktype.normal": "Обычный", "components.controls.colorpicker.colorpicker": "Выбор цвета", "components.controls.colorpicker.text": "Текст", "components.controls.colorpicker.background": "Фон", "components.controls.embedded.embedded": "Встраивание", "components.controls.embedded.embeddedlink": "Ссылка в iFrame", "components.controls.embedded.enterlink": "Вставьте ссылку", "components.controls.emoji.emoji": "Эмодзи", "components.controls.fontfamily.fontfamily": "Шрифт", "components.controls.fontsize.fontsize": "Размер шрифта", "components.controls.history.history": "История", "components.controls.history.undo": "Отменить", "components.controls.history.redo": "Вернуть", "components.controls.image.image": "Изображение", "components.controls.image.fileUpload": "Файлы", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Переместите в эту область файлы или кликните для загрузки", "components.controls.inline.bold": "Жирный", "components.controls.inline.italic": "Курсив", "components.controls.inline.underline": "Подчеркивание", "components.controls.inline.strikethrough": "Зачеркивание", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Верхний индекс", "components.controls.inline.subscript": "Нижний индекс", "components.controls.link.linkTitle": "Текст", "components.controls.link.linkTarget": "Адрес ссылки", "components.controls.link.linkTargetOption": "Открывать в новом окне", "components.controls.link.link": "Ссылка", "components.controls.link.unlink": "Убрать ссылку", "components.controls.list.list": "Список", "components.controls.list.unordered": "Неупорядоченный", "components.controls.list.ordered": "Упорядоченный", "components.controls.list.indent": "Отступ", "components.controls.list.outdent": "Выступ", "components.controls.remove.remove": "Удалить", "components.controls.textalign.textalign": "Выравнивание текста", "components.controls.textalign.left": "Слева", "components.controls.textalign.center": "По центру", "components.controls.textalign.right": "Справа", "components.controls.textalign.justify": "Выравнить" }, pt: { "generic.add": "Ok", "generic.cancel": "Cancelar", "components.controls.blocktype.h1": "Título 1", "components.controls.blocktype.h2": "Título 2", "components.controls.blocktype.h3": "Título 3", "components.controls.blocktype.h4": "Título 4", "components.controls.blocktype.h5": "Título 5", "components.controls.blocktype.h6": "Título 6", "components.controls.blocktype.blockquote": "Citação", "components.controls.blocktype.code": "Code", "components.controls.blocktype.blocktype": "Estilo", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Paleta de cores", "components.controls.colorpicker.text": "Texto", "components.controls.colorpicker.background": "Fundo", "components.controls.embedded.embedded": "Embarcado", "components.controls.embedded.embeddedlink": "Link embarcado", "components.controls.embedded.enterlink": "Coloque o link", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Fonte", "components.controls.fontsize.fontsize": "Tamanho da Fonte", "components.controls.history.history": "Histórico", "components.controls.history.undo": "Desfazer", "components.controls.history.redo": "Refazer", "components.controls.image.image": "Imagem", "components.controls.image.fileUpload": "Carregar arquivo", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Arraste uma imagem aqui ou clique para carregar", "components.controls.inline.bold": "Negrito", "components.controls.inline.italic": "Itálico", "components.controls.inline.underline": "Sublinhado", "components.controls.inline.strikethrough": "Strikethrough", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Sobrescrito", "components.controls.inline.subscript": "Subscrito", "components.controls.link.linkTitle": "Título do link", "components.controls.link.linkTarget": "Alvo do link", "components.controls.link.linkTargetOption": "Abrir link em outra janela", "components.controls.link.link": "Adicionar Link", "components.controls.link.unlink": "Remover link", "components.controls.list.list": "Lista", "components.controls.list.unordered": "Sem ordenção", "components.controls.list.ordered": "Ordenada", "components.controls.list.indent": "Aumentar recuo", "components.controls.list.outdent": "Diminuir recuo", "components.controls.remove.remove": "Remover", "components.controls.textalign.textalign": "Alinhamento do texto", "components.controls.textalign.left": "À Esquerda", "components.controls.textalign.center": "Centralizado", "components.controls.textalign.right": "À Direita", "components.controls.textalign.justify": "Justificado" }, ko: { "generic.add": "입력", "generic.cancel": "취소", "components.controls.blocktype.h1": "제목1", "components.controls.blocktype.h2": "제목2", "components.controls.blocktype.h3": "제목3", "components.controls.blocktype.h4": "제목4", "components.controls.blocktype.h5": "제목5", "components.controls.blocktype.h6": "제목6", "components.controls.blocktype.blockquote": "인용", "components.controls.blocktype.code": "Code", "components.controls.blocktype.blocktype": "블록", "components.controls.blocktype.normal": "표준", "components.controls.colorpicker.colorpicker": "색상 선택", "components.controls.colorpicker.text": "글꼴색", "components.controls.colorpicker.background": "배경색", "components.controls.embedded.embedded": "임베드", "components.controls.embedded.embeddedlink": "임베드 링크", "components.controls.embedded.enterlink": "주소를 입력하세요", "components.controls.emoji.emoji": "이모지", "components.controls.fontfamily.fontfamily": "글꼴", "components.controls.fontsize.fontsize": "글꼴 크기", "components.controls.history.history": "히스토리", "components.controls.history.undo": "실행 취소", "components.controls.history.redo": "다시 실행", "components.controls.image.image": "이미지", "components.controls.image.fileUpload": "파일 업로드", "components.controls.image.byURL": "주소", "components.controls.image.dropFileText": "클릭하거나 파일을 드롭하여 업로드하세요", "components.controls.inline.bold": "굵게", "components.controls.inline.italic": "기울임꼴", "components.controls.inline.underline": "밑줄", "components.controls.inline.strikethrough": "취소선", "components.controls.inline.monospace": "고정 너비", "components.controls.inline.superscript": "위 첨자", "components.controls.inline.subscript": "아래 첨자", "components.controls.link.linkTitle": "링크 제목", "components.controls.link.linkTarget": "링크 타겟", "components.controls.link.linkTargetOption": "새창으로 열기", "components.controls.link.link": "링크", "components.controls.link.unlink": "링크 제거", "components.controls.list.list": "리스트", "components.controls.list.unordered": "일반 리스트", "components.controls.list.ordered": "순서 리스트", "components.controls.list.indent": "들여쓰기", "components.controls.list.outdent": "내어쓰기", "components.controls.remove.remove": "삭제", "components.controls.textalign.textalign": "텍스트 정렬", "components.controls.textalign.left": "왼쪽", "components.controls.textalign.center": "중앙", "components.controls.textalign.right": "오른쪽", "components.controls.textalign.justify": "양쪽" }, it: { "generic.add": "Aggiungi", "generic.cancel": "Annulla", "components.controls.blocktype.h1": "H1", "components.controls.blocktype.h2": "H2", "components.controls.blocktype.h3": "H3", "components.controls.blocktype.h4": "H4", "components.controls.blocktype.h5": "H5", "components.controls.blocktype.h6": "H6", "components.controls.blocktype.blockquote": "Citazione", "components.controls.blocktype.code": "Codice", "components.controls.blocktype.blocktype": "Stili", "components.controls.blocktype.normal": "Normale", "components.controls.colorpicker.colorpicker": "Colore testo", "components.controls.colorpicker.text": "Testo", "components.controls.colorpicker.background": "Evidenziazione", "components.controls.embedded.embedded": "Incorpora", "components.controls.embedded.embeddedlink": "Incorpora link", "components.controls.embedded.enterlink": "Inserisci link", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Carattere", "components.controls.fontsize.fontsize": "Dimensione carattere", "components.controls.history.history": "Modifiche", "components.controls.history.undo": "Annulla", "components.controls.history.redo": "Ripristina", "components.controls.image.image": "Immagine", "components.controls.image.fileUpload": "Carica immagine", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Trascina il file o clicca per caricare", "components.controls.inline.bold": "Grassetto", "components.controls.inline.italic": "Corsivo", "components.controls.inline.underline": "Sottolineato", "components.controls.inline.strikethrough": "Barrato", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Apice", "components.controls.inline.subscript": "Pedice", "components.controls.link.linkTitle": "Testo", "components.controls.link.linkTarget": "Link", "components.controls.link.linkTargetOption": "Apri link in una nuova finestra", "components.controls.link.link": "Inserisci link", "components.controls.link.unlink": "Rimuovi link", "components.controls.list.list": "Lista", "components.controls.list.unordered": "Elenco puntato", "components.controls.list.ordered": "Elenco numerato", "components.controls.list.indent": "Indent", "components.controls.list.outdent": "Outdent", "components.controls.remove.remove": "Rimuovi formattazione", "components.controls.textalign.textalign": "Allineamento del testo", "components.controls.textalign.left": "Allinea a sinistra", "components.controls.textalign.center": "Allinea al centro", "components.controls.textalign.right": "Allinea a destra", "components.controls.textalign.justify": "Giustifica" }, nl: { "generic.add": "Toevoegen", "generic.cancel": "Annuleren", "components.controls.blocktype.h1": "H1", "components.controls.blocktype.h2": "H2", "components.controls.blocktype.h3": "H3", "components.controls.blocktype.h4": "H4", "components.controls.blocktype.h5": "H5", "components.controls.blocktype.h6": "H6", "components.controls.blocktype.blockquote": "Blockquote", "components.controls.blocktype.code": "Code", "components.controls.blocktype.blocktype": "Blocktype", "components.controls.blocktype.normal": "Normaal", "components.controls.colorpicker.colorpicker": "Kleurkiezer", "components.controls.colorpicker.text": "Tekst", "components.controls.colorpicker.background": "Achtergrond", "components.controls.embedded.embedded": "Ingevoegd", "components.controls.embedded.embeddedlink": "Ingevoegde link", "components.controls.embedded.enterlink": "Voeg link toe", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Lettertype", "components.controls.fontsize.fontsize": "Lettergrootte", "components.controls.history.history": "Geschiedenis", "components.controls.history.undo": "Ongedaan maken", "components.controls.history.redo": "Opnieuw", "components.controls.image.image": "Afbeelding", "components.controls.image.fileUpload": "Bestand uploaden", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Drop het bestand hier of klik om te uploaden", "components.controls.inline.bold": "Dikgedrukt", "components.controls.inline.italic": "Schuingedrukt", "components.controls.inline.underline": "Onderstrepen", "components.controls.inline.strikethrough": "Doorstrepen", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Superscript", "components.controls.inline.subscript": "Subscript", "components.controls.link.linkTitle": "Linktitel", "components.controls.link.linkTarget": "Link bestemming", "components.controls.link.linkTargetOption": "Open link in een nieuw venster", "components.controls.link.link": "Link", "components.controls.link.unlink": "Unlink", "components.controls.list.list": "Lijst", "components.controls.list.unordered": "Ongeordend", "components.controls.list.ordered": "Geordend", "components.controls.list.indent": "Inspringen", "components.controls.list.outdent": "Inspringen verkleinen", "components.controls.remove.remove": "Verwijderen", "components.controls.textalign.textalign": "Tekst uitlijnen", "components.controls.textalign.left": "Links", "components.controls.textalign.center": "Gecentreerd", "components.controls.textalign.right": "Rechts", "components.controls.textalign.justify": "Uitgelijnd" }, de: { "generic.add": "Hinzufügen", "generic.cancel": "Abbrechen", "components.controls.blocktype.h1": "Überschrift 1", "components.controls.blocktype.h2": "Überschrift 2", "components.controls.blocktype.h3": "Überschrift 3", "components.controls.blocktype.h4": "Überschrift 4", "components.controls.blocktype.h5": "Überschrift 5", "components.controls.blocktype.h6": "Überschrift 6", "components.controls.blocktype.blockquote": "Zitat", "components.controls.blocktype.code": "Quellcode", "components.controls.blocktype.blocktype": "Blocktyp", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Farbauswahl", "components.controls.colorpicker.text": "Text", "components.controls.colorpicker.background": "Hintergrund", "components.controls.embedded.embedded": "Eingebettet", "components.controls.embedded.embeddedlink": "Eingebetteter Link", "components.controls.embedded.enterlink": "Link eingeben", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Schriftart", "components.controls.fontsize.fontsize": "Schriftgröße", "components.controls.history.history": "Historie", "components.controls.history.undo": "Zurücknehmen", "components.controls.history.redo": "Wiederholen", "components.controls.image.image": "Bild", "components.controls.image.fileUpload": "Datei-Upload", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Dateien ziehen und ablegen, oder klicken zum Hochladen", "components.controls.inline.bold": "Fett", "components.controls.inline.italic": "Kursiv", "components.controls.inline.underline": "Unterstreichen", "components.controls.inline.strikethrough": "Durchstreichen", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Hochgestellt", "components.controls.inline.subscript": "Tiefgestellt", "components.controls.link.linkTitle": "Link-Titel", "components.controls.link.linkTarget": "Link-Ziel", "components.controls.link.linkTargetOption": "Link in neuem Fenster öffnen", "components.controls.link.link": "Link", "components.controls.link.unlink": "Aufheben", "components.controls.list.list": "Liste", "components.controls.list.unordered": "Aufzählung", "components.controls.list.ordered": "Nummerierte Liste", "components.controls.list.indent": "Einzug vergrößern", "components.controls.list.outdent": "Einzug reduzieren", "components.controls.remove.remove": "Entfernen", "components.controls.textalign.textalign": "Textausrichtung", "components.controls.textalign.left": "Linksbündig", "components.controls.textalign.center": "Zentrieren", "components.controls.textalign.right": "Rechtsbündig", "components.controls.textalign.justify": "Blocksatz" }, da: { "generic.add": "Tilføj", "generic.cancel": "Annuller", "components.controls.blocktype.h1": "Overskrift 1", "components.controls.blocktype.h2": "Overskrift 2", "components.controls.blocktype.h3": "Overskrift 3", "components.controls.blocktype.h4": "Overskrift 4", "components.controls.blocktype.h5": "Overskrift 5", "components.controls.blocktype.h6": "Overskrift 6", "components.controls.blocktype.blockquote": "Blokcitat", "components.controls.blocktype.code": "Kode", "components.controls.blocktype.blocktype": "Blok Type", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Farver", "components.controls.colorpicker.text": "Tekst", "components.controls.colorpicker.background": "Baggrund", "components.controls.embedded.embedded": "Indlejre", "components.controls.embedded.embeddedlink": "Indlejre Link", "components.controls.embedded.enterlink": "Indtast link", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Fonttype", "components.controls.fontsize.fontsize": "Fontstørrelser", "components.controls.history.history": "Historie", "components.controls.history.undo": "Fortryd", "components.controls.history.redo": "Gendan", "components.controls.image.image": "Billede", "components.controls.image.fileUpload": "Filoverførsel", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Drop filen eller klik for at uploade", "components.controls.inline.bold": "Fed", "components.controls.inline.italic": "Kursiv", "components.controls.inline.underline": "Understrege", "components.controls.inline.strikethrough": "Gennemstreget", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Hævet", "components.controls.inline.subscript": "Sænket", "components.controls.link.linkTitle": "Link Titel", "components.controls.link.linkTarget": "Link Mål", "components.controls.link.linkTargetOption": "Åbn link i nyt vindue", "components.controls.link.link": "Link", "components.controls.link.unlink": "Fjern link", "components.controls.list.list": "Liste", "components.controls.list.unordered": "Uordnet", "components.controls.list.ordered": "Ordnet", "components.controls.list.indent": "Indrykning", "components.controls.list.outdent": "Udrykning", "components.controls.remove.remove": "Fjern", "components.controls.textalign.textalign": "Tekstjustering", "components.controls.textalign.left": "Venstre", "components.controls.textalign.center": "Center", "components.controls.textalign.right": "Højre", "components.controls.textalign.justify": "Margener" }, zh_tw: { "generic.add": "新增", "generic.cancel": "取消", "components.controls.blocktype.h1": "標題1", "components.controls.blocktype.h2": "標題2", "components.controls.blocktype.h3": "標題3", "components.controls.blocktype.h4": "標題4", "components.controls.blocktype.h5": "標題5", "components.controls.blocktype.h6": "標題6", "components.controls.blocktype.blockquote": "引用", "components.controls.blocktype.code": "程式碼", "components.controls.blocktype.blocktype": "樣式", "components.controls.blocktype.normal": "正文", "components.controls.colorpicker.colorpicker": "選色器", "components.controls.colorpicker.text": "文字", "components.controls.colorpicker.background": "背景", "components.controls.embedded.embedded": "內嵌", "components.controls.embedded.embeddedlink": "內嵌網頁", "components.controls.embedded.enterlink": "輸入網頁地址", "components.controls.emoji.emoji": "表情符號", "components.controls.fontfamily.fontfamily": "字體", "components.controls.fontsize.fontsize": "字體大小", "components.controls.history.history": "歷史紀錄", "components.controls.history.undo": "復原", "components.controls.history.redo": "重做", "components.controls.image.image": "圖片", "components.controls.image.fileUpload": "檔案上傳", "components.controls.image.byURL": "網址", "components.controls.image.dropFileText": "點擊或拖曳檔案上傳", "components.controls.inline.bold": "粗體", "components.controls.inline.italic": "斜體", "components.controls.inline.underline": "底線", "components.controls.inline.strikethrough": "刪除線", "components.controls.inline.monospace": "等寬字體", "components.controls.inline.superscript": "上標", "components.controls.inline.subscript": "下標", "components.controls.link.linkTitle": "超連結", "components.controls.link.linkTarget": "輸入連結位址", "components.controls.link.linkTargetOption": "在新視窗打開連結", "components.controls.link.link": "連結", "components.controls.link.unlink": "刪除連結", "components.controls.list.list": "列表", "components.controls.list.unordered": "項目符號", "components.controls.list.ordered": "編號", "components.controls.list.indent": "增加縮排", "components.controls.list.outdent": "減少縮排", "components.controls.remove.remove": "清除格式", "components.controls.textalign.textalign": "文字對齊", "components.controls.textalign.left": "文字向左對齊", "components.controls.textalign.center": "文字置中", "components.controls.textalign.right": "文字向右對齊", "components.controls.textalign.justify": "兩端對齊" }, pl: { "generic.add": "Dodaj", "generic.cancel": "Anuluj", "components.controls.blocktype.h1": "Nagłówek 1", "components.controls.blocktype.h2": "Nagłówek 2", "components.controls.blocktype.h3": "Nagłówek 3", "components.controls.blocktype.h4": "Nagłówek 4", "components.controls.blocktype.h5": "Nagłówek 5", "components.controls.blocktype.h6": "Nagłówek 6", "components.controls.blocktype.blockquote": "Cytat", "components.controls.blocktype.code": "Kod", "components.controls.blocktype.blocktype": "Format", "components.controls.blocktype.normal": "Normalny", "components.controls.colorpicker.colorpicker": "Kolor", "components.controls.colorpicker.text": "Tekst", "components.controls.colorpicker.background": "Tło", "components.controls.embedded.embedded": "Osadź", "components.controls.embedded.embeddedlink": "Osadź odnośnik", "components.controls.embedded.enterlink": "Wprowadź odnośnik", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Krój czcionki", "components.controls.fontsize.fontsize": "Rozmiar czcionki", "components.controls.history.history": "Historia", "components.controls.history.undo": "Cofnij", "components.controls.history.redo": "Ponów", "components.controls.image.image": "Obrazek", "components.controls.image.fileUpload": "Prześlij plik", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Upuść plik lub kliknij, aby przesłać", "components.controls.inline.bold": "Pogrubienie", "components.controls.inline.italic": "Kursywa", "components.controls.inline.underline": "Podkreślenie", "components.controls.inline.strikethrough": "Przekreślenie", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Indeks górny", "components.controls.inline.subscript": "Indeks dolny", "components.controls.link.linkTitle": "Tytuł odnośnika", "components.controls.link.linkTarget": "Adres odnośnika", "components.controls.link.linkTargetOption": "Otwórz odnośnik w nowej karcie", "components.controls.link.link": "Wstaw odnośnik", "components.controls.link.unlink": "Usuń odnośnik", "components.controls.list.list": "Lista", "components.controls.list.unordered": "Lista nieuporządkowana", "components.controls.list.ordered": "Lista uporządkowana", "components.controls.list.indent": "Zwiększ wcięcie", "components.controls.list.outdent": "Zmniejsz wcięcie", "components.controls.remove.remove": "Usuń", "components.controls.textalign.textalign": "Wyrównaj tekst", "components.controls.textalign.left": "Do lewej", "components.controls.textalign.center": "Do środka", "components.controls.textalign.right": "Do prawej", "components.controls.textalign.justify": "Wyjustuj" }, es: { "generic.add": "Añadir", "generic.cancel": "Cancelar", "components.controls.blocktype.h1": "H1", "components.controls.blocktype.h2": "H2", "components.controls.blocktype.h3": "H3", "components.controls.blocktype.h4": "H4", "components.controls.blocktype.h5": "H5", "components.controls.blocktype.h6": "H6", "components.controls.blocktype.blockquote": "Blockquote", "components.controls.blocktype.code": "Código", "components.controls.blocktype.blocktype": "Tipo de bloque", "components.controls.blocktype.normal": "Normal", "components.controls.colorpicker.colorpicker": "Seleccionar color", "components.controls.colorpicker.text": "Texto", "components.controls.colorpicker.background": "Subrayado", "components.controls.embedded.embedded": "Adjuntar", "components.controls.embedded.embeddedlink": "Adjuntar Link", "components.controls.embedded.enterlink": "Introducir link", "components.controls.emoji.emoji": "Emoji", "components.controls.fontfamily.fontfamily": "Fuente", "components.controls.fontsize.fontsize": "Tamaño de fuente", "components.controls.history.history": "Histórico", "components.controls.history.undo": "Deshacer", "components.controls.history.redo": "Rehacer", "components.controls.image.image": "Imagen", "components.controls.image.fileUpload": "Subir archivo", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "Arrastra el archivo o haz click para subirlo", "components.controls.inline.bold": "Negrita", "components.controls.inline.italic": "Cursiva", "components.controls.inline.underline": "Subrayado", "components.controls.inline.strikethrough": "Tachado", "components.controls.inline.monospace": "Monospace", "components.controls.inline.superscript": "Sobreíndice", "components.controls.inline.subscript": "Subíndice", "components.controls.link.linkTitle": "Título del enlace", "components.controls.link.linkTarget": "Objetivo del enlace", "components.controls.link.linkTargetOption": "Abrir en nueva ventana", "components.controls.link.link": "Enlazar", "components.controls.link.unlink": "Desenlazar", "components.controls.list.list": "Lista", "components.controls.list.unordered": "Desordenada", "components.controls.list.ordered": "Ordenada", "components.controls.list.indent": "Indentada", "components.controls.list.outdent": "Dentada", "components.controls.remove.remove": "Eliminar", "components.controls.textalign.textalign": "Alineación del texto", "components.controls.textalign.left": "Izquierda", "components.controls.textalign.center": "Centrado", "components.controls.textalign.right": "Derecha", "components.controls.textalign.justify": "Justificado" }, ja: { "generic.add": "追加", "generic.cancel": "キャンセル", "components.controls.blocktype.h1": "見出し1", "components.controls.blocktype.h2": "見出し2", "components.controls.blocktype.h3": "見出し3", "components.controls.blocktype.h4": "見出し4", "components.controls.blocktype.h5": "見出し5", "components.controls.blocktype.h6": "見出し6", "components.controls.blocktype.blockquote": "引用", "components.controls.blocktype.code": "コード", "components.controls.blocktype.blocktype": "スタイル", "components.controls.blocktype.normal": "標準テキスト", "components.controls.colorpicker.colorpicker": "テキストの色", "components.controls.colorpicker.text": "テキスト", "components.controls.colorpicker.background": "ハイライト", "components.controls.embedded.embedded": "埋め込み", "components.controls.embedded.embeddedlink": "埋め込みリンク", "components.controls.embedded.enterlink": "リンクを入力してください", "components.controls.emoji.emoji": "絵文字", "components.controls.fontfamily.fontfamily": "フォント", "components.controls.fontsize.fontsize": "フォントサイズ", "components.controls.history.history": "履歴", "components.controls.history.undo": "元に戻す", "components.controls.history.redo": "やり直し", "components.controls.image.image": "画像", "components.controls.image.fileUpload": "ファイルをアップロード", "components.controls.image.byURL": "URL", "components.controls.image.dropFileText": "ここに画像をドラッグするか、クリックしてください", "components.controls.inline.bold": "太字", "components.controls.inline.italic": "斜体", "components.controls.inline.underline": "下線", "components.controls.inline.strikethrough": "取り消し線", "components.controls.inline.monospace": "等幅フォント", "components.controls.inline.superscript": "上付き文字", "components.controls.inline.subscript": "下付き文字", "components.controls.link.linkTitle": "リンクタイトル", "components.controls.link.linkTarget": "リンク対象", "components.controls.link.linkTargetOption": "新しいウィンドウで開く", "components.controls.link.link": "リンク", "components.controls.link.unlink": "リンクを解除", "components.controls.list.list": "リスト", "components.controls.list.unordered": "箇条書き", "components.controls.list.ordered": "番号付き", "components.controls.list.indent": "インデント増", "components.controls.list.outdent": "インデント減", "components.controls.remove.remove": "書式をクリア", "components.controls.textalign.textalign": "整列", "components.controls.textalign.left": "左揃え", "components.controls.textalign.center": "中央揃え", "components.controls.textalign.right": "右揃え", "components.controls.textalign.justify": "両端揃え" } };
|
|
3761
|
-
E(38), E(39);
|
|
3762
|
-
function fo(i) {
|
|
3763
|
-
return (fo = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3764
|
-
return typeof t;
|
|
3765
|
-
} : function(t) {
|
|
3766
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3767
|
-
})(i);
|
|
3768
|
-
}
|
|
3769
|
-
function It() {
|
|
3770
|
-
return (It = Object.assign ? Object.assign.bind() : function(i) {
|
|
3771
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
3772
|
-
var r = arguments[t];
|
|
3773
|
-
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (i[o] = r[o]);
|
|
3774
|
-
}
|
|
3775
|
-
return i;
|
|
3776
|
-
}).apply(this, arguments);
|
|
3777
|
-
}
|
|
3778
|
-
function mo(i, t) {
|
|
3779
|
-
var r = Object.keys(i);
|
|
3780
|
-
if (Object.getOwnPropertySymbols) {
|
|
3781
|
-
var o = Object.getOwnPropertySymbols(i);
|
|
3782
|
-
t && (o = o.filter(function(n) {
|
|
3783
|
-
return Object.getOwnPropertyDescriptor(i, n).enumerable;
|
|
3784
|
-
})), r.push.apply(r, o);
|
|
3785
|
-
}
|
|
3786
|
-
return r;
|
|
3787
|
-
}
|
|
3788
|
-
function Fe(i) {
|
|
3789
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
3790
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
3791
|
-
t % 2 ? mo(Object(r), !0).forEach(function(o) {
|
|
3792
|
-
qr(i, o, r[o]);
|
|
3793
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(r)) : mo(Object(r)).forEach(function(o) {
|
|
3794
|
-
Object.defineProperty(i, o, Object.getOwnPropertyDescriptor(r, o));
|
|
3795
|
-
});
|
|
3796
|
-
}
|
|
3797
|
-
return i;
|
|
3798
|
-
}
|
|
3799
|
-
function qr(i, t, r) {
|
|
3800
|
-
return t in i ? Object.defineProperty(i, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : i[t] = r, i;
|
|
3801
|
-
}
|
|
3802
|
-
function yo(i) {
|
|
3803
|
-
return function(t) {
|
|
3804
|
-
if (Array.isArray(t)) return Tt(t);
|
|
3805
|
-
}(i) || function(t) {
|
|
3806
|
-
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
|
|
3807
|
-
}(i) || function(t, r) {
|
|
3808
|
-
if (t) {
|
|
3809
|
-
if (typeof t == "string") return Tt(t, r);
|
|
3810
|
-
var o = Object.prototype.toString.call(t).slice(8, -1);
|
|
3811
|
-
if (o === "Object" && t.constructor && (o = t.constructor.name), o === "Map" || o === "Set") return Array.from(t);
|
|
3812
|
-
if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return Tt(t, r);
|
|
3813
|
-
}
|
|
3814
|
-
}(i) || function() {
|
|
3815
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3816
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3817
|
-
}();
|
|
3818
|
-
}
|
|
3819
|
-
function Tt(i, t) {
|
|
3820
|
-
(t == null || t > i.length) && (t = i.length);
|
|
3821
|
-
for (var r = 0, o = new Array(t); r < t; r++) o[r] = i[r];
|
|
3822
|
-
return o;
|
|
3823
|
-
}
|
|
3824
|
-
function Kr(i, t) {
|
|
3825
|
-
for (var r = 0; r < t.length; r++) {
|
|
3826
|
-
var o = t[r];
|
|
3827
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, o.key, o);
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
function go(i, t) {
|
|
3831
|
-
return (go = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
3832
|
-
return r.__proto__ = o, r;
|
|
3833
|
-
})(i, t);
|
|
3834
|
-
}
|
|
3835
|
-
function Xr(i) {
|
|
3836
|
-
var t = function() {
|
|
3837
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3838
|
-
if (typeof Proxy == "function") return !0;
|
|
3839
|
-
try {
|
|
3840
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
3841
|
-
})), !0;
|
|
3842
|
-
} catch {
|
|
3843
|
-
return !1;
|
|
3844
|
-
}
|
|
3845
|
-
}();
|
|
3846
|
-
return function() {
|
|
3847
|
-
var r, o = At(i);
|
|
3848
|
-
if (t) {
|
|
3849
|
-
var n = At(this).constructor;
|
|
3850
|
-
r = Reflect.construct(o, arguments, n);
|
|
3851
|
-
} else r = o.apply(this, arguments);
|
|
3852
|
-
return function(e, a) {
|
|
3853
|
-
{
|
|
3854
|
-
if (a && (fo(a) === "object" || typeof a == "function")) return a;
|
|
3855
|
-
if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3856
|
-
}
|
|
3857
|
-
return function(c) {
|
|
3858
|
-
if (c !== void 0) return c;
|
|
3859
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3860
|
-
}(e);
|
|
3861
|
-
}(this, r);
|
|
3862
|
-
};
|
|
3863
|
-
}
|
|
3864
|
-
function At(i) {
|
|
3865
|
-
return (At = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
3866
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3867
|
-
})(i);
|
|
3868
|
-
}
|
|
3869
|
-
var zt = function() {
|
|
3870
|
-
(function(n, e) {
|
|
3871
|
-
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
3872
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && go(n, e);
|
|
3873
|
-
})(o, C.Component);
|
|
3874
|
-
var i, t, r = Xr(o);
|
|
3875
|
-
function o(n) {
|
|
3876
|
-
var e;
|
|
3877
|
-
(function(l, p) {
|
|
3878
|
-
if (!(l instanceof p)) throw new TypeError("Cannot call a class as a function");
|
|
3879
|
-
})(this, o), (e = r.call(this, n)).onEditorBlur = function() {
|
|
3880
|
-
e.setState({ editorFocused: !1 });
|
|
3881
|
-
}, e.onEditorFocus = function(l) {
|
|
3882
|
-
var p = e.props.onFocus;
|
|
3883
|
-
e.setState({ editorFocused: !0 });
|
|
3884
|
-
var f = e.focusHandler.isEditorFocused();
|
|
3885
|
-
p && f && p(l);
|
|
3886
|
-
}, e.onEditorMouseDown = function() {
|
|
3887
|
-
e.focusHandler.onEditorMouseDown();
|
|
3888
|
-
}, e.keyBindingFn = function(l) {
|
|
3889
|
-
if (l.key !== "Tab") return l.key !== "ArrowUp" && l.key !== "ArrowDown" || de() && l.preventDefault(), Object(L.getDefaultKeyBinding)(l);
|
|
3890
|
-
var p = e.props.onTab;
|
|
3891
|
-
if (!p || !p(l)) {
|
|
3892
|
-
var f = Object(g.changeDepth)(e.state.editorState, l.shiftKey ? -1 : 1, 4);
|
|
3893
|
-
f && f !== e.state.editorState && (e.onChange(f), l.preventDefault());
|
|
3894
|
-
}
|
|
3895
|
-
return null;
|
|
3896
|
-
}, e.onToolbarFocus = function(l) {
|
|
3897
|
-
var p = e.props.onFocus;
|
|
3898
|
-
p && e.focusHandler.isToolbarFocused() && p(l);
|
|
3899
|
-
}, e.onWrapperBlur = function(l) {
|
|
3900
|
-
var p = e.props.onBlur;
|
|
3901
|
-
p && e.focusHandler.isEditorBlur(l) && p(l, e.getEditorState());
|
|
3902
|
-
}, e.onChange = function(l) {
|
|
3903
|
-
var p = e.props, f = p.readOnly, m = p.onEditorStateChange;
|
|
3904
|
-
f || Object(g.getSelectedBlocksType)(l) === "atomic" && l.getSelection().isCollapsed || (m && m(l, e.props.wrapperId), ge(e.props, "editorState") ? e.afterChange(l) : e.setState({ editorState: l }, e.afterChange(l)));
|
|
3905
|
-
}, e.setWrapperReference = function(l) {
|
|
3906
|
-
e.wrapper = l;
|
|
3907
|
-
}, e.setEditorReference = function(l) {
|
|
3908
|
-
e.props.editorRef && e.props.editorRef(l), e.editor = l;
|
|
3909
|
-
}, e.getCompositeDecorator = function(l) {
|
|
3910
|
-
var p = [].concat(yo(e.props.customDecorators), [{ strategy: Tr, component: Ar({ showOpenOptionOnHover: l.link.showOpenOptionOnHover }) }]);
|
|
3911
|
-
return e.props.mention && p.push.apply(p, yo(Br(Fe(Fe({}, e.props.mention), {}, { onChange: e.onChange, getEditorState: e.getEditorState, getSuggestions: e.getSuggestions, getWrapperRef: e.getWrapperRef, modalHandler: e.modalHandler })))), e.props.hashtag && p.push(Qr(e.props.hashtag)), new L.CompositeDecorator(p);
|
|
3912
|
-
}, e.getWrapperRef = function() {
|
|
3913
|
-
return e.wrapper;
|
|
3914
|
-
}, e.getEditorState = function() {
|
|
3915
|
-
return e.state ? e.state.editorState : null;
|
|
3916
|
-
}, e.getSuggestions = function() {
|
|
3917
|
-
return e.props.mention && e.props.mention.suggestions;
|
|
3918
|
-
}, e.afterChange = function(l) {
|
|
3919
|
-
setTimeout(function() {
|
|
3920
|
-
var p = e.props, f = p.onChange, m = p.onContentStateChange;
|
|
3921
|
-
f && f(Object(L.convertToRaw)(l.getCurrentContent())), m && m(Object(L.convertToRaw)(l.getCurrentContent()));
|
|
3922
|
-
});
|
|
3923
|
-
}, e.isReadOnly = function() {
|
|
3924
|
-
return e.props.readOnly;
|
|
3925
|
-
}, e.isImageAlignmentEnabled = function() {
|
|
3926
|
-
return e.state.toolbar.image.alignmentEnabled;
|
|
3927
|
-
}, e.createEditorState = function(l) {
|
|
3928
|
-
var p;
|
|
3929
|
-
if (ge(e.props, "editorState")) e.props.editorState && (p = L.EditorState.set(e.props.editorState, { decorator: l }));
|
|
3930
|
-
else if (ge(e.props, "defaultEditorState")) e.props.defaultEditorState && (p = L.EditorState.set(e.props.defaultEditorState, { decorator: l }));
|
|
3931
|
-
else if (ge(e.props, "contentState")) {
|
|
3932
|
-
if (e.props.contentState) {
|
|
3933
|
-
var f = Object(L.convertFromRaw)(e.props.contentState);
|
|
3934
|
-
p = L.EditorState.createWithContent(f, l), p = L.EditorState.moveSelectionToEnd(p);
|
|
3935
|
-
}
|
|
3936
|
-
} else if (ge(e.props, "defaultContentState") || ge(e.props, "initialContentState")) {
|
|
3937
|
-
var m = e.props.defaultContentState || e.props.initialContentState;
|
|
3938
|
-
m && (m = Object(L.convertFromRaw)(m), p = L.EditorState.createWithContent(m, l), p = L.EditorState.moveSelectionToEnd(p));
|
|
3939
|
-
}
|
|
3940
|
-
return p = p || L.EditorState.createEmpty(l);
|
|
3941
|
-
}, e.filterEditorProps = function(l) {
|
|
3942
|
-
return p = l, f = ["onChange", "onEditorStateChange", "onContentStateChange", "initialContentState", "defaultContentState", "contentState", "editorState", "defaultEditorState", "locale", "localization", "toolbarOnFocus", "toolbar", "toolbarCustomButtons", "toolbarClassName", "editorClassName", "toolbarHidden", "wrapperClassName", "toolbarStyle", "editorStyle", "wrapperStyle", "uploadCallback", "onFocus", "onBlur", "onTab", "mention", "hashtag", "ariaLabel", "customBlockRenderFunc", "customDecorators", "handlePastedText", "customStyleMap"], m = Object.keys(p).filter(function(v) {
|
|
3943
|
-
return f.indexOf(v) < 0;
|
|
3944
|
-
}), b = {}, m && 0 < m.length && m.forEach(function(v) {
|
|
3945
|
-
b[v] = p[v];
|
|
3946
|
-
}), b;
|
|
3947
|
-
var p, f, m, b;
|
|
3948
|
-
}, e.getStyleMap = function(l) {
|
|
3949
|
-
return Fe(Fe({}, Object(g.getCustomStyleMap)()), l.customStyleMap);
|
|
3950
|
-
}, e.changeEditorState = function(l) {
|
|
3951
|
-
var p = Object(L.convertFromRaw)(l), f = e.state.editorState;
|
|
3952
|
-
return f = L.EditorState.push(f, p, "insert-characters"), f = L.EditorState.moveSelectionToEnd(f);
|
|
3953
|
-
}, e.focusEditor = function() {
|
|
3954
|
-
setTimeout(function() {
|
|
3955
|
-
e.editor.focus();
|
|
3956
|
-
});
|
|
3957
|
-
}, e.handleKeyCommand = function(l) {
|
|
3958
|
-
var p = e.state, f = p.editorState, m = p.toolbar.inline;
|
|
3959
|
-
if (m && 0 <= m.options.indexOf(l)) {
|
|
3960
|
-
var b = L.RichUtils.handleKeyCommand(f, l);
|
|
3961
|
-
if (b) return e.onChange(b), !0;
|
|
3962
|
-
}
|
|
3963
|
-
return !1;
|
|
3964
|
-
}, e.handleReturn = function(l) {
|
|
3965
|
-
if (de()) return !0;
|
|
3966
|
-
var p = e.state.editorState, f = Object(g.handleNewLine)(p, l);
|
|
3967
|
-
return !!f && (e.onChange(f), !0);
|
|
3968
|
-
}, e.handlePastedTextFn = function(l, p) {
|
|
3969
|
-
var f = e.state.editorState, m = e.props, b = m.handlePastedText, v = m.stripPastedStyles;
|
|
3970
|
-
return b ? b(l, p, f, e.onChange) : !v && function(_, T, N, z) {
|
|
3971
|
-
var R = Object(g.getSelectedBlock)(N);
|
|
3972
|
-
if (R && R.type === "code") {
|
|
3973
|
-
var Y = L.Modifier.replaceText(N.getCurrentContent(), N.getSelection(), _, N.getCurrentInlineStyle());
|
|
3974
|
-
return z(L.EditorState.push(N, Y, "insert-characters")), !0;
|
|
3975
|
-
}
|
|
3976
|
-
if (T) {
|
|
3977
|
-
var J = H()(T), W = N.getCurrentContent();
|
|
3978
|
-
return J.entityMap.forEach(function(ye, Ee) {
|
|
3979
|
-
W = W.mergeEntityData(Ee, ye);
|
|
3980
|
-
}), W = L.Modifier.replaceWithFragment(W, N.getSelection(), new ie.List(J.contentBlocks)), z(L.EditorState.push(N, W, "insert-characters")), !0;
|
|
3981
|
-
}
|
|
3982
|
-
return !1;
|
|
3983
|
-
}(l, p, f, e.onChange);
|
|
3984
|
-
}, e.preventDefault = function(l) {
|
|
3985
|
-
l.target.tagName === "INPUT" || l.target.tagName === "LABEL" || l.target.tagName === "TEXTAREA" ? e.focusHandler.onInputMouseDown() : l.preventDefault();
|
|
3986
|
-
};
|
|
3987
|
-
var a = Se(po, n.toolbar), c = n.wrapperId ? n.wrapperId : Math.floor(1e4 * Math.random());
|
|
3988
|
-
e.wrapperId = "rdw-wrapper-".concat(c), e.modalHandler = new K(), e.focusHandler = new ne(), e.blockRendererFn = Jr({ isReadOnly: e.isReadOnly, isImageAlignmentEnabled: e.isImageAlignmentEnabled, getEditorState: e.getEditorState, onChange: e.onChange }, n.customBlockRenderFunc), e.editorProps = e.filterEditorProps(n), e.customStyleMap = e.getStyleMap(n), e.compositeDecorator = e.getCompositeDecorator(a);
|
|
3989
|
-
var u = e.createEditorState(e.compositeDecorator);
|
|
3990
|
-
return Object(g.extractInlineStyle)(u), e.state = { editorState: u, editorFocused: !1, toolbar: a }, e;
|
|
3991
|
-
}
|
|
3992
|
-
return i = o, (t = [{ key: "componentDidMount", value: function() {
|
|
3993
|
-
this.modalHandler.init(this.wrapperId);
|
|
3994
|
-
} }, { key: "componentDidUpdate", value: function(n) {
|
|
3995
|
-
if (n !== this.props) {
|
|
3996
|
-
var e = {}, a = this.props, c = a.editorState, u = a.contentState;
|
|
3997
|
-
if (!this.state.toolbar) {
|
|
3998
|
-
var l = Se(po, l);
|
|
3999
|
-
e.toolbar = l;
|
|
4000
|
-
}
|
|
4001
|
-
if (ge(this.props, "editorState") && c !== n.editorState) e.editorState = c ? L.EditorState.set(c, { decorator: this.compositeDecorator }) : L.EditorState.createEmpty(this.compositeDecorator);
|
|
4002
|
-
else if (ge(this.props, "contentState") && u !== n.contentState) if (u) {
|
|
4003
|
-
var p = this.changeEditorState(u);
|
|
4004
|
-
p && (e.editorState = p);
|
|
4005
|
-
} else e.editorState = L.EditorState.createEmpty(this.compositeDecorator);
|
|
4006
|
-
n.editorState === c && n.contentState === u || Object(g.extractInlineStyle)(e.editorState), Object.keys(e).length && this.setState(e), this.editorProps = this.filterEditorProps(this.props), this.customStyleMap = this.getStyleMap(this.props);
|
|
4007
|
-
}
|
|
4008
|
-
} }, { key: "render", value: function() {
|
|
4009
|
-
var n = this.state, e = n.editorState, a = n.editorFocused, c = n.toolbar, u = this.props, l = u.locale, p = u.localization, f = p.locale, m = p.translations, b = u.toolbarCustomButtons, v = u.toolbarOnFocus, _ = u.toolbarClassName, T = u.toolbarHidden, N = u.editorClassName, z = u.wrapperClassName, R = u.toolbarStyle, Y = u.editorStyle, J = u.wrapperStyle, W = u.uploadCallback, ye = u.ariaLabel, Ee = { modalHandler: this.modalHandler, editorState: e, onChange: this.onChange, translations: Fe(Fe({}, Vr[l || f]), m) }, He = a || this.focusHandler.isInputFocused() || !v;
|
|
4010
|
-
return s.a.createElement("div", { id: this.wrapperId, className: y()(z, "rdw-editor-wrapper"), style: J, onClick: this.modalHandler.onEditorClick, onBlur: this.onWrapperBlur, "aria-label": "rdw-wrapper" }, !T && s.a.createElement("div", { className: y()("rdw-editor-toolbar", _), style: Fe({ visibility: He ? "visible" : "hidden" }, R), onMouseDown: this.preventDefault, "aria-label": "rdw-toolbar", "aria-hidden": (!a && v).toString(), onFocus: this.onToolbarFocus }, c.options.map(function(Ye, Re) {
|
|
4011
|
-
var _t = Dr[Ye], et = c[Ye];
|
|
4012
|
-
return Ye === "image" && W && (et.uploadCallback = W), s.a.createElement(_t, It({ key: Re }, Ee, { config: et }));
|
|
4013
|
-
}), b && b.map(function(Ye, Re) {
|
|
4014
|
-
return s.a.cloneElement(Ye, Fe({ key: Re }, Ee));
|
|
4015
|
-
})), s.a.createElement("div", { ref: this.setWrapperReference, className: y()(N, "rdw-editor-main"), style: Y, onClick: this.focusEditor, onFocus: this.onEditorFocus, onBlur: this.onEditorBlur, onKeyDown: x.onKeyDown, onMouseDown: this.onEditorMouseDown }, s.a.createElement(L.Editor, It({ ref: this.setEditorReference, keyBindingFn: this.keyBindingFn, editorState: e, onChange: this.onChange, blockStyleFn: le, customStyleMap: this.getStyleMap(this.props), handleReturn: this.handleReturn, handlePastedText: this.handlePastedTextFn, blockRendererFn: this.blockRendererFn, handleKeyCommand: this.handleKeyCommand, ariaLabel: ye || "rdw-editor", blockRenderMap: g.blockRenderMap }, this.editorProps))));
|
|
4016
|
-
} }]) && Kr(i.prototype, t), Object.defineProperty(i, "prototype", { writable: !1 }), o;
|
|
4017
|
-
}();
|
|
4018
|
-
zt.propTypes = { onChange: d.a.func, onEditorStateChange: d.a.func, onContentStateChange: d.a.func, initialContentState: d.a.object, defaultContentState: d.a.object, contentState: d.a.object, editorState: d.a.object, defaultEditorState: d.a.object, toolbarOnFocus: d.a.bool, spellCheck: d.a.bool, stripPastedStyles: d.a.bool, toolbar: d.a.object, toolbarCustomButtons: d.a.array, toolbarClassName: d.a.string, toolbarHidden: d.a.bool, locale: d.a.string, localization: d.a.object, editorClassName: d.a.string, wrapperClassName: d.a.string, toolbarStyle: d.a.object, editorStyle: d.a.object, wrapperStyle: d.a.object, uploadCallback: d.a.func, onFocus: d.a.func, onBlur: d.a.func, onTab: d.a.func, mention: d.a.object, hashtag: d.a.object, textAlignment: d.a.string, readOnly: d.a.bool, tabIndex: d.a.number, placeholder: d.a.string, ariaLabel: d.a.string, ariaOwneeID: d.a.string, ariaActiveDescendantID: d.a.string, ariaAutoComplete: d.a.string, ariaDescribedBy: d.a.string, ariaExpanded: d.a.string, ariaHasPopup: d.a.string, customBlockRenderFunc: d.a.func, wrapperId: d.a.number, customDecorators: d.a.array, editorRef: d.a.func, handlePastedText: d.a.func }, zt.defaultProps = { toolbarOnFocus: !1, toolbarHidden: !1, stripPastedStyles: !1, localization: { locale: "en", translations: {} }, customDecorators: [] };
|
|
4019
|
-
var $r = zt;
|
|
4020
|
-
}], pe.c = Je, pe.d = function(S, A, E) {
|
|
4021
|
-
pe.o(S, A) || Object.defineProperty(S, A, { enumerable: !0, get: E });
|
|
4022
|
-
}, pe.r = function(S) {
|
|
4023
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(S, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(S, "__esModule", { value: !0 });
|
|
4024
|
-
}, pe.t = function(S, A) {
|
|
4025
|
-
if (1 & A && (S = pe(S)), 8 & A || 4 & A && typeof S == "object" && S && S.__esModule) return S;
|
|
4026
|
-
var E = /* @__PURE__ */ Object.create(null);
|
|
4027
|
-
if (pe.r(E), Object.defineProperty(E, "default", { enumerable: !0, value: S }), 2 & A && typeof S != "string") for (var C in S) pe.d(E, C, function(s) {
|
|
4028
|
-
return S[s];
|
|
4029
|
-
}.bind(null, C));
|
|
4030
|
-
return E;
|
|
4031
|
-
}, pe.n = function(S) {
|
|
4032
|
-
var A = S && S.__esModule ? function() {
|
|
4033
|
-
return S.default;
|
|
4034
|
-
} : function() {
|
|
4035
|
-
return S;
|
|
4036
|
-
};
|
|
4037
|
-
return pe.d(A, "a", A), A;
|
|
4038
|
-
}, pe.o = function(S, A) {
|
|
4039
|
-
return Object.prototype.hasOwnProperty.call(S, A);
|
|
4040
|
-
}, pe.p = "", pe(pe.s = 8);
|
|
4041
|
-
function pe(S) {
|
|
4042
|
-
if (Je[S]) return Je[S].exports;
|
|
4043
|
-
var A = Je[S] = { i: S, l: !1, exports: {} };
|
|
4044
|
-
return Rt[S].call(A.exports, A, A.exports, pe), A.l = !0, A.exports;
|
|
4045
|
-
}
|
|
4046
|
-
var Rt, Je;
|
|
4047
|
-
});
|
|
4048
|
-
})(Mo);
|
|
4049
|
-
var jo = Mo.exports;
|
|
4050
|
-
const ci = /* @__PURE__ */ ni(jo), pi = /* @__PURE__ */ ai({
|
|
4051
|
-
__proto__: null,
|
|
4052
|
-
default: ci
|
|
4053
|
-
}, [jo]);
|
|
4054
|
-
export {
|
|
4055
|
-
pi as r
|
|
4056
|
-
};
|