@prefecthq/prefab-ui-docs 0.16.3 → 0.17.0
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/_renderer/_basePickBy-fiErwOTY.mjs +151 -0
- package/dist/_renderer/_baseUniq-Iy7gOYgw.mjs +614 -0
- package/dist/_renderer/arc-BYm2F1-h.mjs +83 -0
- package/dist/_renderer/architectureDiagram-2XIMDMQ5-BKR0-ZSX.mjs +4683 -0
- package/dist/_renderer/band-TE_TbDmh.mjs +56 -0
- package/dist/_renderer/blockDiagram-WCTKOSBZ-BruGG_9M.mjs +2298 -0
- package/dist/_renderer/c4Diagram-IC4MRINW-K4nxeBNU.mjs +1581 -0
- package/dist/_renderer/channel-D4_UYSAN.mjs +5 -0
- package/dist/_renderer/charts-Bwny4UB2.mjs +19169 -0
- package/dist/_renderer/chunk-4BX2VUAB-mqLb5fm9.mjs +9 -0
- package/dist/_renderer/chunk-55IACEB6-Bxgi9T70.mjs +8 -0
- package/dist/_renderer/chunk-FMBD7UC4-Dsah75wQ.mjs +19 -0
- package/dist/_renderer/chunk-JSJVCQXG-Bsg6dsjU.mjs +68 -0
- package/dist/_renderer/chunk-KX2RTZJC-DvDXsxvC.mjs +20 -0
- package/dist/_renderer/chunk-NQ4KR5QH-CwFlbBfF.mjs +1384 -0
- package/dist/_renderer/chunk-QZHKN3VN-CYPyScRI.mjs +15 -0
- package/dist/_renderer/chunk-WL4C6EOR-2eYOPJVd.mjs +1430 -0
- package/dist/_renderer/classDiagram-VBA2DB6C-Dj8h8-wl.mjs +16 -0
- package/dist/_renderer/classDiagram-v2-RAHNMMFH-Dj8h8-wl.mjs +16 -0
- package/dist/_renderer/clone-BmajYOc3.mjs +8 -0
- package/dist/_renderer/{compound-calendar-Cn18AoRs.mjs → compound-calendar-Bmz7kTAd.mjs} +3 -3
- package/dist/_renderer/{content-e43PvxaF.mjs → content-Bd8N98h-.mjs} +6 -6
- package/dist/_renderer/cose-bilkent-S5V4N54A-BLhD0lt7.mjs +2609 -0
- package/dist/_renderer/cytoscape.esm-CjI2IsL8.mjs +18735 -0
- package/dist/_renderer/dagre-KLK3FWXG-DCIde85z.mjs +447 -0
- package/dist/_renderer/defaultLocale-BgPVtth8.mjs +171 -0
- package/dist/_renderer/diagram-E7M64L7V-BbWs-jbo.mjs +533 -0
- package/dist/_renderer/diagram-IFDJBPK2-Sfx8kanl.mjs +221 -0
- package/dist/_renderer/diagram-P4PSJMXO-DCqYaW3Z.mjs +143 -0
- package/dist/_renderer/{embed-DRE2wKZJ.mjs → embed-BCPaWfQN.mjs} +1119 -1114
- package/dist/_renderer/embed.mjs +1 -1
- package/dist/_renderer/erDiagram-INFDFZHY-D8cdLSCi.mjs +863 -0
- package/dist/_renderer/flowDiagram-PKNHOUZH-B_rW2Xww.mjs +1647 -0
- package/dist/_renderer/ganttDiagram-A5KZAMGK-Be_Svnat.mjs +1964 -0
- package/dist/_renderer/gitGraphDiagram-K3NZZRJ6--wMgYsSv.mjs +709 -0
- package/dist/_renderer/graph-alLjIojU.mjs +604 -0
- package/dist/_renderer/{icons-CImNZgDa.mjs → icons-w8tvN_30.mjs} +155 -135
- package/dist/_renderer/infoDiagram-LFFYTUFH-QW1PzgNF.mjs +24 -0
- package/dist/_renderer/init-DxzjmxYy.mjs +32 -0
- package/dist/_renderer/ishikawaDiagram-PHBUUO56-xY8fsGh3.mjs +621 -0
- package/dist/_renderer/journeyDiagram-4ABVD52K-7XeHSH9G.mjs +834 -0
- package/dist/_renderer/kanban-definition-K7BYSVSG-Cn7INDI0.mjs +723 -0
- package/dist/_renderer/katex-AQJr8RMF.mjs +11623 -0
- package/dist/_renderer/layout-Bspk8k85.mjs +1335 -0
- package/dist/_renderer/linear-CVnzSbdA.mjs +275 -0
- package/dist/_renderer/mermaid-DjgBUZ1W.mjs +48 -0
- package/dist/_renderer/mermaid.core-BzbdT8_O.mjs +13838 -0
- package/dist/_renderer/mindmap-definition-YRQLILUH-CVIMKVZI.mjs +788 -0
- package/dist/_renderer/ordinal-Bq0KrZxK.mjs +62 -0
- package/dist/_renderer/pieDiagram-SKSYHLDU-CL_luPJM.mjs +162 -0
- package/dist/_renderer/{svg-BL0kMZ_p.mjs → purify.es-M2Bspgo5.mjs} +222 -240
- package/dist/_renderer/quadrantDiagram-337W2JSQ-BQWFWFNU.mjs +1024 -0
- package/dist/_renderer/requirementDiagram-Z7DCOOCP-Di29RxJ6.mjs +862 -0
- package/dist/_renderer/sankeyDiagram-WA2Y5GQK-DY4kgDbR.mjs +810 -0
- package/dist/_renderer/sequenceDiagram-2WXFIKYE-vjbD37pn.mjs +2823 -0
- package/dist/_renderer/stateDiagram-RAJIS63D-BQ9BAuO6.mjs +264 -0
- package/dist/_renderer/stateDiagram-v2-FVOUBMTO-Bs26kEor.mjs +16 -0
- package/dist/_renderer/string-kGvNrjOo.mjs +934 -0
- package/dist/_renderer/svg-qTs_3V9p.mjs +22 -0
- package/dist/_renderer/time-sQ_UKgU4.mjs +765 -0
- package/dist/_renderer/timeline-definition-YZTLITO2-CJfaRgME.mjs +799 -0
- package/dist/_renderer/treemap-KZPCXAKY-DQq6TCTm.mjs +17996 -0
- package/dist/_renderer/vennDiagram-LZ73GAT5-BkBksHrj.mjs +1564 -0
- package/dist/_renderer/xychartDiagram-JWTSCODW-Boo1R-nF.mjs +1299 -0
- package/package.json +1 -1
- package/dist/_renderer/charts-Dr57vKmb.mjs +0 -21311
|
@@ -1,113 +1,111 @@
|
|
|
1
|
-
import { j as Yt, c as jt } from "./embed-DRE2wKZJ.mjs";
|
|
2
|
-
import { a as Xt } from "./icons-CImNZgDa.mjs";
|
|
3
1
|
/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */
|
|
4
2
|
const {
|
|
5
3
|
entries: _t,
|
|
6
4
|
setPrototypeOf: ct,
|
|
7
|
-
isFrozen:
|
|
8
|
-
getPrototypeOf:
|
|
9
|
-
getOwnPropertyDescriptor:
|
|
5
|
+
isFrozen: Yt,
|
|
6
|
+
getPrototypeOf: Xt,
|
|
7
|
+
getOwnPropertyDescriptor: jt
|
|
10
8
|
} = Object;
|
|
11
9
|
let {
|
|
12
|
-
freeze:
|
|
13
|
-
seal:
|
|
10
|
+
freeze: S,
|
|
11
|
+
seal: b,
|
|
14
12
|
create: me
|
|
15
13
|
} = Object, {
|
|
16
|
-
apply:
|
|
14
|
+
apply: ve,
|
|
17
15
|
construct: Ue
|
|
18
16
|
} = typeof Reflect < "u" && Reflect;
|
|
19
|
-
|
|
20
|
-
return
|
|
17
|
+
S || (S = function(o) {
|
|
18
|
+
return o;
|
|
21
19
|
});
|
|
22
|
-
|
|
23
|
-
return
|
|
20
|
+
b || (b = function(o) {
|
|
21
|
+
return o;
|
|
24
22
|
});
|
|
25
|
-
|
|
26
|
-
for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0),
|
|
27
|
-
c[
|
|
28
|
-
return
|
|
23
|
+
ve || (ve = function(o, l) {
|
|
24
|
+
for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), D = 2; D < a; D++)
|
|
25
|
+
c[D - 2] = arguments[D];
|
|
26
|
+
return o.apply(l, c);
|
|
29
27
|
});
|
|
30
|
-
Ue || (Ue = function(
|
|
28
|
+
Ue || (Ue = function(o) {
|
|
31
29
|
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
32
30
|
a[c - 1] = arguments[c];
|
|
33
|
-
return new
|
|
31
|
+
return new o(...a);
|
|
34
32
|
});
|
|
35
|
-
const fe =
|
|
36
|
-
function
|
|
37
|
-
return function(
|
|
38
|
-
|
|
33
|
+
const fe = R(Array.prototype.forEach), Vt = R(Array.prototype.lastIndexOf), ft = R(Array.prototype.pop), q = R(Array.prototype.push), $t = R(Array.prototype.splice), pe = R(String.prototype.toLowerCase), Ie = R(String.prototype.toString), Me = R(String.prototype.match), K = R(String.prototype.replace), qt = R(String.prototype.indexOf), Kt = R(String.prototype.trim), L = R(Object.prototype.hasOwnProperty), h = R(RegExp.prototype.test), Z = Zt(TypeError);
|
|
34
|
+
function R(s) {
|
|
35
|
+
return function(o) {
|
|
36
|
+
o instanceof RegExp && (o.lastIndex = 0);
|
|
39
37
|
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
40
38
|
a[c - 1] = arguments[c];
|
|
41
|
-
return
|
|
39
|
+
return ve(s, o, a);
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
|
-
function
|
|
42
|
+
function Zt(s) {
|
|
45
43
|
return function() {
|
|
46
|
-
for (var
|
|
44
|
+
for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)
|
|
47
45
|
l[a] = arguments[a];
|
|
48
|
-
return Ue(
|
|
46
|
+
return Ue(s, l);
|
|
49
47
|
};
|
|
50
48
|
}
|
|
51
|
-
function s
|
|
49
|
+
function r(s, o) {
|
|
52
50
|
let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : pe;
|
|
53
|
-
ct && ct(
|
|
54
|
-
let a =
|
|
51
|
+
ct && ct(s, null);
|
|
52
|
+
let a = o.length;
|
|
55
53
|
for (; a--; ) {
|
|
56
|
-
let c =
|
|
54
|
+
let c = o[a];
|
|
57
55
|
if (typeof c == "string") {
|
|
58
|
-
const
|
|
59
|
-
|
|
56
|
+
const D = l(c);
|
|
57
|
+
D !== c && (Yt(o) || (o[a] = D), c = D);
|
|
60
58
|
}
|
|
61
|
-
|
|
59
|
+
s[c] = !0;
|
|
62
60
|
}
|
|
63
|
-
return
|
|
61
|
+
return s;
|
|
64
62
|
}
|
|
65
|
-
function
|
|
66
|
-
for (let
|
|
67
|
-
|
|
68
|
-
return
|
|
63
|
+
function Jt(s) {
|
|
64
|
+
for (let o = 0; o < s.length; o++)
|
|
65
|
+
L(s, o) || (s[o] = null);
|
|
66
|
+
return s;
|
|
69
67
|
}
|
|
70
|
-
function C(
|
|
71
|
-
const
|
|
72
|
-
for (const [l, a] of _t(
|
|
73
|
-
|
|
74
|
-
return
|
|
68
|
+
function C(s) {
|
|
69
|
+
const o = me(null);
|
|
70
|
+
for (const [l, a] of _t(s))
|
|
71
|
+
L(s, l) && (Array.isArray(a) ? o[l] = Jt(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = C(a) : o[l] = a);
|
|
72
|
+
return o;
|
|
75
73
|
}
|
|
76
|
-
function J(
|
|
77
|
-
for (;
|
|
78
|
-
const a =
|
|
74
|
+
function J(s, o) {
|
|
75
|
+
for (; s !== null; ) {
|
|
76
|
+
const a = jt(s, o);
|
|
79
77
|
if (a) {
|
|
80
78
|
if (a.get)
|
|
81
|
-
return
|
|
79
|
+
return R(a.get);
|
|
82
80
|
if (typeof a.value == "function")
|
|
83
|
-
return
|
|
81
|
+
return R(a.value);
|
|
84
82
|
}
|
|
85
|
-
|
|
83
|
+
s = Xt(s);
|
|
86
84
|
}
|
|
87
85
|
function l() {
|
|
88
86
|
return null;
|
|
89
87
|
}
|
|
90
88
|
return l;
|
|
91
89
|
}
|
|
92
|
-
const ut =
|
|
90
|
+
const ut = S(["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", "search", "section", "select", "shadow", "slot", "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"]), we = S(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), xe = S(["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"]), Qt = S(["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"]), Pe = S(["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 = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), mt = S(["#text"]), pt = S(["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", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "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", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), ke = S(["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", "mask-type", "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"]), Tt = S(["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"]), ue = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), tn = b(/\{\{[\w\W]*|[\w\W]*\}\}/gm), nn = b(/<%[\w\W]*|[\w\W]*%>/gm), on = b(/\$\{[\w\W]*/gm), an = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), rn = b(/^aria-[\-\w]+$/), gt = b(
|
|
93
91
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
94
92
|
// eslint-disable-line no-useless-escape
|
|
95
|
-
),
|
|
93
|
+
), sn = b(/^(?:\w+script|data):/i), ln = b(
|
|
96
94
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
97
95
|
// eslint-disable-line no-control-regex
|
|
98
|
-
), At =
|
|
96
|
+
), At = b(/^html$/i), cn = b(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
99
97
|
var dt = /* @__PURE__ */ Object.freeze({
|
|
100
98
|
__proto__: null,
|
|
101
|
-
ARIA_ATTR:
|
|
102
|
-
ATTR_WHITESPACE:
|
|
103
|
-
CUSTOM_ELEMENT:
|
|
104
|
-
DATA_ATTR:
|
|
99
|
+
ARIA_ATTR: rn,
|
|
100
|
+
ATTR_WHITESPACE: ln,
|
|
101
|
+
CUSTOM_ELEMENT: cn,
|
|
102
|
+
DATA_ATTR: an,
|
|
105
103
|
DOCTYPE_NAME: At,
|
|
106
|
-
ERB_EXPR:
|
|
104
|
+
ERB_EXPR: nn,
|
|
107
105
|
IS_ALLOWED_URI: gt,
|
|
108
|
-
IS_SCRIPT_OR_DATA:
|
|
109
|
-
MUSTACHE_EXPR:
|
|
110
|
-
TMPLIT_EXPR:
|
|
106
|
+
IS_SCRIPT_OR_DATA: sn,
|
|
107
|
+
MUSTACHE_EXPR: tn,
|
|
108
|
+
TMPLIT_EXPR: on
|
|
111
109
|
});
|
|
112
110
|
const Q = {
|
|
113
111
|
element: 1,
|
|
@@ -116,26 +114,26 @@ const Q = {
|
|
|
116
114
|
progressingInstruction: 7,
|
|
117
115
|
comment: 8,
|
|
118
116
|
document: 9
|
|
119
|
-
},
|
|
117
|
+
}, fn = function() {
|
|
120
118
|
return typeof window > "u" ? null : window;
|
|
121
|
-
},
|
|
122
|
-
if (typeof
|
|
119
|
+
}, un = function(o, l) {
|
|
120
|
+
if (typeof o != "object" || typeof o.createPolicy != "function")
|
|
123
121
|
return null;
|
|
124
122
|
let a = null;
|
|
125
123
|
const c = "data-tt-policy-suffix";
|
|
126
124
|
l && l.hasAttribute(c) && (a = l.getAttribute(c));
|
|
127
|
-
const
|
|
125
|
+
const D = "dompurify" + (a ? "#" + a : "");
|
|
128
126
|
try {
|
|
129
|
-
return
|
|
130
|
-
createHTML(
|
|
131
|
-
return
|
|
127
|
+
return o.createPolicy(D, {
|
|
128
|
+
createHTML(v) {
|
|
129
|
+
return v;
|
|
132
130
|
},
|
|
133
|
-
createScriptURL(
|
|
134
|
-
return
|
|
131
|
+
createScriptURL(v) {
|
|
132
|
+
return v;
|
|
135
133
|
}
|
|
136
134
|
});
|
|
137
135
|
} catch {
|
|
138
|
-
return console.warn("TrustedTypes policy " +
|
|
136
|
+
return console.warn("TrustedTypes policy " + D + " could not be created."), null;
|
|
139
137
|
}
|
|
140
138
|
}, Et = function() {
|
|
141
139
|
return {
|
|
@@ -151,39 +149,39 @@ const Q = {
|
|
|
151
149
|
};
|
|
152
150
|
};
|
|
153
151
|
function ht() {
|
|
154
|
-
let
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
return
|
|
152
|
+
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fn();
|
|
153
|
+
const o = (i) => ht(i);
|
|
154
|
+
if (o.version = "3.3.2", o.removed = [], !s || !s.document || s.document.nodeType !== Q.document || !s.Element)
|
|
155
|
+
return o.isSupported = !1, o;
|
|
158
156
|
let {
|
|
159
157
|
document: l
|
|
160
|
-
} =
|
|
158
|
+
} = s;
|
|
161
159
|
const a = l, c = a.currentScript, {
|
|
162
|
-
DocumentFragment:
|
|
163
|
-
HTMLTemplateElement:
|
|
160
|
+
DocumentFragment: D,
|
|
161
|
+
HTMLTemplateElement: v,
|
|
164
162
|
Node: Te,
|
|
165
163
|
Element: Fe,
|
|
166
164
|
NodeFilter: B,
|
|
167
|
-
NamedNodeMap: St =
|
|
165
|
+
NamedNodeMap: St = s.NamedNodeMap || s.MozNamedAttrMap,
|
|
168
166
|
HTMLFormElement: Rt,
|
|
169
|
-
DOMParser:
|
|
167
|
+
DOMParser: Dt,
|
|
170
168
|
trustedTypes: ee
|
|
171
|
-
} =
|
|
172
|
-
if (typeof
|
|
169
|
+
} = s, Y = Fe.prototype, Ot = J(Y, "cloneNode"), Lt = J(Y, "remove"), bt = J(Y, "nextSibling"), yt = J(Y, "childNodes"), te = J(Y, "parentNode");
|
|
170
|
+
if (typeof v == "function") {
|
|
173
171
|
const i = l.createElement("template");
|
|
174
172
|
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
175
173
|
}
|
|
176
|
-
let
|
|
174
|
+
let g, X = "";
|
|
177
175
|
const {
|
|
178
176
|
implementation: de,
|
|
179
177
|
createNodeIterator: Nt,
|
|
180
|
-
createDocumentFragment:
|
|
181
|
-
getElementsByTagName:
|
|
178
|
+
createDocumentFragment: Ct,
|
|
179
|
+
getElementsByTagName: It
|
|
182
180
|
} = l, {
|
|
183
181
|
importNode: Mt
|
|
184
182
|
} = a;
|
|
185
|
-
let
|
|
186
|
-
|
|
183
|
+
let A = Et();
|
|
184
|
+
o.isSupported = typeof _t == "function" && typeof te == "function" && de && de.createHTMLDocument !== void 0;
|
|
187
185
|
const {
|
|
188
186
|
MUSTACHE_EXPR: Ee,
|
|
189
187
|
ERB_EXPR: _e,
|
|
@@ -192,14 +190,14 @@ function ht() {
|
|
|
192
190
|
ARIA_ATTR: xt,
|
|
193
191
|
IS_SCRIPT_OR_DATA: Pt,
|
|
194
192
|
ATTR_WHITESPACE: He,
|
|
195
|
-
CUSTOM_ELEMENT:
|
|
193
|
+
CUSTOM_ELEMENT: kt
|
|
196
194
|
} = dt;
|
|
197
195
|
let {
|
|
198
196
|
IS_ALLOWED_URI: ze
|
|
199
197
|
} = dt, T = null;
|
|
200
|
-
const Ge =
|
|
198
|
+
const Ge = r({}, [...ut, ...we, ...xe, ...Pe, ...mt]);
|
|
201
199
|
let d = null;
|
|
202
|
-
const We =
|
|
200
|
+
const We = r({}, [...pt, ...ke, ...Tt, ...ue]);
|
|
203
201
|
let u = Object.seal(me(null, {
|
|
204
202
|
tagNameCheck: {
|
|
205
203
|
writable: !0,
|
|
@@ -219,8 +217,8 @@ function ht() {
|
|
|
219
217
|
enumerable: !0,
|
|
220
218
|
value: !1
|
|
221
219
|
}
|
|
222
|
-
})),
|
|
223
|
-
const
|
|
220
|
+
})), j = null, ne = null;
|
|
221
|
+
const x = Object.seal(me(null, {
|
|
224
222
|
tagCheck: {
|
|
225
223
|
writable: !0,
|
|
226
224
|
configurable: !1,
|
|
@@ -234,62 +232,62 @@ function ht() {
|
|
|
234
232
|
value: null
|
|
235
233
|
}
|
|
236
234
|
}));
|
|
237
|
-
let Be = !0, Ae = !0, Ye = !1,
|
|
238
|
-
const
|
|
239
|
-
let Re = !0, V = !1, H = {},
|
|
240
|
-
const
|
|
235
|
+
let Be = !0, Ae = !0, Ye = !1, Xe = !0, U = !1, oe = !0, P = !1, he = !1, Se = !1, F = !1, ie = !1, ae = !1, je = !0, Ve = !1;
|
|
236
|
+
const vt = "user-content-";
|
|
237
|
+
let Re = !0, V = !1, H = {}, y = null;
|
|
238
|
+
const De = r({}, ["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"]);
|
|
241
239
|
let $e = null;
|
|
242
|
-
const qe =
|
|
243
|
-
let
|
|
244
|
-
const Ke =
|
|
245
|
-
let z =
|
|
246
|
-
const Ut =
|
|
247
|
-
let le =
|
|
248
|
-
const Ft =
|
|
240
|
+
const qe = r({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
241
|
+
let Oe = null;
|
|
242
|
+
const Ke = r({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), re = "http://www.w3.org/1998/Math/MathML", se = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml";
|
|
243
|
+
let z = I, Le = !1, be = null;
|
|
244
|
+
const Ut = r({}, [re, se, I], Ie);
|
|
245
|
+
let le = r({}, ["mi", "mo", "mn", "ms", "mtext"]), ce = r({}, ["annotation-xml"]);
|
|
246
|
+
const Ft = r({}, ["title", "style", "font", "a", "script"]);
|
|
249
247
|
let $ = null;
|
|
250
248
|
const Ht = ["application/xhtml+xml", "text/html"], zt = "text/html";
|
|
251
249
|
let p = null, G = null;
|
|
252
250
|
const Gt = l.createElement("form"), Ze = function(e) {
|
|
253
251
|
return e instanceof RegExp || e instanceof Function;
|
|
254
|
-
},
|
|
252
|
+
}, ye = function() {
|
|
255
253
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
256
254
|
if (!(G && G === e)) {
|
|
257
255
|
if ((!e || typeof e != "object") && (e = {}), e = C(e), $ = // eslint-disable-next-line unicorn/prefer-includes
|
|
258
|
-
Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, p = $ === "application/xhtml+xml" ?
|
|
256
|
+
Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, p = $ === "application/xhtml+xml" ? Ie : pe, T = L(e, "ALLOWED_TAGS") ? r({}, e.ALLOWED_TAGS, p) : Ge, d = L(e, "ALLOWED_ATTR") ? r({}, e.ALLOWED_ATTR, p) : We, be = L(e, "ALLOWED_NAMESPACES") ? r({}, e.ALLOWED_NAMESPACES, Ie) : Ut, Oe = L(e, "ADD_URI_SAFE_ATTR") ? r(C(Ke), e.ADD_URI_SAFE_ATTR, p) : Ke, $e = L(e, "ADD_DATA_URI_TAGS") ? r(C(qe), e.ADD_DATA_URI_TAGS, p) : qe, y = L(e, "FORBID_CONTENTS") ? r({}, e.FORBID_CONTENTS, p) : De, j = L(e, "FORBID_TAGS") ? r({}, e.FORBID_TAGS, p) : C({}), ne = L(e, "FORBID_ATTR") ? r({}, e.FORBID_ATTR, p) : C({}), H = L(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Be = e.ALLOW_ARIA_ATTR !== !1, Ae = e.ALLOW_DATA_ATTR !== !1, Ye = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Xe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, oe = e.SAFE_FOR_XML !== !1, P = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, ie = e.RETURN_DOM_FRAGMENT || !1, ae = e.RETURN_TRUSTED_TYPE || !1, Se = e.FORCE_BODY || !1, je = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Re = e.KEEP_CONTENT !== !1, V = e.IN_PLACE || !1, ze = e.ALLOWED_URI_REGEXP || gt, z = e.NAMESPACE || I, le = e.MATHML_TEXT_INTEGRATION_POINTS || le, ce = e.HTML_INTEGRATION_POINTS || ce, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (Ae = !1), ie && (F = !0), H && (T = r({}, mt), d = me(null), H.html === !0 && (r(T, ut), r(d, pt)), H.svg === !0 && (r(T, we), r(d, ke), r(d, ue)), H.svgFilters === !0 && (r(T, xe), r(d, ke), r(d, ue)), H.mathMl === !0 && (r(T, Pe), r(d, Tt), r(d, ue))), L(e, "ADD_TAGS") || (x.tagCheck = null), L(e, "ADD_ATTR") || (x.attributeCheck = null), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? x.tagCheck = e.ADD_TAGS : (T === Ge && (T = C(T)), r(T, e.ADD_TAGS, p))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? x.attributeCheck = e.ADD_ATTR : (d === We && (d = C(d)), r(d, e.ADD_ATTR, p))), e.ADD_URI_SAFE_ATTR && r(Oe, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (y === De && (y = C(y)), r(y, e.FORBID_CONTENTS, p)), e.ADD_FORBID_CONTENTS && (y === De && (y = C(y)), r(y, e.ADD_FORBID_CONTENTS, p)), Re && (T["#text"] = !0), P && r(T, ["html", "head", "body"]), T.table && (r(T, ["tbody"]), delete j.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
259
257
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
260
258
|
throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
261
259
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
262
260
|
throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
263
|
-
|
|
261
|
+
g = e.TRUSTED_TYPES_POLICY, X = g.createHTML("");
|
|
264
262
|
} else
|
|
265
|
-
|
|
266
|
-
|
|
263
|
+
g === void 0 && (g = un(ee, c)), g !== null && typeof X == "string" && (X = g.createHTML(""));
|
|
264
|
+
S && S(e), G = e;
|
|
267
265
|
}
|
|
268
|
-
}, Je =
|
|
266
|
+
}, Je = r({}, [...we, ...xe, ...Qt]), Qe = r({}, [...Pe, ...en]), Wt = function(e) {
|
|
269
267
|
let t = te(e);
|
|
270
268
|
(!t || !t.tagName) && (t = {
|
|
271
269
|
namespaceURI: z,
|
|
272
270
|
tagName: "template"
|
|
273
271
|
});
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
},
|
|
277
|
-
q(
|
|
272
|
+
const n = pe(e.tagName), f = pe(t.tagName);
|
|
273
|
+
return be[e.namespaceURI] ? e.namespaceURI === se ? t.namespaceURI === I ? n === "svg" : t.namespaceURI === re ? n === "svg" && (f === "annotation-xml" || le[f]) : !!Je[n] : e.namespaceURI === re ? t.namespaceURI === I ? n === "math" : t.namespaceURI === se ? n === "math" && ce[f] : !!Qe[n] : e.namespaceURI === I ? t.namespaceURI === se && !ce[f] || t.namespaceURI === re && !le[f] ? !1 : !Qe[n] && (Ft[n] || !Je[n]) : !!($ === "application/xhtml+xml" && be[e.namespaceURI]) : !1;
|
|
274
|
+
}, N = function(e) {
|
|
275
|
+
q(o.removed, {
|
|
278
276
|
element: e
|
|
279
277
|
});
|
|
280
278
|
try {
|
|
281
279
|
te(e).removeChild(e);
|
|
282
280
|
} catch {
|
|
283
|
-
|
|
281
|
+
Lt(e);
|
|
284
282
|
}
|
|
285
283
|
}, k = function(e, t) {
|
|
286
284
|
try {
|
|
287
|
-
q(
|
|
285
|
+
q(o.removed, {
|
|
288
286
|
attribute: t.getAttributeNode(e),
|
|
289
287
|
from: t
|
|
290
288
|
});
|
|
291
289
|
} catch {
|
|
292
|
-
q(
|
|
290
|
+
q(o.removed, {
|
|
293
291
|
attribute: null,
|
|
294
292
|
from: t
|
|
295
293
|
});
|
|
@@ -297,7 +295,7 @@ function ht() {
|
|
|
297
295
|
if (t.removeAttribute(e), e === "is")
|
|
298
296
|
if (F || ie)
|
|
299
297
|
try {
|
|
300
|
-
|
|
298
|
+
N(t);
|
|
301
299
|
} catch {
|
|
302
300
|
}
|
|
303
301
|
else
|
|
@@ -306,29 +304,29 @@ function ht() {
|
|
|
306
304
|
} catch {
|
|
307
305
|
}
|
|
308
306
|
}, et = function(e) {
|
|
309
|
-
let t = null,
|
|
307
|
+
let t = null, n = null;
|
|
310
308
|
if (Se)
|
|
311
309
|
e = "<remove></remove>" + e;
|
|
312
310
|
else {
|
|
313
311
|
const m = Me(e, /^[\r\n\t ]+/);
|
|
314
|
-
|
|
312
|
+
n = m && m[0];
|
|
315
313
|
}
|
|
316
|
-
$ === "application/xhtml+xml" && z ===
|
|
317
|
-
const f =
|
|
318
|
-
if (z ===
|
|
314
|
+
$ === "application/xhtml+xml" && z === I && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
315
|
+
const f = g ? g.createHTML(e) : e;
|
|
316
|
+
if (z === I)
|
|
319
317
|
try {
|
|
320
|
-
t = new
|
|
318
|
+
t = new Dt().parseFromString(f, $);
|
|
321
319
|
} catch {
|
|
322
320
|
}
|
|
323
321
|
if (!t || !t.documentElement) {
|
|
324
322
|
t = de.createDocument(z, "template", null);
|
|
325
323
|
try {
|
|
326
|
-
t.documentElement.innerHTML =
|
|
324
|
+
t.documentElement.innerHTML = Le ? X : f;
|
|
327
325
|
} catch {
|
|
328
326
|
}
|
|
329
327
|
}
|
|
330
|
-
const
|
|
331
|
-
return e &&
|
|
328
|
+
const _ = t.body || t.documentElement;
|
|
329
|
+
return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), z === I ? It.call(t, P ? "html" : "body")[0] : P ? t.documentElement : _;
|
|
332
330
|
}, tt = function(e) {
|
|
333
331
|
return Nt.call(
|
|
334
332
|
e.ownerDocument || e,
|
|
@@ -342,61 +340,61 @@ function ht() {
|
|
|
342
340
|
}, nt = function(e) {
|
|
343
341
|
return typeof Te == "function" && e instanceof Te;
|
|
344
342
|
};
|
|
345
|
-
function
|
|
346
|
-
fe(i, (
|
|
347
|
-
|
|
343
|
+
function M(i, e, t) {
|
|
344
|
+
fe(i, (n) => {
|
|
345
|
+
n.call(o, e, t, G);
|
|
348
346
|
});
|
|
349
347
|
}
|
|
350
348
|
const ot = function(e) {
|
|
351
349
|
let t = null;
|
|
352
|
-
if (
|
|
353
|
-
return
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
356
|
-
tagName:
|
|
350
|
+
if (M(A.beforeSanitizeElements, e, null), Ne(e))
|
|
351
|
+
return N(e), !0;
|
|
352
|
+
const n = p(e.nodeName);
|
|
353
|
+
if (M(A.uponSanitizeElement, e, {
|
|
354
|
+
tagName: n,
|
|
357
355
|
allowedTags: T
|
|
358
|
-
}), oe && e.hasChildNodes() && !nt(e.firstElementChild) &&
|
|
359
|
-
return
|
|
360
|
-
if (!(
|
|
361
|
-
if (!
|
|
356
|
+
}), oe && e.hasChildNodes() && !nt(e.firstElementChild) && h(/<[/\w!]/g, e.innerHTML) && h(/<[/\w!]/g, e.textContent) || e.nodeType === Q.progressingInstruction || oe && e.nodeType === Q.comment && h(/<[/\w]/g, e.data))
|
|
357
|
+
return N(e), !0;
|
|
358
|
+
if (!(x.tagCheck instanceof Function && x.tagCheck(n)) && (!T[n] || j[n])) {
|
|
359
|
+
if (!j[n] && at(n) && (u.tagNameCheck instanceof RegExp && h(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
362
360
|
return !1;
|
|
363
|
-
if (Re && !
|
|
364
|
-
const f = te(e) || e.parentNode,
|
|
365
|
-
if (
|
|
366
|
-
const m =
|
|
367
|
-
for (let
|
|
368
|
-
const
|
|
369
|
-
|
|
361
|
+
if (Re && !y[n]) {
|
|
362
|
+
const f = te(e) || e.parentNode, _ = yt(e) || e.childNodes;
|
|
363
|
+
if (_ && f) {
|
|
364
|
+
const m = _.length;
|
|
365
|
+
for (let O = m - 1; O >= 0; --O) {
|
|
366
|
+
const w = Ot(_[O], !0);
|
|
367
|
+
w.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(w, bt(e));
|
|
370
368
|
}
|
|
371
369
|
}
|
|
372
370
|
}
|
|
373
|
-
return
|
|
371
|
+
return N(e), !0;
|
|
374
372
|
}
|
|
375
|
-
return e instanceof Fe && !Wt(e) || (
|
|
373
|
+
return e instanceof Fe && !Wt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && h(/<\/no(script|embed|frames)/i, e.innerHTML) ? (N(e), !0) : (U && e.nodeType === Q.text && (t = e.textContent, fe([Ee, _e, ge], (f) => {
|
|
376
374
|
t = K(t, f, " ");
|
|
377
|
-
}), e.textContent !== t && (q(
|
|
375
|
+
}), e.textContent !== t && (q(o.removed, {
|
|
378
376
|
element: e.cloneNode()
|
|
379
|
-
}), e.textContent = t)),
|
|
380
|
-
}, it = function(e, t,
|
|
381
|
-
if (ne[t] ||
|
|
377
|
+
}), e.textContent = t)), M(A.afterSanitizeElements, e, null), !1);
|
|
378
|
+
}, it = function(e, t, n) {
|
|
379
|
+
if (ne[t] || je && (t === "id" || t === "name") && (n in l || n in Gt))
|
|
382
380
|
return !1;
|
|
383
|
-
if (!(Ae && !ne[t] &&
|
|
384
|
-
if (!(Be &&
|
|
385
|
-
if (!(
|
|
381
|
+
if (!(Ae && !ne[t] && h(wt, t))) {
|
|
382
|
+
if (!(Be && h(xt, t))) {
|
|
383
|
+
if (!(x.attributeCheck instanceof Function && x.attributeCheck(t, e))) {
|
|
386
384
|
if (!d[t] || ne[t]) {
|
|
387
385
|
if (
|
|
388
386
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
389
387
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
390
388
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
391
|
-
!(at(e) && (u.tagNameCheck instanceof RegExp &&
|
|
389
|
+
!(at(e) && (u.tagNameCheck instanceof RegExp && h(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && h(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
392
390
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
393
|
-
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp &&
|
|
391
|
+
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && h(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
394
392
|
) return !1;
|
|
395
|
-
} else if (!
|
|
396
|
-
if (!
|
|
397
|
-
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" &&
|
|
398
|
-
if (!(Ye && !
|
|
399
|
-
if (
|
|
393
|
+
} else if (!Oe[t]) {
|
|
394
|
+
if (!h(ze, K(n, He, ""))) {
|
|
395
|
+
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && qt(n, "data:") === 0 && $e[e])) {
|
|
396
|
+
if (!(Ye && !h(Pt, K(n, He, "")))) {
|
|
397
|
+
if (n)
|
|
400
398
|
return !1;
|
|
401
399
|
}
|
|
402
400
|
}
|
|
@@ -407,15 +405,15 @@ function ht() {
|
|
|
407
405
|
}
|
|
408
406
|
return !0;
|
|
409
407
|
}, at = function(e) {
|
|
410
|
-
return e !== "annotation-xml" && Me(e,
|
|
408
|
+
return e !== "annotation-xml" && Me(e, kt);
|
|
411
409
|
}, rt = function(e) {
|
|
412
|
-
|
|
410
|
+
M(A.beforeSanitizeAttributes, e, null);
|
|
413
411
|
const {
|
|
414
412
|
attributes: t
|
|
415
413
|
} = e;
|
|
416
414
|
if (!t || Ne(e))
|
|
417
415
|
return;
|
|
418
|
-
const
|
|
416
|
+
const n = {
|
|
419
417
|
attrName: "",
|
|
420
418
|
attrValue: "",
|
|
421
419
|
keepAttr: !0,
|
|
@@ -424,13 +422,13 @@ function ht() {
|
|
|
424
422
|
};
|
|
425
423
|
let f = t.length;
|
|
426
424
|
for (; f--; ) {
|
|
427
|
-
const
|
|
425
|
+
const _ = t[f], {
|
|
428
426
|
name: m,
|
|
429
|
-
namespaceURI:
|
|
430
|
-
value:
|
|
431
|
-
} =
|
|
432
|
-
let E = m === "value" ?
|
|
433
|
-
if (
|
|
427
|
+
namespaceURI: O,
|
|
428
|
+
value: w
|
|
429
|
+
} = _, W = p(m), Ce = w;
|
|
430
|
+
let E = m === "value" ? Ce : Kt(Ce);
|
|
431
|
+
if (n.attrName = W, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, M(A.uponSanitizeAttribute, e, n), E = n.attrValue, Ve && (W === "id" || W === "name") && (k(m, e), E = vt + E), oe && h(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, E)) {
|
|
434
432
|
k(m, e);
|
|
435
433
|
continue;
|
|
436
434
|
}
|
|
@@ -438,13 +436,13 @@ function ht() {
|
|
|
438
436
|
k(m, e);
|
|
439
437
|
continue;
|
|
440
438
|
}
|
|
441
|
-
if (
|
|
439
|
+
if (n.forceKeepAttr)
|
|
442
440
|
continue;
|
|
443
|
-
if (!
|
|
441
|
+
if (!n.keepAttr) {
|
|
444
442
|
k(m, e);
|
|
445
443
|
continue;
|
|
446
444
|
}
|
|
447
|
-
if (!
|
|
445
|
+
if (!Xe && h(/\/>/i, E)) {
|
|
448
446
|
k(m, e);
|
|
449
447
|
continue;
|
|
450
448
|
}
|
|
@@ -456,116 +454,100 @@ function ht() {
|
|
|
456
454
|
k(m, e);
|
|
457
455
|
continue;
|
|
458
456
|
}
|
|
459
|
-
if (
|
|
457
|
+
if (g && typeof ee == "object" && typeof ee.getAttributeType == "function" && !O)
|
|
460
458
|
switch (ee.getAttributeType(st, W)) {
|
|
461
459
|
case "TrustedHTML": {
|
|
462
|
-
E =
|
|
460
|
+
E = g.createHTML(E);
|
|
463
461
|
break;
|
|
464
462
|
}
|
|
465
463
|
case "TrustedScriptURL": {
|
|
466
|
-
E =
|
|
464
|
+
E = g.createScriptURL(E);
|
|
467
465
|
break;
|
|
468
466
|
}
|
|
469
467
|
}
|
|
470
|
-
if (E !==
|
|
468
|
+
if (E !== Ce)
|
|
471
469
|
try {
|
|
472
|
-
|
|
470
|
+
O ? e.setAttributeNS(O, m, E) : e.setAttribute(m, E), Ne(e) ? N(e) : ft(o.removed);
|
|
473
471
|
} catch {
|
|
474
472
|
k(m, e);
|
|
475
473
|
}
|
|
476
474
|
}
|
|
477
|
-
|
|
475
|
+
M(A.afterSanitizeAttributes, e, null);
|
|
478
476
|
}, Bt = function i(e) {
|
|
479
477
|
let t = null;
|
|
480
|
-
const
|
|
481
|
-
for (
|
|
482
|
-
|
|
483
|
-
|
|
478
|
+
const n = tt(e);
|
|
479
|
+
for (M(A.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
|
|
480
|
+
M(A.uponSanitizeShadowNode, t, null), ot(t), rt(t), t.content instanceof D && i(t.content);
|
|
481
|
+
M(A.afterSanitizeShadowDOM, e, null);
|
|
484
482
|
};
|
|
485
|
-
return
|
|
486
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null,
|
|
487
|
-
if (
|
|
483
|
+
return o.sanitize = function(i) {
|
|
484
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, f = null, _ = null;
|
|
485
|
+
if (Le = !i, Le && (i = "<!-->"), typeof i != "string" && !nt(i))
|
|
488
486
|
if (typeof i.toString == "function") {
|
|
489
487
|
if (i = i.toString(), typeof i != "string")
|
|
490
488
|
throw Z("dirty is not a string, aborting");
|
|
491
489
|
} else
|
|
492
490
|
throw Z("toString is not a function");
|
|
493
|
-
if (!
|
|
491
|
+
if (!o.isSupported)
|
|
494
492
|
return i;
|
|
495
|
-
if (he ||
|
|
493
|
+
if (he || ye(e), o.removed = [], typeof i == "string" && (V = !1), V) {
|
|
496
494
|
if (i.nodeName) {
|
|
497
|
-
const
|
|
498
|
-
if (!T[
|
|
495
|
+
const w = p(i.nodeName);
|
|
496
|
+
if (!T[w] || j[w])
|
|
499
497
|
throw Z("root node is forbidden and cannot be sanitized in-place");
|
|
500
498
|
}
|
|
501
499
|
} else if (i instanceof Te)
|
|
502
|
-
t = et("<!---->"),
|
|
500
|
+
t = et("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === Q.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
|
|
503
501
|
else {
|
|
504
|
-
if (!F && !U && !
|
|
502
|
+
if (!F && !U && !P && // eslint-disable-next-line unicorn/prefer-includes
|
|
505
503
|
i.indexOf("<") === -1)
|
|
506
|
-
return
|
|
504
|
+
return g && ae ? g.createHTML(i) : i;
|
|
507
505
|
if (t = et(i), !t)
|
|
508
|
-
return F ? null : ae ?
|
|
506
|
+
return F ? null : ae ? X : "";
|
|
509
507
|
}
|
|
510
|
-
t && Se &&
|
|
508
|
+
t && Se && N(t.firstChild);
|
|
511
509
|
const m = tt(V ? i : t);
|
|
512
510
|
for (; f = m.nextNode(); )
|
|
513
|
-
ot(f), rt(f), f.content instanceof
|
|
511
|
+
ot(f), rt(f), f.content instanceof D && Bt(f.content);
|
|
514
512
|
if (V)
|
|
515
513
|
return i;
|
|
516
514
|
if (F) {
|
|
517
515
|
if (ie)
|
|
518
|
-
for (
|
|
519
|
-
|
|
516
|
+
for (_ = Ct.call(t.ownerDocument); t.firstChild; )
|
|
517
|
+
_.appendChild(t.firstChild);
|
|
520
518
|
else
|
|
521
|
-
|
|
522
|
-
return (d.shadowroot || d.shadowrootmode) && (
|
|
519
|
+
_ = t;
|
|
520
|
+
return (d.shadowroot || d.shadowrootmode) && (_ = Mt.call(a, _, !0)), _;
|
|
523
521
|
}
|
|
524
|
-
let
|
|
525
|
-
return
|
|
526
|
-
` +
|
|
527
|
-
|
|
528
|
-
}),
|
|
529
|
-
},
|
|
522
|
+
let O = P ? t.outerHTML : t.innerHTML;
|
|
523
|
+
return P && T["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && h(At, t.ownerDocument.doctype.name) && (O = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
524
|
+
` + O), U && fe([Ee, _e, ge], (w) => {
|
|
525
|
+
O = K(O, w, " ");
|
|
526
|
+
}), g && ae ? g.createHTML(O) : O;
|
|
527
|
+
}, o.setConfig = function() {
|
|
530
528
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
531
|
-
|
|
532
|
-
},
|
|
529
|
+
ye(i), he = !0;
|
|
530
|
+
}, o.clearConfig = function() {
|
|
533
531
|
G = null, he = !1;
|
|
534
|
-
},
|
|
535
|
-
G ||
|
|
536
|
-
const
|
|
537
|
-
return it(
|
|
538
|
-
},
|
|
539
|
-
typeof e == "function" && q(
|
|
540
|
-
},
|
|
532
|
+
}, o.isValidAttribute = function(i, e, t) {
|
|
533
|
+
G || ye({});
|
|
534
|
+
const n = p(i), f = p(e);
|
|
535
|
+
return it(n, f, t);
|
|
536
|
+
}, o.addHook = function(i, e) {
|
|
537
|
+
typeof e == "function" && q(A[i], e);
|
|
538
|
+
}, o.removeHook = function(i, e) {
|
|
541
539
|
if (e !== void 0) {
|
|
542
|
-
const t =
|
|
543
|
-
return t === -1 ? void 0 :
|
|
540
|
+
const t = Vt(A[i], e);
|
|
541
|
+
return t === -1 ? void 0 : $t(A[i], t, 1)[0];
|
|
544
542
|
}
|
|
545
|
-
return ft(
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
},
|
|
549
|
-
|
|
550
|
-
},
|
|
551
|
-
}
|
|
552
|
-
var dn = ht();
|
|
553
|
-
function gn({ content: r, width: n, height: l, className: a, cssClass: c }) {
|
|
554
|
-
const _ = Xt.useMemo(
|
|
555
|
-
() => dn.sanitize(r, {
|
|
556
|
-
USE_PROFILES: { svg: !0, svgFilters: !0 }
|
|
557
|
-
}),
|
|
558
|
-
[r]
|
|
559
|
-
), b = {};
|
|
560
|
-
return n && (b.width = n), l && (b.height = l), /* @__PURE__ */ Yt.jsx(
|
|
561
|
-
"div",
|
|
562
|
-
{
|
|
563
|
-
style: Object.keys(b).length > 0 ? b : void 0,
|
|
564
|
-
className: jt(a, c),
|
|
565
|
-
dangerouslySetInnerHTML: { __html: _ }
|
|
566
|
-
}
|
|
567
|
-
);
|
|
543
|
+
return ft(A[i]);
|
|
544
|
+
}, o.removeHooks = function(i) {
|
|
545
|
+
A[i] = [];
|
|
546
|
+
}, o.removeAllHooks = function() {
|
|
547
|
+
A = Et();
|
|
548
|
+
}, o;
|
|
568
549
|
}
|
|
550
|
+
var mn = ht();
|
|
569
551
|
export {
|
|
570
|
-
|
|
552
|
+
mn as p
|
|
571
553
|
};
|