@happeouikit/content-renderer 3.2.6 → 3.2.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/index.cjs.js +74 -88
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +198 -202
- 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,18 +2231,28 @@ 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",
|
|
2238
2238
|
"target",
|
|
2239
2239
|
"href",
|
|
2240
2240
|
"title",
|
|
2241
|
-
"data-collection-id",
|
|
2242
|
-
"data-page-id",
|
|
2243
2241
|
"rel",
|
|
2244
2242
|
"data-user-id",
|
|
2245
|
-
"data-user-id-old"
|
|
2243
|
+
"data-user-id-old",
|
|
2244
|
+
"data-collection-id",
|
|
2245
|
+
"data-page-id",
|
|
2246
|
+
"data-link-id",
|
|
2247
|
+
"data-mime-type",
|
|
2248
|
+
"data-source",
|
|
2249
|
+
"data-hashtag",
|
|
2250
|
+
"data-channel-id",
|
|
2251
|
+
"data-post-id",
|
|
2252
|
+
"data-page-group-id",
|
|
2253
|
+
"data-document-id",
|
|
2254
|
+
"data-document-type",
|
|
2255
|
+
"data-link-chip"
|
|
2246
2256
|
],
|
|
2247
2257
|
abbr: ["title"],
|
|
2248
2258
|
address: [],
|
|
@@ -2330,7 +2340,7 @@ const Wn = {
|
|
|
2330
2340
|
], Xn = [
|
|
2331
2341
|
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css",
|
|
2332
2342
|
`https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/${Kn}.min.css`
|
|
2333
|
-
],
|
|
2343
|
+
], wt = "PRE", Zn = "CODE", Jn = [
|
|
2334
2344
|
"javascript",
|
|
2335
2345
|
"html",
|
|
2336
2346
|
"css",
|
|
@@ -2340,7 +2350,7 @@ const Wn = {
|
|
|
2340
2350
|
"php",
|
|
2341
2351
|
"typescript"
|
|
2342
2352
|
];
|
|
2343
|
-
var
|
|
2353
|
+
var Qt = { exports: {} };
|
|
2344
2354
|
(function(e) {
|
|
2345
2355
|
(function() {
|
|
2346
2356
|
function i(r) {
|
|
@@ -5011,9 +5021,9 @@ var Kt = { exports: {} };
|
|
|
5011
5021
|
var N = this;
|
|
5012
5022
|
e.exports ? e.exports = t : N.showdown = t;
|
|
5013
5023
|
}).call(je);
|
|
5014
|
-
})(
|
|
5015
|
-
var ei =
|
|
5016
|
-
const Pe = /* @__PURE__ */ Ur(ei), rt = /@(\d*|channel|editors):\((.*?)\)/,
|
|
5024
|
+
})(Qt);
|
|
5025
|
+
var ei = Qt.exports;
|
|
5026
|
+
const Pe = /* @__PURE__ */ Ur(ei), rt = /@(\d*|channel|editors):\((.*?)\)/, Yt = ["channel", "editors"], ri = new RegExp(rt, "i"), ti = new RegExp(rt, "gi");
|
|
5017
5027
|
let ie;
|
|
5018
5028
|
const Lr = {
|
|
5019
5029
|
color: {
|
|
@@ -5028,7 +5038,7 @@ const Lr = {
|
|
|
5028
5038
|
regex: ti,
|
|
5029
5039
|
replace: (e) => {
|
|
5030
5040
|
const i = e.match(ri), u = i && i.length > 1 && i[1], t = i && i.length > 2 && i[2];
|
|
5031
|
-
return
|
|
5041
|
+
return Yt.find(
|
|
5032
5042
|
(s) => s.toLowerCase() === String(u).toLowerCase()
|
|
5033
5043
|
) ? `<a class="mention extraMention" data-user-id="${u}">@${t}</a>` : `<a class="mention" data-user-id="${u}">@${t}</a>`;
|
|
5034
5044
|
}
|
|
@@ -5050,9 +5060,9 @@ function ai() {
|
|
|
5050
5060
|
const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
5051
5061
|
/<user-mentio[^>]*data-user-id=["']([^"]+)["'][^>]*>(?:@|(?:@))(.+?)<\/user-mentio>/,
|
|
5052
5062
|
"gi"
|
|
5053
|
-
),
|
|
5063
|
+
), yt = (e, i, u) => Yt.find(
|
|
5054
5064
|
(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,
|
|
5065
|
+
) ? `<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
5066
|
whiteList: Wn,
|
|
5057
5067
|
css: {
|
|
5058
5068
|
whiteList: {
|
|
@@ -5096,7 +5106,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5096
5106
|
}
|
|
5097
5107
|
}, li = (e = "", i = "html") => {
|
|
5098
5108
|
let u = da(e);
|
|
5099
|
-
return u = oa(u), i === "markdown" ? u = ni.makeHtml(u) : u = si(u), u =
|
|
5109
|
+
return u = oa(u), i === "markdown" ? u = ni.makeHtml(u) : u = si(u), u = Kt(u), u = ci(u), u;
|
|
5100
5110
|
}, fi = () => {
|
|
5101
5111
|
const e = "ibmMonoOnDemand";
|
|
5102
5112
|
if (!document.getElementById(e)) {
|
|
@@ -5105,7 +5115,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5105
5115
|
document.createTextNode(`@import url(${Qn});`)
|
|
5106
5116
|
), document.head.appendChild(i);
|
|
5107
5117
|
}
|
|
5108
|
-
},
|
|
5118
|
+
}, _t = (e = "") => (
|
|
5109
5119
|
// eslint-disable-next-line no-control-regex
|
|
5110
5120
|
e.replace(/[^\u0000-\u007E]/g, "")
|
|
5111
5121
|
), pi = (e = "") => {
|
|
@@ -5128,7 +5138,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5128
5138
|
inheritBrandingStyles: m = !1,
|
|
5129
5139
|
addColorBlocks: b = !1
|
|
5130
5140
|
}) => {
|
|
5131
|
-
const S =
|
|
5141
|
+
const S = Jt(null), [q, E] = ea([]), w = ra(() => {
|
|
5132
5142
|
var C;
|
|
5133
5143
|
try {
|
|
5134
5144
|
const { hash: R } = window.location;
|
|
@@ -5146,7 +5156,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5146
5156
|
} catch {
|
|
5147
5157
|
}
|
|
5148
5158
|
}, [p]);
|
|
5149
|
-
|
|
5159
|
+
ta(() => {
|
|
5150
5160
|
if (!S.current)
|
|
5151
5161
|
return;
|
|
5152
5162
|
const C = () => {
|
|
@@ -5155,7 +5165,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5155
5165
|
const N = S.current.querySelectorAll("h1, h2, h3, h4, h5, h6") || [];
|
|
5156
5166
|
N.length > 0 && N.forEach((r) => {
|
|
5157
5167
|
const { textContent: n = "" } = r;
|
|
5158
|
-
(n || "").length > 0 && (r.id = r.id ||
|
|
5168
|
+
(n || "").length > 0 && (r.id = r.id || _t(
|
|
5159
5169
|
(n || "").toLowerCase().replace(/\s/g, "-")
|
|
5160
5170
|
));
|
|
5161
5171
|
}), E((r) => [...r, ...N]);
|
|
@@ -5179,14 +5189,14 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5179
5189
|
if (!S.current)
|
|
5180
5190
|
return;
|
|
5181
5191
|
const N = S.current.querySelectorAll(
|
|
5182
|
-
|
|
5192
|
+
wt
|
|
5183
5193
|
);
|
|
5184
5194
|
N.length > 0 && (_r.isDefined("highlightjs") || (fi(), _r([...Yn, ...Xn], "highlightjs")), _r.ready("highlightjs", () => {
|
|
5185
5195
|
window.hljs.configure({
|
|
5186
5196
|
languages: Jn,
|
|
5187
5197
|
useBr: !0
|
|
5188
5198
|
}), N.forEach((r) => {
|
|
5189
|
-
const n = r.innerText, a = document.createElement(Zn), d =
|
|
5199
|
+
const n = r.innerText, a = document.createElement(Zn), d = Kt(n);
|
|
5190
5200
|
a.textContent = d, r.innerHTML = "", r.appendChild(a), window.hljs.highlightBlock(r);
|
|
5191
5201
|
}), E((r) => [...r, ...N]);
|
|
5192
5202
|
}));
|
|
@@ -5205,12 +5215,12 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5205
5215
|
s,
|
|
5206
5216
|
w
|
|
5207
5217
|
]);
|
|
5208
|
-
const D =
|
|
5218
|
+
const D = aa(() => {
|
|
5209
5219
|
const C = i && typeof i == "string" ? i.toLowerCase() : "html";
|
|
5210
5220
|
let R = C === "text" ? `<p>${e}</p>` : li(e, C);
|
|
5211
5221
|
return b && (R = oi(R)), R = pi(R), di(R);
|
|
5212
5222
|
}, [e, i, b]);
|
|
5213
|
-
return /* @__PURE__ */
|
|
5223
|
+
return /* @__PURE__ */ Xt(Zt, { children: [
|
|
5214
5224
|
/* @__PURE__ */ yr(
|
|
5215
5225
|
gi,
|
|
5216
5226
|
{
|
|
@@ -5226,15 +5236,17 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5226
5236
|
),
|
|
5227
5237
|
q.map((C) => {
|
|
5228
5238
|
let R = C.textContent || "";
|
|
5229
|
-
return C.tagName !==
|
|
5239
|
+
return C.tagName !== wt && (R = `${window.location.href.split("#")[0]}#${C.id}`), R = _t(R), na.createPortal(
|
|
5230
5240
|
/* @__PURE__ */ yr(hi, { className: "content-copy-btn", children: /* @__PURE__ */ yr(ia, { clipboardContent: R }) }),
|
|
5231
5241
|
C
|
|
5232
5242
|
);
|
|
5233
5243
|
})
|
|
5234
5244
|
] });
|
|
5235
|
-
}, hi =
|
|
5236
|
-
|
|
5245
|
+
}, hi = kt.div`
|
|
5246
|
+
position: relative;
|
|
5247
|
+
display: inline-block;
|
|
5237
5248
|
margin-left: var(--space-xs);
|
|
5249
|
+
bottom: 0.2em;
|
|
5238
5250
|
button {
|
|
5239
5251
|
opacity: 0;
|
|
5240
5252
|
transition-property: opacity;
|
|
@@ -5250,13 +5262,11 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5250
5262
|
font-size: 12px;
|
|
5251
5263
|
line-height: 16px;
|
|
5252
5264
|
}
|
|
5253
|
-
`, gi =
|
|
5265
|
+
`, gi = kt(ua).attrs({ as: "div" })`
|
|
5254
5266
|
${({ createAnchors: e }) => e ? `
|
|
5255
|
-
h1, h2, h3, h4, h5, h6 {
|
|
5256
|
-
display: flex;
|
|
5257
|
-
align-items: center;
|
|
5267
|
+
h1, h2, h3, h4, h5, h6 {
|
|
5258
5268
|
:hover button {
|
|
5259
|
-
opacity:
|
|
5269
|
+
opacity: 1;
|
|
5260
5270
|
}
|
|
5261
5271
|
}
|
|
5262
5272
|
` : ""}
|
|
@@ -5322,7 +5332,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5322
5332
|
border-radius: var(--radii-md);
|
|
5323
5333
|
background-color: var(--color-yellow50);
|
|
5324
5334
|
border: 1px solid var(--color-yellow50);
|
|
5325
|
-
color: var(--color-primary-text-on-light)
|
|
5335
|
+
color: var(--color-primary-text-on-light);
|
|
5326
5336
|
font-weight: 400;
|
|
5327
5337
|
|
|
5328
5338
|
&:hover {
|
|
@@ -5343,7 +5353,64 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5343
5353
|
border-radius: var(--radius-md);
|
|
5344
5354
|
border: 1px solid var(--color-gray100);
|
|
5345
5355
|
}
|
|
5346
|
-
|
|
5356
|
+
|
|
5357
|
+
// NOTE - most of these table colors should have opacity so that they work well with colored backgrounds
|
|
5358
|
+
table {
|
|
5359
|
+
width: 100%;
|
|
5360
|
+
margin: var(--space-md) 0;
|
|
5361
|
+
text-align: left;
|
|
5362
|
+
border-collapse: collapse;
|
|
5363
|
+
thead th {
|
|
5364
|
+
background: rgba(0, 0, 0, 0.1);
|
|
5365
|
+
}
|
|
5366
|
+
th,
|
|
5367
|
+
td {
|
|
5368
|
+
padding: 0.5em;
|
|
5369
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
5370
|
+
&.fr-selected-cell {
|
|
5371
|
+
border: 1px double var(--color-active-primary);
|
|
5372
|
+
}
|
|
5373
|
+
&.cell-bold {
|
|
5374
|
+
font-weight: bold;
|
|
5375
|
+
li {
|
|
5376
|
+
font-weight: bold !important;
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
&.cell-disable-break-word {
|
|
5380
|
+
// v2-widgets apply word-break: break-word, this allows users to override it
|
|
5381
|
+
word-break: normal;
|
|
5382
|
+
}
|
|
5383
|
+
}
|
|
5384
|
+
&.padded-1 {
|
|
5385
|
+
th,
|
|
5386
|
+
td {
|
|
5387
|
+
padding: 1em;
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
&.padded-2 {
|
|
5391
|
+
th,
|
|
5392
|
+
td {
|
|
5393
|
+
padding: 2em;
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
&.no-borders {
|
|
5397
|
+
th:not(.fr-selected-cell),
|
|
5398
|
+
td:not(.fr-selected-cell) {
|
|
5399
|
+
// keeping a transparent border so that selection doesn't push things by 1 pixel
|
|
5400
|
+
border: 1px dashed transparent;
|
|
5401
|
+
}
|
|
5402
|
+
}
|
|
5403
|
+
&.alternating-rows {
|
|
5404
|
+
tr:nth-child(odd) {
|
|
5405
|
+
background: rgba(255, 255, 255, 0.05);
|
|
5406
|
+
}
|
|
5407
|
+
tr:nth-child(even) {
|
|
5408
|
+
background: rgba(0, 0, 0, 0.05);
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
|
|
5413
|
+
${({ widgetType: e, inheritBrandingStyles: i }) => e === "page" ? "" : nt`
|
|
5347
5414
|
* {
|
|
5348
5415
|
font-family: ${sa};
|
|
5349
5416
|
}
|
|
@@ -5498,45 +5565,6 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5498
5565
|
height: 0px;
|
|
5499
5566
|
border-width: 1px 0 0 0;
|
|
5500
5567
|
}
|
|
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
5568
|
img {
|
|
5541
5569
|
max-width: 100%;
|
|
5542
5570
|
margin: var(--space-md) 0;
|
|
@@ -5560,7 +5588,7 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5560
5588
|
}
|
|
5561
5589
|
`}
|
|
5562
5590
|
|
|
5563
|
-
${({ widgetType: e, inheritBrandingStyles: i }) => e === "article" &&
|
|
5591
|
+
${({ widgetType: e, inheritBrandingStyles: i }) => e === "article" && nt`
|
|
5564
5592
|
h1 {
|
|
5565
5593
|
font-family: ${i ? "var(--channels-h1-font-family, revert)" : "revert"};
|
|
5566
5594
|
& * {
|
|
@@ -5632,44 +5660,12 @@ const ni = ai(), ii = new RegExp(rt, "gi"), ui = new RegExp(
|
|
|
5632
5660
|
}
|
|
5633
5661
|
|
|
5634
5662
|
table {
|
|
5635
|
-
width: 100% !important;
|
|
5636
|
-
margin: var(--space-md) 0;
|
|
5637
5663
|
font-size: var(--font-size-subtitle-sm) !important;
|
|
5638
5664
|
text-align: left;
|
|
5639
|
-
border-collapse: collapse;
|
|
5640
|
-
border-spacing: 0;
|
|
5641
|
-
|
|
5642
|
-
thead th {
|
|
5643
|
-
background: var(--color-surface);
|
|
5644
|
-
}
|
|
5645
5665
|
th,
|
|
5646
5666
|
td {
|
|
5647
|
-
border-width: 1px;
|
|
5648
|
-
border-style: solid;
|
|
5649
|
-
border-color: var(--color-divider);
|
|
5650
|
-
padding: var(--space-sm);
|
|
5651
5667
|
word-wrap: break-word;
|
|
5652
5668
|
}
|
|
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
5669
|
}
|
|
5674
5670
|
|
|
5675
5671
|
img,
|