@uva-glass/component-library 1.62.7 → 1.62.8
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/{Lexical.prod-eo-UKDld.js → Lexical.prod-B6kL_nwF.js} +159 -159
- package/dist/Lexical.prod-B6kL_nwF.js.map +1 -0
- package/dist/{LexicalUtils.prod-DzksRdFe.js → LexicalUtils.prod-BBoyOK4A.js} +22 -22
- package/dist/{LexicalUtils.prod-DzksRdFe.js.map → LexicalUtils.prod-BBoyOK4A.js.map} +1 -1
- package/dist/{ListPlugin-DsPphjdE.js → ListPlugin-CpLcVKRP.js} +17 -17
- package/dist/{ListPlugin-DsPphjdE.js.map → ListPlugin-CpLcVKRP.js.map} +1 -1
- package/dist/{TablePlugin-hmwPCCLn.js → TablePlugin-B-yAWpsC.js} +39 -39
- package/dist/{TablePlugin-hmwPCCLn.js.map → TablePlugin-B-yAWpsC.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +32 -32
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +74 -74
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BD3Y_bqE.js → helpers-C7Yo7VY3.js} +34 -34
- package/dist/{helpers-BD3Y_bqE.js.map → helpers-C7Yo7VY3.js.map} +1 -1
- package/dist/{helpers-DONVwywj.js → helpers-pUTvcL4e.js} +83 -83
- package/dist/helpers-pUTvcL4e.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/dist/Lexical.prod-eo-UKDld.js.map +0 -1
- package/dist/helpers-DONVwywj.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as y, jsxs as A, Fragment as
|
|
1
|
+
import { jsx as y, jsxs as A, Fragment as Ie } from "react/jsx-runtime";
|
|
2
2
|
import { l as Xe, o as Ye, u as R } from "../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import { ak as
|
|
3
|
+
import { ak as Fe, w as I, D as fe, M as v, l as q, b as J, L as Ze, a as P, v as C, al as Ke, am as Ge, O as p, a8 as Qe, T as K, J as et, an as tt, ao as nt, ap as rt, R as oe, aq as ot, ar as it, af as st, ah as at, E as lt, a2 as ct, as as ut, at as ge, o as he, a7 as dt, a5 as ie, a6 as ft, n as Ae, au as ve, a1 as mt, a0 as pt, W as gt, X as Ce, Z as ht, av as vt, aw as Ct, ax as yt, A as wt, a9 as Et, d as bt, ay as $t, aa as St, a4 as _t, a3 as kt, r as xt, t as Lt, I as ye, az as Nt, j as Dt, K as X, $ as Y, aA as Tt, aB as Pt, g as Rt, h as Mt, ae as Ot } from "../../Lexical.prod-B6kL_nwF.js";
|
|
4
4
|
import * as se from "react";
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { L as B, i as z, e as At, t as me, r as zt, u as Bt } from "../../LexicalUtils.prod-
|
|
5
|
+
import { useMemo as W, useLayoutEffect as U, useEffect as k, useRef as It, useState as O, Suspense as Ft, forwardRef as ze, useCallback as Kt } from "react";
|
|
6
|
+
import { L as B, i as z, e as At, t as me, r as zt, u as Bt } from "../../LexicalUtils.prod-BBoyOK4A.js";
|
|
7
7
|
import { r as we } from "../../index-DsprzSCj.js";
|
|
8
|
-
import { _ as Ee, O as be, L as $e, $ as Se, u as ne, f as re, h as Be, K as Ut, n as _e, r as jt, j as qt, k as
|
|
9
|
-
import { J as Ue, D as je, Z as
|
|
10
|
-
import { a as qe, U as xe, m as ae, g as Qt, b as en, F as tn, M as nn, f as rn } from "../../helpers-
|
|
8
|
+
import { _ as Ee, O as be, L as $e, $ as Se, u as ne, f as re, h as Be, K as Ut, n as _e, r as jt, j as qt, k as Jt, l as Wt, F as Ht, m as ke, o as Vt, U as Xt, p as Yt, q as Zt } from "../../helpers-pUTvcL4e.js";
|
|
9
|
+
import { J as Ue, D as je, Z as Gt } from "../../ListPlugin-CpLcVKRP.js";
|
|
10
|
+
import { a as qe, U as xe, m as ae, g as Qt, b as en, F as tn, M as nn, f as rn } from "../../helpers-C7Yo7VY3.js";
|
|
11
11
|
import { c as on } from "../../clsx-OuTLNxxd.js";
|
|
12
12
|
import { s as M } from "../../RteEditor.module-CHbWzGpE.js";
|
|
13
13
|
import { ToolBarPlugin as sn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
14
14
|
import { useTranslation as an } from "./hooks/useTranslation.js";
|
|
15
|
-
import "../../TablePlugin-
|
|
15
|
+
import "../../TablePlugin-B-yAWpsC.js";
|
|
16
16
|
import "./hooks/components/Flyout.js";
|
|
17
17
|
import "../Buttons/Button.js";
|
|
18
18
|
import "../Buttons/LinkButton.js";
|
|
@@ -34,34 +34,34 @@ import "../../SortableProvider-BUsvniX7.js";
|
|
|
34
34
|
import { UvaTheme as cn } from "./UvaTheme/UvaTheme.js";
|
|
35
35
|
import { EditorHeader as un } from "./EditorHeader/EditorHeader.js";
|
|
36
36
|
import { useLanguage as dn, LanguageProvider as fn } from "./Providers/LanguageProvider.js";
|
|
37
|
-
const
|
|
37
|
+
const Je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, mn = Je ? U : k, Z = { tag: "history-merge" };
|
|
38
38
|
function pn({ initialConfig: e, children: t }) {
|
|
39
|
-
const n =
|
|
40
|
-
const { theme: r, namespace: i, nodes: o, onError: s, editorState: a, html: l } = e, c = Ye(null, r), u =
|
|
39
|
+
const n = W(() => {
|
|
40
|
+
const { theme: r, namespace: i, nodes: o, onError: s, editorState: a, html: l } = e, c = Ye(null, r), u = Fe({ editable: e.editable, html: l, namespace: i, nodes: o, onError: (d) => s(d, u), theme: r });
|
|
41
41
|
return function(d, f) {
|
|
42
42
|
if (f !== null) {
|
|
43
43
|
if (f === void 0) d.update(() => {
|
|
44
|
-
const m =
|
|
44
|
+
const m = I();
|
|
45
45
|
if (m.isEmpty()) {
|
|
46
46
|
const g = fe();
|
|
47
47
|
m.append(g);
|
|
48
|
-
const h =
|
|
48
|
+
const h = Je ? document.activeElement : null;
|
|
49
49
|
(v() !== null || h !== null && h === d.getRootElement()) && g.select();
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, Z);
|
|
52
52
|
else if (f !== null) switch (typeof f) {
|
|
53
53
|
case "string": {
|
|
54
54
|
const m = d.parseEditorState(f);
|
|
55
|
-
d.setEditorState(m,
|
|
55
|
+
d.setEditorState(m, Z);
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
case "object":
|
|
59
|
-
d.setEditorState(f,
|
|
59
|
+
d.setEditorState(f, Z);
|
|
60
60
|
break;
|
|
61
61
|
case "function":
|
|
62
62
|
d.update(() => {
|
|
63
|
-
|
|
64
|
-
},
|
|
63
|
+
I().isEmpty() && f(d);
|
|
64
|
+
}, Z);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}(u, a), [u, c];
|
|
@@ -77,7 +77,7 @@ function hn(e) {
|
|
|
77
77
|
}
|
|
78
78
|
function vn() {
|
|
79
79
|
return function(e) {
|
|
80
|
-
const [t] = R(), n =
|
|
80
|
+
const [t] = R(), n = W(() => e(t), [t, e]), r = It(n.initialValueFn()), [i, o] = O(r.current);
|
|
81
81
|
return gn(() => {
|
|
82
82
|
const { initialValueFn: s, subscribe: a } = n, l = s();
|
|
83
83
|
return r.current !== l && (r.current = l, o(l)), a((c) => {
|
|
@@ -87,7 +87,7 @@ function vn() {
|
|
|
87
87
|
}(hn);
|
|
88
88
|
}
|
|
89
89
|
function Cn() {
|
|
90
|
-
return
|
|
90
|
+
return I().getTextContent();
|
|
91
91
|
}
|
|
92
92
|
function yn(e, t = !0) {
|
|
93
93
|
if (e) return !1;
|
|
@@ -96,13 +96,13 @@ function yn(e, t = !0) {
|
|
|
96
96
|
}
|
|
97
97
|
function wn(e) {
|
|
98
98
|
if (!yn(e, !1)) return !1;
|
|
99
|
-
const t =
|
|
99
|
+
const t = I().getChildren(), n = t.length;
|
|
100
100
|
if (n > 1) return !1;
|
|
101
101
|
for (let r = 0; r < n; r++) {
|
|
102
102
|
const i = t[r];
|
|
103
103
|
if (q(i)) return !1;
|
|
104
|
-
if (
|
|
105
|
-
if (!
|
|
104
|
+
if (J(i)) {
|
|
105
|
+
if (!Ze(i) || i.__indent !== 0) return !1;
|
|
106
106
|
const o = i.getChildren(), s = o.length;
|
|
107
107
|
for (let a = 0; a < s; a++) {
|
|
108
108
|
const l = o[r];
|
|
@@ -112,7 +112,7 @@ function wn(e) {
|
|
|
112
112
|
}
|
|
113
113
|
return !0;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function We(e) {
|
|
116
116
|
return () => wn(e);
|
|
117
117
|
}
|
|
118
118
|
function En(e) {
|
|
@@ -177,7 +177,7 @@ function Le(e, t) {
|
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
179
|
const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, $n = j && "documentMode" in document ? document.documentMode : null, Sn = !(!j || !("InputEvent" in window) || $n) && "getTargetRanges" in new window.InputEvent("input"), _n = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), kn = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, xn = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ln = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !xn, Ne = Lt();
|
|
180
|
-
function
|
|
180
|
+
function G(e) {
|
|
181
181
|
let t = null;
|
|
182
182
|
if (z(e, DragEvent) ? t = e.dataTransfer : z(e, ClipboardEvent) && (t = e.clipboardData), t === null) return [!1, [], !1];
|
|
183
183
|
const n = t.types, r = n.includes("Files"), i = n.includes("text/html") || n.includes("text/plain");
|
|
@@ -190,7 +190,7 @@ function De(e) {
|
|
|
190
190
|
for (let i = 0; i < r.length; i++) {
|
|
191
191
|
const o = r[i], s = o.getKey();
|
|
192
192
|
if (n.has(s)) continue;
|
|
193
|
-
const a = me(o, (c) =>
|
|
193
|
+
const a = me(o, (c) => J(c) && !c.isInline());
|
|
194
194
|
if (a === null) continue;
|
|
195
195
|
const l = a.getKey();
|
|
196
196
|
a.canIndent() && !n.has(l) && (n.add(l), e(a));
|
|
@@ -238,7 +238,7 @@ function Nn(e) {
|
|
|
238
238
|
if (!C(n) && !K(n)) return !1;
|
|
239
239
|
const r = n.getNodes();
|
|
240
240
|
for (const i of r) {
|
|
241
|
-
const o = me(i, (s) =>
|
|
241
|
+
const o = me(i, (s) => J(s) && !s.isInline());
|
|
242
242
|
o !== null && o.setFormat(t);
|
|
243
243
|
}
|
|
244
244
|
return !0;
|
|
@@ -272,7 +272,7 @@ function Nn(e) {
|
|
|
272
272
|
} else if (C(n)) {
|
|
273
273
|
if (function(i) {
|
|
274
274
|
const o = i.focus;
|
|
275
|
-
return o.key === "root" && o.offset ===
|
|
275
|
+
return o.key === "root" && o.offset === I().getChildrenSize();
|
|
276
276
|
}(n)) return t.preventDefault(), !0;
|
|
277
277
|
const r = Ce(n.focus, !1);
|
|
278
278
|
if (!t.shiftKey && q(r) && !r.isIsolated() && !r.isInline()) return r.selectNext(), t.preventDefault(), !0;
|
|
@@ -322,7 +322,7 @@ function Nn(e) {
|
|
|
322
322
|
const t = v();
|
|
323
323
|
return !!C(t) && (e.blur(), !0);
|
|
324
324
|
}, p), e.registerCommand(it, (t) => {
|
|
325
|
-
const [, n] =
|
|
325
|
+
const [, n] = G(t);
|
|
326
326
|
if (n.length > 0) {
|
|
327
327
|
const i = Le(t.clientX, t.clientY);
|
|
328
328
|
if (i !== null) {
|
|
@@ -344,10 +344,10 @@ function Nn(e) {
|
|
|
344
344
|
const r = v();
|
|
345
345
|
return !!C(r);
|
|
346
346
|
}, p), e.registerCommand(ot, (t) => {
|
|
347
|
-
const [n] =
|
|
347
|
+
const [n] = G(t), r = v();
|
|
348
348
|
return !(n && !C(r));
|
|
349
349
|
}, p), e.registerCommand(rt, (t) => {
|
|
350
|
-
const [n] =
|
|
350
|
+
const [n] = G(t), r = v();
|
|
351
351
|
if (n && !C(r)) return !1;
|
|
352
352
|
const i = Le(t.clientX, t.clientY);
|
|
353
353
|
if (i !== null) {
|
|
@@ -361,8 +361,8 @@ function Nn(e) {
|
|
|
361
361
|
C(i) ? i.removeText() : K(i) && i.getNodes().forEach((o) => o.remove());
|
|
362
362
|
});
|
|
363
363
|
}(t, e), !0), p), e.registerCommand(Ke, (t) => {
|
|
364
|
-
const [, n, r] =
|
|
365
|
-
return n.length > 0 && !r ? (e.dispatchCommand(Ne, n), !0) :
|
|
364
|
+
const [, n, r] = G(t);
|
|
365
|
+
return n.length > 0 && !r ? (e.dispatchCommand(Ne, n), !0) : Ge(t.target) ? !1 : v() !== null && (function(i, o) {
|
|
366
366
|
i.preventDefault(), o.update(() => {
|
|
367
367
|
const s = v(), a = z(i, InputEvent) || z(i, KeyboardEvent) ? null : i.clipboardData;
|
|
368
368
|
a != null && s !== null && Ee(a, s, o);
|
|
@@ -372,7 +372,7 @@ function Nn(e) {
|
|
|
372
372
|
}
|
|
373
373
|
const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : k;
|
|
374
374
|
function Te(e) {
|
|
375
|
-
return e.getEditorState().read(
|
|
375
|
+
return e.getEditorState().read(We(e.isComposing()));
|
|
376
376
|
}
|
|
377
377
|
function Dn({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
378
378
|
const [r] = R(), i = function(o, s) {
|
|
@@ -383,10 +383,10 @@ function Dn({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
|
383
383
|
});
|
|
384
384
|
}), [o]), k(() => {
|
|
385
385
|
l(o.getDecorators());
|
|
386
|
-
}, [o]),
|
|
386
|
+
}, [o]), W(() => {
|
|
387
387
|
const c = [], u = Object.keys(a);
|
|
388
388
|
for (let d = 0; d < u.length; d++) {
|
|
389
|
-
const f = u[d], m = y(s, { onError: (h) => o._onError(h), children: y(
|
|
389
|
+
const f = u[d], m = y(s, { onError: (h) => o._onError(h), children: y(Ft, { fallback: null, children: a[f] }) }), g = o.getElementByKey(f);
|
|
390
390
|
g !== null && c.push(we.createPortal(m, g, f));
|
|
391
391
|
}
|
|
392
392
|
return c;
|
|
@@ -394,7 +394,7 @@ function Dn({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
|
394
394
|
}(r, n);
|
|
395
395
|
return function(o) {
|
|
396
396
|
le(() => B(Nn(o), bn(o)), [o]);
|
|
397
|
-
}(r), A(
|
|
397
|
+
}(r), A(Ie, { children: [e, y(Tn, { content: t }), i] });
|
|
398
398
|
}
|
|
399
399
|
function Tn({ content: e }) {
|
|
400
400
|
const [t] = R(), n = function(i) {
|
|
@@ -413,34 +413,34 @@ function Tn({ content: e }) {
|
|
|
413
413
|
}(t), r = vn();
|
|
414
414
|
return n ? typeof e == "function" ? e(r) : e : null;
|
|
415
415
|
}
|
|
416
|
-
const
|
|
416
|
+
const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : k;
|
|
417
417
|
function Pn({ editor: e, ariaActiveDescendant: t, ariaAutoComplete: n, ariaControls: r, ariaDescribedBy: i, ariaErrorMessage: o, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: u, ariaOwns: d, ariaRequired: f, autoCapitalize: m, className: g, id: h, role: S = "textbox", spellCheck: w = !0, style: E, tabIndex: $, "data-testid": b, ...L }, x) {
|
|
418
|
-
const [_, N] = O(e.isEditable()),
|
|
418
|
+
const [_, N] = O(e.isEditable()), F = Kt((T) => {
|
|
419
419
|
T && T.ownerDocument && T.ownerDocument.defaultView ? e.setRootElement(T) : e.setRootElement(null);
|
|
420
|
-
}, [e]),
|
|
420
|
+
}, [e]), H = W(() => /* @__PURE__ */ function(...T) {
|
|
421
421
|
return (pe) => {
|
|
422
422
|
T.forEach((V) => {
|
|
423
423
|
typeof V == "function" ? V(pe) : V != null && (V.current = pe);
|
|
424
424
|
});
|
|
425
425
|
};
|
|
426
|
-
}(x,
|
|
427
|
-
return
|
|
426
|
+
}(x, F), [F, x]);
|
|
427
|
+
return He(() => (N(e.isEditable()), e.registerEditableListener((T) => {
|
|
428
428
|
N(T);
|
|
429
|
-
})), [e]), y("div", { ...L, "aria-activedescendant": _ ? t : void 0, "aria-autocomplete": _ ? n : "none", "aria-controls": _ ? r : void 0, "aria-describedby": i, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": _ && S === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": _ ? d : void 0, "aria-readonly": !_ || void 0, "aria-required": f, autoCapitalize: m, className: g, contentEditable: _, "data-testid": b, id: h, ref:
|
|
429
|
+
})), [e]), y("div", { ...L, "aria-activedescendant": _ ? t : void 0, "aria-autocomplete": _ ? n : "none", "aria-controls": _ ? r : void 0, "aria-describedby": i, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": _ && S === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": _ ? d : void 0, "aria-readonly": !_ || void 0, "aria-required": f, autoCapitalize: m, className: g, contentEditable: _, "data-testid": b, id: h, ref: H, role: _ ? S : void 0, spellCheck: w, style: E, tabIndex: $ });
|
|
430
430
|
}
|
|
431
431
|
const Rn = ze(Pn);
|
|
432
432
|
function Pe(e) {
|
|
433
|
-
return e.getEditorState().read(
|
|
433
|
+
return e.getEditorState().read(We(e.isComposing()));
|
|
434
434
|
}
|
|
435
435
|
const Mn = ze(On);
|
|
436
436
|
function On(e, t) {
|
|
437
437
|
const { placeholder: n, ...r } = e, [i] = R();
|
|
438
|
-
return A(
|
|
438
|
+
return A(Ie, { children: [y(Rn, { editor: i, ...r, ref: t }), n != null && y(In, { editor: i, content: n })] });
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function In({ content: e, editor: t }) {
|
|
441
441
|
const n = function(s) {
|
|
442
442
|
const [a, l] = O(() => Pe(s));
|
|
443
|
-
return
|
|
443
|
+
return He(() => {
|
|
444
444
|
function c() {
|
|
445
445
|
const u = Pe(s);
|
|
446
446
|
l(u);
|
|
@@ -463,7 +463,7 @@ function ce(e, t) {
|
|
|
463
463
|
return n.__proto__ = r, n;
|
|
464
464
|
}, ce(e, t);
|
|
465
465
|
}
|
|
466
|
-
var Re = { error: null },
|
|
466
|
+
var Re = { error: null }, Fn = function(e) {
|
|
467
467
|
var t, n;
|
|
468
468
|
function r() {
|
|
469
469
|
for (var o, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
|
|
@@ -499,7 +499,7 @@ var Re = { error: null }, In = function(e) {
|
|
|
499
499
|
}, r;
|
|
500
500
|
}(se.Component);
|
|
501
501
|
function Kn({ children: e, onError: t }) {
|
|
502
|
-
return y(
|
|
502
|
+
return y(Fn, { fallback: y("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: t, children: e });
|
|
503
503
|
}
|
|
504
504
|
const An = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : k;
|
|
505
505
|
function zn({ ignoreHistoryMergeTagChange: e = !0, ignoreSelectionChange: t = !1, onChange: n }) {
|
|
@@ -515,7 +515,7 @@ function Bn() {
|
|
|
515
515
|
return k(() => {
|
|
516
516
|
if (!e.hasNodes([Ue, je])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
517
517
|
}, [e]), function(t) {
|
|
518
|
-
k(() =>
|
|
518
|
+
k(() => Gt(t), [t]);
|
|
519
519
|
}(e), null;
|
|
520
520
|
}
|
|
521
521
|
function Un({ validateUrl: e, attributes: t }) {
|
|
@@ -535,7 +535,7 @@ function Un({ validateUrl: e, attributes: t }) {
|
|
|
535
535
|
const o = r;
|
|
536
536
|
if (o.clipboardData === null) return !1;
|
|
537
537
|
const s = o.clipboardData.getData("text");
|
|
538
|
-
return !!e(s) && !i.getNodes().some((a) =>
|
|
538
|
+
return !!e(s) && !i.getNodes().some((a) => J(a)) && (n.dispatchCommand(xe, { ...t, url: s }), r.preventDefault(), !0);
|
|
539
539
|
}, ye) : () => {
|
|
540
540
|
});
|
|
541
541
|
}, [n, e, t]), null;
|
|
@@ -552,7 +552,7 @@ function jn({ newTab: e = !0, disabled: t = !1 }) {
|
|
|
552
552
|
if (a.update(() => {
|
|
553
553
|
const f = oe(s);
|
|
554
554
|
if (f !== null) {
|
|
555
|
-
const m = me(f,
|
|
555
|
+
const m = me(f, J);
|
|
556
556
|
if (!t) if (Qt(m)) l = m.sanitizeUrl(m.getURL()), c = m.getTarget();
|
|
557
557
|
else {
|
|
558
558
|
const g = function(h, S) {
|
|
@@ -579,8 +579,8 @@ function jn({ newTab: e = !0, disabled: t = !1 }) {
|
|
|
579
579
|
});
|
|
580
580
|
}, [n, e, t]), null;
|
|
581
581
|
}
|
|
582
|
-
const ee = 0, ue = 1, de = 2, D = 0, qn = 1, Me = 2,
|
|
583
|
-
function
|
|
582
|
+
const ee = 0, ue = 1, de = 2, D = 0, qn = 1, Me = 2, Jn = 3, Wn = 4;
|
|
583
|
+
function Hn(e, t, n, r, i) {
|
|
584
584
|
if (e === null || n.size === 0 && r.size === 0 && !i) return D;
|
|
585
585
|
const o = t._selection, s = e._selection;
|
|
586
586
|
if (i) return qn;
|
|
@@ -610,14 +610,14 @@ function Jn(e, t, n, r, i) {
|
|
|
610
610
|
const f = o.anchor, m = s.anchor;
|
|
611
611
|
if (f.key !== m.key || f.type !== "text") return D;
|
|
612
612
|
const g = f.offset, h = m.offset, S = d.length - u.length;
|
|
613
|
-
return S === 1 && h === g - 1 ? Me : S === -1 && h === g + 1 ?
|
|
613
|
+
return S === 1 && h === g - 1 ? Me : S === -1 && h === g + 1 ? Jn : S === -1 && h === g ? Wn : D;
|
|
614
614
|
}
|
|
615
615
|
function Vn(e, t) {
|
|
616
616
|
let n = Date.now(), r = D;
|
|
617
617
|
return (i, o, s, a, l, c) => {
|
|
618
618
|
const u = Date.now();
|
|
619
619
|
if (c.has("historic")) return r = D, n = u, de;
|
|
620
|
-
const d =
|
|
620
|
+
const d = Hn(i, o, a, l, e.isComposing()), f = (() => {
|
|
621
621
|
const m = s === null || s.editor === e, g = c.has("history-push");
|
|
622
622
|
if (!g && m && c.has("history-merge")) return ee;
|
|
623
623
|
if (i === null) return ue;
|
|
@@ -661,17 +661,17 @@ function Xn(e, t, n) {
|
|
|
661
661
|
function Yn() {
|
|
662
662
|
return { current: null, redoStack: [], undoStack: [] };
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Zn({ delay: e, externalHistoryState: t }) {
|
|
665
665
|
const [n] = R();
|
|
666
666
|
return function(r, i, o = 1e3) {
|
|
667
|
-
const s =
|
|
667
|
+
const s = W(() => i || Yn(), [i]);
|
|
668
668
|
k(() => Xn(r, s, o), [o, r, s]);
|
|
669
669
|
}(n, t, e), null;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Gn(e) {
|
|
672
672
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
673
673
|
}
|
|
674
|
-
var te =
|
|
674
|
+
var te = Gn(function(e) {
|
|
675
675
|
const t = new URLSearchParams();
|
|
676
676
|
t.append("code", e);
|
|
677
677
|
for (let n = 1; n < arguments.length; n++) t.append("v", arguments[n]);
|
|
@@ -704,7 +704,7 @@ function Qn({ hasCellMerge: e = !0, hasCellBackgroundColor: t = !0, hasTabHandle
|
|
|
704
704
|
const u = i.get(l), d = r.getElementByKey(l);
|
|
705
705
|
u && d === u[1] || (u && (u[0].removeListeners(), i.delete(l)), d !== null && r.getEditorState().read(() => {
|
|
706
706
|
const f = Ot(l);
|
|
707
|
-
|
|
707
|
+
Jt(f) && o(f, l, d);
|
|
708
708
|
}));
|
|
709
709
|
} else if (c === "destroyed") {
|
|
710
710
|
const u = i.get(l);
|
|
@@ -718,7 +718,7 @@ function Qn({ hasCellMerge: e = !0, hasCellBackgroundColor: t = !0, hasTabHandle
|
|
|
718
718
|
}, [r, n]), k(() => {
|
|
719
719
|
if (!e) return r.registerNodeTransform(re, (i) => {
|
|
720
720
|
if (i.getColSpan() > 1 || i.getRowSpan() > 1) {
|
|
721
|
-
const [, , o] =
|
|
721
|
+
const [, , o] = Wt(i), [s] = Ht(o, i, i), a = s.length, l = s[0].length;
|
|
722
722
|
let c = o.getFirstChild();
|
|
723
723
|
ke(c) || te(175);
|
|
724
724
|
const u = [];
|
|
@@ -756,7 +756,7 @@ const Ve = 200, er = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p
|
|
|
756
756
|
maxWords: l = Ve,
|
|
757
757
|
onChange: c
|
|
758
758
|
}) => {
|
|
759
|
-
const { switchLanguage: u } = dn(), d = an(), [f] = O(() =>
|
|
759
|
+
const { switchLanguage: u } = dn(), d = an(), [f] = O(() => Fe()), [m, g] = O(0), [h, S] = O(0), w = {
|
|
760
760
|
namespace: "UvaEditor",
|
|
761
761
|
editor: f,
|
|
762
762
|
theme: cn,
|
|
@@ -765,23 +765,23 @@ const Ve = 200, er = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p
|
|
|
765
765
|
},
|
|
766
766
|
nodes: [Ue, je, qe, rn, re, Be, ne],
|
|
767
767
|
editorState: (b) => {
|
|
768
|
-
const x = new DOMParser().parseFromString(t, "text/html"), _ = Yt(b, x), N =
|
|
768
|
+
const x = new DOMParser().parseFromString(t, "text/html"), _ = Yt(b, x), N = I();
|
|
769
769
|
if (N.clear(), er(t))
|
|
770
|
-
_.forEach((
|
|
771
|
-
N.append(
|
|
770
|
+
_.forEach((F) => {
|
|
771
|
+
N.append(F);
|
|
772
772
|
});
|
|
773
773
|
else {
|
|
774
|
-
const
|
|
775
|
-
_.forEach((
|
|
776
|
-
T === 0 ? (
|
|
774
|
+
const F = fe();
|
|
775
|
+
_.forEach((H, T) => {
|
|
776
|
+
T === 0 ? (F.append(H), N.append(F)) : N.append(H);
|
|
777
777
|
});
|
|
778
778
|
}
|
|
779
|
-
g(E(
|
|
779
|
+
g(E(I().getTextContent().replace(/\s+/g, " ").trim()) || 0);
|
|
780
780
|
}
|
|
781
781
|
}, E = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, $ = (b, L) => {
|
|
782
782
|
b.read(() => {
|
|
783
783
|
let x = "";
|
|
784
|
-
g(E(
|
|
784
|
+
g(E(I().getTextContent().replace(/\s+/g, " ").trim())), x = Zt(L), c(x);
|
|
785
785
|
});
|
|
786
786
|
};
|
|
787
787
|
return k(() => {
|
|
@@ -820,7 +820,7 @@ const Ve = 200, er = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p
|
|
|
820
820
|
}
|
|
821
821
|
),
|
|
822
822
|
/* @__PURE__ */ y(Qn, {}),
|
|
823
|
-
/* @__PURE__ */ y(
|
|
823
|
+
/* @__PURE__ */ y(Zn, {}),
|
|
824
824
|
/* @__PURE__ */ y(Bn, {}),
|
|
825
825
|
/* @__PURE__ */ y(Un, { validateUrl: en }),
|
|
826
826
|
/* @__PURE__ */ y(tn, { matchers: nn }),
|
|
@@ -830,7 +830,7 @@ const Ve = 200, er = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p
|
|
|
830
830
|
] }) }),
|
|
831
831
|
s !== "" && /* @__PURE__ */ y(ln, { level: "error", feedback: s })
|
|
832
832
|
] });
|
|
833
|
-
},
|
|
833
|
+
}, Fr = ({
|
|
834
834
|
currentLanguage: e = "NL",
|
|
835
835
|
initialValue: t = "",
|
|
836
836
|
placeholder: n = "",
|
|
@@ -856,6 +856,6 @@ const Ve = 200, er = (e) => /^<(b|i|u|strong|em|mark|small|del|ins|sub|sup|div|p
|
|
|
856
856
|
) });
|
|
857
857
|
export {
|
|
858
858
|
tr as Rte,
|
|
859
|
-
|
|
859
|
+
Fr as RteEditor
|
|
860
860
|
};
|
|
861
861
|
//# sourceMappingURL=RteEditor.js.map
|
package/dist/components/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import { Label as po } from "./Label/Label.js";
|
|
|
30
30
|
import { MenuLink as mo } from "./MenuLink/MenuLink.js";
|
|
31
31
|
import { MetaDataList as io } from "./MetaDataList/MetaDataList.js";
|
|
32
32
|
import { ModalDialog as no } from "./ModalDialog/ModalDialog.js";
|
|
33
|
-
import { M as uo } from "../TablePlugin-
|
|
33
|
+
import { M as uo } from "../TablePlugin-B-yAWpsC.js";
|
|
34
34
|
import { OverlayCloseButton as so } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
35
35
|
import { PageOverlay as So } from "./PageOverlay/PageOverlay.js";
|
|
36
36
|
import { Periods as ko } from "./Periods/Periods.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { $ as J, t as
|
|
2
|
-
import {
|
|
1
|
+
import { $ as J, t as G, L as j } from "./LexicalUtils.prod-BBoyOK4A.js";
|
|
2
|
+
import { m as H, v as L, j as X, f as Z, b as S, t as V, M as N, I as K, G as q, a as T, c as E, T as Q, V as y } from "./Lexical.prod-B6kL_nwF.js";
|
|
3
3
|
import { u as Y } from "./LexicalComposerContext.prod-Dyvim1tK.js";
|
|
4
4
|
import { useEffect as tt } from "react";
|
|
5
5
|
const et = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
|
|
6
|
-
class
|
|
6
|
+
class x extends H {
|
|
7
7
|
static getType() {
|
|
8
8
|
return "link";
|
|
9
9
|
}
|
|
10
10
|
static clone(t) {
|
|
11
|
-
return new
|
|
11
|
+
return new x(t.__url, { rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
12
12
|
}
|
|
13
13
|
constructor(t, e = {}, r) {
|
|
14
14
|
super(r);
|
|
@@ -106,12 +106,12 @@ function nt(n) {
|
|
|
106
106
|
return { node: t };
|
|
107
107
|
}
|
|
108
108
|
function k(n, t) {
|
|
109
|
-
return
|
|
109
|
+
return Z(new x(n, t));
|
|
110
110
|
}
|
|
111
111
|
function w(n) {
|
|
112
|
-
return n instanceof
|
|
112
|
+
return n instanceof x;
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class v extends x {
|
|
115
115
|
constructor(t, e = {}, r) {
|
|
116
116
|
super(t, e, r), this.__isUnlinked = e.isUnlinked !== void 0 && e.isUnlinked !== null && e.isUnlinked;
|
|
117
117
|
}
|
|
@@ -119,7 +119,7 @@ class A extends T {
|
|
|
119
119
|
return "autolink";
|
|
120
120
|
}
|
|
121
121
|
static clone(t) {
|
|
122
|
-
return new
|
|
122
|
+
return new v(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
|
|
123
123
|
}
|
|
124
124
|
getIsUnlinked() {
|
|
125
125
|
return this.__isUnlinked;
|
|
@@ -154,18 +154,18 @@ class A extends T {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function C(n, t) {
|
|
157
|
-
return
|
|
157
|
+
return Z(new v(n, t));
|
|
158
158
|
}
|
|
159
159
|
function U(n) {
|
|
160
|
-
return n instanceof
|
|
160
|
+
return n instanceof v;
|
|
161
161
|
}
|
|
162
|
-
const rt =
|
|
162
|
+
const rt = V();
|
|
163
163
|
function wt(n, t = {}) {
|
|
164
164
|
const { target: e, title: r } = t, a = t.rel === void 0 ? "noreferrer" : t.rel, u = N();
|
|
165
165
|
if (!L(u)) return;
|
|
166
166
|
const s = u.extract();
|
|
167
167
|
if (n === null) s.forEach((g) => {
|
|
168
|
-
const o =
|
|
168
|
+
const o = G(g, (i) => !U(i) && w(i));
|
|
169
169
|
if (o) {
|
|
170
170
|
const i = o.getChildren();
|
|
171
171
|
for (let l = 0; l < i.length; l++) o.insertBefore(i[l]);
|
|
@@ -232,11 +232,11 @@ function z(n) {
|
|
|
232
232
|
}
|
|
233
233
|
function W(n) {
|
|
234
234
|
let t = n.getPreviousSibling();
|
|
235
|
-
return S(t) && (t = t.getLastDescendant()), t === null ||
|
|
235
|
+
return S(t) && (t = t.getLastDescendant()), t === null || y(t) || T(t) && M(t.getTextContent());
|
|
236
236
|
}
|
|
237
237
|
function F(n) {
|
|
238
238
|
let t = n.getNextSibling();
|
|
239
|
-
return S(t) && (t = t.getFirstDescendant()), t === null ||
|
|
239
|
+
return S(t) && (t = t.getFirstDescendant()), t === null || y(t) || T(t) && z(t.getTextContent());
|
|
240
240
|
}
|
|
241
241
|
function ut(n, t, e, r) {
|
|
242
242
|
return (n > 0 ? R(e[n - 1]) : W(r[0])) ? t < e.length ? R(e[t]) : F(r[r.length - 1]) : !1;
|
|
@@ -256,7 +256,7 @@ function gt(n, t, e, r) {
|
|
|
256
256
|
if (n.length === 1) {
|
|
257
257
|
let u, s = n[0];
|
|
258
258
|
t === 0 ? [u, s] = s.splitText(e) : [, u, s] = s.splitText(t, e);
|
|
259
|
-
const g =
|
|
259
|
+
const g = E(r.text);
|
|
260
260
|
return g.setFormat(u.getFormat()), g.setDetail(u.getDetail()), g.setStyle(u.getStyle()), a.append(g), u.replace(a), s;
|
|
261
261
|
}
|
|
262
262
|
if (n.length > 1) {
|
|
@@ -274,18 +274,18 @@ function gt(n, t, e, r) {
|
|
|
274
274
|
}
|
|
275
275
|
g += f;
|
|
276
276
|
}
|
|
277
|
-
const l = N(), h = l ? l.getNodes().find(
|
|
278
|
-
return c.setFormat(s.getFormat()), c.setDetail(s.getDetail()), c.setStyle(s.getStyle()), a.append(c, ...o), h && h === s && (L(l) ? c.select(l.anchor.offset, l.focus.offset) :
|
|
277
|
+
const l = N(), h = l ? l.getNodes().find(T) : void 0, c = E(s.getTextContent());
|
|
278
|
+
return c.setFormat(s.getFormat()), c.setDetail(s.getDetail()), c.setStyle(s.getStyle()), a.append(c, ...o), h && h === s && (L(l) ? c.select(l.anchor.offset, l.focus.offset) : Q(l) && c.select(0, c.getTextContent().length)), s.replace(a), i;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
function O(n, t, e) {
|
|
282
282
|
const r = n.getChildren(), a = r.length;
|
|
283
283
|
for (let o = 0; o < a; o++) {
|
|
284
284
|
const i = r[o];
|
|
285
|
-
if (!
|
|
285
|
+
if (!T(i) || !i.isSimpleText()) return A(n), void e(null, n.getURL());
|
|
286
286
|
}
|
|
287
287
|
const u = n.getTextContent(), s = P(u, t);
|
|
288
|
-
if (s === null || s.text !== u || !W(n) || !F(n)) return
|
|
288
|
+
if (s === null || s.text !== u || !W(n) || !F(n)) return A(n), void e(null, n.getURL());
|
|
289
289
|
const g = n.getURL();
|
|
290
290
|
if (g !== s.url && (n.setURL(s.url), e(s.url, g)), s.attributes) {
|
|
291
291
|
const o = n.getRel();
|
|
@@ -294,18 +294,18 @@ function O(n, t, e) {
|
|
|
294
294
|
i !== s.attributes.target && (n.setTarget(s.attributes.target || null), e(s.attributes.target || null, i));
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function A(n) {
|
|
298
298
|
const t = n.getChildren();
|
|
299
299
|
for (let e = t.length - 1; e >= 0; e--) n.insertAfter(t[e]);
|
|
300
300
|
return n.remove(), t.map((e) => e.getLatest());
|
|
301
301
|
}
|
|
302
302
|
function ct(n, t, e) {
|
|
303
303
|
tt(() => {
|
|
304
|
-
n.hasNodes([
|
|
304
|
+
n.hasNodes([v]) || st(77);
|
|
305
305
|
const r = (a, u) => {
|
|
306
306
|
e && e(a, u);
|
|
307
307
|
};
|
|
308
|
-
return
|
|
308
|
+
return j(n.registerNodeTransform(q, (a) => {
|
|
309
309
|
const u = a.getParentOrThrow(), s = a.getPreviousSibling();
|
|
310
310
|
if (U(u) && !u.getIsUnlinked()) O(u, t, r);
|
|
311
311
|
else if (!w(u)) {
|
|
@@ -313,7 +313,7 @@ function ct(n, t, e) {
|
|
|
313
313
|
const g = function(o) {
|
|
314
314
|
const i = [o];
|
|
315
315
|
let l = o.getNextSibling();
|
|
316
|
-
for (; l !== null &&
|
|
316
|
+
for (; l !== null && T(l) && l.isSimpleText() && (i.push(l), !/[\s]/.test(l.getTextContent())); ) l = l.getNextSibling();
|
|
317
317
|
return i;
|
|
318
318
|
}(a);
|
|
319
319
|
(function(o, i, l) {
|
|
@@ -323,8 +323,8 @@ function ct(n, t, e) {
|
|
|
323
323
|
for (; (_ = P(p, i)) && _ !== null; ) {
|
|
324
324
|
const d = _.index, m = d + _.length;
|
|
325
325
|
if (ut(f + d, f + m, c, h)) {
|
|
326
|
-
const [b, , B,
|
|
327
|
-
h =
|
|
326
|
+
const [b, , B, I] = at(h, f + d, f + m), D = gt(B, f + d - b, f + m - b, _);
|
|
327
|
+
h = D ? [D, ...I] : I, l(_.url, null), f = 0;
|
|
328
328
|
} else f += m;
|
|
329
329
|
p = p.substring(m);
|
|
330
330
|
}
|
|
@@ -333,7 +333,7 @@ function ct(n, t, e) {
|
|
|
333
333
|
(function(g, o, i) {
|
|
334
334
|
const l = g.getPreviousSibling(), h = g.getNextSibling(), c = g.getTextContent();
|
|
335
335
|
var _;
|
|
336
|
-
!U(l) || l.getIsUnlinked() || z(c) && (_ = c, !(l.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(_) : /^\.[a-zA-Z0-9]{1,}/.test(_))) || (l.append(g), O(l, o, i), i(null, l.getURL())), !U(h) || h.getIsUnlinked() || M(c) || (
|
|
336
|
+
!U(l) || l.getIsUnlinked() || z(c) && (_ = c, !(l.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(_) : /^\.[a-zA-Z0-9]{1,}/.test(_))) || (l.append(g), O(l, o, i), i(null, l.getURL())), !U(h) || h.getIsUnlinked() || M(c) || (A(h), O(h, o, i), i(null, h.getURL()));
|
|
337
337
|
})(a, t, r);
|
|
338
338
|
}
|
|
339
339
|
}), n.registerCommand(rt, (a) => {
|
|
@@ -342,26 +342,26 @@ function ct(n, t, e) {
|
|
|
342
342
|
const g = s.getParent();
|
|
343
343
|
if (U(g)) return g.setIsUnlinked(!g.getIsUnlinked()), g.markDirty(), !0;
|
|
344
344
|
}), !1;
|
|
345
|
-
},
|
|
345
|
+
}, K));
|
|
346
346
|
}, [n, t, e]);
|
|
347
347
|
}
|
|
348
348
|
function Ut({ matchers: n, onChange: t }) {
|
|
349
349
|
const [e] = Y();
|
|
350
350
|
return ct(e, n, t), null;
|
|
351
351
|
}
|
|
352
|
-
const ht = /^(http|https):\/\//, $ = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, _t = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/,
|
|
352
|
+
const ht = /^(http|https):\/\//, $ = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, _t = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/, Tt = (n) => n === "https://" || $.test(n), xt = (n) => n === "https://" || _t.test(n), vt = [
|
|
353
353
|
lt($, (n) => ht.test(n) ? n : `//${n}`)
|
|
354
354
|
], bt = (n) => /^https?:\/\//i.test(n) ? n : `https://${n}`;
|
|
355
355
|
export {
|
|
356
356
|
Ut as F,
|
|
357
|
-
|
|
357
|
+
vt as M,
|
|
358
358
|
rt as U,
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
x as a,
|
|
360
|
+
Tt as b,
|
|
361
361
|
bt as e,
|
|
362
|
-
|
|
362
|
+
v as f,
|
|
363
363
|
w as g,
|
|
364
364
|
wt as m,
|
|
365
|
-
|
|
365
|
+
xt as v
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=helpers-
|
|
367
|
+
//# sourceMappingURL=helpers-C7Yo7VY3.js.map
|