@happeouikit/content-renderer 3.2.6 → 3.2.7
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/index.cjs.js +69 -83
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +180 -194
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as Xt, Fragment as Zt, jsx as yr } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Jt, useState as ea, useCallback as ra, useEffect as ta, useMemo as aa } from "react";
|
|
3
|
+
import na from "react-dom";
|
|
4
|
+
import kt, { css as nt } from "styled-components";
|
|
5
5
|
import { CopyToClipboardButton as ia } from "@happeouikit/copy-to-clipboard-button";
|
|
6
6
|
import { BodyUI as ua, sansFamily as sa } from "@happeouikit/typography";
|
|
7
7
|
import { media as me } from "@happeouikit/layout";
|
|
@@ -10,7 +10,7 @@ var je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
10
10
|
function Ur(e) {
|
|
11
11
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
12
12
|
}
|
|
13
|
-
var
|
|
13
|
+
var Et = { exports: {} };
|
|
14
14
|
(function(e, i) {
|
|
15
15
|
(function(u, t) {
|
|
16
16
|
e.exports = t();
|
|
@@ -110,11 +110,11 @@ var kt = { exports: {} };
|
|
|
110
110
|
return D in t;
|
|
111
111
|
}, E;
|
|
112
112
|
});
|
|
113
|
-
})(
|
|
114
|
-
var ca =
|
|
113
|
+
})(Et);
|
|
114
|
+
var ca = Et.exports;
|
|
115
115
|
const _r = /* @__PURE__ */ Ur(ca);
|
|
116
116
|
var qr = { exports: {} }, x = {}, Dr = { exports: {} }, ce = {};
|
|
117
|
-
function
|
|
117
|
+
function Tt() {
|
|
118
118
|
var e = {};
|
|
119
119
|
return e["align-content"] = !1, e["align-items"] = !1, e["align-self"] = !1, e["alignment-adjust"] = !1, e["alignment-baseline"] = !1, e.all = !1, e["anchor-point"] = !1, e.animation = !1, e["animation-delay"] = !1, e["animation-direction"] = !1, e["animation-duration"] = !1, e["animation-fill-mode"] = !1, e["animation-iteration-count"] = !1, e["animation-name"] = !1, e["animation-play-state"] = !1, e["animation-timing-function"] = !1, e.azimuth = !1, e["backface-visibility"] = !1, e.background = !0, e["background-attachment"] = !0, e["background-clip"] = !0, e["background-color"] = !0, e["background-image"] = !0, e["background-origin"] = !0, e["background-position"] = !0, e["background-repeat"] = !0, e["background-size"] = !0, e["baseline-shift"] = !1, e.binding = !1, e.bleed = !1, e["bookmark-label"] = !1, e["bookmark-level"] = !1, e["bookmark-state"] = !1, e.border = !0, e["border-bottom"] = !0, e["border-bottom-color"] = !0, e["border-bottom-left-radius"] = !0, e["border-bottom-right-radius"] = !0, e["border-bottom-style"] = !0, e["border-bottom-width"] = !0, e["border-collapse"] = !0, e["border-color"] = !0, e["border-image"] = !0, e["border-image-outset"] = !0, e["border-image-repeat"] = !0, e["border-image-slice"] = !0, e["border-image-source"] = !0, e["border-image-width"] = !0, e["border-left"] = !0, e["border-left-color"] = !0, e["border-left-style"] = !0, e["border-left-width"] = !0, e["border-radius"] = !0, e["border-right"] = !0, e["border-right-color"] = !0, e["border-right-style"] = !0, e["border-right-width"] = !0, e["border-spacing"] = !0, e["border-style"] = !0, e["border-top"] = !0, e["border-top-color"] = !0, e["border-top-left-radius"] = !0, e["border-top-right-radius"] = !0, e["border-top-style"] = !0, e["border-top-width"] = !0, e["border-width"] = !0, e.bottom = !1, e["box-decoration-break"] = !0, e["box-shadow"] = !0, e["box-sizing"] = !0, e["box-snap"] = !0, e["box-suppress"] = !0, e["break-after"] = !0, e["break-before"] = !0, e["break-inside"] = !0, e["caption-side"] = !1, e.chains = !1, e.clear = !0, e.clip = !1, e["clip-path"] = !1, e["clip-rule"] = !1, e.color = !0, e["color-interpolation-filters"] = !0, e["column-count"] = !1, e["column-fill"] = !1, e["column-gap"] = !1, e["column-rule"] = !1, e["column-rule-color"] = !1, e["column-rule-style"] = !1, e["column-rule-width"] = !1, e["column-span"] = !1, e["column-width"] = !1, e.columns = !1, e.contain = !1, e.content = !1, e["counter-increment"] = !1, e["counter-reset"] = !1, e["counter-set"] = !1, e.crop = !1, e.cue = !1, e["cue-after"] = !1, e["cue-before"] = !1, e.cursor = !1, e.direction = !1, e.display = !0, e["display-inside"] = !0, e["display-list"] = !0, e["display-outside"] = !0, e["dominant-baseline"] = !1, e.elevation = !1, e["empty-cells"] = !1, e.filter = !1, e.flex = !1, e["flex-basis"] = !1, e["flex-direction"] = !1, e["flex-flow"] = !1, e["flex-grow"] = !1, e["flex-shrink"] = !1, e["flex-wrap"] = !1, e.float = !1, e["float-offset"] = !1, e["flood-color"] = !1, e["flood-opacity"] = !1, e["flow-from"] = !1, e["flow-into"] = !1, e.font = !0, e["font-family"] = !0, e["font-feature-settings"] = !0, e["font-kerning"] = !0, e["font-language-override"] = !0, e["font-size"] = !0, e["font-size-adjust"] = !0, e["font-stretch"] = !0, e["font-style"] = !0, e["font-synthesis"] = !0, e["font-variant"] = !0, e["font-variant-alternates"] = !0, e["font-variant-caps"] = !0, e["font-variant-east-asian"] = !0, e["font-variant-ligatures"] = !0, e["font-variant-numeric"] = !0, e["font-variant-position"] = !0, e["font-weight"] = !0, e.grid = !1, e["grid-area"] = !1, e["grid-auto-columns"] = !1, e["grid-auto-flow"] = !1, e["grid-auto-rows"] = !1, e["grid-column"] = !1, e["grid-column-end"] = !1, e["grid-column-start"] = !1, e["grid-row"] = !1, e["grid-row-end"] = !1, e["grid-row-start"] = !1, e["grid-template"] = !1, e["grid-template-areas"] = !1, e["grid-template-columns"] = !1, e["grid-template-rows"] = !1, e["hanging-punctuation"] = !1, e.height = !0, e.hyphens = !1, e.icon = !1, e["image-orientation"] = !1, e["image-resolution"] = !1, e["ime-mode"] = !1, e["initial-letters"] = !1, e["inline-box-align"] = !1, e["justify-content"] = !1, e["justify-items"] = !1, e["justify-self"] = !1, e.left = !1, e["letter-spacing"] = !0, e["lighting-color"] = !0, e["line-box-contain"] = !1, e["line-break"] = !1, e["line-grid"] = !1, e["line-height"] = !1, e["line-snap"] = !1, e["line-stacking"] = !1, e["line-stacking-ruby"] = !1, e["line-stacking-shift"] = !1, e["line-stacking-strategy"] = !1, e["list-style"] = !0, e["list-style-image"] = !0, e["list-style-position"] = !0, e["list-style-type"] = !0, e.margin = !0, e["margin-bottom"] = !0, e["margin-left"] = !0, e["margin-right"] = !0, e["margin-top"] = !0, e["marker-offset"] = !1, e["marker-side"] = !1, e.marks = !1, e.mask = !1, e["mask-box"] = !1, e["mask-box-outset"] = !1, e["mask-box-repeat"] = !1, e["mask-box-slice"] = !1, e["mask-box-source"] = !1, e["mask-box-width"] = !1, e["mask-clip"] = !1, e["mask-image"] = !1, e["mask-origin"] = !1, e["mask-position"] = !1, e["mask-repeat"] = !1, e["mask-size"] = !1, e["mask-source-type"] = !1, e["mask-type"] = !1, e["max-height"] = !0, e["max-lines"] = !1, e["max-width"] = !0, e["min-height"] = !0, e["min-width"] = !0, e["move-to"] = !1, e["nav-down"] = !1, e["nav-index"] = !1, e["nav-left"] = !1, e["nav-right"] = !1, e["nav-up"] = !1, e["object-fit"] = !1, e["object-position"] = !1, e.opacity = !1, e.order = !1, e.orphans = !1, e.outline = !1, e["outline-color"] = !1, e["outline-offset"] = !1, e["outline-style"] = !1, e["outline-width"] = !1, e.overflow = !1, e["overflow-wrap"] = !1, e["overflow-x"] = !1, e["overflow-y"] = !1, e.padding = !0, e["padding-bottom"] = !0, e["padding-left"] = !0, e["padding-right"] = !0, e["padding-top"] = !0, e.page = !1, e["page-break-after"] = !1, e["page-break-before"] = !1, e["page-break-inside"] = !1, e["page-policy"] = !1, e.pause = !1, e["pause-after"] = !1, e["pause-before"] = !1, e.perspective = !1, e["perspective-origin"] = !1, e.pitch = !1, e["pitch-range"] = !1, e["play-during"] = !1, e.position = !1, e["presentation-level"] = !1, e.quotes = !1, e["region-fragment"] = !1, e.resize = !1, e.rest = !1, e["rest-after"] = !1, e["rest-before"] = !1, e.richness = !1, e.right = !1, e.rotation = !1, e["rotation-point"] = !1, e["ruby-align"] = !1, e["ruby-merge"] = !1, e["ruby-position"] = !1, e["shape-image-threshold"] = !1, e["shape-outside"] = !1, e["shape-margin"] = !1, e.size = !1, e.speak = !1, e["speak-as"] = !1, e["speak-header"] = !1, e["speak-numeral"] = !1, e["speak-punctuation"] = !1, e["speech-rate"] = !1, e.stress = !1, e["string-set"] = !1, e["tab-size"] = !1, e["table-layout"] = !1, e["text-align"] = !0, e["text-align-last"] = !0, e["text-combine-upright"] = !0, e["text-decoration"] = !0, e["text-decoration-color"] = !0, e["text-decoration-line"] = !0, e["text-decoration-skip"] = !0, e["text-decoration-style"] = !0, e["text-emphasis"] = !0, e["text-emphasis-color"] = !0, e["text-emphasis-position"] = !0, e["text-emphasis-style"] = !0, e["text-height"] = !0, e["text-indent"] = !0, e["text-justify"] = !0, e["text-orientation"] = !0, e["text-overflow"] = !0, e["text-shadow"] = !0, e["text-space-collapse"] = !0, e["text-transform"] = !0, e["text-underline-position"] = !0, e["text-wrap"] = !0, e.top = !1, e.transform = !1, e["transform-origin"] = !1, e["transform-style"] = !1, e.transition = !1, e["transition-delay"] = !1, e["transition-duration"] = !1, e["transition-property"] = !1, e["transition-timing-function"] = !1, e["unicode-bidi"] = !1, e["vertical-align"] = !1, e.visibility = !1, e["voice-balance"] = !1, e["voice-duration"] = !1, e["voice-family"] = !1, e["voice-pitch"] = !1, e["voice-range"] = !1, e["voice-rate"] = !1, e["voice-stress"] = !1, e["voice-volume"] = !1, e.volume = !1, e["white-space"] = !1, e.widows = !1, e.width = !0, e["will-change"] = !1, e["word-break"] = !0, e["word-spacing"] = !0, e["word-wrap"] = !0, e["wrap-flow"] = !1, e["wrap-through"] = !1, e["writing-mode"] = !1, e["z-index"] = !1, e;
|
|
120
120
|
}
|
|
@@ -126,8 +126,8 @@ var pa = /javascript\s*\:/img;
|
|
|
126
126
|
function ha(e, i) {
|
|
127
127
|
return pa.test(i) ? "" : i;
|
|
128
128
|
}
|
|
129
|
-
ce.whiteList =
|
|
130
|
-
ce.getDefaultWhiteList =
|
|
129
|
+
ce.whiteList = Tt();
|
|
130
|
+
ce.getDefaultWhiteList = Tt;
|
|
131
131
|
ce.onAttr = la;
|
|
132
132
|
ce.onIgnoreAttr = fa;
|
|
133
133
|
ce.safeAttrValue = ha;
|
|
@@ -185,7 +185,7 @@ function ma(e, i) {
|
|
|
185
185
|
return be.trim(g);
|
|
186
186
|
}
|
|
187
187
|
var ba = ma, Te = ce, va = ba;
|
|
188
|
-
function
|
|
188
|
+
function it(e) {
|
|
189
189
|
return e == null;
|
|
190
190
|
}
|
|
191
191
|
function wa(e) {
|
|
@@ -194,10 +194,10 @@ function wa(e) {
|
|
|
194
194
|
i[u] = e[u];
|
|
195
195
|
return i;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function At(e) {
|
|
198
198
|
e = wa(e || {}), e.whiteList = e.whiteList || Te.whiteList, e.onAttr = e.onAttr || Te.onAttr, e.onIgnoreAttr = e.onIgnoreAttr || Te.onIgnoreAttr, e.safeAttrValue = e.safeAttrValue || Te.safeAttrValue, this.options = e;
|
|
199
199
|
}
|
|
200
|
-
|
|
200
|
+
At.prototype.process = function(e) {
|
|
201
201
|
if (e = e || "", e = e.toString(), !e)
|
|
202
202
|
return "";
|
|
203
203
|
var i = this, u = i.options, t = u.whiteList, s = u.onAttr, p = u.onIgnoreAttr, g = u.safeAttrValue, m = va(e, function(b, S, q, E, w) {
|
|
@@ -211,17 +211,17 @@ Tt.prototype.process = function(e) {
|
|
|
211
211
|
};
|
|
212
212
|
if (C) {
|
|
213
213
|
var j = s(q, E, R);
|
|
214
|
-
return
|
|
214
|
+
return it(j) ? q + ":" + E : j;
|
|
215
215
|
} else {
|
|
216
216
|
var j = p(q, E, R);
|
|
217
|
-
if (!
|
|
217
|
+
if (!it(j))
|
|
218
218
|
return j;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
222
|
return m;
|
|
223
223
|
};
|
|
224
|
-
var ya =
|
|
224
|
+
var ya = At;
|
|
225
225
|
(function(e, i) {
|
|
226
226
|
var u = ce, t = ya;
|
|
227
227
|
function s(g, m) {
|
|
@@ -258,7 +258,7 @@ var Br = Dr.exports, Vr = {
|
|
|
258
258
|
return u ? u.index : -1;
|
|
259
259
|
}
|
|
260
260
|
}, _a = Br.FilterCSS, ka = Br.getDefaultWhiteList, Ie = Vr;
|
|
261
|
-
function
|
|
261
|
+
function Ct() {
|
|
262
262
|
return {
|
|
263
263
|
a: ["target", "href", "title"],
|
|
264
264
|
abbr: ["title"],
|
|
@@ -350,7 +350,7 @@ function At() {
|
|
|
350
350
|
]
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var St = new _a();
|
|
354
354
|
function Ea(e, i, u) {
|
|
355
355
|
}
|
|
356
356
|
function Ta(e, i, u) {
|
|
@@ -359,11 +359,11 @@ function Aa(e, i, u) {
|
|
|
359
359
|
}
|
|
360
360
|
function Ca(e, i, u) {
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Lt(e) {
|
|
363
363
|
return e.replace(La, "<").replace(qa, ">");
|
|
364
364
|
}
|
|
365
365
|
function Sa(e, i, u, t) {
|
|
366
|
-
if (u =
|
|
366
|
+
if (u = Nt(u), i === "href" || i === "src") {
|
|
367
367
|
if (u = Ie.trim(u), u === "#")
|
|
368
368
|
return "#";
|
|
369
369
|
if (!(u.substr(0, 7) === "http://" || u.substr(0, 8) === "https://" || u.substr(0, 7) === "mailto:" || u.substr(0, 4) === "tel:" || u.substr(0, 11) === "data:image/" || u.substr(0, 6) === "ftp://" || u.substr(0, 2) === "./" || u.substr(0, 3) === "../" || u[0] === "#" || u[0] === "/"))
|
|
@@ -372,37 +372,37 @@ function Sa(e, i, u, t) {
|
|
|
372
372
|
if (Ae.lastIndex = 0, Ae.test(u))
|
|
373
373
|
return "";
|
|
374
374
|
} else if (i === "style") {
|
|
375
|
-
if (
|
|
375
|
+
if (ut.lastIndex = 0, ut.test(u) || (st.lastIndex = 0, st.test(u) && (Ae.lastIndex = 0, Ae.test(u))))
|
|
376
376
|
return "";
|
|
377
|
-
t !== !1 && (t = t ||
|
|
377
|
+
t !== !1 && (t = t || St, u = t.process(u));
|
|
378
378
|
}
|
|
379
|
-
return u =
|
|
379
|
+
return u = jt(u), u;
|
|
380
380
|
}
|
|
381
|
-
var La = /</g, qa = />/g, Da = /"/g, Pa = /"/g, Ra = /&#([a-zA-Z0-9]*);?/gim, za = /:?/gim, Na = /&newline;?/gim, Ae = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,
|
|
382
|
-
function
|
|
381
|
+
var La = /</g, qa = />/g, Da = /"/g, Pa = /"/g, Ra = /&#([a-zA-Z0-9]*);?/gim, za = /:?/gim, Na = /&newline;?/gim, Ae = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi, ut = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, st = /u\s*r\s*l\s*\(.*/gi;
|
|
382
|
+
function qt(e) {
|
|
383
383
|
return e.replace(Da, """);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Dt(e) {
|
|
386
386
|
return e.replace(Pa, '"');
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Pt(e) {
|
|
389
389
|
return e.replace(Ra, function(u, t) {
|
|
390
390
|
return t[0] === "x" || t[0] === "X" ? String.fromCharCode(parseInt(t.substr(1), 16)) : String.fromCharCode(parseInt(t, 10));
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Rt(e) {
|
|
394
394
|
return e.replace(za, ":").replace(Na, " ");
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function zt(e) {
|
|
397
397
|
for (var i = "", u = 0, t = e.length; u < t; u++)
|
|
398
398
|
i += e.charCodeAt(u) < 32 ? " " : e.charAt(u);
|
|
399
399
|
return Ie.trim(i);
|
|
400
400
|
}
|
|
401
|
-
function zt(e) {
|
|
402
|
-
return e = qt(e), e = Dt(e), e = Pt(e), e = Rt(e), e;
|
|
403
|
-
}
|
|
404
401
|
function Nt(e) {
|
|
405
|
-
return e =
|
|
402
|
+
return e = Dt(e), e = Pt(e), e = Rt(e), e = zt(e), e;
|
|
403
|
+
}
|
|
404
|
+
function jt(e) {
|
|
405
|
+
return e = qt(e), e = Lt(e), e;
|
|
406
406
|
}
|
|
407
407
|
function ja() {
|
|
408
408
|
return "";
|
|
@@ -459,27 +459,27 @@ function Ha(e) {
|
|
|
459
459
|
return t === 127 ? !1 : t <= 31 ? t === 10 || t === 13 : !0;
|
|
460
460
|
}), i.join("");
|
|
461
461
|
}
|
|
462
|
-
x.whiteList =
|
|
463
|
-
x.getDefaultWhiteList =
|
|
462
|
+
x.whiteList = Ct();
|
|
463
|
+
x.getDefaultWhiteList = Ct;
|
|
464
464
|
x.onTag = Ea;
|
|
465
465
|
x.onIgnoreTag = Ta;
|
|
466
466
|
x.onTagAttr = Aa;
|
|
467
467
|
x.onIgnoreTagAttr = Ca;
|
|
468
468
|
x.safeAttrValue = Sa;
|
|
469
|
-
x.escapeHtml =
|
|
470
|
-
x.escapeQuote =
|
|
471
|
-
x.unescapeQuote =
|
|
472
|
-
x.escapeHtmlEntities =
|
|
473
|
-
x.escapeDangerHtml5Entities =
|
|
474
|
-
x.clearNonPrintableCharacter =
|
|
475
|
-
x.friendlyAttrValue =
|
|
476
|
-
x.escapeAttrValue =
|
|
469
|
+
x.escapeHtml = Lt;
|
|
470
|
+
x.escapeQuote = qt;
|
|
471
|
+
x.unescapeQuote = Dt;
|
|
472
|
+
x.escapeHtmlEntities = Pt;
|
|
473
|
+
x.escapeDangerHtml5Entities = Rt;
|
|
474
|
+
x.clearNonPrintableCharacter = zt;
|
|
475
|
+
x.friendlyAttrValue = Nt;
|
|
476
|
+
x.escapeAttrValue = jt;
|
|
477
477
|
x.onIgnoreTagStripAll = ja;
|
|
478
478
|
x.StripTagBody = Ia;
|
|
479
479
|
x.stripCommentTag = Oa;
|
|
480
480
|
x.stripBlankChar = Ha;
|
|
481
481
|
x.attributeWrapSign = '"';
|
|
482
|
-
x.cssFilter =
|
|
482
|
+
x.cssFilter = St;
|
|
483
483
|
x.getDefaultCSSWhiteList = ka;
|
|
484
484
|
var pr = {}, ue = Vr;
|
|
485
485
|
function Ma(e) {
|
|
@@ -560,12 +560,12 @@ function Va(e, i) {
|
|
|
560
560
|
continue;
|
|
561
561
|
}
|
|
562
562
|
else if (E = Ga(e, b - 1), E === -1) {
|
|
563
|
-
q = ue.trim(e.slice(u, b)), q =
|
|
563
|
+
q = ue.trim(e.slice(u, b)), q = dt(q), m(p, q), p = !1, u = b + 1;
|
|
564
564
|
continue;
|
|
565
565
|
} else
|
|
566
566
|
continue;
|
|
567
567
|
}
|
|
568
|
-
return u < e.length && (p === !1 ? m(e.slice(u)) : m(p,
|
|
568
|
+
return u < e.length && (p === !1 ? m(e.slice(u)) : m(p, dt(ue.trim(e.slice(u))))), ue.trim(s.join(" "));
|
|
569
569
|
}
|
|
570
570
|
function Fa(e, i) {
|
|
571
571
|
for (; i < e.length; i++) {
|
|
@@ -591,12 +591,12 @@ function Ga(e, i) {
|
|
|
591
591
|
function Wa(e) {
|
|
592
592
|
return e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'";
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function dt(e) {
|
|
595
595
|
return Wa(e) ? e.substr(1, e.length - 2) : e;
|
|
596
596
|
}
|
|
597
597
|
pr.parseTag = Ua;
|
|
598
598
|
pr.parseAttr = Va;
|
|
599
|
-
var Ka = Br.FilterCSS, Z = x,
|
|
599
|
+
var Ka = Br.FilterCSS, Z = x, It = pr, Qa = It.parseTag, Ya = It.parseAttr, Re = Vr;
|
|
600
600
|
function Ce(e) {
|
|
601
601
|
return e == null;
|
|
602
602
|
}
|
|
@@ -628,12 +628,12 @@ function Ja(e) {
|
|
|
628
628
|
}) : i[u.toLowerCase()] = e[u];
|
|
629
629
|
return i;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Ot(e) {
|
|
632
632
|
e = Za(e || {}), e.stripIgnoreTag && (e.onIgnoreTag && console.error(
|
|
633
633
|
'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
|
|
634
634
|
), e.onIgnoreTag = Z.onIgnoreTagStripAll), e.whiteList || e.allowList ? e.whiteList = Ja(e.whiteList || e.allowList) : e.whiteList = Z.whiteList, this.attributeWrapSign = e.singleQuotedAttributeValue === !0 ? "'" : Z.attributeWrapSign, e.onTag = e.onTag || Z.onTag, e.onTagAttr = e.onTagAttr || Z.onTagAttr, e.onIgnoreTag = e.onIgnoreTag || Z.onIgnoreTag, e.onIgnoreTagAttr = e.onIgnoreTagAttr || Z.onIgnoreTagAttr, e.safeAttrValue = e.safeAttrValue || Z.safeAttrValue, e.escapeHtml = e.escapeHtml || Z.escapeHtml, this.options = e, e.css === !1 ? this.cssFilter = !1 : (e.css = e.css || {}, this.cssFilter = new Ka(e.css));
|
|
635
635
|
}
|
|
636
|
-
|
|
636
|
+
Ot.prototype.process = function(e) {
|
|
637
637
|
if (e = e || "", e = e.toString(), !e)
|
|
638
638
|
return "";
|
|
639
639
|
var i = this, u = i.options, t = u.whiteList, s = u.onTag, p = u.onIgnoreTag, g = u.onTagAttr, m = u.onIgnoreTagAttr, b = u.safeAttrValue, S = u.escapeHtml, q = i.attributeWrapSign, E = i.cssFilter;
|
|
@@ -669,7 +669,7 @@ It.prototype.process = function(e) {
|
|
|
669
669
|
);
|
|
670
670
|
return w && (D = w.remove(D)), D;
|
|
671
671
|
};
|
|
672
|
-
var en =
|
|
672
|
+
var en = Ot;
|
|
673
673
|
(function(e, i) {
|
|
674
674
|
var u = x, t = pr, s = en;
|
|
675
675
|
function p(m, b) {
|
|
@@ -692,12 +692,12 @@ const Pr = /* @__PURE__ */ Ur(rn), tn = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0a
|
|
|
692
692
|
for (const u in i)
|
|
693
693
|
e[u] = i[u];
|
|
694
694
|
return e;
|
|
695
|
-
}, Rr = "numeric", zr = "ascii", Nr = "alpha", ze = "asciinumeric", Se = "alphanumeric", jr = "domain",
|
|
695
|
+
}, Rr = "numeric", zr = "ascii", Nr = "alpha", ze = "asciinumeric", Se = "alphanumeric", jr = "domain", Ht = "emoji", nn = "scheme", un = "slashscheme", ot = "whitespace";
|
|
696
696
|
function sn(e, i) {
|
|
697
697
|
return e in i || (i[e] = []), i[e];
|
|
698
698
|
}
|
|
699
699
|
function oe(e, i, u) {
|
|
700
|
-
i[Rr] && (i[ze] = !0, i[Se] = !0), i[zr] && (i[ze] = !0, i[Nr] = !0), i[ze] && (i[Se] = !0), i[Nr] && (i[Se] = !0), i[Se] && (i[jr] = !0), i[
|
|
700
|
+
i[Rr] && (i[ze] = !0, i[Se] = !0), i[zr] && (i[ze] = !0, i[Nr] = !0), i[ze] && (i[Se] = !0), i[Nr] && (i[Se] = !0), i[Se] && (i[jr] = !0), i[Ht] && (i[jr] = !0);
|
|
701
701
|
for (const t in i) {
|
|
702
702
|
const s = sn(t, u);
|
|
703
703
|
s.indexOf(e) < 0 && s.push(e);
|
|
@@ -834,8 +834,8 @@ Q.prototype = {
|
|
|
834
834
|
return s.j[e] = g, g;
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
|
-
const I = (e, i, u, t, s) => e.ta(i, u, t, s), Y = (e, i, u, t, s) => e.tr(i, u, t, s),
|
|
838
|
-
var
|
|
837
|
+
const I = (e, i, u, t, s) => e.ta(i, u, t, s), Y = (e, i, u, t, s) => e.tr(i, u, t, s), ct = (e, i, u, t, s) => e.ts(i, u, t, s), A = (e, i, u, t, s) => e.tt(i, u, t, s), ae = "WORD", Ir = "UWORD", ke = "LOCALHOST", Or = "TLD", Hr = "UTLD", Ne = "SCHEME", fe = "SLASH_SCHEME", Fr = "NUM", Mt = "WS", $r = "NL", ve = "OPENBRACE", we = "CLOSEBRACE", Oe = "OPENBRACKET", He = "CLOSEBRACKET", Me = "OPENPAREN", xe = "CLOSEPAREN", Ue = "OPENANGLEBRACKET", Be = "CLOSEANGLEBRACKET", Ve = "FULLWIDTHLEFTPAREN", Fe = "FULLWIDTHRIGHTPAREN", $e = "LEFTCORNERBRACKET", Ge = "RIGHTCORNERBRACKET", We = "LEFTWHITECORNERBRACKET", Ke = "RIGHTWHITECORNERBRACKET", Qe = "FULLWIDTHLESSTHAN", Ye = "FULLWIDTHGREATERTHAN", Xe = "AMPERSAND", Ze = "APOSTROPHE", Je = "ASTERISK", se = "AT", er = "BACKSLASH", rr = "BACKTICK", tr = "CARET", de = "COLON", Gr = "COMMA", ar = "DOLLAR", ee = "DOT", nr = "EQUALS", Wr = "EXCLAMATION", re = "HYPHEN", ir = "PERCENT", ur = "PIPE", sr = "PLUS", dr = "POUND", or = "QUERY", Kr = "QUOTE", Qr = "SEMI", te = "SLASH", ye = "TILDE", cr = "UNDERSCORE", xt = "EMOJI", lr = "SYM";
|
|
838
|
+
var Ut = /* @__PURE__ */ Object.freeze({
|
|
839
839
|
__proto__: null,
|
|
840
840
|
WORD: ae,
|
|
841
841
|
UWORD: Ir,
|
|
@@ -845,7 +845,7 @@ var xt = /* @__PURE__ */ Object.freeze({
|
|
|
845
845
|
SCHEME: Ne,
|
|
846
846
|
SLASH_SCHEME: fe,
|
|
847
847
|
NUM: Fr,
|
|
848
|
-
WS:
|
|
848
|
+
WS: Mt,
|
|
849
849
|
NL: $r,
|
|
850
850
|
OPENBRACE: ve,
|
|
851
851
|
CLOSEBRACE: we,
|
|
@@ -887,10 +887,10 @@ var xt = /* @__PURE__ */ Object.freeze({
|
|
|
887
887
|
SLASH: te,
|
|
888
888
|
TILDE: ye,
|
|
889
889
|
UNDERSCORE: cr,
|
|
890
|
-
EMOJI:
|
|
890
|
+
EMOJI: xt,
|
|
891
891
|
SYM: lr
|
|
892
892
|
});
|
|
893
|
-
const le = /[a-z]/, kr = new RegExp("\\p{L}", "u"), Er = new RegExp("\\p{Emoji}", "u"), Tr = /\d/,
|
|
893
|
+
const le = /[a-z]/, kr = new RegExp("\\p{L}", "u"), Er = new RegExp("\\p{Emoji}", "u"), Tr = /\d/, lt = /\s/, ft = `
|
|
894
894
|
`, on = "️", cn = "";
|
|
895
895
|
let Le = null, qe = null;
|
|
896
896
|
function ln(e) {
|
|
@@ -898,7 +898,7 @@ function ln(e) {
|
|
|
898
898
|
const i = {};
|
|
899
899
|
Q.groups = i;
|
|
900
900
|
const u = new Q();
|
|
901
|
-
Le == null && (Le =
|
|
901
|
+
Le == null && (Le = pt(tn)), qe == null && (qe = pt(an)), A(u, "'", Ze), A(u, "{", ve), A(u, "}", we), A(u, "[", Oe), A(u, "]", He), A(u, "(", Me), A(u, ")", xe), A(u, "<", Ue), A(u, ">", Be), A(u, "(", Ve), A(u, ")", Fe), A(u, "「", $e), A(u, "」", Ge), A(u, "『", We), A(u, "』", Ke), A(u, "<", Qe), A(u, ">", Ye), A(u, "&", Xe), A(u, "*", Je), A(u, "@", se), A(u, "`", rr), A(u, "^", tr), A(u, ":", de), A(u, ",", Gr), A(u, "$", ar), A(u, ".", ee), A(u, "=", nr), A(u, "!", Wr), A(u, "-", re), A(u, "%", ir), A(u, "|", ur), A(u, "+", sr), A(u, "#", dr), A(u, "?", or), A(u, '"', Kr), A(u, "/", te), A(u, ";", Qr), A(u, "~", ye), A(u, "_", cr), A(u, "\\", er);
|
|
902
902
|
const t = Y(u, Tr, Fr, {
|
|
903
903
|
[Rr]: !0
|
|
904
904
|
});
|
|
@@ -911,14 +911,14 @@ function ln(e) {
|
|
|
911
911
|
[Nr]: !0
|
|
912
912
|
});
|
|
913
913
|
Y(p, le), Y(p, kr, p);
|
|
914
|
-
const g = Y(u,
|
|
915
|
-
[
|
|
914
|
+
const g = Y(u, lt, Mt, {
|
|
915
|
+
[ot]: !0
|
|
916
916
|
});
|
|
917
|
-
A(u,
|
|
918
|
-
[
|
|
919
|
-
}), A(g,
|
|
920
|
-
const m = Y(u, Er,
|
|
921
|
-
[
|
|
917
|
+
A(u, ft, $r, {
|
|
918
|
+
[ot]: !0
|
|
919
|
+
}), A(g, ft), Y(g, lt, g);
|
|
920
|
+
const m = Y(u, Er, xt, {
|
|
921
|
+
[Ht]: !0
|
|
922
922
|
});
|
|
923
923
|
Y(m, Er, m), A(m, on, m);
|
|
924
924
|
const b = A(m, cn);
|
|
@@ -947,15 +947,15 @@ function ln(e) {
|
|
|
947
947
|
} : {
|
|
948
948
|
[un]: !0
|
|
949
949
|
};
|
|
950
|
-
w.indexOf("-") >= 0 ? C[jr] = !0 : le.test(w) ? Tr.test(w) ? C[ze] = !0 : C[zr] = !0 : C[Rr] = !0,
|
|
950
|
+
w.indexOf("-") >= 0 ? C[jr] = !0 : le.test(w) ? Tr.test(w) ? C[ze] = !0 : C[zr] = !0 : C[Rr] = !0, ct(u, w, w, C);
|
|
951
951
|
}
|
|
952
|
-
return
|
|
952
|
+
return ct(u, "localhost", ke, {
|
|
953
953
|
ascii: !0
|
|
954
954
|
}), u.jd = new Q(lr), {
|
|
955
955
|
start: u,
|
|
956
956
|
tokens: pe({
|
|
957
957
|
groups: i
|
|
958
|
-
},
|
|
958
|
+
}, Ut)
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
961
|
function fn(e, i) {
|
|
@@ -996,7 +996,7 @@ function ne(e, i, u, t, s) {
|
|
|
996
996
|
}
|
|
997
997
|
return p = new Q(u), p.jr = s.slice(), e.j[i[g - 1]] = p, p;
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function pt(e) {
|
|
1000
1000
|
const i = [], u = [];
|
|
1001
1001
|
let t = 0, s = "0123456789";
|
|
1002
1002
|
for (; t < e.length; ) {
|
|
@@ -1016,8 +1016,8 @@ function ft(e) {
|
|
|
1016
1016
|
const Ee = {
|
|
1017
1017
|
defaultProtocol: "http",
|
|
1018
1018
|
events: null,
|
|
1019
|
-
format:
|
|
1020
|
-
formatHref:
|
|
1019
|
+
format: ht,
|
|
1020
|
+
formatHref: ht,
|
|
1021
1021
|
nl2br: !1,
|
|
1022
1022
|
tagName: "a",
|
|
1023
1023
|
target: null,
|
|
@@ -1100,13 +1100,13 @@ Yr.prototype = {
|
|
|
1100
1100
|
return (this.get("render", null, e) || this.defaultRender)(i, e.t, e);
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
|
-
function
|
|
1103
|
+
function ht(e) {
|
|
1104
1104
|
return e;
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Bt(e, i) {
|
|
1107
1107
|
this.t = "token", this.v = e, this.tk = i;
|
|
1108
1108
|
}
|
|
1109
|
-
|
|
1109
|
+
Bt.prototype = {
|
|
1110
1110
|
isLink: !1,
|
|
1111
1111
|
/**
|
|
1112
1112
|
* Return the string this token represents.
|
|
@@ -1211,7 +1211,7 @@ Ut.prototype = {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
};
|
|
1213
1213
|
function hr(e, i) {
|
|
1214
|
-
class u extends
|
|
1214
|
+
class u extends Bt {
|
|
1215
1215
|
constructor(s, p) {
|
|
1216
1216
|
super(s, p), this.t = e;
|
|
1217
1217
|
}
|
|
@@ -1220,12 +1220,12 @@ function hr(e, i) {
|
|
|
1220
1220
|
u.prototype[t] = i[t];
|
|
1221
1221
|
return u.t = e, u;
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1223
|
+
const gt = hr("email", {
|
|
1224
1224
|
isLink: !0,
|
|
1225
1225
|
toHref() {
|
|
1226
1226
|
return "mailto:" + this.toString();
|
|
1227
1227
|
}
|
|
1228
|
-
}),
|
|
1228
|
+
}), mt = hr("text"), hn = hr("nl"), De = hr("url", {
|
|
1229
1229
|
isLink: !0,
|
|
1230
1230
|
/**
|
|
1231
1231
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -1262,12 +1262,12 @@ function gn(e) {
|
|
|
1262
1262
|
I(q, i.domain, w), I(w, i.domain, w);
|
|
1263
1263
|
const D = A(w, ee);
|
|
1264
1264
|
I(D, i.domain, w);
|
|
1265
|
-
const C = X(
|
|
1265
|
+
const C = X(gt);
|
|
1266
1266
|
I(D, i.tld, C), I(D, i.utld, C), A(q, ke, C);
|
|
1267
1267
|
const R = A(w, re);
|
|
1268
1268
|
I(R, i.domain, w), I(C, i.domain, w), A(C, ee, D), A(C, re, R);
|
|
1269
1269
|
const j = A(C, de);
|
|
1270
|
-
I(j, i.numeric,
|
|
1270
|
+
I(j, i.numeric, gt);
|
|
1271
1271
|
const O = A(m, re), M = A(m, ee);
|
|
1272
1272
|
I(O, i.domain, m), I(M, s, g), I(M, i.domain, m);
|
|
1273
1273
|
const N = X(De);
|
|
@@ -1306,7 +1306,7 @@ function gn(e) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return A(p, ke, N), A(p, $r, hn), {
|
|
1308
1308
|
start: p,
|
|
1309
|
-
tokens:
|
|
1309
|
+
tokens: Ut
|
|
1310
1310
|
};
|
|
1311
1311
|
}
|
|
1312
1312
|
function mn(e, i, u) {
|
|
@@ -1320,12 +1320,12 @@ function mn(e, i, u) {
|
|
|
1320
1320
|
if (w < 0)
|
|
1321
1321
|
s -= q, s < t && (g.push(u[s]), s++);
|
|
1322
1322
|
else {
|
|
1323
|
-
g.length > 0 && (p.push(Ar(
|
|
1323
|
+
g.length > 0 && (p.push(Ar(mt, i, g)), g = []), s -= w, q -= w;
|
|
1324
1324
|
const D = E.t, C = u.slice(s - q, s);
|
|
1325
1325
|
p.push(Ar(D, i, C));
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
return g.length > 0 && p.push(Ar(
|
|
1328
|
+
return g.length > 0 && p.push(Ar(mt, i, g)), p;
|
|
1329
1329
|
}
|
|
1330
1330
|
function Ar(e, i, u) {
|
|
1331
1331
|
const t = u[0].s, s = u[u.length - 1].e, p = i.slice(t, s);
|
|
@@ -1388,7 +1388,7 @@ var wn = {
|
|
|
1388
1388
|
function V(e) {
|
|
1389
1389
|
return Tn.test(e);
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function bt(e) {
|
|
1392
1392
|
return An.test(e);
|
|
1393
1393
|
}
|
|
1394
1394
|
function Sn(e) {
|
|
@@ -1434,7 +1434,7 @@ var Ln = (
|
|
|
1434
1434
|
) : s === "/" ? this.transitionTo(
|
|
1435
1435
|
"endTagOpen"
|
|
1436
1436
|
/* endTagOpen */
|
|
1437
|
-
) : (s === "@" || s === ":" ||
|
|
1437
|
+
) : (s === "@" || s === ":" || bt(s)) && (this.transitionTo(
|
|
1438
1438
|
"tagName"
|
|
1439
1439
|
/* tagName */
|
|
1440
1440
|
), this.tagNameBuffer = "", this.delegate.beginStartTag(), this.appendToTagName(s));
|
|
@@ -1795,7 +1795,7 @@ var Ln = (
|
|
|
1795
1795
|
},
|
|
1796
1796
|
endTagOpen: function() {
|
|
1797
1797
|
var s = this.consume();
|
|
1798
|
-
(s === "@" || s === ":" ||
|
|
1798
|
+
(s === "@" || s === ":" || bt(s)) && (this.transitionTo(
|
|
1799
1799
|
"endTagName"
|
|
1800
1800
|
/* endTagName */
|
|
1801
1801
|
), this.tagNameBuffer = "", this.delegate.beginEndTag(), this.appendToTagName(s));
|
|
@@ -1986,7 +1986,7 @@ function Dn(e, i) {
|
|
|
1986
1986
|
var u = new qn(new En(wn), i);
|
|
1987
1987
|
return u.tokenize(e);
|
|
1988
1988
|
}
|
|
1989
|
-
const
|
|
1989
|
+
const Vt = "LinkifyResult", fr = "StartTag", Ft = "EndTag", Mr = "Chars", Pn = "Comment", Rn = "Doctype";
|
|
1990
1990
|
function zn(e, i) {
|
|
1991
1991
|
i === void 0 && (i = {});
|
|
1992
1992
|
const u = Dn(e), t = [], s = [], p = new Yr(i, In);
|
|
@@ -2009,7 +2009,7 @@ function zn(e, i) {
|
|
|
2009
2009
|
for (let g = 0; g < t.length; g++) {
|
|
2010
2010
|
const m = t[g];
|
|
2011
2011
|
switch (m.type) {
|
|
2012
|
-
case
|
|
2012
|
+
case Vt:
|
|
2013
2013
|
s.push(m.rendered);
|
|
2014
2014
|
break;
|
|
2015
2015
|
case fr: {
|
|
@@ -2017,7 +2017,7 @@ function zn(e, i) {
|
|
|
2017
2017
|
m.attributes.length > 0 && (b += " " + Hn(m.attributes).join(" ")), m.selfClosing && (b += " /"), b += ">", s.push(b);
|
|
2018
2018
|
break;
|
|
2019
2019
|
}
|
|
2020
|
-
case
|
|
2020
|
+
case Ft:
|
|
2021
2021
|
s.push(`</${m.tagName}>`);
|
|
2022
2022
|
break;
|
|
2023
2023
|
case Mr:
|
|
@@ -2048,7 +2048,7 @@ function Nn(e, i) {
|
|
|
2048
2048
|
type: Mr,
|
|
2049
2049
|
chars: p.toString()
|
|
2050
2050
|
}) : t.push({
|
|
2051
|
-
type:
|
|
2051
|
+
type: Vt,
|
|
2052
2052
|
rendered: i.render(p)
|
|
2053
2053
|
});
|
|
2054
2054
|
}
|
|
@@ -2058,7 +2058,7 @@ function jn(e, i, u, t) {
|
|
|
2058
2058
|
let s = 1;
|
|
2059
2059
|
for (; u < i.length && s > 0; ) {
|
|
2060
2060
|
let p = i[u];
|
|
2061
|
-
p.type === fr && p.tagName.toUpperCase() === e ? s++ : p.type ===
|
|
2061
|
+
p.type === fr && p.tagName.toUpperCase() === e ? s++ : p.type === Ft && p.tagName.toUpperCase() === e && s--, t.push(p), u++;
|
|
2062
2062
|
}
|
|
2063
2063
|
return t;
|
|
2064
2064
|
}
|
|
@@ -2073,14 +2073,14 @@ function In(e) {
|
|
|
2073
2073
|
function xr(e) {
|
|
2074
2074
|
return e.replace(/</g, "<").replace(/>/g, ">");
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function $t(e) {
|
|
2077
2077
|
return e.replace(/"/g, """);
|
|
2078
2078
|
}
|
|
2079
2079
|
function On(e) {
|
|
2080
2080
|
const i = [];
|
|
2081
2081
|
for (const u in e) {
|
|
2082
2082
|
const t = e[u] + "";
|
|
2083
|
-
i.push(`${u}="${
|
|
2083
|
+
i.push(`${u}="${$t(t)}"`);
|
|
2084
2084
|
}
|
|
2085
2085
|
return i.join(" ");
|
|
2086
2086
|
}
|
|
@@ -2088,7 +2088,7 @@ function Hn(e) {
|
|
|
2088
2088
|
const i = [];
|
|
2089
2089
|
for (let u = 0; u < e.length; u++) {
|
|
2090
2090
|
const t = e[u][0], s = e[u][1] + "";
|
|
2091
|
-
i.push(`${t}="${
|
|
2091
|
+
i.push(`${t}="${$t(s)}"`);
|
|
2092
2092
|
}
|
|
2093
2093
|
return i;
|
|
2094
2094
|
}
|
|
@@ -2123,7 +2123,7 @@ var he = je && je.__assign || function() {
|
|
|
2123
2123
|
}, he.apply(this, arguments);
|
|
2124
2124
|
};
|
|
2125
2125
|
Object.defineProperty(gr, "__esModule", { value: !0 });
|
|
2126
|
-
var _e = mr,
|
|
2126
|
+
var _e = mr, Gt = Xr, Zr = ge, Jr = he(he({}, _e.namedReferences), { all: _e.namedReferences.html5 }), Mn = {
|
|
2127
2127
|
specialChars: /[<>'"&]/g,
|
|
2128
2128
|
nonAscii: /(?:[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
|
|
2129
2129
|
nonAsciiPrintable: /(?:[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
|
|
@@ -2161,7 +2161,7 @@ gr.encode = Un;
|
|
|
2161
2161
|
var Bn = {
|
|
2162
2162
|
scope: "body",
|
|
2163
2163
|
level: "all"
|
|
2164
|
-
}, Cr = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g, Sr = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,
|
|
2164
|
+
}, Cr = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g, Sr = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g, vt = {
|
|
2165
2165
|
xml: {
|
|
2166
2166
|
strict: Cr,
|
|
2167
2167
|
attribute: Sr,
|
|
@@ -2177,7 +2177,7 @@ var Bn = {
|
|
|
2177
2177
|
attribute: Sr,
|
|
2178
2178
|
body: _e.bodyRegExps.html5
|
|
2179
2179
|
}
|
|
2180
|
-
}, Vn = he(he({},
|
|
2180
|
+
}, Vn = he(he({}, vt), { all: vt.html5 }), et = String.fromCharCode, Wt = et(65533), Fn = {
|
|
2181
2181
|
level: "all"
|
|
2182
2182
|
};
|
|
2183
2183
|
function $n(e, i) {
|
|
@@ -2192,7 +2192,7 @@ function $n(e, i) {
|
|
|
2192
2192
|
t = s;
|
|
2193
2193
|
else if (e[0] === "&" && e[1] === "#") {
|
|
2194
2194
|
var p = e[2], g = p == "x" || p == "X" ? parseInt(e.substr(3), 16) : parseInt(e.substr(2));
|
|
2195
|
-
t = g >= 1114111 ?
|
|
2195
|
+
t = g >= 1114111 ? Wt : g > 65535 ? Zr.fromCodePoint(g) : et(Gt.numericUnicodeMap[g] || g);
|
|
2196
2196
|
}
|
|
2197
2197
|
}
|
|
2198
2198
|
return t;
|
|
@@ -2221,7 +2221,7 @@ function Gn(e, i) {
|
|
|
2221
2221
|
R = O;
|
|
2222
2222
|
else if (C[0] === "&" && C[1] === "#") {
|
|
2223
2223
|
var M = C[2], N = M == "x" || M == "X" ? parseInt(C.substr(3), 16) : parseInt(C.substr(2));
|
|
2224
|
-
R = N >= 1114111 ?
|
|
2224
|
+
R = N >= 1114111 ? Wt : N > 65535 ? Zr.fromCodePoint(N) : et(Gt.numericUnicodeMap[N] || N);
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
w += R, D = E.index + C.length;
|
|
@@ -2231,7 +2231,7 @@ function Gn(e, i) {
|
|
|
2231
2231
|
w = e;
|
|
2232
2232
|
return w;
|
|
2233
2233
|
}
|
|
2234
|
-
var
|
|
2234
|
+
var Kt = gr.decode = Gn;
|
|
2235
2235
|
const Wn = {
|
|
2236
2236
|
a: [
|
|
2237
2237
|
"class",
|
|
@@ -2330,7 +2330,7 @@ const Wn = {
|
|
|
2330
2330
|
], Xn = [
|
|
2331
2331
|
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css",
|
|
2332
2332
|
`https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/${Kn}.min.css`
|
|
2333
|
-
],
|
|
2333
|
+
], wt = "PRE", Zn = "CODE", Jn = [
|
|
2334
2334
|
"javascript",
|
|
2335
2335
|
"html",
|
|
2336
2336
|
"css",
|
|
@@ -2340,7 +2340,7 @@ const Wn = {
|
|
|
2340
2340
|
"php",
|
|
2341
2341
|
"typescript"
|
|
2342
2342
|
];
|
|
2343
|
-
var
|
|
2343
|
+
var Qt = { exports: {} };
|
|
2344
2344
|
(function(e) {
|
|
2345
2345
|
(function() {
|
|
2346
2346
|
function i(r) {
|
|
@@ -5011,9 +5011,9 @@ var Kt = { exports: {} };
|
|
|
5011
5011
|
var N = this;
|
|
5012
5012
|
e.exports ? e.exports = t : N.showdown = t;
|
|
5013
5013
|
}).call(je);
|
|
5014
|
-
})(
|
|
5015
|
-
var ei =
|
|
5016
|
-
const Pe = /* @__PURE__ */ Ur(ei), rt = /@(\d*|channel|editors):\((.*?)\)/,
|
|
5014
|
+
})(Qt);
|
|
5015
|
+
var ei = Qt.exports;
|
|
5016
|
+
const Pe = /* @__PURE__ */ Ur(ei), rt = /@(\d*|channel|editors):\((.*?)\)/, Yt = ["channel", "editors"], ri = new RegExp(rt, "i"), ti = new RegExp(rt, "gi");
|
|
5017
5017
|
let ie;
|
|
5018
5018
|
const Lr = {
|
|
5019
5019
|
color: {
|
|
@@ -5028,7 +5028,7 @@ const Lr = {
|
|
|
5028
5028
|
regex: ti,
|
|
5029
5029
|
replace: (e) => {
|
|
5030
5030
|
const i = e.match(ri), u = i && i.length > 1 && i[1], t = i && i.length > 2 && i[2];
|
|
5031
|
-
return
|
|
5031
|
+
return Yt.find(
|
|
5032
5032
|
(s) => s.toLowerCase() === String(u).toLowerCase()
|
|
5033
5033
|
) ? `<a class="mention extraMention" data-user-id="${u}">@${t}</a>` : `<a class="mention" data-user-id="${u}">@${t}</a>`;
|
|
5034
5034
|
}
|
|
@@ -5050,9 +5050,9 @@ function ai() {
|
|
|
5050
5050
|
const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
5051
5051
|
/<user-mentio[^>]*data-user-id=["']([^"]+)["'][^>]*>(?:@|(?:@))(.+?)<\/user-mentio>/,
|
|
5052
5052
|
"gi"
|
|
5053
|
-
),
|
|
5053
|
+
), yt = (e, i, u) => Yt.find(
|
|
5054
5054
|
(t) => t.toLowerCase() === String(i).toLowerCase()
|
|
5055
|
-
) ? `<a class="mention extraMention" data-user-id="${i}">@${u}</a>` : `<a class="mention" data-user-id="${i}">@${u}</a>`, si = (e = "") => e.replace(ii,
|
|
5055
|
+
) ? `<a class="mention extraMention" data-user-id="${i}">@${u}</a>` : `<a class="mention" data-user-id="${i}">@${u}</a>`, si = (e = "") => e.replace(ii, yt).replace(ui, yt), di = (e = "") => Pr(e, {
|
|
5056
5056
|
whiteList: Wn,
|
|
5057
5057
|
css: {
|
|
5058
5058
|
whiteList: {
|
|
@@ -5096,7 +5096,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5096
5096
|
}
|
|
5097
5097
|
}, li = (e = "", i = "html") => {
|
|
5098
5098
|
let u = da(e);
|
|
5099
|
-
return u = oa(u), i === "markdown" ? u = ni.makeHtml(u) : u = si(u), u =
|
|
5099
|
+
return u = oa(u), i === "markdown" ? u = ni.makeHtml(u) : u = si(u), u = Kt(u), u = ci(u), u;
|
|
5100
5100
|
}, fi = () => {
|
|
5101
5101
|
const e = "ibmMonoOnDemand";
|
|
5102
5102
|
if (!document.getElementById(e)) {
|
|
@@ -5105,7 +5105,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5105
5105
|
document.createTextNode(`@import url(${Qn});`)
|
|
5106
5106
|
), document.head.appendChild(i);
|
|
5107
5107
|
}
|
|
5108
|
-
},
|
|
5108
|
+
}, _t = (e = "") => (
|
|
5109
5109
|
// eslint-disable-next-line no-control-regex
|
|
5110
5110
|
e.replace(/[^\u0000-\u007E]/g, "")
|
|
5111
5111
|
), pi = (e = "") => {
|
|
@@ -5128,7 +5128,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5128
5128
|
inheritBrandingStyles: m = !1,
|
|
5129
5129
|
addColorBlocks: b = !1
|
|
5130
5130
|
}) => {
|
|
5131
|
-
const S =
|
|
5131
|
+
const S = Jt(null), [q, E] = ea([]), w = ra(() => {
|
|
5132
5132
|
var C;
|
|
5133
5133
|
try {
|
|
5134
5134
|
const { hash: R } = window.location;
|
|
@@ -5146,7 +5146,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5146
5146
|
} catch {
|
|
5147
5147
|
}
|
|
5148
5148
|
}, [p]);
|
|
5149
|
-
|
|
5149
|
+
ta(() => {
|
|
5150
5150
|
if (!S.current)
|
|
5151
5151
|
return;
|
|
5152
5152
|
const C = () => {
|
|
@@ -5155,7 +5155,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5155
5155
|
const N = S.current.querySelectorAll("h1, h2, h3, h4, h5, h6") || [];
|
|
5156
5156
|
N.length > 0 && N.forEach((r) => {
|
|
5157
5157
|
const { textContent: n = "" } = r;
|
|
5158
|
-
(n || "").length > 0 && (r.id = r.id ||
|
|
5158
|
+
(n || "").length > 0 && (r.id = r.id || _t(
|
|
5159
5159
|
(n || "").toLowerCase().replace(/\s/g, "-")
|
|
5160
5160
|
));
|
|
5161
5161
|
}), E((r) => [...r, ...N]);
|
|
@@ -5179,14 +5179,14 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5179
5179
|
if (!S.current)
|
|
5180
5180
|
return;
|
|
5181
5181
|
const N = S.current.querySelectorAll(
|
|
5182
|
-
|
|
5182
|
+
wt
|
|
5183
5183
|
);
|
|
5184
5184
|
N.length > 0 && (_r.isDefined("highlightjs") || (fi(), _r([...Yn, ...Xn], "highlightjs")), _r.ready("highlightjs", () => {
|
|
5185
5185
|
window.hljs.configure({
|
|
5186
5186
|
languages: Jn,
|
|
5187
5187
|
useBr: !0
|
|
5188
5188
|
}), N.forEach((r) => {
|
|
5189
|
-
const n = r.innerText, a = document.createElement(Zn), d =
|
|
5189
|
+
const n = r.innerText, a = document.createElement(Zn), d = Kt(n);
|
|
5190
5190
|
a.textContent = d, r.innerHTML = "", r.appendChild(a), window.hljs.highlightBlock(r);
|
|
5191
5191
|
}), E((r) => [...r, ...N]);
|
|
5192
5192
|
}));
|
|
@@ -5205,12 +5205,12 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5205
5205
|
s,
|
|
5206
5206
|
w
|
|
5207
5207
|
]);
|
|
5208
|
-
const D =
|
|
5208
|
+
const D = aa(() => {
|
|
5209
5209
|
const C = i && typeof i == "string" ? i.toLowerCase() : "html";
|
|
5210
5210
|
let R = C === "text" ? `<p>${e}</p>` : li(e, C);
|
|
5211
5211
|
return b && (R = oi(R)), R = pi(R), di(R);
|
|
5212
5212
|
}, [e, i, b]);
|
|
5213
|
-
return /* @__PURE__ */
|
|
5213
|
+
return /* @__PURE__ */ Xt(Zt, { children: [
|
|
5214
5214
|
/* @__PURE__ */ yr(
|
|
5215
5215
|
gi,
|
|
5216
5216
|
{
|
|
@@ -5226,13 +5226,13 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5226
5226
|
),
|
|
5227
5227
|
q.map((C) => {
|
|
5228
5228
|
let R = C.textContent || "";
|
|
5229
|
-
return C.tagName !==
|
|
5229
|
+
return C.tagName !== wt && (R = `${window.location.href.split("#")[0]}#${C.id}`), R = _t(R), na.createPortal(
|
|
5230
5230
|
/* @__PURE__ */ yr(hi, { className: "content-copy-btn", children: /* @__PURE__ */ yr(ia, { clipboardContent: R }) }),
|
|
5231
5231
|
C
|
|
5232
5232
|
);
|
|
5233
5233
|
})
|
|
5234
5234
|
] });
|
|
5235
|
-
}, hi =
|
|
5235
|
+
}, hi = kt.div`
|
|
5236
5236
|
display: inline-flex;
|
|
5237
5237
|
margin-left: var(--space-xs);
|
|
5238
5238
|
button {
|
|
@@ -5250,7 +5250,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5250
5250
|
font-size: 12px;
|
|
5251
5251
|
line-height: 16px;
|
|
5252
5252
|
}
|
|
5253
|
-
`, gi =
|
|
5253
|
+
`, gi = kt(ua).attrs({ as: "div" })`
|
|
5254
5254
|
${({ createAnchors: e }) => e ? `
|
|
5255
5255
|
h1, h2, h3, h4, h5, h6 {
|
|
5256
5256
|
display: flex;
|
|
@@ -5322,7 +5322,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5322
5322
|
border-radius: var(--radii-md);
|
|
5323
5323
|
background-color: var(--color-yellow50);
|
|
5324
5324
|
border: 1px solid var(--color-yellow50);
|
|
5325
|
-
color: var(--color-primary-text-on-light)
|
|
5325
|
+
color: var(--color-primary-text-on-light);
|
|
5326
5326
|
font-weight: 400;
|
|
5327
5327
|
|
|
5328
5328
|
&:hover {
|
|
@@ -5343,7 +5343,64 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5343
5343
|
border-radius: var(--radius-md);
|
|
5344
5344
|
border: 1px solid var(--color-gray100);
|
|
5345
5345
|
}
|
|
5346
|
-
|
|
5346
|
+
|
|
5347
|
+
// NOTE - most of these table colors should have opacity so that they work well with colored backgrounds
|
|
5348
|
+
table {
|
|
5349
|
+
width: 100%;
|
|
5350
|
+
margin: var(--space-md) 0;
|
|
5351
|
+
text-align: left;
|
|
5352
|
+
border-collapse: collapse;
|
|
5353
|
+
thead th {
|
|
5354
|
+
background: rgba(0, 0, 0, 0.1);
|
|
5355
|
+
}
|
|
5356
|
+
th,
|
|
5357
|
+
td {
|
|
5358
|
+
padding: 0.5em;
|
|
5359
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
5360
|
+
&.fr-selected-cell {
|
|
5361
|
+
border: 1px double var(--color-active-primary);
|
|
5362
|
+
}
|
|
5363
|
+
&.cell-bold {
|
|
5364
|
+
font-weight: bold;
|
|
5365
|
+
li {
|
|
5366
|
+
font-weight: bold !important;
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
&.cell-disable-break-word {
|
|
5370
|
+
// v2-widgets apply word-break: break-word, this allows users to override it
|
|
5371
|
+
word-break: normal;
|
|
5372
|
+
}
|
|
5373
|
+
}
|
|
5374
|
+
&.padded-1 {
|
|
5375
|
+
th,
|
|
5376
|
+
td {
|
|
5377
|
+
padding: 1em;
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
&.padded-2 {
|
|
5381
|
+
th,
|
|
5382
|
+
td {
|
|
5383
|
+
padding: 2em;
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
&.no-borders {
|
|
5387
|
+
th:not(.fr-selected-cell),
|
|
5388
|
+
td:not(.fr-selected-cell) {
|
|
5389
|
+
// keeping a transparent border so that selection doesn't push things by 1 pixel
|
|
5390
|
+
border: 1px dashed transparent;
|
|
5391
|
+
}
|
|
5392
|
+
}
|
|
5393
|
+
&.alternating-rows {
|
|
5394
|
+
tr:nth-child(odd) {
|
|
5395
|
+
background: rgba(255, 255, 255, 0.05);
|
|
5396
|
+
}
|
|
5397
|
+
tr:nth-child(even) {
|
|
5398
|
+
background: rgba(0, 0, 0, 0.05);
|
|
5399
|
+
}
|
|
5400
|
+
}
|
|
5401
|
+
}
|
|
5402
|
+
|
|
5403
|
+
${({ widgetType: e, inheritBrandingStyles: i }) => e === "page" ? "" : nt`
|
|
5347
5404
|
* {
|
|
5348
5405
|
font-family: ${sa};
|
|
5349
5406
|
}
|
|
@@ -5498,45 +5555,6 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5498
5555
|
height: 0px;
|
|
5499
5556
|
border-width: 1px 0 0 0;
|
|
5500
5557
|
}
|
|
5501
|
-
table {
|
|
5502
|
-
width: 100%;
|
|
5503
|
-
margin: 15px 0;
|
|
5504
|
-
text-align: left;
|
|
5505
|
-
thead th {
|
|
5506
|
-
background: var(--color-surface);
|
|
5507
|
-
}
|
|
5508
|
-
th,
|
|
5509
|
-
td {
|
|
5510
|
-
border-width: 1px;
|
|
5511
|
-
border-style: solid;
|
|
5512
|
-
border-color: var(--color-divider);
|
|
5513
|
-
padding: 0.5em;
|
|
5514
|
-
}
|
|
5515
|
-
tr:nth-child(even) {
|
|
5516
|
-
background: var(--color-surface-darken);
|
|
5517
|
-
}
|
|
5518
|
-
tr:nth-child(odd) {
|
|
5519
|
-
background: var(--color-surface);
|
|
5520
|
-
}
|
|
5521
|
-
}
|
|
5522
|
-
table.no-borders {
|
|
5523
|
-
th,
|
|
5524
|
-
td {
|
|
5525
|
-
border: none;
|
|
5526
|
-
}
|
|
5527
|
-
}
|
|
5528
|
-
table.padded-2 {
|
|
5529
|
-
th,
|
|
5530
|
-
td {
|
|
5531
|
-
padding: 2em;
|
|
5532
|
-
}
|
|
5533
|
-
}
|
|
5534
|
-
table.padded-1 {
|
|
5535
|
-
th,
|
|
5536
|
-
td {
|
|
5537
|
-
padding: 1em;
|
|
5538
|
-
}
|
|
5539
|
-
}
|
|
5540
5558
|
img {
|
|
5541
5559
|
max-width: 100%;
|
|
5542
5560
|
margin: var(--space-md) 0;
|
|
@@ -5560,7 +5578,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5560
5578
|
}
|
|
5561
5579
|
`}
|
|
5562
5580
|
|
|
5563
|
-
${({ widgetType: e, inheritBrandingStyles: i }) => e === "article" &&
|
|
5581
|
+
${({ widgetType: e, inheritBrandingStyles: i }) => e === "article" && nt`
|
|
5564
5582
|
h1 {
|
|
5565
5583
|
font-family: ${i ? "var(--channels-h1-font-family, revert)" : "revert"};
|
|
5566
5584
|
& * {
|
|
@@ -5632,44 +5650,12 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5632
5650
|
}
|
|
5633
5651
|
|
|
5634
5652
|
table {
|
|
5635
|
-
width: 100% !important;
|
|
5636
|
-
margin: var(--space-md) 0;
|
|
5637
5653
|
font-size: var(--font-size-subtitle-sm) !important;
|
|
5638
5654
|
text-align: left;
|
|
5639
|
-
border-collapse: collapse;
|
|
5640
|
-
border-spacing: 0;
|
|
5641
|
-
|
|
5642
|
-
thead th {
|
|
5643
|
-
background: var(--color-surface);
|
|
5644
|
-
}
|
|
5645
5655
|
th,
|
|
5646
5656
|
td {
|
|
5647
|
-
border-width: 1px;
|
|
5648
|
-
border-style: solid;
|
|
5649
|
-
border-color: var(--color-divider);
|
|
5650
|
-
padding: var(--space-sm);
|
|
5651
5657
|
word-wrap: break-word;
|
|
5652
5658
|
}
|
|
5653
|
-
tr:nth-child(odd) {
|
|
5654
|
-
background: var(--color-divider-lighten);
|
|
5655
|
-
}
|
|
5656
|
-
tr:nth-child(even) {
|
|
5657
|
-
background: var(--color-surface);
|
|
5658
|
-
}
|
|
5659
|
-
}
|
|
5660
|
-
|
|
5661
|
-
table.no-borders {
|
|
5662
|
-
th,
|
|
5663
|
-
td {
|
|
5664
|
-
border: none;
|
|
5665
|
-
}
|
|
5666
|
-
|
|
5667
|
-
tr:nth-child(odd) {
|
|
5668
|
-
background: var(--color-surface-darken);
|
|
5669
|
-
}
|
|
5670
|
-
tr:nth-child(even) {
|
|
5671
|
-
background: var(--color-surface);
|
|
5672
|
-
}
|
|
5673
5659
|
}
|
|
5674
5660
|
|
|
5675
5661
|
img,
|