jclib-ui 1.1.8 → 1.1.11
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/jclib-ui.es.js
CHANGED
|
@@ -9116,7 +9116,7 @@ function RadioGroup({
|
|
|
9116
9116
|
}
|
|
9117
9117
|
);
|
|
9118
9118
|
}
|
|
9119
|
-
/*! @license DOMPurify 3.4.
|
|
9119
|
+
/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */
|
|
9120
9120
|
function _arrayLikeToArray(r, a) {
|
|
9121
9121
|
(null == a || a > r.length) && (a = r.length);
|
|
9122
9122
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
@@ -9349,7 +9349,7 @@ const mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mgly
|
|
|
9349
9349
|
const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
9350
9350
|
const text = freeze(["#text"]);
|
|
9351
9351
|
const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]);
|
|
9352
|
-
const svg = freeze(["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", "dominant-baseline", "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-orientation", "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"]);
|
|
9352
|
+
const svg = freeze(["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", "dominant-baseline", "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", "pointer-events", "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-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "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"]);
|
|
9353
9353
|
const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]);
|
|
9354
9354
|
const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
9355
9355
|
const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
|
|
@@ -9389,6 +9389,15 @@ const NODE_TYPE = {
|
|
|
9389
9389
|
notation: 12
|
|
9390
9390
|
// Deprecated
|
|
9391
9391
|
};
|
|
9392
|
+
const LITERAL_TEXT_ELEMENT_NAMES = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"];
|
|
9393
|
+
const LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
|
|
9394
|
+
const LITERAL_TEXT_CLOSE = function() {
|
|
9395
|
+
const map = {};
|
|
9396
|
+
arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
|
|
9397
|
+
map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
9398
|
+
});
|
|
9399
|
+
return freeze(map);
|
|
9400
|
+
}();
|
|
9392
9401
|
const getGlobal = function getGlobal2() {
|
|
9393
9402
|
return typeof window === "undefined" ? null : window;
|
|
9394
9403
|
};
|
|
@@ -9432,10 +9441,14 @@ const _createHooksMap = function _createHooksMap2() {
|
|
|
9432
9441
|
const _resolveSetOption = function _resolveSetOption2(cfg, key, fallback, options) {
|
|
9433
9442
|
return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
|
|
9434
9443
|
};
|
|
9444
|
+
const _resolveObjectOption = function _resolveObjectOption2(cfg, key, makeFallback) {
|
|
9445
|
+
const value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;
|
|
9446
|
+
return value && typeof value === "object" ? clone(value) : makeFallback();
|
|
9447
|
+
};
|
|
9435
9448
|
function createDOMPurify() {
|
|
9436
9449
|
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
9437
9450
|
const DOMPurify = (root) => createDOMPurify(root);
|
|
9438
|
-
DOMPurify.version = "3.4.
|
|
9451
|
+
DOMPurify.version = "3.4.15";
|
|
9439
9452
|
DOMPurify.removed = [];
|
|
9440
9453
|
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
9441
9454
|
DOMPurify.isSupported = false;
|
|
@@ -9452,6 +9465,7 @@ function createDOMPurify() {
|
|
|
9452
9465
|
const ElementPrototype = Element.prototype;
|
|
9453
9466
|
const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
|
|
9454
9467
|
const remove = lookupGetter(ElementPrototype, "remove");
|
|
9468
|
+
const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
|
|
9455
9469
|
const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
|
|
9456
9470
|
const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
|
|
9457
9471
|
const getParentNode = lookupGetter(ElementPrototype, "parentNode");
|
|
@@ -9460,6 +9474,12 @@ function createDOMPurify() {
|
|
|
9460
9474
|
const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
|
|
9461
9475
|
const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
|
|
9462
9476
|
const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, "ownerDocument") : null;
|
|
9477
|
+
const _readNodeType = function _readNodeType2(node) {
|
|
9478
|
+
return getNodeType ? getNodeType(node) : node.nodeType;
|
|
9479
|
+
};
|
|
9480
|
+
const _readNodeName = function _readNodeName2(node) {
|
|
9481
|
+
return getNodeName ? getNodeName(node) : node.nodeName;
|
|
9482
|
+
};
|
|
9463
9483
|
if (typeof HTMLTemplateElement === "function") {
|
|
9464
9484
|
const template = document2.createElement("template");
|
|
9465
9485
|
if (template.content && template.content.ownerDocument) {
|
|
@@ -9686,9 +9706,19 @@ function createDOMPurify() {
|
|
|
9686
9706
|
IN_PLACE = cfg.IN_PLACE || false;
|
|
9687
9707
|
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
|
|
9688
9708
|
NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
|
|
9689
|
-
MATHML_TEXT_INTEGRATION_POINTS =
|
|
9690
|
-
|
|
9691
|
-
|
|
9709
|
+
MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(
|
|
9710
|
+
cfg,
|
|
9711
|
+
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
9712
|
+
() => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS)
|
|
9713
|
+
// Default built-in map
|
|
9714
|
+
);
|
|
9715
|
+
HTML_INTEGRATION_POINTS = _resolveObjectOption(
|
|
9716
|
+
cfg,
|
|
9717
|
+
"HTML_INTEGRATION_POINTS",
|
|
9718
|
+
() => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS)
|
|
9719
|
+
// Default built-in map
|
|
9720
|
+
);
|
|
9721
|
+
const customElementHandling = _resolveObjectOption(cfg, "CUSTOM_ELEMENT_HANDLING", () => create(null));
|
|
9692
9722
|
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
9693
9723
|
if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
9694
9724
|
CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
|
|
@@ -9751,15 +9781,6 @@ function createDOMPurify() {
|
|
|
9751
9781
|
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
9752
9782
|
}
|
|
9753
9783
|
}
|
|
9754
|
-
if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
|
|
9755
|
-
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
9756
|
-
}
|
|
9757
|
-
if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
|
|
9758
|
-
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
9759
|
-
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
9760
|
-
}
|
|
9761
|
-
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
9762
|
-
}
|
|
9763
9784
|
if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
|
|
9764
9785
|
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
9765
9786
|
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
@@ -9876,6 +9897,16 @@ function createDOMPurify() {
|
|
|
9876
9897
|
}
|
|
9877
9898
|
}
|
|
9878
9899
|
};
|
|
9900
|
+
const _stripAttributeNode = function _stripAttributeNode2(element, attribute, name) {
|
|
9901
|
+
try {
|
|
9902
|
+
removeAttributeNode(element, attribute);
|
|
9903
|
+
} catch (_) {
|
|
9904
|
+
try {
|
|
9905
|
+
element.removeAttribute(name);
|
|
9906
|
+
} catch (_2) {
|
|
9907
|
+
}
|
|
9908
|
+
}
|
|
9909
|
+
};
|
|
9879
9910
|
const _neutralizeRoot = function _neutralizeRoot2(root) {
|
|
9880
9911
|
_neutralizeSubtree(root);
|
|
9881
9912
|
const childNodes = getChildNodes(root);
|
|
@@ -9897,27 +9928,35 @@ function createDOMPurify() {
|
|
|
9897
9928
|
const attribute = attributes[i];
|
|
9898
9929
|
const name = attribute && attribute.name;
|
|
9899
9930
|
if (typeof name === "string") {
|
|
9900
|
-
|
|
9901
|
-
root.removeAttribute(name);
|
|
9902
|
-
} catch (_) {
|
|
9903
|
-
}
|
|
9931
|
+
_stripAttributeNode(root, attribute, name);
|
|
9904
9932
|
}
|
|
9905
9933
|
}
|
|
9906
9934
|
}
|
|
9907
9935
|
};
|
|
9908
|
-
const _removeAttribute = function _removeAttribute2(name, element) {
|
|
9936
|
+
const _removeAttribute = function _removeAttribute2(name, element, attr) {
|
|
9937
|
+
if (!attr) {
|
|
9938
|
+
try {
|
|
9939
|
+
attr = element.getAttributeNode(name);
|
|
9940
|
+
} catch (_) {
|
|
9941
|
+
attr = null;
|
|
9942
|
+
}
|
|
9943
|
+
}
|
|
9944
|
+
arrayPush(DOMPurify.removed, {
|
|
9945
|
+
attribute: attr || null,
|
|
9946
|
+
from: element
|
|
9947
|
+
});
|
|
9909
9948
|
try {
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9949
|
+
if (attr) {
|
|
9950
|
+
removeAttributeNode(element, attr);
|
|
9951
|
+
} else {
|
|
9952
|
+
element.removeAttribute(name);
|
|
9953
|
+
}
|
|
9914
9954
|
} catch (_) {
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
}
|
|
9955
|
+
try {
|
|
9956
|
+
element.removeAttribute(name);
|
|
9957
|
+
} catch (_2) {
|
|
9958
|
+
}
|
|
9919
9959
|
}
|
|
9920
|
-
element.removeAttribute(name);
|
|
9921
9960
|
if (name === "is") {
|
|
9922
9961
|
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
|
9923
9962
|
try {
|
|
@@ -9943,17 +9982,14 @@ function createDOMPurify() {
|
|
|
9943
9982
|
if (typeof name !== "string" || ALLOWED_ATTR[transformCaseFunc(name)]) {
|
|
9944
9983
|
continue;
|
|
9945
9984
|
}
|
|
9946
|
-
|
|
9947
|
-
element.removeAttribute(name);
|
|
9948
|
-
} catch (_) {
|
|
9949
|
-
}
|
|
9985
|
+
_stripAttributeNode(element, attribute, name);
|
|
9950
9986
|
}
|
|
9951
9987
|
};
|
|
9952
9988
|
const _neutralizeSubtree = function _neutralizeSubtree2(root) {
|
|
9953
9989
|
const stack = [root];
|
|
9954
9990
|
while (stack.length > 0) {
|
|
9955
9991
|
const node = stack.pop();
|
|
9956
|
-
const nodeType =
|
|
9992
|
+
const nodeType = _readNodeType(node);
|
|
9957
9993
|
if (nodeType === NODE_TYPE.element) {
|
|
9958
9994
|
_stripDisallowedAttributes(node);
|
|
9959
9995
|
}
|
|
@@ -9965,6 +10001,15 @@ function createDOMPurify() {
|
|
|
9965
10001
|
}
|
|
9966
10002
|
}
|
|
9967
10003
|
};
|
|
10004
|
+
const _isPatchLinkageAttribute = function _isPatchLinkageAttribute2(lcName, lcTag) {
|
|
10005
|
+
if (!SAFE_FOR_XML) {
|
|
10006
|
+
return false;
|
|
10007
|
+
}
|
|
10008
|
+
if (lcName === "patchsrc") {
|
|
10009
|
+
return true;
|
|
10010
|
+
}
|
|
10011
|
+
return lcName === "for" && lcTag !== "label" && lcTag !== "output";
|
|
10012
|
+
};
|
|
9968
10013
|
const _neutralizePatchLinkage = function _neutralizePatchLinkage2(root) {
|
|
9969
10014
|
if (!SAFE_FOR_XML) {
|
|
9970
10015
|
return;
|
|
@@ -9972,7 +10017,7 @@ function createDOMPurify() {
|
|
|
9972
10017
|
const stack = [root];
|
|
9973
10018
|
while (stack.length > 0) {
|
|
9974
10019
|
const node = stack.pop();
|
|
9975
|
-
const nodeType =
|
|
10020
|
+
const nodeType = _readNodeType(node);
|
|
9976
10021
|
if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
|
|
9977
10022
|
try {
|
|
9978
10023
|
remove(node);
|
|
@@ -9982,12 +10027,12 @@ function createDOMPurify() {
|
|
|
9982
10027
|
}
|
|
9983
10028
|
if (nodeType === NODE_TYPE.element) {
|
|
9984
10029
|
const element = node;
|
|
9985
|
-
const lcTag = transformCaseFunc(
|
|
10030
|
+
const lcTag = transformCaseFunc(_readNodeName(node));
|
|
9986
10031
|
try {
|
|
9987
10032
|
if (element.hasAttribute && element.hasAttribute("patchsrc")) {
|
|
9988
10033
|
element.removeAttribute("patchsrc");
|
|
9989
10034
|
}
|
|
9990
|
-
if (element.hasAttribute && element.hasAttribute("for") &&
|
|
10035
|
+
if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) {
|
|
9991
10036
|
element.removeAttribute("for");
|
|
9992
10037
|
}
|
|
9993
10038
|
} catch (_) {
|
|
@@ -10090,7 +10135,16 @@ function createDOMPurify() {
|
|
|
10090
10135
|
// makes the direct read diverge from the cached read; a clean form
|
|
10091
10136
|
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
10092
10137
|
// canonical NamedNodeMap.
|
|
10093
|
-
element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" ||
|
|
10138
|
+
element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || // A form descendant named "removeAttributeNode" or "getAttributeNode"
|
|
10139
|
+
// shadows these Attr-node methods via [LegacyOverrideBuiltIns].
|
|
10140
|
+
// _removeAttribute() / _stripAttributeNode() reach for
|
|
10141
|
+
// element.removeAttributeNode(attr) first; when it is shadowed the call
|
|
10142
|
+
// throws and the name-based fallback element.removeAttribute(name)
|
|
10143
|
+
// ASCII-lowercases its lookup key in an HTML document, silently missing
|
|
10144
|
+
// a case-preserved event-handler attribute (e.g. an ONANIMATIONSTART
|
|
10145
|
+
// that reached the sanitizer through an XML/XHTML parse). Flag the form
|
|
10146
|
+
// so it is removed wholesale, exactly as for the other shadowed methods.
|
|
10147
|
+
typeof element.removeAttributeNode !== "function" || typeof element.getAttributeNode !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
10094
10148
|
// returns the integer 1 for any Element regardless of realm; direct
|
|
10095
10149
|
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
10096
10150
|
// the named child element. Cheap addition — nodeType is read from
|
|
@@ -10142,7 +10196,7 @@ function createDOMPurify() {
|
|
|
10142
10196
|
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {
|
|
10143
10197
|
return true;
|
|
10144
10198
|
}
|
|
10145
|
-
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "
|
|
10199
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) {
|
|
10146
10200
|
return true;
|
|
10147
10201
|
}
|
|
10148
10202
|
if (currentNode.nodeType === NODE_TYPE.processingInstruction) {
|
|
@@ -10153,14 +10207,21 @@ function createDOMPurify() {
|
|
|
10153
10207
|
}
|
|
10154
10208
|
return false;
|
|
10155
10209
|
};
|
|
10156
|
-
const
|
|
10157
|
-
if (
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10210
|
+
const _matchesNameCheck = function _matchesNameCheck2(check, name) {
|
|
10211
|
+
if (check instanceof RegExp) {
|
|
10212
|
+
return regExpTest(check, name);
|
|
10213
|
+
}
|
|
10214
|
+
if (check instanceof Function) {
|
|
10215
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
10216
|
+
args[_key - 2] = arguments[_key];
|
|
10163
10217
|
}
|
|
10218
|
+
return Boolean(check(name, ...args));
|
|
10219
|
+
}
|
|
10220
|
+
return false;
|
|
10221
|
+
};
|
|
10222
|
+
const _sanitizeDisallowedNode = function _sanitizeDisallowedNode2(currentNode, tagName, root) {
|
|
10223
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
10224
|
+
return false;
|
|
10164
10225
|
}
|
|
10165
10226
|
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
10166
10227
|
const parentNode = getParentNode(currentNode);
|
|
@@ -10182,28 +10243,31 @@ function createDOMPurify() {
|
|
|
10182
10243
|
}
|
|
10183
10244
|
return set === defaultSet || set === setConfigSet ? clone(set) : set;
|
|
10184
10245
|
};
|
|
10246
|
+
const _handleHookDetachedNode = function _handleHookDetachedNode2(currentNode, root) {
|
|
10247
|
+
if (currentNode === root || getParentNode(currentNode) !== null) {
|
|
10248
|
+
return false;
|
|
10249
|
+
}
|
|
10250
|
+
if (IN_PLACE) {
|
|
10251
|
+
_neutralizeSubtree(currentNode);
|
|
10252
|
+
}
|
|
10253
|
+
return true;
|
|
10254
|
+
};
|
|
10185
10255
|
const _sanitizeElements = function _sanitizeElements2(currentNode, root) {
|
|
10186
10256
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
10187
|
-
if (currentNode
|
|
10188
|
-
if (IN_PLACE) {
|
|
10189
|
-
_neutralizeSubtree(currentNode);
|
|
10190
|
-
}
|
|
10257
|
+
if (_handleHookDetachedNode(currentNode, root)) {
|
|
10191
10258
|
return true;
|
|
10192
10259
|
}
|
|
10193
10260
|
if (_isClobbered(currentNode)) {
|
|
10194
10261
|
_forceRemove(currentNode);
|
|
10195
10262
|
return true;
|
|
10196
10263
|
}
|
|
10197
|
-
const tagName = transformCaseFunc(
|
|
10264
|
+
const tagName = transformCaseFunc(_readNodeName(currentNode));
|
|
10198
10265
|
ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);
|
|
10199
10266
|
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
|
10200
10267
|
tagName,
|
|
10201
10268
|
allowedTags: ALLOWED_TAGS
|
|
10202
10269
|
});
|
|
10203
|
-
if (currentNode
|
|
10204
|
-
if (IN_PLACE) {
|
|
10205
|
-
_neutralizeSubtree(currentNode);
|
|
10206
|
-
}
|
|
10270
|
+
if (_handleHookDetachedNode(currentNode, root)) {
|
|
10207
10271
|
return true;
|
|
10208
10272
|
}
|
|
10209
10273
|
if (_isUnsafeNode(currentNode, tagName)) {
|
|
@@ -10217,7 +10281,7 @@ function createDOMPurify() {
|
|
|
10217
10281
|
}
|
|
10218
10282
|
return removed;
|
|
10219
10283
|
}
|
|
10220
|
-
const nt =
|
|
10284
|
+
const nt = _readNodeType(currentNode);
|
|
10221
10285
|
if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
|
|
10222
10286
|
_forceRemove(currentNode);
|
|
10223
10287
|
return true;
|
|
@@ -10242,38 +10306,43 @@ function createDOMPurify() {
|
|
|
10242
10306
|
if (FORBID_ATTR[lcName]) {
|
|
10243
10307
|
return false;
|
|
10244
10308
|
}
|
|
10245
|
-
if (
|
|
10246
|
-
return false;
|
|
10247
|
-
}
|
|
10248
|
-
if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") {
|
|
10309
|
+
if (_isPatchLinkageAttribute(lcName, lcTag)) {
|
|
10249
10310
|
return false;
|
|
10250
10311
|
}
|
|
10251
10312
|
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
|
|
10252
10313
|
return false;
|
|
10253
10314
|
}
|
|
10254
10315
|
const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
|
|
10255
|
-
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName))
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
//
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10316
|
+
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) {
|
|
10317
|
+
return true;
|
|
10318
|
+
}
|
|
10319
|
+
if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) {
|
|
10320
|
+
return true;
|
|
10321
|
+
}
|
|
10322
|
+
if (!nameIsPermitted) {
|
|
10323
|
+
return (
|
|
10324
|
+
// Condition a) covers a basically valid custom element tag name whose
|
|
10325
|
+
// tag passes the configured tagNameCheck and whose attribute name
|
|
10326
|
+
// passes the configured attributeNameCheck ...
|
|
10327
|
+
_isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || // Condition b) covers an `is` attribute whose value passes the
|
|
10328
|
+
// configured tagNameCheck while customized built-in elements are
|
|
10329
|
+
// allowed.
|
|
10330
|
+
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)
|
|
10331
|
+
);
|
|
10332
|
+
}
|
|
10333
|
+
if (URI_SAFE_ATTRIBUTES[lcName]) {
|
|
10334
|
+
return true;
|
|
10335
|
+
}
|
|
10336
|
+
if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) {
|
|
10337
|
+
return true;
|
|
10338
|
+
}
|
|
10339
|
+
if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) {
|
|
10340
|
+
return true;
|
|
10341
|
+
}
|
|
10342
|
+
if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) {
|
|
10343
|
+
return true;
|
|
10344
|
+
}
|
|
10345
|
+
return !value;
|
|
10277
10346
|
};
|
|
10278
10347
|
const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
|
|
10279
10348
|
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
@@ -10301,11 +10370,12 @@ function createDOMPurify() {
|
|
|
10301
10370
|
}
|
|
10302
10371
|
if (_isClobbered(currentNode)) {
|
|
10303
10372
|
_forceRemove(currentNode);
|
|
10304
|
-
|
|
10305
|
-
arrayPop(DOMPurify.removed);
|
|
10373
|
+
return false;
|
|
10306
10374
|
}
|
|
10375
|
+
return true;
|
|
10307
10376
|
} catch (_) {
|
|
10308
10377
|
_removeAttribute(name, currentNode);
|
|
10378
|
+
return false;
|
|
10309
10379
|
}
|
|
10310
10380
|
};
|
|
10311
10381
|
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
@@ -10330,6 +10400,7 @@ function createDOMPurify() {
|
|
|
10330
10400
|
const lcName = transformCaseFunc(name);
|
|
10331
10401
|
const initValue = attrValue;
|
|
10332
10402
|
let value = name === "value" ? initValue : stringTrim(initValue);
|
|
10403
|
+
let recreatedNamedProp = false;
|
|
10333
10404
|
hookEvent.attrName = lcName;
|
|
10334
10405
|
hookEvent.attrValue = value;
|
|
10335
10406
|
hookEvent.keepAttr = true;
|
|
@@ -10337,38 +10408,42 @@ function createDOMPurify() {
|
|
|
10337
10408
|
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
10338
10409
|
value = hookEvent.attrValue;
|
|
10339
10410
|
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
|
|
10340
|
-
_removeAttribute(name, currentNode);
|
|
10411
|
+
_removeAttribute(name, currentNode, attr);
|
|
10341
10412
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
10413
|
+
recreatedNamedProp = true;
|
|
10342
10414
|
}
|
|
10343
10415
|
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
|
|
10344
|
-
_removeAttribute(name, currentNode);
|
|
10416
|
+
_removeAttribute(name, currentNode, attr);
|
|
10345
10417
|
continue;
|
|
10346
10418
|
}
|
|
10347
10419
|
if (lcName === "attributename" && stringMatch(value, "href")) {
|
|
10348
|
-
_removeAttribute(name, currentNode);
|
|
10420
|
+
_removeAttribute(name, currentNode, attr);
|
|
10349
10421
|
continue;
|
|
10350
10422
|
}
|
|
10351
10423
|
if (hookEvent.forceKeepAttr) {
|
|
10352
10424
|
continue;
|
|
10353
10425
|
}
|
|
10354
10426
|
if (!hookEvent.keepAttr) {
|
|
10355
|
-
_removeAttribute(name, currentNode);
|
|
10427
|
+
_removeAttribute(name, currentNode, attr);
|
|
10356
10428
|
continue;
|
|
10357
10429
|
}
|
|
10358
10430
|
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
|
|
10359
|
-
_removeAttribute(name, currentNode);
|
|
10431
|
+
_removeAttribute(name, currentNode, attr);
|
|
10360
10432
|
continue;
|
|
10361
10433
|
}
|
|
10362
10434
|
if (SAFE_FOR_TEMPLATES) {
|
|
10363
10435
|
value = _stripTemplateExpressions(value);
|
|
10364
10436
|
}
|
|
10365
10437
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
10366
|
-
_removeAttribute(name, currentNode);
|
|
10438
|
+
_removeAttribute(name, currentNode, attr);
|
|
10367
10439
|
continue;
|
|
10368
10440
|
}
|
|
10369
10441
|
value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
|
|
10370
10442
|
if (value !== initValue) {
|
|
10371
|
-
_setAttributeValue(currentNode, name, namespaceURI, value);
|
|
10443
|
+
const cleanWrite = _setAttributeValue(currentNode, name, namespaceURI, value);
|
|
10444
|
+
if (cleanWrite && recreatedNamedProp) {
|
|
10445
|
+
arrayPop(DOMPurify.removed);
|
|
10446
|
+
}
|
|
10372
10447
|
}
|
|
10373
10448
|
}
|
|
10374
10449
|
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
@@ -10384,8 +10459,7 @@ function createDOMPurify() {
|
|
|
10384
10459
|
if (_isDocumentFragment(shadowNode.content)) {
|
|
10385
10460
|
_sanitizeShadowDOM2(shadowNode.content);
|
|
10386
10461
|
}
|
|
10387
|
-
|
|
10388
|
-
if (shadowNodeType === NODE_TYPE.element) {
|
|
10462
|
+
if (_readNodeType(shadowNode) === NODE_TYPE.element) {
|
|
10389
10463
|
const innerSr = getShadowRoot(shadowNode);
|
|
10390
10464
|
if (_isDocumentFragment(innerSr)) {
|
|
10391
10465
|
_sanitizeAttachedShadowRoots(innerSr);
|
|
@@ -10407,7 +10481,7 @@ function createDOMPurify() {
|
|
|
10407
10481
|
continue;
|
|
10408
10482
|
}
|
|
10409
10483
|
const node = item.node;
|
|
10410
|
-
const nodeType =
|
|
10484
|
+
const nodeType = _readNodeType(node);
|
|
10411
10485
|
const isElement = nodeType === NODE_TYPE.element;
|
|
10412
10486
|
const childNodes = getChildNodes(node);
|
|
10413
10487
|
if (childNodes) {
|
|
@@ -10479,7 +10553,7 @@ function createDOMPurify() {
|
|
|
10479
10553
|
const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
|
|
10480
10554
|
if (inPlace) {
|
|
10481
10555
|
_neutralizePatchLinkage(dirty);
|
|
10482
|
-
const nn =
|
|
10556
|
+
const nn = _readNodeName(dirty);
|
|
10483
10557
|
if (typeof nn === "string") {
|
|
10484
10558
|
const tagName = transformCaseFunc(nn);
|
|
10485
10559
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
@@ -10507,7 +10581,7 @@ function createDOMPurify() {
|
|
|
10507
10581
|
} else {
|
|
10508
10582
|
body.appendChild(importedNode);
|
|
10509
10583
|
}
|
|
10510
|
-
_sanitizeAttachedShadowRoots(
|
|
10584
|
+
_sanitizeAttachedShadowRoots(body);
|
|
10511
10585
|
} else {
|
|
10512
10586
|
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
|
|
10513
10587
|
dirty.indexOf("<") === -1) {
|
|
@@ -10822,7 +10896,7 @@ const MainContainer = styled.main`
|
|
|
10822
10896
|
function ScrollContainer({ children, hasMaxWidth = true }) {
|
|
10823
10897
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(MainContainer, { hasMaxWidth, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "scroll--content", children }) });
|
|
10824
10898
|
}
|
|
10825
|
-
function
|
|
10899
|
+
function PrintButtonTypes({ ...rest }) {
|
|
10826
10900
|
const { reportType, setReportType } = useLibContext();
|
|
10827
10901
|
const arrTypes = ["PDF", "Excel", "Word", "Texto"];
|
|
10828
10902
|
const reportTypeItems = createDropdownItems([
|
|
@@ -10855,28 +10929,33 @@ function PrintButtons({ onClose, showTypes }) {
|
|
|
10855
10929
|
}
|
|
10856
10930
|
}
|
|
10857
10931
|
]);
|
|
10932
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10933
|
+
DropDownButton,
|
|
10934
|
+
{
|
|
10935
|
+
items: reportTypeItems,
|
|
10936
|
+
title: "Formato do relatório",
|
|
10937
|
+
direction: "down",
|
|
10938
|
+
...rest,
|
|
10939
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "d-flex align-items-center gap-1", children: [
|
|
10940
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
10941
|
+
"Formato",
|
|
10942
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "d-inline-block d-sm-none", children: " do relatório:" })
|
|
10943
|
+
] }),
|
|
10944
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "me-1", children: arrTypes[reportType] }),
|
|
10945
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: "fa-solid fa-chevron-down ms-auto fs-7" })
|
|
10946
|
+
] })
|
|
10947
|
+
}
|
|
10948
|
+
);
|
|
10949
|
+
}
|
|
10950
|
+
function PrintButtons({ onClose, showTypes }) {
|
|
10951
|
+
const { setReportType } = useLibContext();
|
|
10858
10952
|
useEffect(() => {
|
|
10859
10953
|
if (!showTypes) {
|
|
10860
10954
|
setReportType(0);
|
|
10861
10955
|
}
|
|
10862
10956
|
}, []);
|
|
10863
10957
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "print-btn--container", children: [
|
|
10864
|
-
showTypes && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10865
|
-
DropDownButton,
|
|
10866
|
-
{
|
|
10867
|
-
items: reportTypeItems,
|
|
10868
|
-
title: "Formato do relatório",
|
|
10869
|
-
direction: "down",
|
|
10870
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "d-flex align-items-center gap-1", children: [
|
|
10871
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
10872
|
-
"Formato",
|
|
10873
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "d-inline-block d-sm-none", children: " do relatório:" })
|
|
10874
|
-
] }),
|
|
10875
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "me-1", children: arrTypes[reportType] }),
|
|
10876
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: "fa-solid fa-chevron-down ms-auto fs-7" })
|
|
10877
|
-
] })
|
|
10878
|
-
}
|
|
10879
|
-
),
|
|
10958
|
+
showTypes && /* @__PURE__ */ jsxRuntimeExports.jsx(PrintButtonTypes, {}),
|
|
10880
10959
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "print-btn--buttons", children: [
|
|
10881
10960
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "btn btn-primary", type: "submit", children: [
|
|
10882
10961
|
/* @__PURE__ */ jsxRuntimeExports.jsx("i", { className: "fas fa-print" }),
|
|
@@ -14589,6 +14668,7 @@ export {
|
|
|
14589
14668
|
Panel,
|
|
14590
14669
|
PanelDashboard,
|
|
14591
14670
|
PanelHeader,
|
|
14671
|
+
PrintButtonTypes,
|
|
14592
14672
|
PrintButtons,
|
|
14593
14673
|
QRCodeReader,
|
|
14594
14674
|
RadioGroup,
|