@dasidev/dasi-ui 1.0.3 → 1.0.6
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/bin/dash-cli.cjs +191 -0
- package/bin/{dasi-cli.cjs → dasi-cli-old.cjs} +16 -11
- package/index.html +18 -0
- package/package.json +14 -9
- package/postcss.config.js +0 -0
- package/tailwind.config.js +137 -0
- package/tsconfig.json +14 -0
- package/vite.config.ts +33 -0
- package/dist/date-selector-test-BlukYeWl.js +0 -91
- package/dist/html2canvas.esm-CKxSAI8P.js +0 -4886
- package/dist/index-BQSA2aPs.js +0 -126556
- package/dist/index.es-DQWt-PZn.js +0 -5769
- package/dist/index.es.js +0 -11
- package/dist/index.umd.js +0 -8564
- package/dist/informasi-gudang-BmoEy2RL.js +0 -164
- package/dist/informasi-gudang-DXfS46Nh.js +0 -50
- package/dist/purify.es-C-9oolON.js +0 -546
- package/dist/style.css +0 -1
- package/dist/test-schema-JFghGc0_.js +0 -8
- package/dist/test-schema-uusFsJe4.js +0 -438
- package/dist/types-l0sNRNKZ.js +0 -1
- /package/{dist → public}/favicon.ico +0 -0
- /package/{dist → public}/img/brand/ic_pln.svg +0 -0
- /package/{dist → public}/img/brand/mapp_power_logo.svg +0 -0
- /package/{dist → public}/img/common/pltu_ulumbu_flores_ntt.jpeg +0 -0
- /package/{dist → public}/scripts/pdf.worker.min.js +0 -0
- /package/{dist → public}/scripts/pdf.worker.min.mjs +0 -0
- /package/{dist → public}/scripts/pdf.worker.mjs +0 -0
- /package/{dist → public}/scripts/pdf.worker.mjs.map +0 -0
|
@@ -1,546 +0,0 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.2.7 | (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.7/LICENSE */
|
|
2
|
-
const {
|
|
3
|
-
entries: Tt,
|
|
4
|
-
setPrototypeOf: st,
|
|
5
|
-
isFrozen: Bt,
|
|
6
|
-
getPrototypeOf: Yt,
|
|
7
|
-
getOwnPropertyDescriptor: Xt
|
|
8
|
-
} = Object;
|
|
9
|
-
let {
|
|
10
|
-
freeze: S,
|
|
11
|
-
seal: L,
|
|
12
|
-
create: Et
|
|
13
|
-
} = Object, {
|
|
14
|
-
apply: xe,
|
|
15
|
-
construct: Pe
|
|
16
|
-
} = typeof Reflect < "u" && Reflect;
|
|
17
|
-
S || (S = function(o) {
|
|
18
|
-
return o;
|
|
19
|
-
});
|
|
20
|
-
L || (L = function(o) {
|
|
21
|
-
return o;
|
|
22
|
-
});
|
|
23
|
-
xe || (xe = function(o, l) {
|
|
24
|
-
for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), O = 2; O < a; O++)
|
|
25
|
-
c[O - 2] = arguments[O];
|
|
26
|
-
return o.apply(l, c);
|
|
27
|
-
});
|
|
28
|
-
Pe || (Pe = function(o) {
|
|
29
|
-
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
30
|
-
a[c - 1] = arguments[c];
|
|
31
|
-
return new o(...a);
|
|
32
|
-
});
|
|
33
|
-
const le = R(Array.prototype.forEach), jt = R(Array.prototype.lastIndexOf), lt = R(Array.prototype.pop), $ = R(Array.prototype.push), Vt = R(Array.prototype.splice), fe = R(String.prototype.toLowerCase), De = R(String.prototype.toString), Ne = R(String.prototype.match), q = R(String.prototype.replace), $t = R(String.prototype.indexOf), qt = R(String.prototype.trim), b = R(Object.prototype.hasOwnProperty), A = R(RegExp.prototype.test), K = Kt(TypeError);
|
|
34
|
-
function R(s) {
|
|
35
|
-
return function(o) {
|
|
36
|
-
o instanceof RegExp && (o.lastIndex = 0);
|
|
37
|
-
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
38
|
-
a[c - 1] = arguments[c];
|
|
39
|
-
return xe(s, o, a);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function Kt(s) {
|
|
43
|
-
return function() {
|
|
44
|
-
for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)
|
|
45
|
-
l[a] = arguments[a];
|
|
46
|
-
return Pe(s, l);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function r(s, o) {
|
|
50
|
-
let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : fe;
|
|
51
|
-
st && st(s, null);
|
|
52
|
-
let a = o.length;
|
|
53
|
-
for (; a--; ) {
|
|
54
|
-
let c = o[a];
|
|
55
|
-
if (typeof c == "string") {
|
|
56
|
-
const O = l(c);
|
|
57
|
-
O !== c && (Bt(o) || (o[a] = O), c = O);
|
|
58
|
-
}
|
|
59
|
-
s[c] = !0;
|
|
60
|
-
}
|
|
61
|
-
return s;
|
|
62
|
-
}
|
|
63
|
-
function Zt(s) {
|
|
64
|
-
for (let o = 0; o < s.length; o++)
|
|
65
|
-
b(s, o) || (s[o] = null);
|
|
66
|
-
return s;
|
|
67
|
-
}
|
|
68
|
-
function C(s) {
|
|
69
|
-
const o = Et(null);
|
|
70
|
-
for (const [l, a] of Tt(s))
|
|
71
|
-
b(s, l) && (Array.isArray(a) ? o[l] = Zt(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = C(a) : o[l] = a);
|
|
72
|
-
return o;
|
|
73
|
-
}
|
|
74
|
-
function Z(s, o) {
|
|
75
|
-
for (; s !== null; ) {
|
|
76
|
-
const a = Xt(s, o);
|
|
77
|
-
if (a) {
|
|
78
|
-
if (a.get)
|
|
79
|
-
return R(a.get);
|
|
80
|
-
if (typeof a.value == "function")
|
|
81
|
-
return R(a.value);
|
|
82
|
-
}
|
|
83
|
-
s = Yt(s);
|
|
84
|
-
}
|
|
85
|
-
function l() {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
return l;
|
|
89
|
-
}
|
|
90
|
-
const ct = 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"]), Ie = 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", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Me = 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"]), Jt = 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"]), Ce = 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"]), Qt = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ft = S(["#text"]), ut = 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"]), we = 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", "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"]), mt = 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"]), ce = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), en = L(/\{\{[\w\W]*|[\w\W]*\}\}/gm), tn = L(/<%[\w\W]*|[\w\W]*%>/gm), nn = L(/\$\{[\w\W]*/gm), on = L(/^data-[\-\w.\u00B7-\uFFFF]+$/), an = L(/^aria-[\-\w]+$/), _t = L(
|
|
91
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
92
|
-
// eslint-disable-line no-useless-escape
|
|
93
|
-
), rn = L(/^(?:\w+script|data):/i), sn = L(
|
|
94
|
-
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
95
|
-
// eslint-disable-line no-control-regex
|
|
96
|
-
), gt = L(/^html$/i), ln = L(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
97
|
-
var pt = /* @__PURE__ */ Object.freeze({
|
|
98
|
-
__proto__: null,
|
|
99
|
-
ARIA_ATTR: an,
|
|
100
|
-
ATTR_WHITESPACE: sn,
|
|
101
|
-
CUSTOM_ELEMENT: ln,
|
|
102
|
-
DATA_ATTR: on,
|
|
103
|
-
DOCTYPE_NAME: gt,
|
|
104
|
-
ERB_EXPR: tn,
|
|
105
|
-
IS_ALLOWED_URI: _t,
|
|
106
|
-
IS_SCRIPT_OR_DATA: rn,
|
|
107
|
-
MUSTACHE_EXPR: en,
|
|
108
|
-
TMPLIT_EXPR: nn
|
|
109
|
-
});
|
|
110
|
-
const J = {
|
|
111
|
-
element: 1,
|
|
112
|
-
attribute: 2,
|
|
113
|
-
text: 3,
|
|
114
|
-
cdataSection: 4,
|
|
115
|
-
entityReference: 5,
|
|
116
|
-
// Deprecated
|
|
117
|
-
entityNode: 6,
|
|
118
|
-
// Deprecated
|
|
119
|
-
progressingInstruction: 7,
|
|
120
|
-
comment: 8,
|
|
121
|
-
document: 9,
|
|
122
|
-
documentType: 10,
|
|
123
|
-
documentFragment: 11,
|
|
124
|
-
notation: 12
|
|
125
|
-
// Deprecated
|
|
126
|
-
}, cn = function() {
|
|
127
|
-
return typeof window > "u" ? null : window;
|
|
128
|
-
}, fn = function(o, l) {
|
|
129
|
-
if (typeof o != "object" || typeof o.createPolicy != "function")
|
|
130
|
-
return null;
|
|
131
|
-
let a = null;
|
|
132
|
-
const c = "data-tt-policy-suffix";
|
|
133
|
-
l && l.hasAttribute(c) && (a = l.getAttribute(c));
|
|
134
|
-
const O = "dompurify" + (a ? "#" + a : "");
|
|
135
|
-
try {
|
|
136
|
-
return o.createPolicy(O, {
|
|
137
|
-
createHTML(P) {
|
|
138
|
-
return P;
|
|
139
|
-
},
|
|
140
|
-
createScriptURL(P) {
|
|
141
|
-
return P;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
} catch {
|
|
145
|
-
return console.warn("TrustedTypes policy " + O + " could not be created."), null;
|
|
146
|
-
}
|
|
147
|
-
}, dt = function() {
|
|
148
|
-
return {
|
|
149
|
-
afterSanitizeAttributes: [],
|
|
150
|
-
afterSanitizeElements: [],
|
|
151
|
-
afterSanitizeShadowDOM: [],
|
|
152
|
-
beforeSanitizeAttributes: [],
|
|
153
|
-
beforeSanitizeElements: [],
|
|
154
|
-
beforeSanitizeShadowDOM: [],
|
|
155
|
-
uponSanitizeAttribute: [],
|
|
156
|
-
uponSanitizeElement: [],
|
|
157
|
-
uponSanitizeShadowNode: []
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
function ht() {
|
|
161
|
-
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cn();
|
|
162
|
-
const o = (i) => ht(i);
|
|
163
|
-
if (o.version = "3.2.7", o.removed = [], !s || !s.document || s.document.nodeType !== J.document || !s.Element)
|
|
164
|
-
return o.isSupported = !1, o;
|
|
165
|
-
let {
|
|
166
|
-
document: l
|
|
167
|
-
} = s;
|
|
168
|
-
const a = l, c = a.currentScript, {
|
|
169
|
-
DocumentFragment: O,
|
|
170
|
-
HTMLTemplateElement: P,
|
|
171
|
-
Node: ue,
|
|
172
|
-
Element: ve,
|
|
173
|
-
NodeFilter: W,
|
|
174
|
-
NamedNodeMap: At = s.NamedNodeMap || s.MozNamedAttrMap,
|
|
175
|
-
HTMLFormElement: St,
|
|
176
|
-
DOMParser: Rt,
|
|
177
|
-
trustedTypes: Q
|
|
178
|
-
} = s, B = ve.prototype, Ot = Z(B, "cloneNode"), yt = Z(B, "remove"), Lt = Z(B, "nextSibling"), bt = Z(B, "childNodes"), ee = Z(B, "parentNode");
|
|
179
|
-
if (typeof P == "function") {
|
|
180
|
-
const i = l.createElement("template");
|
|
181
|
-
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
182
|
-
}
|
|
183
|
-
let g, Y = "";
|
|
184
|
-
const {
|
|
185
|
-
implementation: me,
|
|
186
|
-
createNodeIterator: Dt,
|
|
187
|
-
createDocumentFragment: Nt,
|
|
188
|
-
getElementsByTagName: It
|
|
189
|
-
} = l, {
|
|
190
|
-
importNode: Mt
|
|
191
|
-
} = a;
|
|
192
|
-
let h = dt();
|
|
193
|
-
o.isSupported = typeof Tt == "function" && typeof ee == "function" && me && me.createHTMLDocument !== void 0;
|
|
194
|
-
const {
|
|
195
|
-
MUSTACHE_EXPR: pe,
|
|
196
|
-
ERB_EXPR: de,
|
|
197
|
-
TMPLIT_EXPR: Te,
|
|
198
|
-
DATA_ATTR: Ct,
|
|
199
|
-
ARIA_ATTR: wt,
|
|
200
|
-
IS_SCRIPT_OR_DATA: xt,
|
|
201
|
-
ATTR_WHITESPACE: ke,
|
|
202
|
-
CUSTOM_ELEMENT: Pt
|
|
203
|
-
} = pt;
|
|
204
|
-
let {
|
|
205
|
-
IS_ALLOWED_URI: Ue
|
|
206
|
-
} = pt, p = null;
|
|
207
|
-
const Fe = r({}, [...ct, ...Ie, ...Me, ...Ce, ...ft]);
|
|
208
|
-
let T = null;
|
|
209
|
-
const He = r({}, [...ut, ...we, ...mt, ...ce]);
|
|
210
|
-
let u = Object.seal(Et(null, {
|
|
211
|
-
tagNameCheck: {
|
|
212
|
-
writable: !0,
|
|
213
|
-
configurable: !1,
|
|
214
|
-
enumerable: !0,
|
|
215
|
-
value: null
|
|
216
|
-
},
|
|
217
|
-
attributeNameCheck: {
|
|
218
|
-
writable: !0,
|
|
219
|
-
configurable: !1,
|
|
220
|
-
enumerable: !0,
|
|
221
|
-
value: null
|
|
222
|
-
},
|
|
223
|
-
allowCustomizedBuiltInElements: {
|
|
224
|
-
writable: !0,
|
|
225
|
-
configurable: !1,
|
|
226
|
-
enumerable: !0,
|
|
227
|
-
value: !1
|
|
228
|
-
}
|
|
229
|
-
})), X = null, Ee = null, ze = !0, _e = !0, Ge = !1, We = !0, v = !1, te = !0, w = !1, ge = !1, he = !1, k = !1, ne = !1, oe = !1, Be = !0, Ye = !1;
|
|
230
|
-
const vt = "user-content-";
|
|
231
|
-
let Ae = !0, j = !1, U = {}, F = null;
|
|
232
|
-
const Xe = 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"]);
|
|
233
|
-
let je = null;
|
|
234
|
-
const Ve = r({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
235
|
-
let Se = null;
|
|
236
|
-
const $e = r({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ie = "http://www.w3.org/1998/Math/MathML", ae = "http://www.w3.org/2000/svg", N = "http://www.w3.org/1999/xhtml";
|
|
237
|
-
let H = N, Re = !1, Oe = null;
|
|
238
|
-
const kt = r({}, [ie, ae, N], De);
|
|
239
|
-
let re = r({}, ["mi", "mo", "mn", "ms", "mtext"]), se = r({}, ["annotation-xml"]);
|
|
240
|
-
const Ut = r({}, ["title", "style", "font", "a", "script"]);
|
|
241
|
-
let V = null;
|
|
242
|
-
const Ft = ["application/xhtml+xml", "text/html"], Ht = "text/html";
|
|
243
|
-
let d = null, z = null;
|
|
244
|
-
const zt = l.createElement("form"), qe = function(e) {
|
|
245
|
-
return e instanceof RegExp || e instanceof Function;
|
|
246
|
-
}, ye = function() {
|
|
247
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
248
|
-
if (!(z && z === e)) {
|
|
249
|
-
if ((!e || typeof e != "object") && (e = {}), e = C(e), V = // eslint-disable-next-line unicorn/prefer-includes
|
|
250
|
-
Ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Ht : e.PARSER_MEDIA_TYPE, d = V === "application/xhtml+xml" ? De : fe, p = b(e, "ALLOWED_TAGS") ? r({}, e.ALLOWED_TAGS, d) : Fe, T = b(e, "ALLOWED_ATTR") ? r({}, e.ALLOWED_ATTR, d) : He, Oe = b(e, "ALLOWED_NAMESPACES") ? r({}, e.ALLOWED_NAMESPACES, De) : kt, Se = b(e, "ADD_URI_SAFE_ATTR") ? r(C($e), e.ADD_URI_SAFE_ATTR, d) : $e, je = b(e, "ADD_DATA_URI_TAGS") ? r(C(Ve), e.ADD_DATA_URI_TAGS, d) : Ve, F = b(e, "FORBID_CONTENTS") ? r({}, e.FORBID_CONTENTS, d) : Xe, X = b(e, "FORBID_TAGS") ? r({}, e.FORBID_TAGS, d) : C({}), Ee = b(e, "FORBID_ATTR") ? r({}, e.FORBID_ATTR, d) : C({}), U = b(e, "USE_PROFILES") ? e.USE_PROFILES : !1, ze = e.ALLOW_ARIA_ATTR !== !1, _e = e.ALLOW_DATA_ATTR !== !1, Ge = e.ALLOW_UNKNOWN_PROTOCOLS || !1, We = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, v = e.SAFE_FOR_TEMPLATES || !1, te = e.SAFE_FOR_XML !== !1, w = e.WHOLE_DOCUMENT || !1, k = e.RETURN_DOM || !1, ne = e.RETURN_DOM_FRAGMENT || !1, oe = e.RETURN_TRUSTED_TYPE || !1, he = e.FORCE_BODY || !1, Be = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, Ae = e.KEEP_CONTENT !== !1, j = e.IN_PLACE || !1, Ue = e.ALLOWED_URI_REGEXP || _t, H = e.NAMESPACE || N, re = e.MATHML_TEXT_INTEGRATION_POINTS || re, se = e.HTML_INTEGRATION_POINTS || se, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && qe(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), v && (_e = !1), ne && (k = !0), U && (p = r({}, ft), T = [], U.html === !0 && (r(p, ct), r(T, ut)), U.svg === !0 && (r(p, Ie), r(T, we), r(T, ce)), U.svgFilters === !0 && (r(p, Me), r(T, we), r(T, ce)), U.mathMl === !0 && (r(p, Ce), r(T, mt), r(T, ce))), e.ADD_TAGS && (p === Fe && (p = C(p)), r(p, e.ADD_TAGS, d)), e.ADD_ATTR && (T === He && (T = C(T)), r(T, e.ADD_ATTR, d)), e.ADD_URI_SAFE_ATTR && r(Se, e.ADD_URI_SAFE_ATTR, d), e.FORBID_CONTENTS && (F === Xe && (F = C(F)), r(F, e.FORBID_CONTENTS, d)), Ae && (p["#text"] = !0), w && r(p, ["html", "head", "body"]), p.table && (r(p, ["tbody"]), delete X.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
251
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
252
|
-
throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
253
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
254
|
-
throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
255
|
-
g = e.TRUSTED_TYPES_POLICY, Y = g.createHTML("");
|
|
256
|
-
} else
|
|
257
|
-
g === void 0 && (g = fn(Q, c)), g !== null && typeof Y == "string" && (Y = g.createHTML(""));
|
|
258
|
-
S && S(e), z = e;
|
|
259
|
-
}
|
|
260
|
-
}, Ke = r({}, [...Ie, ...Me, ...Jt]), Ze = r({}, [...Ce, ...Qt]), Gt = function(e) {
|
|
261
|
-
let t = ee(e);
|
|
262
|
-
(!t || !t.tagName) && (t = {
|
|
263
|
-
namespaceURI: H,
|
|
264
|
-
tagName: "template"
|
|
265
|
-
});
|
|
266
|
-
const n = fe(e.tagName), f = fe(t.tagName);
|
|
267
|
-
return Oe[e.namespaceURI] ? e.namespaceURI === ae ? t.namespaceURI === N ? n === "svg" : t.namespaceURI === ie ? n === "svg" && (f === "annotation-xml" || re[f]) : !!Ke[n] : e.namespaceURI === ie ? t.namespaceURI === N ? n === "math" : t.namespaceURI === ae ? n === "math" && se[f] : !!Ze[n] : e.namespaceURI === N ? t.namespaceURI === ae && !se[f] || t.namespaceURI === ie && !re[f] ? !1 : !Ze[n] && (Ut[n] || !Ke[n]) : !!(V === "application/xhtml+xml" && Oe[e.namespaceURI]) : !1;
|
|
268
|
-
}, D = function(e) {
|
|
269
|
-
$(o.removed, {
|
|
270
|
-
element: e
|
|
271
|
-
});
|
|
272
|
-
try {
|
|
273
|
-
ee(e).removeChild(e);
|
|
274
|
-
} catch {
|
|
275
|
-
yt(e);
|
|
276
|
-
}
|
|
277
|
-
}, x = function(e, t) {
|
|
278
|
-
try {
|
|
279
|
-
$(o.removed, {
|
|
280
|
-
attribute: t.getAttributeNode(e),
|
|
281
|
-
from: t
|
|
282
|
-
});
|
|
283
|
-
} catch {
|
|
284
|
-
$(o.removed, {
|
|
285
|
-
attribute: null,
|
|
286
|
-
from: t
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
if (t.removeAttribute(e), e === "is")
|
|
290
|
-
if (k || ne)
|
|
291
|
-
try {
|
|
292
|
-
D(t);
|
|
293
|
-
} catch {
|
|
294
|
-
}
|
|
295
|
-
else
|
|
296
|
-
try {
|
|
297
|
-
t.setAttribute(e, "");
|
|
298
|
-
} catch {
|
|
299
|
-
}
|
|
300
|
-
}, Je = function(e) {
|
|
301
|
-
let t = null, n = null;
|
|
302
|
-
if (he)
|
|
303
|
-
e = "<remove></remove>" + e;
|
|
304
|
-
else {
|
|
305
|
-
const m = Ne(e, /^[\r\n\t ]+/);
|
|
306
|
-
n = m && m[0];
|
|
307
|
-
}
|
|
308
|
-
V === "application/xhtml+xml" && H === N && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
309
|
-
const f = g ? g.createHTML(e) : e;
|
|
310
|
-
if (H === N)
|
|
311
|
-
try {
|
|
312
|
-
t = new Rt().parseFromString(f, V);
|
|
313
|
-
} catch {
|
|
314
|
-
}
|
|
315
|
-
if (!t || !t.documentElement) {
|
|
316
|
-
t = me.createDocument(H, "template", null);
|
|
317
|
-
try {
|
|
318
|
-
t.documentElement.innerHTML = Re ? Y : f;
|
|
319
|
-
} catch {
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
const _ = t.body || t.documentElement;
|
|
323
|
-
return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), H === N ? It.call(t, w ? "html" : "body")[0] : w ? t.documentElement : _;
|
|
324
|
-
}, Qe = function(e) {
|
|
325
|
-
return Dt.call(
|
|
326
|
-
e.ownerDocument || e,
|
|
327
|
-
e,
|
|
328
|
-
// eslint-disable-next-line no-bitwise
|
|
329
|
-
W.SHOW_ELEMENT | W.SHOW_COMMENT | W.SHOW_TEXT | W.SHOW_PROCESSING_INSTRUCTION | W.SHOW_CDATA_SECTION,
|
|
330
|
-
null
|
|
331
|
-
);
|
|
332
|
-
}, Le = function(e) {
|
|
333
|
-
return e instanceof St && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof At) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
334
|
-
}, et = function(e) {
|
|
335
|
-
return typeof ue == "function" && e instanceof ue;
|
|
336
|
-
};
|
|
337
|
-
function I(i, e, t) {
|
|
338
|
-
le(i, (n) => {
|
|
339
|
-
n.call(o, e, t, z);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
const tt = function(e) {
|
|
343
|
-
let t = null;
|
|
344
|
-
if (I(h.beforeSanitizeElements, e, null), Le(e))
|
|
345
|
-
return D(e), !0;
|
|
346
|
-
const n = d(e.nodeName);
|
|
347
|
-
if (I(h.uponSanitizeElement, e, {
|
|
348
|
-
tagName: n,
|
|
349
|
-
allowedTags: p
|
|
350
|
-
}), te && e.hasChildNodes() && !et(e.firstElementChild) && A(/<[/\w!]/g, e.innerHTML) && A(/<[/\w!]/g, e.textContent) || e.nodeType === J.progressingInstruction || te && e.nodeType === J.comment && A(/<[/\w]/g, e.data))
|
|
351
|
-
return D(e), !0;
|
|
352
|
-
if (!p[n] || X[n]) {
|
|
353
|
-
if (!X[n] && ot(n) && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
354
|
-
return !1;
|
|
355
|
-
if (Ae && !F[n]) {
|
|
356
|
-
const f = ee(e) || e.parentNode, _ = bt(e) || e.childNodes;
|
|
357
|
-
if (_ && f) {
|
|
358
|
-
const m = _.length;
|
|
359
|
-
for (let y = m - 1; y >= 0; --y) {
|
|
360
|
-
const M = Ot(_[y], !0);
|
|
361
|
-
M.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(M, Lt(e));
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return D(e), !0;
|
|
366
|
-
}
|
|
367
|
-
return e instanceof ve && !Gt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && A(/<\/no(script|embed|frames)/i, e.innerHTML) ? (D(e), !0) : (v && e.nodeType === J.text && (t = e.textContent, le([pe, de, Te], (f) => {
|
|
368
|
-
t = q(t, f, " ");
|
|
369
|
-
}), e.textContent !== t && ($(o.removed, {
|
|
370
|
-
element: e.cloneNode()
|
|
371
|
-
}), e.textContent = t)), I(h.afterSanitizeElements, e, null), !1);
|
|
372
|
-
}, nt = function(e, t, n) {
|
|
373
|
-
if (Be && (t === "id" || t === "name") && (n in l || n in zt))
|
|
374
|
-
return !1;
|
|
375
|
-
if (!(_e && !Ee[t] && A(Ct, t))) {
|
|
376
|
-
if (!(ze && A(wt, t))) {
|
|
377
|
-
if (!T[t] || Ee[t]) {
|
|
378
|
-
if (
|
|
379
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
380
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
381
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
382
|
-
!(ot(e) && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && A(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
383
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
384
|
-
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
385
|
-
)
|
|
386
|
-
return !1;
|
|
387
|
-
} else if (!Se[t]) {
|
|
388
|
-
if (!A(Ue, q(n, ke, ""))) {
|
|
389
|
-
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && $t(n, "data:") === 0 && je[e])) {
|
|
390
|
-
if (!(Ge && !A(xt, q(n, ke, "")))) {
|
|
391
|
-
if (n)
|
|
392
|
-
return !1;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return !0;
|
|
400
|
-
}, ot = function(e) {
|
|
401
|
-
return e !== "annotation-xml" && Ne(e, Pt);
|
|
402
|
-
}, it = function(e) {
|
|
403
|
-
I(h.beforeSanitizeAttributes, e, null);
|
|
404
|
-
const {
|
|
405
|
-
attributes: t
|
|
406
|
-
} = e;
|
|
407
|
-
if (!t || Le(e))
|
|
408
|
-
return;
|
|
409
|
-
const n = {
|
|
410
|
-
attrName: "",
|
|
411
|
-
attrValue: "",
|
|
412
|
-
keepAttr: !0,
|
|
413
|
-
allowedAttributes: T,
|
|
414
|
-
forceKeepAttr: void 0
|
|
415
|
-
};
|
|
416
|
-
let f = t.length;
|
|
417
|
-
for (; f--; ) {
|
|
418
|
-
const _ = t[f], {
|
|
419
|
-
name: m,
|
|
420
|
-
namespaceURI: y,
|
|
421
|
-
value: M
|
|
422
|
-
} = _, G = d(m), be = M;
|
|
423
|
-
let E = m === "value" ? be : qt(be);
|
|
424
|
-
if (n.attrName = G, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, I(h.uponSanitizeAttribute, e, n), E = n.attrValue, Ye && (G === "id" || G === "name") && (x(m, e), E = vt + E), te && A(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
|
|
425
|
-
x(m, e);
|
|
426
|
-
continue;
|
|
427
|
-
}
|
|
428
|
-
if (G === "attributename" && Ne(E, "href")) {
|
|
429
|
-
x(m, e);
|
|
430
|
-
continue;
|
|
431
|
-
}
|
|
432
|
-
if (n.forceKeepAttr)
|
|
433
|
-
continue;
|
|
434
|
-
if (!n.keepAttr) {
|
|
435
|
-
x(m, e);
|
|
436
|
-
continue;
|
|
437
|
-
}
|
|
438
|
-
if (!We && A(/\/>/i, E)) {
|
|
439
|
-
x(m, e);
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
v && le([pe, de, Te], (rt) => {
|
|
443
|
-
E = q(E, rt, " ");
|
|
444
|
-
});
|
|
445
|
-
const at = d(e.nodeName);
|
|
446
|
-
if (!nt(at, G, E)) {
|
|
447
|
-
x(m, e);
|
|
448
|
-
continue;
|
|
449
|
-
}
|
|
450
|
-
if (g && typeof Q == "object" && typeof Q.getAttributeType == "function" && !y)
|
|
451
|
-
switch (Q.getAttributeType(at, G)) {
|
|
452
|
-
case "TrustedHTML": {
|
|
453
|
-
E = g.createHTML(E);
|
|
454
|
-
break;
|
|
455
|
-
}
|
|
456
|
-
case "TrustedScriptURL": {
|
|
457
|
-
E = g.createScriptURL(E);
|
|
458
|
-
break;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
if (E !== be)
|
|
462
|
-
try {
|
|
463
|
-
y ? e.setAttributeNS(y, m, E) : e.setAttribute(m, E), Le(e) ? D(e) : lt(o.removed);
|
|
464
|
-
} catch {
|
|
465
|
-
x(m, e);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
I(h.afterSanitizeAttributes, e, null);
|
|
469
|
-
}, Wt = function i(e) {
|
|
470
|
-
let t = null;
|
|
471
|
-
const n = Qe(e);
|
|
472
|
-
for (I(h.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
|
|
473
|
-
I(h.uponSanitizeShadowNode, t, null), tt(t), it(t), t.content instanceof O && i(t.content);
|
|
474
|
-
I(h.afterSanitizeShadowDOM, e, null);
|
|
475
|
-
};
|
|
476
|
-
return o.sanitize = function(i) {
|
|
477
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, f = null, _ = null;
|
|
478
|
-
if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !et(i))
|
|
479
|
-
if (typeof i.toString == "function") {
|
|
480
|
-
if (i = i.toString(), typeof i != "string")
|
|
481
|
-
throw K("dirty is not a string, aborting");
|
|
482
|
-
} else
|
|
483
|
-
throw K("toString is not a function");
|
|
484
|
-
if (!o.isSupported)
|
|
485
|
-
return i;
|
|
486
|
-
if (ge || ye(e), o.removed = [], typeof i == "string" && (j = !1), j) {
|
|
487
|
-
if (i.nodeName) {
|
|
488
|
-
const M = d(i.nodeName);
|
|
489
|
-
if (!p[M] || X[M])
|
|
490
|
-
throw K("root node is forbidden and cannot be sanitized in-place");
|
|
491
|
-
}
|
|
492
|
-
} else if (i instanceof ue)
|
|
493
|
-
t = Je("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === J.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
|
|
494
|
-
else {
|
|
495
|
-
if (!k && !v && !w && // eslint-disable-next-line unicorn/prefer-includes
|
|
496
|
-
i.indexOf("<") === -1)
|
|
497
|
-
return g && oe ? g.createHTML(i) : i;
|
|
498
|
-
if (t = Je(i), !t)
|
|
499
|
-
return k ? null : oe ? Y : "";
|
|
500
|
-
}
|
|
501
|
-
t && he && D(t.firstChild);
|
|
502
|
-
const m = Qe(j ? i : t);
|
|
503
|
-
for (; f = m.nextNode(); )
|
|
504
|
-
tt(f), it(f), f.content instanceof O && Wt(f.content);
|
|
505
|
-
if (j)
|
|
506
|
-
return i;
|
|
507
|
-
if (k) {
|
|
508
|
-
if (ne)
|
|
509
|
-
for (_ = Nt.call(t.ownerDocument); t.firstChild; )
|
|
510
|
-
_.appendChild(t.firstChild);
|
|
511
|
-
else
|
|
512
|
-
_ = t;
|
|
513
|
-
return (T.shadowroot || T.shadowrootmode) && (_ = Mt.call(a, _, !0)), _;
|
|
514
|
-
}
|
|
515
|
-
let y = w ? t.outerHTML : t.innerHTML;
|
|
516
|
-
return w && p["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(gt, t.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
517
|
-
` + y), v && le([pe, de, Te], (M) => {
|
|
518
|
-
y = q(y, M, " ");
|
|
519
|
-
}), g && oe ? g.createHTML(y) : y;
|
|
520
|
-
}, o.setConfig = function() {
|
|
521
|
-
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
522
|
-
ye(i), ge = !0;
|
|
523
|
-
}, o.clearConfig = function() {
|
|
524
|
-
z = null, ge = !1;
|
|
525
|
-
}, o.isValidAttribute = function(i, e, t) {
|
|
526
|
-
z || ye({});
|
|
527
|
-
const n = d(i), f = d(e);
|
|
528
|
-
return nt(n, f, t);
|
|
529
|
-
}, o.addHook = function(i, e) {
|
|
530
|
-
typeof e == "function" && $(h[i], e);
|
|
531
|
-
}, o.removeHook = function(i, e) {
|
|
532
|
-
if (e !== void 0) {
|
|
533
|
-
const t = jt(h[i], e);
|
|
534
|
-
return t === -1 ? void 0 : Vt(h[i], t, 1)[0];
|
|
535
|
-
}
|
|
536
|
-
return lt(h[i]);
|
|
537
|
-
}, o.removeHooks = function(i) {
|
|
538
|
-
h[i] = [];
|
|
539
|
-
}, o.removeAllHooks = function() {
|
|
540
|
-
h = dt();
|
|
541
|
-
}, o;
|
|
542
|
-
}
|
|
543
|
-
var un = ht();
|
|
544
|
-
export {
|
|
545
|
-
un as default
|
|
546
|
-
};
|