@clevertask/scribe 0.0.3 → 0.0.4
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/{SlashCommandList-D_Ndw6pj.js → SlashCommandList-DLPd43Tg.js} +538 -538
- package/dist/assets/index.css +1 -0
- package/dist/{browser-D3_ToIiA.js → browser-Ce149ePN.js} +497 -508
- package/dist/components/Menu/BubbleMenu.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +482 -432
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts +1 -1
- package/dist/components/Scribe/extension/index.js +719 -783
- package/dist/components/Scribe/extension/math-extension.d.ts +2 -0
- package/dist/components/Scribe/extension/math-extension.js +11768 -0
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +3 -3
- package/dist/components/Scribe/extension/slashCommand/index.js +76 -75
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/index.js +3 -3
- package/dist/{index-ggVAwdRQ.js → index-Bl1eZGET.js} +520 -516
- package/dist/{index-CUP7vhu5.js → index-pCZujIH1.js} +2073 -1967
- package/dist/main.css +1 -1
- package/dist/{turndown.browser.es-CeowJDZ0.js → turndown.browser.es-BSoGafvq.js} +249 -253
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +43 -42
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.2.
|
|
1
|
+
/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
|
|
2
2
|
const {
|
|
3
|
-
entries:
|
|
3
|
+
entries: Lt,
|
|
4
4
|
setPrototypeOf: Tt,
|
|
5
5
|
isFrozen: sn,
|
|
6
6
|
getPrototypeOf: cn,
|
|
@@ -9,10 +9,10 @@ const {
|
|
|
9
9
|
let {
|
|
10
10
|
freeze: v,
|
|
11
11
|
seal: C,
|
|
12
|
-
create:
|
|
12
|
+
create: Dt
|
|
13
13
|
} = Object, {
|
|
14
|
-
apply:
|
|
15
|
-
construct:
|
|
14
|
+
apply: He,
|
|
15
|
+
construct: Be
|
|
16
16
|
} = typeof Reflect < "u" && Reflect;
|
|
17
17
|
v || (v = function(t) {
|
|
18
18
|
return t;
|
|
@@ -20,25 +20,26 @@ v || (v = function(t) {
|
|
|
20
20
|
C || (C = function(t) {
|
|
21
21
|
return t;
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
He || (He = function(t, r, i) {
|
|
24
24
|
return t.apply(r, i);
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
Be || (Be = function(t, r) {
|
|
27
27
|
return new t(...r);
|
|
28
28
|
});
|
|
29
|
-
const ue =
|
|
30
|
-
function
|
|
29
|
+
const ue = b(Array.prototype.forEach), un = b(Array.prototype.lastIndexOf), Et = b(Array.prototype.pop), Z = b(Array.prototype.push), mn = b(Array.prototype.splice), pe = b(String.prototype.toLowerCase), Ie = b(String.prototype.toString), At = b(String.prototype.match), Q = b(String.prototype.replace), pn = b(String.prototype.indexOf), dn = b(String.prototype.trim), I = b(Object.prototype.hasOwnProperty), O = b(RegExp.prototype.test), J = hn(TypeError);
|
|
30
|
+
function b(e) {
|
|
31
31
|
return function(t) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
t instanceof RegExp && (t.lastIndex = 0);
|
|
33
|
+
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
34
|
+
i[s - 1] = arguments[s];
|
|
35
|
+
return He(e, t, i);
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function hn(e) {
|
|
38
39
|
return function() {
|
|
39
40
|
for (var t = arguments.length, r = new Array(t), i = 0; i < t; i++)
|
|
40
41
|
r[i] = arguments[i];
|
|
41
|
-
return
|
|
42
|
+
return Be(e, r);
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
function f(e, t) {
|
|
@@ -46,24 +47,24 @@ function f(e, t) {
|
|
|
46
47
|
Tt && Tt(e, null);
|
|
47
48
|
let i = t.length;
|
|
48
49
|
for (; i--; ) {
|
|
49
|
-
let
|
|
50
|
-
if (typeof
|
|
51
|
-
const c = r(
|
|
52
|
-
c !==
|
|
50
|
+
let s = t[i];
|
|
51
|
+
if (typeof s == "string") {
|
|
52
|
+
const c = r(s);
|
|
53
|
+
c !== s && (sn(t) || (t[i] = c), s = c);
|
|
53
54
|
}
|
|
54
|
-
e[
|
|
55
|
+
e[s] = !0;
|
|
55
56
|
}
|
|
56
57
|
return e;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function gn(e) {
|
|
59
60
|
for (let t = 0; t < e.length; t++)
|
|
60
61
|
I(e, t) || (e[t] = null);
|
|
61
62
|
return e;
|
|
62
63
|
}
|
|
63
64
|
function U(e) {
|
|
64
|
-
const t =
|
|
65
|
-
for (const [r, i] of
|
|
66
|
-
I(e, r) && (Array.isArray(i) ? t[r] =
|
|
65
|
+
const t = Dt(null);
|
|
66
|
+
for (const [r, i] of Lt(e))
|
|
67
|
+
I(e, r) && (Array.isArray(i) ? t[r] = gn(i) : i && typeof i == "object" && i.constructor === Object ? t[r] = U(i) : t[r] = i);
|
|
67
68
|
return t;
|
|
68
69
|
}
|
|
69
70
|
function ee(e, t) {
|
|
@@ -71,9 +72,9 @@ function ee(e, t) {
|
|
|
71
72
|
const i = fn(e, t);
|
|
72
73
|
if (i) {
|
|
73
74
|
if (i.get)
|
|
74
|
-
return
|
|
75
|
+
return b(i.get);
|
|
75
76
|
if (typeof i.value == "function")
|
|
76
|
-
return
|
|
77
|
+
return b(i.value);
|
|
77
78
|
}
|
|
78
79
|
e = cn(e);
|
|
79
80
|
}
|
|
@@ -82,50 +83,41 @@ function ee(e, t) {
|
|
|
82
83
|
}
|
|
83
84
|
return r;
|
|
84
85
|
}
|
|
85
|
-
const _t = v(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]),
|
|
86
|
+
const _t = v(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Me = v(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), we = v(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Tn = v(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ke = v(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), En = v(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), St = v(["#text"]), Rt = v(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), xe = v(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), yt = v(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), me = v(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), An = C(/\{\{[\w\W]*|[\w\W]*\}\}/gm), _n = C(/<%[\w\W]*|[\w\W]*%>/gm), Sn = C(/\$\{[\w\W]*/gm), Rn = C(/^data-[\-\w.\u00B7-\uFFFF]+$/), yn = C(/^aria-[\-\w]+$/), Ct = C(
|
|
86
87
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
87
88
|
// eslint-disable-line no-useless-escape
|
|
88
|
-
),
|
|
89
|
+
), Nn = C(/^(?:\w+script|data):/i), On = C(
|
|
89
90
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
90
91
|
// eslint-disable-line no-control-regex
|
|
91
|
-
), It = C(/^html$/i),
|
|
92
|
+
), It = C(/^html$/i), vn = C(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
92
93
|
var Nt = /* @__PURE__ */ Object.freeze({
|
|
93
94
|
__proto__: null,
|
|
94
|
-
ARIA_ATTR:
|
|
95
|
-
ATTR_WHITESPACE:
|
|
96
|
-
CUSTOM_ELEMENT:
|
|
97
|
-
DATA_ATTR:
|
|
95
|
+
ARIA_ATTR: yn,
|
|
96
|
+
ATTR_WHITESPACE: On,
|
|
97
|
+
CUSTOM_ELEMENT: vn,
|
|
98
|
+
DATA_ATTR: Rn,
|
|
98
99
|
DOCTYPE_NAME: It,
|
|
99
|
-
ERB_EXPR:
|
|
100
|
+
ERB_EXPR: _n,
|
|
100
101
|
IS_ALLOWED_URI: Ct,
|
|
101
|
-
IS_SCRIPT_OR_DATA:
|
|
102
|
-
MUSTACHE_EXPR:
|
|
103
|
-
TMPLIT_EXPR:
|
|
102
|
+
IS_SCRIPT_OR_DATA: Nn,
|
|
103
|
+
MUSTACHE_EXPR: An,
|
|
104
|
+
TMPLIT_EXPR: Sn
|
|
104
105
|
});
|
|
105
106
|
const te = {
|
|
106
107
|
element: 1,
|
|
107
|
-
attribute: 2,
|
|
108
108
|
text: 3,
|
|
109
|
-
cdataSection: 4,
|
|
110
|
-
entityReference: 5,
|
|
111
|
-
// Deprecated
|
|
112
|
-
entityNode: 6,
|
|
113
109
|
// Deprecated
|
|
114
110
|
progressingInstruction: 7,
|
|
115
111
|
comment: 8,
|
|
116
|
-
document: 9
|
|
117
|
-
|
|
118
|
-
documentFragment: 11,
|
|
119
|
-
notation: 12
|
|
120
|
-
// Deprecated
|
|
121
|
-
}, vn = function() {
|
|
112
|
+
document: 9
|
|
113
|
+
}, bn = function() {
|
|
122
114
|
return typeof window > "u" ? null : window;
|
|
123
|
-
},
|
|
115
|
+
}, Ln = function(t, r) {
|
|
124
116
|
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
125
117
|
return null;
|
|
126
118
|
let i = null;
|
|
127
|
-
const
|
|
128
|
-
r && r.hasAttribute(
|
|
119
|
+
const s = "data-tt-policy-suffix";
|
|
120
|
+
r && r.hasAttribute(s) && (i = r.getAttribute(s));
|
|
129
121
|
const c = "dompurify" + (i ? "#" + i : "");
|
|
130
122
|
try {
|
|
131
123
|
return t.createPolicy(c, {
|
|
@@ -139,7 +131,7 @@ const te = {
|
|
|
139
131
|
} catch {
|
|
140
132
|
return console.warn("TrustedTypes policy " + c + " could not be created."), null;
|
|
141
133
|
}
|
|
142
|
-
},
|
|
134
|
+
}, Ot = function() {
|
|
143
135
|
return {
|
|
144
136
|
afterSanitizeAttributes: [],
|
|
145
137
|
afterSanitizeElements: [],
|
|
@@ -153,17 +145,17 @@ const te = {
|
|
|
153
145
|
};
|
|
154
146
|
};
|
|
155
147
|
function Mt() {
|
|
156
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
157
|
-
const t = (
|
|
158
|
-
if (t.version = "3.2.
|
|
148
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : bn();
|
|
149
|
+
const t = (l) => Mt(l);
|
|
150
|
+
if (t.version = "3.2.5", t.removed = [], !e || !e.document || e.document.nodeType !== te.document || !e.Element)
|
|
159
151
|
return t.isSupported = !1, t;
|
|
160
152
|
let {
|
|
161
153
|
document: r
|
|
162
154
|
} = e;
|
|
163
|
-
const i = r,
|
|
155
|
+
const i = r, s = i.currentScript, {
|
|
164
156
|
DocumentFragment: c,
|
|
165
157
|
HTMLTemplateElement: p,
|
|
166
|
-
Node:
|
|
158
|
+
Node: L,
|
|
167
159
|
Element: m,
|
|
168
160
|
NodeFilter: S,
|
|
169
161
|
NamedNodeMap: F = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
@@ -172,8 +164,8 @@ function Mt() {
|
|
|
172
164
|
trustedTypes: ne
|
|
173
165
|
} = e, $ = m.prototype, zt = ee($, "cloneNode"), Wt = ee($, "remove"), Gt = ee($, "nextSibling"), Yt = ee($, "childNodes"), re = ee($, "parentNode");
|
|
174
166
|
if (typeof p == "function") {
|
|
175
|
-
const
|
|
176
|
-
|
|
167
|
+
const l = r.createElement("template");
|
|
168
|
+
l.content && l.content.ownerDocument && (r = l.content.ownerDocument);
|
|
177
169
|
}
|
|
178
170
|
let R, V = "";
|
|
179
171
|
const {
|
|
@@ -184,8 +176,8 @@ function Mt() {
|
|
|
184
176
|
} = r, {
|
|
185
177
|
importNode: jt
|
|
186
178
|
} = i;
|
|
187
|
-
let
|
|
188
|
-
t.isSupported = typeof
|
|
179
|
+
let y = Ot();
|
|
180
|
+
t.isSupported = typeof Lt == "function" && typeof re == "function" && ge && ge.createHTMLDocument !== void 0;
|
|
189
181
|
const {
|
|
190
182
|
MUSTACHE_EXPR: Te,
|
|
191
183
|
ERB_EXPR: Ee,
|
|
@@ -193,16 +185,16 @@ function Mt() {
|
|
|
193
185
|
DATA_ATTR: Kt,
|
|
194
186
|
ARIA_ATTR: qt,
|
|
195
187
|
IS_SCRIPT_OR_DATA: Zt,
|
|
196
|
-
ATTR_WHITESPACE:
|
|
188
|
+
ATTR_WHITESPACE: Ve,
|
|
197
189
|
CUSTOM_ELEMENT: Qt
|
|
198
190
|
} = Nt;
|
|
199
191
|
let {
|
|
200
|
-
IS_ALLOWED_URI:
|
|
192
|
+
IS_ALLOWED_URI: Xe
|
|
201
193
|
} = Nt, h = null;
|
|
202
|
-
const
|
|
194
|
+
const je = f({}, [..._t, ...Me, ...we, ...ke, ...St]);
|
|
203
195
|
let T = null;
|
|
204
|
-
const
|
|
205
|
-
let d = Object.seal(
|
|
196
|
+
const Ke = f({}, [...Rt, ...xe, ...yt, ...me]);
|
|
197
|
+
let d = Object.seal(Dt(null, {
|
|
206
198
|
tagNameCheck: {
|
|
207
199
|
writable: !0,
|
|
208
200
|
configurable: !1,
|
|
@@ -221,45 +213,45 @@ function Mt() {
|
|
|
221
213
|
enumerable: !0,
|
|
222
214
|
value: !1
|
|
223
215
|
}
|
|
224
|
-
})), X = null, _e = null,
|
|
216
|
+
})), X = null, _e = null, qe = !0, Se = !0, Ze = !1, Qe = !0, H = !1, Re = !0, P = !1, ye = !1, Ne = !1, B = !1, ie = !1, ae = !1, Je = !0, et = !1;
|
|
225
217
|
const Jt = "user-content-";
|
|
226
|
-
let
|
|
227
|
-
const
|
|
228
|
-
let
|
|
229
|
-
const
|
|
230
|
-
let
|
|
231
|
-
const
|
|
232
|
-
let G = k, be = !1,
|
|
233
|
-
const en = f({}, [oe, le, k],
|
|
218
|
+
let Oe = !0, j = !1, z = {}, W = null;
|
|
219
|
+
const tt = f({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
220
|
+
let nt = null;
|
|
221
|
+
const rt = f({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
222
|
+
let ve = null;
|
|
223
|
+
const it = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), oe = "http://www.w3.org/1998/Math/MathML", le = "http://www.w3.org/2000/svg", k = "http://www.w3.org/1999/xhtml";
|
|
224
|
+
let G = k, be = !1, Le = null;
|
|
225
|
+
const en = f({}, [oe, le, k], Ie);
|
|
234
226
|
let se = f({}, ["mi", "mo", "mn", "ms", "mtext"]), ce = f({}, ["annotation-xml"]);
|
|
235
227
|
const tn = f({}, ["title", "style", "font", "a", "script"]);
|
|
236
228
|
let K = null;
|
|
237
229
|
const nn = ["application/xhtml+xml", "text/html"], rn = "text/html";
|
|
238
230
|
let g = null, Y = null;
|
|
239
|
-
const an = r.createElement("form"),
|
|
231
|
+
const an = r.createElement("form"), at = function(n) {
|
|
240
232
|
return n instanceof RegExp || n instanceof Function;
|
|
241
|
-
},
|
|
233
|
+
}, De = function() {
|
|
242
234
|
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
243
235
|
if (!(Y && Y === n)) {
|
|
244
236
|
if ((!n || typeof n != "object") && (n = {}), n = U(n), K = // eslint-disable-next-line unicorn/prefer-includes
|
|
245
|
-
nn.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? rn : n.PARSER_MEDIA_TYPE, g = K === "application/xhtml+xml" ?
|
|
237
|
+
nn.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? rn : n.PARSER_MEDIA_TYPE, g = K === "application/xhtml+xml" ? Ie : pe, h = I(n, "ALLOWED_TAGS") ? f({}, n.ALLOWED_TAGS, g) : je, T = I(n, "ALLOWED_ATTR") ? f({}, n.ALLOWED_ATTR, g) : Ke, Le = I(n, "ALLOWED_NAMESPACES") ? f({}, n.ALLOWED_NAMESPACES, Ie) : en, ve = I(n, "ADD_URI_SAFE_ATTR") ? f(U(it), n.ADD_URI_SAFE_ATTR, g) : it, nt = I(n, "ADD_DATA_URI_TAGS") ? f(U(rt), n.ADD_DATA_URI_TAGS, g) : rt, W = I(n, "FORBID_CONTENTS") ? f({}, n.FORBID_CONTENTS, g) : tt, X = I(n, "FORBID_TAGS") ? f({}, n.FORBID_TAGS, g) : {}, _e = I(n, "FORBID_ATTR") ? f({}, n.FORBID_ATTR, g) : {}, z = I(n, "USE_PROFILES") ? n.USE_PROFILES : !1, qe = n.ALLOW_ARIA_ATTR !== !1, Se = n.ALLOW_DATA_ATTR !== !1, Ze = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Qe = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = n.SAFE_FOR_TEMPLATES || !1, Re = n.SAFE_FOR_XML !== !1, P = n.WHOLE_DOCUMENT || !1, B = n.RETURN_DOM || !1, ie = n.RETURN_DOM_FRAGMENT || !1, ae = n.RETURN_TRUSTED_TYPE || !1, Ne = n.FORCE_BODY || !1, Je = n.SANITIZE_DOM !== !1, et = n.SANITIZE_NAMED_PROPS || !1, Oe = n.KEEP_CONTENT !== !1, j = n.IN_PLACE || !1, Xe = n.ALLOWED_URI_REGEXP || Ct, G = n.NAMESPACE || k, se = n.MATHML_TEXT_INTEGRATION_POINTS || se, ce = n.HTML_INTEGRATION_POINTS || ce, d = n.CUSTOM_ELEMENT_HANDLING || {}, n.CUSTOM_ELEMENT_HANDLING && at(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (d.tagNameCheck = n.CUSTOM_ELEMENT_HANDLING.tagNameCheck), n.CUSTOM_ELEMENT_HANDLING && at(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (d.attributeNameCheck = n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (d.allowCustomizedBuiltInElements = n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), H && (Se = !1), ie && (B = !0), z && (h = f({}, St), T = [], z.html === !0 && (f(h, _t), f(T, Rt)), z.svg === !0 && (f(h, Me), f(T, xe), f(T, me)), z.svgFilters === !0 && (f(h, we), f(T, xe), f(T, me)), z.mathMl === !0 && (f(h, ke), f(T, yt), f(T, me))), n.ADD_TAGS && (h === je && (h = U(h)), f(h, n.ADD_TAGS, g)), n.ADD_ATTR && (T === Ke && (T = U(T)), f(T, n.ADD_ATTR, g)), n.ADD_URI_SAFE_ATTR && f(ve, n.ADD_URI_SAFE_ATTR, g), n.FORBID_CONTENTS && (W === tt && (W = U(W)), f(W, n.FORBID_CONTENTS, g)), Oe && (h["#text"] = !0), P && f(h, ["html", "head", "body"]), h.table && (f(h, ["tbody"]), delete X.tbody), n.TRUSTED_TYPES_POLICY) {
|
|
246
238
|
if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
247
239
|
throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
248
240
|
if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
249
241
|
throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
250
242
|
R = n.TRUSTED_TYPES_POLICY, V = R.createHTML("");
|
|
251
243
|
} else
|
|
252
|
-
R === void 0 && (R =
|
|
244
|
+
R === void 0 && (R = Ln(ne, s)), R !== null && typeof V == "string" && (V = R.createHTML(""));
|
|
253
245
|
v && v(n), Y = n;
|
|
254
246
|
}
|
|
255
|
-
},
|
|
247
|
+
}, ot = f({}, [...Me, ...we, ...Tn]), lt = f({}, [...ke, ...En]), on = function(n) {
|
|
256
248
|
let a = re(n);
|
|
257
249
|
(!a || !a.tagName) && (a = {
|
|
258
250
|
namespaceURI: G,
|
|
259
251
|
tagName: "template"
|
|
260
252
|
});
|
|
261
253
|
const o = pe(n.tagName), u = pe(a.tagName);
|
|
262
|
-
return
|
|
254
|
+
return Le[n.namespaceURI] ? n.namespaceURI === le ? a.namespaceURI === k ? o === "svg" : a.namespaceURI === oe ? o === "svg" && (u === "annotation-xml" || se[u]) : !!ot[o] : n.namespaceURI === oe ? a.namespaceURI === k ? o === "math" : a.namespaceURI === le ? o === "math" && ce[u] : !!lt[o] : n.namespaceURI === k ? a.namespaceURI === le && !ce[u] || a.namespaceURI === oe && !se[u] ? !1 : !lt[o] && (tn[o] || !ot[o]) : !!(K === "application/xhtml+xml" && Le[n.namespaceURI]) : !1;
|
|
263
255
|
}, M = function(n) {
|
|
264
256
|
Z(t.removed, {
|
|
265
257
|
element: n
|
|
@@ -292,7 +284,7 @@ function Mt() {
|
|
|
292
284
|
a.setAttribute(n, "");
|
|
293
285
|
} catch {
|
|
294
286
|
}
|
|
295
|
-
},
|
|
287
|
+
}, st = function(n) {
|
|
296
288
|
let a = null, o = null;
|
|
297
289
|
if (Ne)
|
|
298
290
|
n = "<remove></remove>" + n;
|
|
@@ -315,8 +307,8 @@ function Mt() {
|
|
|
315
307
|
}
|
|
316
308
|
}
|
|
317
309
|
const A = a.body || a.documentElement;
|
|
318
|
-
return n && o && A.insertBefore(r.createTextNode(o), A.childNodes[0] || null), G === k ? Xt.call(a,
|
|
319
|
-
},
|
|
310
|
+
return n && o && A.insertBefore(r.createTextNode(o), A.childNodes[0] || null), G === k ? Xt.call(a, P ? "html" : "body")[0] : P ? a.documentElement : A;
|
|
311
|
+
}, ct = function(n) {
|
|
320
312
|
return $t.call(
|
|
321
313
|
n.ownerDocument || n,
|
|
322
314
|
n,
|
|
@@ -324,64 +316,64 @@ function Mt() {
|
|
|
324
316
|
S.SHOW_ELEMENT | S.SHOW_COMMENT | S.SHOW_TEXT | S.SHOW_PROCESSING_INSTRUCTION | S.SHOW_CDATA_SECTION,
|
|
325
317
|
null
|
|
326
318
|
);
|
|
327
|
-
},
|
|
319
|
+
}, Ce = function(n) {
|
|
328
320
|
return n instanceof he && (typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || !(n.attributes instanceof F) || typeof n.removeAttribute != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function");
|
|
329
321
|
}, ft = function(n) {
|
|
330
|
-
return typeof
|
|
322
|
+
return typeof L == "function" && n instanceof L;
|
|
331
323
|
};
|
|
332
|
-
function
|
|
333
|
-
ue(
|
|
324
|
+
function x(l, n, a) {
|
|
325
|
+
ue(l, (o) => {
|
|
334
326
|
o.call(t, n, a, Y);
|
|
335
327
|
});
|
|
336
328
|
}
|
|
337
329
|
const ut = function(n) {
|
|
338
330
|
let a = null;
|
|
339
|
-
if (
|
|
331
|
+
if (x(y.beforeSanitizeElements, n, null), Ce(n))
|
|
340
332
|
return M(n), !0;
|
|
341
333
|
const o = g(n.nodeName);
|
|
342
|
-
if (
|
|
334
|
+
if (x(y.uponSanitizeElement, n, {
|
|
343
335
|
tagName: o,
|
|
344
336
|
allowedTags: h
|
|
345
|
-
}), n.hasChildNodes() && !ft(n.firstElementChild) &&
|
|
337
|
+
}), n.hasChildNodes() && !ft(n.firstElementChild) && O(/<[/\w!]/g, n.innerHTML) && O(/<[/\w!]/g, n.textContent) || n.nodeType === te.progressingInstruction || Re && n.nodeType === te.comment && O(/<[/\w]/g, n.data))
|
|
346
338
|
return M(n), !0;
|
|
347
339
|
if (!h[o] || X[o]) {
|
|
348
|
-
if (!X[o] && pt(o) && (d.tagNameCheck instanceof RegExp &&
|
|
340
|
+
if (!X[o] && pt(o) && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
|
|
349
341
|
return !1;
|
|
350
|
-
if (
|
|
342
|
+
if (Oe && !W[o]) {
|
|
351
343
|
const u = re(n) || n.parentNode, A = Yt(n) || n.childNodes;
|
|
352
344
|
if (A && u) {
|
|
353
345
|
const E = A.length;
|
|
354
|
-
for (let
|
|
355
|
-
const w = zt(A[
|
|
346
|
+
for (let D = E - 1; D >= 0; --D) {
|
|
347
|
+
const w = zt(A[D], !0);
|
|
356
348
|
w.__removalCount = (n.__removalCount || 0) + 1, u.insertBefore(w, Gt(n));
|
|
357
349
|
}
|
|
358
350
|
}
|
|
359
351
|
}
|
|
360
352
|
return M(n), !0;
|
|
361
353
|
}
|
|
362
|
-
return n instanceof m && !on(n) || (o === "noscript" || o === "noembed" || o === "noframes") &&
|
|
354
|
+
return n instanceof m && !on(n) || (o === "noscript" || o === "noembed" || o === "noframes") && O(/<\/no(script|embed|frames)/i, n.innerHTML) ? (M(n), !0) : (H && n.nodeType === te.text && (a = n.textContent, ue([Te, Ee, Ae], (u) => {
|
|
363
355
|
a = Q(a, u, " ");
|
|
364
356
|
}), n.textContent !== a && (Z(t.removed, {
|
|
365
357
|
element: n.cloneNode()
|
|
366
|
-
}), n.textContent = a)),
|
|
358
|
+
}), n.textContent = a)), x(y.afterSanitizeElements, n, null), !1);
|
|
367
359
|
}, mt = function(n, a, o) {
|
|
368
|
-
if (
|
|
360
|
+
if (Je && (a === "id" || a === "name") && (o in r || o in an))
|
|
369
361
|
return !1;
|
|
370
|
-
if (!(Se && !_e[a] &&
|
|
371
|
-
if (!(
|
|
362
|
+
if (!(Se && !_e[a] && O(Kt, a))) {
|
|
363
|
+
if (!(qe && O(qt, a))) {
|
|
372
364
|
if (!T[a] || _e[a]) {
|
|
373
365
|
if (
|
|
374
366
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
375
367
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
376
368
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
377
|
-
!(pt(n) && (d.tagNameCheck instanceof RegExp &&
|
|
369
|
+
!(pt(n) && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, n) || d.tagNameCheck instanceof Function && d.tagNameCheck(n)) && (d.attributeNameCheck instanceof RegExp && O(d.attributeNameCheck, a) || d.attributeNameCheck instanceof Function && d.attributeNameCheck(a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
378
370
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
379
|
-
a === "is" && d.allowCustomizedBuiltInElements && (d.tagNameCheck instanceof RegExp &&
|
|
371
|
+
a === "is" && d.allowCustomizedBuiltInElements && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
|
|
380
372
|
) return !1;
|
|
381
|
-
} else if (!
|
|
382
|
-
if (!
|
|
383
|
-
if (!((a === "src" || a === "xlink:href" || a === "href") && n !== "script" &&
|
|
384
|
-
if (!(
|
|
373
|
+
} else if (!ve[a]) {
|
|
374
|
+
if (!O(Xe, Q(o, Ve, ""))) {
|
|
375
|
+
if (!((a === "src" || a === "xlink:href" || a === "href") && n !== "script" && pn(o, "data:") === 0 && nt[n])) {
|
|
376
|
+
if (!(Ze && !O(Zt, Q(o, Ve, "")))) {
|
|
385
377
|
if (o)
|
|
386
378
|
return !1;
|
|
387
379
|
}
|
|
@@ -394,11 +386,11 @@ function Mt() {
|
|
|
394
386
|
}, pt = function(n) {
|
|
395
387
|
return n !== "annotation-xml" && At(n, Qt);
|
|
396
388
|
}, dt = function(n) {
|
|
397
|
-
|
|
389
|
+
x(y.beforeSanitizeAttributes, n, null);
|
|
398
390
|
const {
|
|
399
391
|
attributes: a
|
|
400
392
|
} = n;
|
|
401
|
-
if (!a)
|
|
393
|
+
if (!a || Ce(n))
|
|
402
394
|
return;
|
|
403
395
|
const o = {
|
|
404
396
|
attrName: "",
|
|
@@ -411,81 +403,81 @@ function Mt() {
|
|
|
411
403
|
for (; u--; ) {
|
|
412
404
|
const A = a[u], {
|
|
413
405
|
name: E,
|
|
414
|
-
namespaceURI:
|
|
406
|
+
namespaceURI: D,
|
|
415
407
|
value: w
|
|
416
408
|
} = A, q = g(E);
|
|
417
|
-
let
|
|
418
|
-
if (o.attrName = q, o.attrValue =
|
|
409
|
+
let N = E === "value" ? w : dn(w);
|
|
410
|
+
if (o.attrName = q, o.attrValue = N, o.keepAttr = !0, o.forceKeepAttr = void 0, x(y.uponSanitizeAttribute, n, o), N = o.attrValue, et && (q === "id" || q === "name") && (fe(E, n), N = Jt + N), Re && O(/((--!?|])>)|<\/(style|title)/i, N)) {
|
|
419
411
|
fe(E, n);
|
|
420
412
|
continue;
|
|
421
413
|
}
|
|
422
414
|
if (o.forceKeepAttr || (fe(E, n), !o.keepAttr))
|
|
423
415
|
continue;
|
|
424
|
-
if (!
|
|
416
|
+
if (!Qe && O(/\/>/i, N)) {
|
|
425
417
|
fe(E, n);
|
|
426
418
|
continue;
|
|
427
419
|
}
|
|
428
420
|
H && ue([Te, Ee, Ae], (gt) => {
|
|
429
|
-
|
|
421
|
+
N = Q(N, gt, " ");
|
|
430
422
|
});
|
|
431
423
|
const ht = g(n.nodeName);
|
|
432
|
-
if (mt(ht, q,
|
|
433
|
-
if (R && typeof ne == "object" && typeof ne.getAttributeType == "function" && !
|
|
424
|
+
if (mt(ht, q, N)) {
|
|
425
|
+
if (R && typeof ne == "object" && typeof ne.getAttributeType == "function" && !D)
|
|
434
426
|
switch (ne.getAttributeType(ht, q)) {
|
|
435
427
|
case "TrustedHTML": {
|
|
436
|
-
|
|
428
|
+
N = R.createHTML(N);
|
|
437
429
|
break;
|
|
438
430
|
}
|
|
439
431
|
case "TrustedScriptURL": {
|
|
440
|
-
|
|
432
|
+
N = R.createScriptURL(N);
|
|
441
433
|
break;
|
|
442
434
|
}
|
|
443
435
|
}
|
|
444
436
|
try {
|
|
445
|
-
|
|
437
|
+
D ? n.setAttributeNS(D, E, N) : n.setAttribute(E, N), Ce(n) ? M(n) : Et(t.removed);
|
|
446
438
|
} catch {
|
|
447
439
|
}
|
|
448
440
|
}
|
|
449
441
|
}
|
|
450
|
-
|
|
451
|
-
}, ln = function
|
|
442
|
+
x(y.afterSanitizeAttributes, n, null);
|
|
443
|
+
}, ln = function l(n) {
|
|
452
444
|
let a = null;
|
|
453
|
-
const o =
|
|
454
|
-
for (
|
|
455
|
-
|
|
456
|
-
|
|
445
|
+
const o = ct(n);
|
|
446
|
+
for (x(y.beforeSanitizeShadowDOM, n, null); a = o.nextNode(); )
|
|
447
|
+
x(y.uponSanitizeShadowNode, a, null), ut(a), dt(a), a.content instanceof c && l(a.content);
|
|
448
|
+
x(y.afterSanitizeShadowDOM, n, null);
|
|
457
449
|
};
|
|
458
|
-
return t.sanitize = function(
|
|
450
|
+
return t.sanitize = function(l) {
|
|
459
451
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, o = null, u = null, A = null;
|
|
460
|
-
if (be = !
|
|
461
|
-
if (typeof
|
|
462
|
-
if (
|
|
452
|
+
if (be = !l, be && (l = "<!-->"), typeof l != "string" && !ft(l))
|
|
453
|
+
if (typeof l.toString == "function") {
|
|
454
|
+
if (l = l.toString(), typeof l != "string")
|
|
463
455
|
throw J("dirty is not a string, aborting");
|
|
464
456
|
} else
|
|
465
457
|
throw J("toString is not a function");
|
|
466
458
|
if (!t.isSupported)
|
|
467
|
-
return
|
|
468
|
-
if (ye ||
|
|
469
|
-
if (
|
|
470
|
-
const w = g(
|
|
459
|
+
return l;
|
|
460
|
+
if (ye || De(n), t.removed = [], typeof l == "string" && (j = !1), j) {
|
|
461
|
+
if (l.nodeName) {
|
|
462
|
+
const w = g(l.nodeName);
|
|
471
463
|
if (!h[w] || X[w])
|
|
472
464
|
throw J("root node is forbidden and cannot be sanitized in-place");
|
|
473
465
|
}
|
|
474
|
-
} else if (
|
|
475
|
-
a =
|
|
466
|
+
} else if (l instanceof L)
|
|
467
|
+
a = st("<!---->"), o = a.ownerDocument.importNode(l, !0), o.nodeType === te.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? a = o : a.appendChild(o);
|
|
476
468
|
else {
|
|
477
|
-
if (!B && !H && !
|
|
478
|
-
|
|
479
|
-
return R && ae ? R.createHTML(
|
|
480
|
-
if (a =
|
|
469
|
+
if (!B && !H && !P && // eslint-disable-next-line unicorn/prefer-includes
|
|
470
|
+
l.indexOf("<") === -1)
|
|
471
|
+
return R && ae ? R.createHTML(l) : l;
|
|
472
|
+
if (a = st(l), !a)
|
|
481
473
|
return B ? null : ae ? V : "";
|
|
482
474
|
}
|
|
483
475
|
a && Ne && M(a.firstChild);
|
|
484
|
-
const E =
|
|
476
|
+
const E = ct(j ? l : a);
|
|
485
477
|
for (; u = E.nextNode(); )
|
|
486
|
-
ut(u)
|
|
478
|
+
ut(u), dt(u), u.content instanceof c && ln(u.content);
|
|
487
479
|
if (j)
|
|
488
|
-
return
|
|
480
|
+
return l;
|
|
489
481
|
if (B) {
|
|
490
482
|
if (ie)
|
|
491
483
|
for (A = Vt.call(a.ownerDocument); a.firstChild; )
|
|
@@ -494,32 +486,36 @@ function Mt() {
|
|
|
494
486
|
A = a;
|
|
495
487
|
return (T.shadowroot || T.shadowrootmode) && (A = jt.call(i, A, !0)), A;
|
|
496
488
|
}
|
|
497
|
-
let
|
|
498
|
-
return
|
|
499
|
-
` +
|
|
500
|
-
|
|
501
|
-
}), R && ae ? R.createHTML(
|
|
489
|
+
let D = P ? a.outerHTML : a.innerHTML;
|
|
490
|
+
return P && h["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && O(It, a.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
|
|
491
|
+
` + D), H && ue([Te, Ee, Ae], (w) => {
|
|
492
|
+
D = Q(D, w, " ");
|
|
493
|
+
}), R && ae ? R.createHTML(D) : D;
|
|
502
494
|
}, t.setConfig = function() {
|
|
503
|
-
let
|
|
504
|
-
|
|
495
|
+
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
496
|
+
De(l), ye = !0;
|
|
505
497
|
}, t.clearConfig = function() {
|
|
506
498
|
Y = null, ye = !1;
|
|
507
|
-
}, t.isValidAttribute = function(
|
|
508
|
-
Y ||
|
|
509
|
-
const o = g(
|
|
499
|
+
}, t.isValidAttribute = function(l, n, a) {
|
|
500
|
+
Y || De({});
|
|
501
|
+
const o = g(l), u = g(n);
|
|
510
502
|
return mt(o, u, a);
|
|
511
|
-
}, t.addHook = function(
|
|
512
|
-
typeof n == "function" && Z(
|
|
513
|
-
}, t.removeHook = function(
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
503
|
+
}, t.addHook = function(l, n) {
|
|
504
|
+
typeof n == "function" && Z(y[l], n);
|
|
505
|
+
}, t.removeHook = function(l, n) {
|
|
506
|
+
if (n !== void 0) {
|
|
507
|
+
const a = un(y[l], n);
|
|
508
|
+
return a === -1 ? void 0 : mn(y[l], a, 1)[0];
|
|
509
|
+
}
|
|
510
|
+
return Et(y[l]);
|
|
511
|
+
}, t.removeHooks = function(l) {
|
|
512
|
+
y[l] = [];
|
|
517
513
|
}, t.removeAllHooks = function() {
|
|
518
|
-
|
|
514
|
+
y = Ot();
|
|
519
515
|
}, t;
|
|
520
516
|
}
|
|
521
|
-
var
|
|
522
|
-
function
|
|
517
|
+
var er = Mt();
|
|
518
|
+
function Dn(e) {
|
|
523
519
|
for (var t = 1; t < arguments.length; t++) {
|
|
524
520
|
var r = arguments[t];
|
|
525
521
|
for (var i in r)
|
|
@@ -527,18 +523,18 @@ function bn(e) {
|
|
|
527
523
|
}
|
|
528
524
|
return e;
|
|
529
525
|
}
|
|
530
|
-
function
|
|
526
|
+
function ze(e, t) {
|
|
531
527
|
return Array(t + 1).join(e);
|
|
532
528
|
}
|
|
533
|
-
function
|
|
529
|
+
function Cn(e) {
|
|
534
530
|
return e.replace(/^\n*/, "");
|
|
535
531
|
}
|
|
536
|
-
function
|
|
532
|
+
function In(e) {
|
|
537
533
|
for (var t = e.length; t > 0 && e[t - 1] === `
|
|
538
534
|
`; ) t--;
|
|
539
535
|
return e.substring(0, t);
|
|
540
536
|
}
|
|
541
|
-
var
|
|
537
|
+
var Mn = [
|
|
542
538
|
"ADDRESS",
|
|
543
539
|
"ARTICLE",
|
|
544
540
|
"ASIDE",
|
|
@@ -589,8 +585,8 @@ var Cn = [
|
|
|
589
585
|
"TR",
|
|
590
586
|
"UL"
|
|
591
587
|
];
|
|
592
|
-
function
|
|
593
|
-
return
|
|
588
|
+
function Ge(e) {
|
|
589
|
+
return Ye(e, Mn);
|
|
594
590
|
}
|
|
595
591
|
var wt = [
|
|
596
592
|
"AREA",
|
|
@@ -611,12 +607,12 @@ var wt = [
|
|
|
611
607
|
"WBR"
|
|
612
608
|
];
|
|
613
609
|
function kt(e) {
|
|
614
|
-
return
|
|
610
|
+
return Ye(e, wt);
|
|
615
611
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
612
|
+
function wn(e) {
|
|
613
|
+
return Pt(e, wt);
|
|
618
614
|
}
|
|
619
|
-
var
|
|
615
|
+
var xt = [
|
|
620
616
|
"A",
|
|
621
617
|
"TABLE",
|
|
622
618
|
"THEAD",
|
|
@@ -629,16 +625,16 @@ var Pt = [
|
|
|
629
625
|
"AUDIO",
|
|
630
626
|
"VIDEO"
|
|
631
627
|
];
|
|
632
|
-
function
|
|
633
|
-
return
|
|
628
|
+
function kn(e) {
|
|
629
|
+
return Ye(e, xt);
|
|
634
630
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
631
|
+
function xn(e) {
|
|
632
|
+
return Pt(e, xt);
|
|
637
633
|
}
|
|
638
|
-
function
|
|
634
|
+
function Ye(e, t) {
|
|
639
635
|
return t.indexOf(e.nodeName) >= 0;
|
|
640
636
|
}
|
|
641
|
-
function
|
|
637
|
+
function Pt(e, t) {
|
|
642
638
|
return e.getElementsByTagName && t.some(function(r) {
|
|
643
639
|
return e.getElementsByTagName(r).length;
|
|
644
640
|
});
|
|
@@ -666,17 +662,17 @@ _.heading = {
|
|
|
666
662
|
replacement: function(e, t, r) {
|
|
667
663
|
var i = Number(t.nodeName.charAt(1));
|
|
668
664
|
if (r.headingStyle === "setext" && i < 3) {
|
|
669
|
-
var
|
|
665
|
+
var s = ze(i === 1 ? "=" : "-", e.length);
|
|
670
666
|
return `
|
|
671
667
|
|
|
672
668
|
` + e + `
|
|
673
|
-
` +
|
|
669
|
+
` + s + `
|
|
674
670
|
|
|
675
671
|
`;
|
|
676
672
|
} else
|
|
677
673
|
return `
|
|
678
674
|
|
|
679
|
-
` +
|
|
675
|
+
` + ze("#", i) + " " + e + `
|
|
680
676
|
|
|
681
677
|
`;
|
|
682
678
|
}
|
|
@@ -709,9 +705,9 @@ _.listItem = {
|
|
|
709
705
|
e = e.replace(/^\n+/, "").replace(/\n+$/, `
|
|
710
706
|
`).replace(/\n/gm, `
|
|
711
707
|
`);
|
|
712
|
-
var i = r.bulletListMarker + " ",
|
|
713
|
-
if (
|
|
714
|
-
var c =
|
|
708
|
+
var i = r.bulletListMarker + " ", s = t.parentNode;
|
|
709
|
+
if (s.nodeName === "OL") {
|
|
710
|
+
var c = s.getAttribute("start"), p = Array.prototype.indexOf.call(s.children, t);
|
|
715
711
|
i = (c ? Number(c) + p : p + 1) + ". ";
|
|
716
712
|
}
|
|
717
713
|
return i + e + (t.nextSibling && !/\n$/.test(e) ? `
|
|
@@ -736,12 +732,12 @@ _.fencedCodeBlock = {
|
|
|
736
732
|
return t.codeBlockStyle === "fenced" && e.nodeName === "PRE" && e.firstChild && e.firstChild.nodeName === "CODE";
|
|
737
733
|
},
|
|
738
734
|
replacement: function(e, t, r) {
|
|
739
|
-
for (var i = t.firstChild.getAttribute("class") || "",
|
|
740
|
-
S[0].length >=
|
|
741
|
-
var F =
|
|
735
|
+
for (var i = t.firstChild.getAttribute("class") || "", s = (i.match(/language-(\S+)/) || [null, ""])[1], c = t.firstChild.textContent, p = r.fence.charAt(0), L = 3, m = new RegExp("^" + p + "{3,}", "gm"), S; S = m.exec(c); )
|
|
736
|
+
S[0].length >= L && (L = S[0].length + 1);
|
|
737
|
+
var F = ze(p, L);
|
|
742
738
|
return `
|
|
743
739
|
|
|
744
|
-
` + F +
|
|
740
|
+
` + F + s + `
|
|
745
741
|
` + c.replace(/\n$/, "") + `
|
|
746
742
|
` + F + `
|
|
747
743
|
|
|
@@ -774,19 +770,19 @@ _.referenceLink = {
|
|
|
774
770
|
return t.linkStyle === "referenced" && e.nodeName === "A" && e.getAttribute("href");
|
|
775
771
|
},
|
|
776
772
|
replacement: function(e, t, r) {
|
|
777
|
-
var i = t.getAttribute("href"),
|
|
778
|
-
|
|
773
|
+
var i = t.getAttribute("href"), s = de(t.getAttribute("title"));
|
|
774
|
+
s && (s = ' "' + s + '"');
|
|
779
775
|
var c, p;
|
|
780
776
|
switch (r.linkReferenceStyle) {
|
|
781
777
|
case "collapsed":
|
|
782
|
-
c = "[" + e + "][]", p = "[" + e + "]: " + i +
|
|
778
|
+
c = "[" + e + "][]", p = "[" + e + "]: " + i + s;
|
|
783
779
|
break;
|
|
784
780
|
case "shortcut":
|
|
785
|
-
c = "[" + e + "]", p = "[" + e + "]: " + i +
|
|
781
|
+
c = "[" + e + "]", p = "[" + e + "]: " + i + s;
|
|
786
782
|
break;
|
|
787
783
|
default:
|
|
788
|
-
var
|
|
789
|
-
c = "[" + e + "][" +
|
|
784
|
+
var L = this.references.length + 1;
|
|
785
|
+
c = "[" + e + "][" + L + "]", p = "[" + L + "]: " + i + s;
|
|
790
786
|
}
|
|
791
787
|
return this.references.push(p), c;
|
|
792
788
|
},
|
|
@@ -828,7 +824,7 @@ _.code = {
|
|
|
828
824
|
_.image = {
|
|
829
825
|
filter: "img",
|
|
830
826
|
replacement: function(e, t) {
|
|
831
|
-
var r = de(t.getAttribute("alt")), i = t.getAttribute("src") || "",
|
|
827
|
+
var r = de(t.getAttribute("alt")), i = t.getAttribute("src") || "", s = de(t.getAttribute("title")), c = s ? ' "' + s + '"' : "";
|
|
832
828
|
return i ? "" : "";
|
|
833
829
|
}
|
|
834
830
|
};
|
|
@@ -873,11 +869,11 @@ Ut.prototype = {
|
|
|
873
869
|
};
|
|
874
870
|
function Pe(e, t, r) {
|
|
875
871
|
for (var i = 0; i < e.length; i++) {
|
|
876
|
-
var
|
|
877
|
-
if (
|
|
872
|
+
var s = e[i];
|
|
873
|
+
if (Pn(s, t, r)) return s;
|
|
878
874
|
}
|
|
879
875
|
}
|
|
880
|
-
function
|
|
876
|
+
function Pn(e, t, r) {
|
|
881
877
|
var i = e.filter;
|
|
882
878
|
if (typeof i == "string") {
|
|
883
879
|
if (i === t.nodeName.toLowerCase()) return !0;
|
|
@@ -888,51 +884,51 @@ function kn(e, t, r) {
|
|
|
888
884
|
} else
|
|
889
885
|
throw new TypeError("`filter` needs to be a string, array, or function");
|
|
890
886
|
}
|
|
891
|
-
function
|
|
892
|
-
var t = e.element, r = e.isBlock, i = e.isVoid,
|
|
887
|
+
function Un(e) {
|
|
888
|
+
var t = e.element, r = e.isBlock, i = e.isVoid, s = e.isPre || function(he) {
|
|
893
889
|
return he.nodeName === "PRE";
|
|
894
890
|
};
|
|
895
|
-
if (!(!t.firstChild ||
|
|
896
|
-
for (var c = null, p = !1,
|
|
891
|
+
if (!(!t.firstChild || s(t))) {
|
|
892
|
+
for (var c = null, p = !1, L = null, m = vt(L, t, s); m !== t; ) {
|
|
897
893
|
if (m.nodeType === 3 || m.nodeType === 4) {
|
|
898
894
|
var S = m.data.replace(/[ \r\n\t]+/g, " ");
|
|
899
895
|
if ((!c || / $/.test(c.data)) && !p && S[0] === " " && (S = S.substr(1)), !S) {
|
|
900
|
-
m =
|
|
896
|
+
m = Ue(m);
|
|
901
897
|
continue;
|
|
902
898
|
}
|
|
903
899
|
m.data = S, c = m;
|
|
904
900
|
} else if (m.nodeType === 1)
|
|
905
|
-
r(m) || m.nodeName === "BR" ? (c && (c.data = c.data.replace(/ $/, "")), c = null, p = !1) : i(m) ||
|
|
901
|
+
r(m) || m.nodeName === "BR" ? (c && (c.data = c.data.replace(/ $/, "")), c = null, p = !1) : i(m) || s(m) ? (c = null, p = !0) : c && (p = !1);
|
|
906
902
|
else {
|
|
907
|
-
m =
|
|
903
|
+
m = Ue(m);
|
|
908
904
|
continue;
|
|
909
905
|
}
|
|
910
|
-
var F =
|
|
911
|
-
|
|
906
|
+
var F = vt(L, m, s);
|
|
907
|
+
L = m, m = F;
|
|
912
908
|
}
|
|
913
|
-
c && (c.data = c.data.replace(/ $/, ""), c.data ||
|
|
909
|
+
c && (c.data = c.data.replace(/ $/, ""), c.data || Ue(c));
|
|
914
910
|
}
|
|
915
911
|
}
|
|
916
|
-
function
|
|
912
|
+
function Ue(e) {
|
|
917
913
|
var t = e.nextSibling || e.parentNode;
|
|
918
914
|
return e.parentNode.removeChild(e), t;
|
|
919
915
|
}
|
|
920
|
-
function
|
|
916
|
+
function vt(e, t, r) {
|
|
921
917
|
return e && e.parentNode === t || r(t) ? t.nextSibling || t.parentNode : t.firstChild || t.nextSibling || t.parentNode;
|
|
922
918
|
}
|
|
923
|
-
var
|
|
924
|
-
function
|
|
925
|
-
var e =
|
|
919
|
+
var $e = typeof window < "u" ? window : {};
|
|
920
|
+
function Fn() {
|
|
921
|
+
var e = $e.DOMParser, t = !1;
|
|
926
922
|
try {
|
|
927
923
|
new e().parseFromString("", "text/html") && (t = !0);
|
|
928
924
|
} catch {
|
|
929
925
|
}
|
|
930
926
|
return t;
|
|
931
927
|
}
|
|
932
|
-
function
|
|
928
|
+
function Hn() {
|
|
933
929
|
var e = function() {
|
|
934
930
|
};
|
|
935
|
-
return
|
|
931
|
+
return Bn() ? e.prototype.parseFromString = function(t) {
|
|
936
932
|
var r = new window.ActiveXObject("htmlfile");
|
|
937
933
|
return r.designMode = "on", r.open(), r.write(t), r.close(), r;
|
|
938
934
|
} : e.prototype.parseFromString = function(t) {
|
|
@@ -940,20 +936,20 @@ function Un() {
|
|
|
940
936
|
return r.open(), r.write(t), r.close(), r;
|
|
941
937
|
}, e;
|
|
942
938
|
}
|
|
943
|
-
function
|
|
939
|
+
function Bn() {
|
|
944
940
|
var e = !1;
|
|
945
941
|
try {
|
|
946
942
|
document.implementation.createHTMLDocument("").open();
|
|
947
943
|
} catch {
|
|
948
|
-
|
|
944
|
+
$e.ActiveXObject && (e = !0);
|
|
949
945
|
}
|
|
950
946
|
return e;
|
|
951
947
|
}
|
|
952
|
-
var
|
|
953
|
-
function
|
|
948
|
+
var zn = Fn() ? $e.DOMParser : Hn();
|
|
949
|
+
function Wn(e, t) {
|
|
954
950
|
var r;
|
|
955
951
|
if (typeof e == "string") {
|
|
956
|
-
var i =
|
|
952
|
+
var i = Gn().parseFromString(
|
|
957
953
|
// DOM parsers arrange elements in the <head> and <body>.
|
|
958
954
|
// Wrapping in a custom element ensures elements are reliably arranged in
|
|
959
955
|
// a single element.
|
|
@@ -963,33 +959,33 @@ function Bn(e, t) {
|
|
|
963
959
|
r = i.getElementById("turndown-root");
|
|
964
960
|
} else
|
|
965
961
|
r = e.cloneNode(!0);
|
|
966
|
-
return
|
|
962
|
+
return Un({
|
|
967
963
|
element: r,
|
|
968
|
-
isBlock:
|
|
964
|
+
isBlock: Ge,
|
|
969
965
|
isVoid: kt,
|
|
970
|
-
isPre: t.preformattedCode ?
|
|
966
|
+
isPre: t.preformattedCode ? Yn : null
|
|
971
967
|
}), r;
|
|
972
968
|
}
|
|
973
|
-
var
|
|
974
|
-
function
|
|
975
|
-
return
|
|
969
|
+
var Fe;
|
|
970
|
+
function Gn() {
|
|
971
|
+
return Fe = Fe || new zn(), Fe;
|
|
976
972
|
}
|
|
977
|
-
function
|
|
973
|
+
function Yn(e) {
|
|
978
974
|
return e.nodeName === "PRE" || e.nodeName === "CODE";
|
|
979
975
|
}
|
|
980
|
-
function
|
|
981
|
-
return e.isBlock =
|
|
976
|
+
function $n(e, t) {
|
|
977
|
+
return e.isBlock = Ge(e), e.isCode = e.nodeName === "CODE" || e.parentNode.isCode, e.isBlank = Vn(e), e.flankingWhitespace = Xn(e, t), e;
|
|
982
978
|
}
|
|
983
|
-
function
|
|
984
|
-
return !kt(e) && !
|
|
979
|
+
function Vn(e) {
|
|
980
|
+
return !kt(e) && !kn(e) && /^\s*$/i.test(e.textContent) && !wn(e) && !xn(e);
|
|
985
981
|
}
|
|
986
|
-
function
|
|
982
|
+
function Xn(e, t) {
|
|
987
983
|
if (e.isBlock || t.preformattedCode && e.isCode)
|
|
988
984
|
return { leading: "", trailing: "" };
|
|
989
|
-
var r =
|
|
985
|
+
var r = jn(e.textContent);
|
|
990
986
|
return r.leadingAscii && bt("left", e, t) && (r.leading = r.leadingNonAscii), r.trailingAscii && bt("right", e, t) && (r.trailing = r.trailingNonAscii), { leading: r.leading, trailing: r.trailing };
|
|
991
987
|
}
|
|
992
|
-
function
|
|
988
|
+
function jn(e) {
|
|
993
989
|
var t = e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);
|
|
994
990
|
return {
|
|
995
991
|
leading: t[1],
|
|
@@ -1003,10 +999,10 @@ function Vn(e) {
|
|
|
1003
999
|
};
|
|
1004
1000
|
}
|
|
1005
1001
|
function bt(e, t, r) {
|
|
1006
|
-
var i,
|
|
1007
|
-
return e === "left" ? (i = t.previousSibling,
|
|
1002
|
+
var i, s, c;
|
|
1003
|
+
return e === "left" ? (i = t.previousSibling, s = / $/) : (i = t.nextSibling, s = /^ /), i && (i.nodeType === 3 ? c = s.test(i.nodeValue) : r.preformattedCode && i.nodeName === "CODE" ? c = !1 : i.nodeType === 1 && !Ge(i) && (c = s.test(i.textContent))), c;
|
|
1008
1004
|
}
|
|
1009
|
-
var
|
|
1005
|
+
var Kn = Array.prototype.reduce, qn = [
|
|
1010
1006
|
[/\\/g, "\\\\"],
|
|
1011
1007
|
[/\*/g, "\\*"],
|
|
1012
1008
|
[/^-/g, "\\-"],
|
|
@@ -1021,8 +1017,8 @@ var Xn = Array.prototype.reduce, jn = [
|
|
|
1021
1017
|
[/_/g, "\\_"],
|
|
1022
1018
|
[/^(\d+)\. /g, "$1\\. "]
|
|
1023
1019
|
];
|
|
1024
|
-
function
|
|
1025
|
-
if (!(this instanceof
|
|
1020
|
+
function We(e) {
|
|
1021
|
+
if (!(this instanceof We)) return new We(e);
|
|
1026
1022
|
var t = {
|
|
1027
1023
|
rules: _,
|
|
1028
1024
|
headingStyle: "setext",
|
|
@@ -1056,9 +1052,9 @@ function ze(e) {
|
|
|
1056
1052
|
` : r;
|
|
1057
1053
|
}
|
|
1058
1054
|
};
|
|
1059
|
-
this.options =
|
|
1055
|
+
this.options = Dn({}, t, e), this.rules = new Ut(this.options);
|
|
1060
1056
|
}
|
|
1061
|
-
|
|
1057
|
+
We.prototype = {
|
|
1062
1058
|
/**
|
|
1063
1059
|
* The entry point for converting a string or DOM node to Markdown
|
|
1064
1060
|
* @public
|
|
@@ -1067,13 +1063,13 @@ ze.prototype = {
|
|
|
1067
1063
|
* @type String
|
|
1068
1064
|
*/
|
|
1069
1065
|
turndown: function(e) {
|
|
1070
|
-
if (!
|
|
1066
|
+
if (!Jn(e))
|
|
1071
1067
|
throw new TypeError(
|
|
1072
1068
|
e + " is not a string, or an element/document/fragment node."
|
|
1073
1069
|
);
|
|
1074
1070
|
if (e === "") return "";
|
|
1075
|
-
var t = Ft.call(this, new
|
|
1076
|
-
return
|
|
1071
|
+
var t = Ft.call(this, new Wn(e, this.options));
|
|
1072
|
+
return Zn.call(this, t);
|
|
1077
1073
|
},
|
|
1078
1074
|
/**
|
|
1079
1075
|
* Add one or more plugins
|
|
@@ -1130,39 +1126,39 @@ ze.prototype = {
|
|
|
1130
1126
|
* @type String
|
|
1131
1127
|
*/
|
|
1132
1128
|
escape: function(e) {
|
|
1133
|
-
return
|
|
1129
|
+
return qn.reduce(function(t, r) {
|
|
1134
1130
|
return t.replace(r[0], r[1]);
|
|
1135
1131
|
}, e);
|
|
1136
1132
|
}
|
|
1137
1133
|
};
|
|
1138
1134
|
function Ft(e) {
|
|
1139
1135
|
var t = this;
|
|
1140
|
-
return
|
|
1141
|
-
i = new
|
|
1142
|
-
var
|
|
1143
|
-
return i.nodeType === 3 ?
|
|
1136
|
+
return Kn.call(e.childNodes, function(r, i) {
|
|
1137
|
+
i = new $n(i, t.options);
|
|
1138
|
+
var s = "";
|
|
1139
|
+
return i.nodeType === 3 ? s = i.isCode ? i.nodeValue : t.escape(i.nodeValue) : i.nodeType === 1 && (s = Qn.call(t, i)), Ht(r, s);
|
|
1144
1140
|
}, "");
|
|
1145
1141
|
}
|
|
1146
|
-
function
|
|
1142
|
+
function Zn(e) {
|
|
1147
1143
|
var t = this;
|
|
1148
1144
|
return this.rules.forEach(function(r) {
|
|
1149
1145
|
typeof r.append == "function" && (e = Ht(e, r.append(t.options)));
|
|
1150
1146
|
}), e.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, "");
|
|
1151
1147
|
}
|
|
1152
|
-
function
|
|
1148
|
+
function Qn(e) {
|
|
1153
1149
|
var t = this.rules.forNode(e), r = Ft.call(this, e), i = e.flankingWhitespace;
|
|
1154
1150
|
return (i.leading || i.trailing) && (r = r.trim()), i.leading + t.replacement(r, e, this.options) + i.trailing;
|
|
1155
1151
|
}
|
|
1156
1152
|
function Ht(e, t) {
|
|
1157
|
-
var r =
|
|
1153
|
+
var r = In(e), i = Cn(t), s = Math.max(e.length - r.length, t.length - i.length), c = `
|
|
1158
1154
|
|
|
1159
|
-
`.substring(0,
|
|
1155
|
+
`.substring(0, s);
|
|
1160
1156
|
return r + c + i;
|
|
1161
1157
|
}
|
|
1162
|
-
function
|
|
1158
|
+
function Jn(e) {
|
|
1163
1159
|
return e != null && (typeof e == "string" || e.nodeType && (e.nodeType === 1 || e.nodeType === 9 || e.nodeType === 11));
|
|
1164
1160
|
}
|
|
1165
1161
|
export {
|
|
1166
|
-
|
|
1167
|
-
|
|
1162
|
+
We as T,
|
|
1163
|
+
er as p
|
|
1168
1164
|
};
|