@nysds/nys-icon 1.20.0 → 1.21.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/nys-icon.js
CHANGED
|
@@ -1,273 +1,895 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as
|
|
1
|
+
import { LitElement as Jn, html as Qn, unsafeCSS as tr } from "lit";
|
|
2
|
+
import { property as Q, state as er } from "lit/decorators.js";
|
|
3
3
|
/*!
|
|
4
4
|
* █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
|
|
5
5
|
* █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
|
|
6
6
|
* █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
|
|
7
7
|
*
|
|
8
|
-
* Icon Component v1.
|
|
8
|
+
* Icon Component v1.21.0
|
|
9
9
|
* Part of the New York State Design System
|
|
10
10
|
* Repository: https://github.com/its-hcd/nysds
|
|
11
11
|
* License: MIT
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Repository: https://github.com/its-hcd/nysds
|
|
17
|
-
* License: MIT
|
|
18
|
-
*/
|
|
19
|
-
let jn = 0;
|
|
20
|
-
function Xn(i) {
|
|
21
|
-
return `${i}-${Date.now()}-${jn++}`;
|
|
13
|
+
var nr = 0;
|
|
14
|
+
function rr(r) {
|
|
15
|
+
return `${r}-${Date.now()}-${nr++}`;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
|
-
class n extends
|
|
17
|
+
var ir = (r) => {
|
|
18
|
+
class n extends r {
|
|
25
19
|
get idPrefix() {
|
|
26
20
|
return this.localName || "nys-element";
|
|
27
21
|
}
|
|
28
22
|
ensureId() {
|
|
29
|
-
this.id || (this.id =
|
|
23
|
+
this.id || (this.id = rr(this.idPrefix));
|
|
30
24
|
}
|
|
31
25
|
connectedCallback() {
|
|
32
26
|
super.connectedCallback(), this.ensureId();
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
return n;
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return oe || (Be ??= import("./nys-icon.library-Bu3noJqZ.js").then(
|
|
40
|
-
(i) => oe = i.default
|
|
41
|
-
), Be);
|
|
30
|
+
}, or = /* @__PURE__ */ ir(Jn), vt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), pt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map(), se = null, Ke = null;
|
|
31
|
+
async function ar() {
|
|
32
|
+
return se || (Ke ??= import("./nys-icon.library-Bi_7DKlD.js").then((r) => se = r.default), Ke);
|
|
42
33
|
}
|
|
43
|
-
function
|
|
44
|
-
if (globalThis.__nysIconDefaultRegistered ||
|
|
34
|
+
function sr() {
|
|
35
|
+
if (globalThis.__nysIconDefaultRegistered || vt.has("default")) {
|
|
45
36
|
globalThis.__nysIconDefaultRegistered = !0;
|
|
46
37
|
return;
|
|
47
38
|
}
|
|
48
|
-
globalThis.__nysIconDefaultRegistered = !0,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
globalThis.__nysIconDefaultRegistered = !0, vt.set("default", { resolver: async (r) => {
|
|
40
|
+
if (!r) return;
|
|
41
|
+
const n = (await ar())[r];
|
|
42
|
+
return n ? {
|
|
43
|
+
type: "svg",
|
|
44
|
+
content: n
|
|
45
|
+
} : void 0;
|
|
46
|
+
} });
|
|
55
47
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
48
|
+
function qr(r, n) {
|
|
49
|
+
vt.set(r, n), pt.get(r)?.forEach((s) => s.redraw());
|
|
58
50
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
51
|
+
function Kr(r) {
|
|
52
|
+
vt.delete(r), pt.get(r)?.forEach((n) => n.redraw());
|
|
61
53
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
54
|
+
function lr(r) {
|
|
55
|
+
return sr(), vt.get(r);
|
|
64
56
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
57
|
+
function Ze(r, n) {
|
|
58
|
+
pt.has(r) || pt.set(r, /* @__PURE__ */ new Set()), pt.get(r).add(n);
|
|
67
59
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
60
|
+
function Je(r, n) {
|
|
61
|
+
pt.get(r)?.delete(n);
|
|
70
62
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(
|
|
74
|
-
for (var s = 0, l = Array(n); s < n; s++) l[s] = i[s];
|
|
63
|
+
function Qe(r, n) {
|
|
64
|
+
(n == null || n > r.length) && (n = r.length);
|
|
65
|
+
for (var s = 0, l = Array(n); s < n; s++) l[s] = r[s];
|
|
75
66
|
return l;
|
|
76
67
|
}
|
|
77
|
-
function
|
|
78
|
-
if (Array.isArray(
|
|
68
|
+
function cr(r) {
|
|
69
|
+
if (Array.isArray(r)) return r;
|
|
79
70
|
}
|
|
80
|
-
function
|
|
81
|
-
var s =
|
|
71
|
+
function ur(r, n) {
|
|
72
|
+
var s = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
82
73
|
if (s != null) {
|
|
83
|
-
var l, u,
|
|
74
|
+
var l, u, p, y, k = [], I = !0, wt = !1;
|
|
84
75
|
try {
|
|
85
|
-
if (
|
|
86
|
-
} catch (
|
|
87
|
-
|
|
76
|
+
if (p = (s = s.call(r)).next, n !== 0) for (; !(I = (l = p.call(s)).done) && (k.push(l.value), k.length !== n); I = !0) ;
|
|
77
|
+
} catch (tt) {
|
|
78
|
+
wt = !0, u = tt;
|
|
88
79
|
} finally {
|
|
89
80
|
try {
|
|
90
|
-
if (!
|
|
81
|
+
if (!I && s.return != null && (y = s.return(), Object(y) !== y)) return;
|
|
91
82
|
} finally {
|
|
92
|
-
if (
|
|
83
|
+
if (wt) throw u;
|
|
93
84
|
}
|
|
94
85
|
}
|
|
95
|
-
return
|
|
86
|
+
return k;
|
|
96
87
|
}
|
|
97
88
|
}
|
|
98
|
-
function
|
|
89
|
+
function fr() {
|
|
99
90
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
100
91
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
101
92
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
93
|
+
function pr(r, n) {
|
|
94
|
+
return cr(r) || ur(r, n) || mr(r, n) || fr();
|
|
104
95
|
}
|
|
105
|
-
function
|
|
106
|
-
if (
|
|
107
|
-
if (typeof
|
|
108
|
-
var s = {}.toString.call(
|
|
109
|
-
return s === "Object" &&
|
|
96
|
+
function mr(r, n) {
|
|
97
|
+
if (r) {
|
|
98
|
+
if (typeof r == "string") return Qe(r, n);
|
|
99
|
+
var s = {}.toString.call(r).slice(8, -1);
|
|
100
|
+
return s === "Object" && r.constructor && (s = r.constructor.name), s === "Map" || s === "Set" ? Array.from(r) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Qe(r, n) : void 0;
|
|
110
101
|
}
|
|
111
102
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
O || (O = function(n) {
|
|
103
|
+
var _n = Object.entries, tn = Object.setPrototypeOf, dr = Object.isFrozen, hr = Object.getPrototypeOf, _r = Object.getOwnPropertyDescriptor, A = Object.freeze, E = Object.seal, ft = Object.create, gn = typeof Reflect < "u" && Reflect, de = gn.apply, he = gn.construct;
|
|
104
|
+
A || (A = function(n) {
|
|
115
105
|
return n;
|
|
116
106
|
});
|
|
117
|
-
|
|
107
|
+
E || (E = function(n) {
|
|
118
108
|
return n;
|
|
119
109
|
});
|
|
120
|
-
|
|
121
|
-
for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0),
|
|
122
|
-
u[m - 2] = arguments[m];
|
|
110
|
+
de || (de = function(n, s) {
|
|
111
|
+
for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), p = 2; p < l; p++) u[p - 2] = arguments[p];
|
|
123
112
|
return n.apply(s, u);
|
|
124
113
|
});
|
|
125
|
-
|
|
126
|
-
for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
|
|
127
|
-
l[u - 1] = arguments[u];
|
|
114
|
+
he || (he = function(n) {
|
|
115
|
+
for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
|
|
128
116
|
return new n(...l);
|
|
129
117
|
});
|
|
130
|
-
|
|
131
|
-
function
|
|
118
|
+
var J = b(Array.prototype.forEach), gr = b(Array.prototype.lastIndexOf), en = b(Array.prototype.pop), Tt = b(Array.prototype.push), yr = b(Array.prototype.splice), mt = Array.isArray, Et = b(String.prototype.toLowerCase), le = b(String.prototype.toString), nn = b(String.prototype.match), bt = b(String.prototype.replace), rn = b(String.prototype.indexOf), Tr = b(String.prototype.trim), br = b(Number.prototype.toString), Ar = b(Boolean.prototype.toString), on = typeof BigInt > "u" ? null : b(BigInt.prototype.toString), an = typeof Symbol > "u" ? null : b(Symbol.prototype.toString), L = b(Object.prototype.hasOwnProperty), At = b(Object.prototype.toString), S = b(RegExp.prototype.test), Z = Er(TypeError);
|
|
119
|
+
function b(r) {
|
|
132
120
|
return function(n) {
|
|
133
121
|
n instanceof RegExp && (n.lastIndex = 0);
|
|
134
|
-
for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
|
|
135
|
-
|
|
136
|
-
return ue(i, n, l);
|
|
122
|
+
for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
|
|
123
|
+
return de(r, n, l);
|
|
137
124
|
};
|
|
138
125
|
}
|
|
139
|
-
function
|
|
126
|
+
function Er(r) {
|
|
140
127
|
return function() {
|
|
141
|
-
for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++)
|
|
142
|
-
|
|
143
|
-
return fe(i, s);
|
|
128
|
+
for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++) s[l] = arguments[l];
|
|
129
|
+
return he(r, s);
|
|
144
130
|
};
|
|
145
131
|
}
|
|
146
|
-
function
|
|
147
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
148
|
-
if (
|
|
149
|
-
return i;
|
|
132
|
+
function d(r, n) {
|
|
133
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
|
|
134
|
+
if (tn && tn(r, null), !mt(n)) return r;
|
|
150
135
|
let l = n.length;
|
|
151
136
|
for (; l--; ) {
|
|
152
137
|
let u = n[l];
|
|
153
138
|
if (typeof u == "string") {
|
|
154
|
-
const
|
|
155
|
-
|
|
139
|
+
const p = s(u);
|
|
140
|
+
p !== u && (dr(n) || (n[l] = p), u = p);
|
|
156
141
|
}
|
|
157
|
-
|
|
142
|
+
r[u] = !0;
|
|
158
143
|
}
|
|
159
|
-
return
|
|
144
|
+
return r;
|
|
160
145
|
}
|
|
161
|
-
function
|
|
162
|
-
for (let n = 0; n <
|
|
163
|
-
|
|
164
|
-
return i;
|
|
146
|
+
function Sr(r) {
|
|
147
|
+
for (let n = 0; n < r.length; n++) L(r, n) || (r[n] = null);
|
|
148
|
+
return r;
|
|
165
149
|
}
|
|
166
|
-
function
|
|
167
|
-
const n =
|
|
168
|
-
for (const l of
|
|
169
|
-
var s =
|
|
170
|
-
const u = s[0],
|
|
171
|
-
|
|
150
|
+
function N(r) {
|
|
151
|
+
const n = ft(null);
|
|
152
|
+
for (const l of _n(r)) {
|
|
153
|
+
var s = pr(l, 2);
|
|
154
|
+
const u = s[0], p = s[1];
|
|
155
|
+
L(r, u) && (mt(p) ? n[u] = Sr(p) : p && typeof p == "object" && p.constructor === Object ? n[u] = N(p) : n[u] = p);
|
|
172
156
|
}
|
|
173
157
|
return n;
|
|
174
158
|
}
|
|
175
|
-
function
|
|
176
|
-
switch (typeof
|
|
159
|
+
function vr(r) {
|
|
160
|
+
switch (typeof r) {
|
|
177
161
|
case "string":
|
|
178
|
-
return
|
|
162
|
+
return r;
|
|
179
163
|
case "number":
|
|
180
|
-
return
|
|
164
|
+
return br(r);
|
|
181
165
|
case "boolean":
|
|
182
|
-
return
|
|
166
|
+
return Ar(r);
|
|
183
167
|
case "bigint":
|
|
184
|
-
return
|
|
168
|
+
return on ? on(r) : "0";
|
|
185
169
|
case "symbol":
|
|
186
|
-
return
|
|
170
|
+
return an ? an(r) : "Symbol()";
|
|
187
171
|
case "undefined":
|
|
188
|
-
return At(
|
|
172
|
+
return At(r);
|
|
189
173
|
case "function":
|
|
190
174
|
case "object": {
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
const n = i, s = H(n, "toString");
|
|
175
|
+
if (r === null) return At(r);
|
|
176
|
+
const n = r, s = M(n, "toString");
|
|
194
177
|
if (typeof s == "function") {
|
|
195
178
|
const l = s(n);
|
|
196
179
|
return typeof l == "string" ? l : At(l);
|
|
197
180
|
}
|
|
198
|
-
return At(
|
|
181
|
+
return At(r);
|
|
199
182
|
}
|
|
200
183
|
default:
|
|
201
|
-
return At(
|
|
184
|
+
return At(r);
|
|
202
185
|
}
|
|
203
186
|
}
|
|
204
|
-
function
|
|
205
|
-
for (;
|
|
206
|
-
const l =
|
|
187
|
+
function M(r, n) {
|
|
188
|
+
for (; r !== null; ) {
|
|
189
|
+
const l = _r(r, n);
|
|
207
190
|
if (l) {
|
|
208
|
-
if (l.get)
|
|
209
|
-
|
|
210
|
-
if (typeof l.value == "function")
|
|
211
|
-
return E(l.value);
|
|
191
|
+
if (l.get) return b(l.get);
|
|
192
|
+
if (typeof l.value == "function") return b(l.value);
|
|
212
193
|
}
|
|
213
|
-
|
|
194
|
+
r = hr(r);
|
|
214
195
|
}
|
|
215
196
|
function s() {
|
|
216
197
|
return null;
|
|
217
198
|
}
|
|
218
199
|
return s;
|
|
219
200
|
}
|
|
220
|
-
function
|
|
201
|
+
function wr(r) {
|
|
221
202
|
try {
|
|
222
|
-
return
|
|
203
|
+
return S(r, ""), !0;
|
|
223
204
|
} catch {
|
|
224
205
|
return !1;
|
|
225
206
|
}
|
|
226
207
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
208
|
+
var sn = A([
|
|
209
|
+
"a",
|
|
210
|
+
"abbr",
|
|
211
|
+
"acronym",
|
|
212
|
+
"address",
|
|
213
|
+
"area",
|
|
214
|
+
"article",
|
|
215
|
+
"aside",
|
|
216
|
+
"audio",
|
|
217
|
+
"b",
|
|
218
|
+
"bdi",
|
|
219
|
+
"bdo",
|
|
220
|
+
"big",
|
|
221
|
+
"blink",
|
|
222
|
+
"blockquote",
|
|
223
|
+
"body",
|
|
224
|
+
"br",
|
|
225
|
+
"button",
|
|
226
|
+
"canvas",
|
|
227
|
+
"caption",
|
|
228
|
+
"center",
|
|
229
|
+
"cite",
|
|
230
|
+
"code",
|
|
231
|
+
"col",
|
|
232
|
+
"colgroup",
|
|
233
|
+
"content",
|
|
234
|
+
"data",
|
|
235
|
+
"datalist",
|
|
236
|
+
"dd",
|
|
237
|
+
"decorator",
|
|
238
|
+
"del",
|
|
239
|
+
"details",
|
|
240
|
+
"dfn",
|
|
241
|
+
"dialog",
|
|
242
|
+
"dir",
|
|
243
|
+
"div",
|
|
244
|
+
"dl",
|
|
245
|
+
"dt",
|
|
246
|
+
"element",
|
|
247
|
+
"em",
|
|
248
|
+
"fieldset",
|
|
249
|
+
"figcaption",
|
|
250
|
+
"figure",
|
|
251
|
+
"font",
|
|
252
|
+
"footer",
|
|
253
|
+
"form",
|
|
254
|
+
"h1",
|
|
255
|
+
"h2",
|
|
256
|
+
"h3",
|
|
257
|
+
"h4",
|
|
258
|
+
"h5",
|
|
259
|
+
"h6",
|
|
260
|
+
"head",
|
|
261
|
+
"header",
|
|
262
|
+
"hgroup",
|
|
263
|
+
"hr",
|
|
264
|
+
"html",
|
|
265
|
+
"i",
|
|
266
|
+
"img",
|
|
267
|
+
"input",
|
|
268
|
+
"ins",
|
|
269
|
+
"kbd",
|
|
270
|
+
"label",
|
|
271
|
+
"legend",
|
|
272
|
+
"li",
|
|
273
|
+
"main",
|
|
274
|
+
"map",
|
|
275
|
+
"mark",
|
|
276
|
+
"marquee",
|
|
277
|
+
"menu",
|
|
278
|
+
"menuitem",
|
|
279
|
+
"meter",
|
|
280
|
+
"nav",
|
|
281
|
+
"nobr",
|
|
282
|
+
"ol",
|
|
283
|
+
"optgroup",
|
|
284
|
+
"option",
|
|
285
|
+
"output",
|
|
286
|
+
"p",
|
|
287
|
+
"picture",
|
|
288
|
+
"pre",
|
|
289
|
+
"progress",
|
|
290
|
+
"q",
|
|
291
|
+
"rp",
|
|
292
|
+
"rt",
|
|
293
|
+
"ruby",
|
|
294
|
+
"s",
|
|
295
|
+
"samp",
|
|
296
|
+
"search",
|
|
297
|
+
"section",
|
|
298
|
+
"select",
|
|
299
|
+
"shadow",
|
|
300
|
+
"slot",
|
|
301
|
+
"small",
|
|
302
|
+
"source",
|
|
303
|
+
"spacer",
|
|
304
|
+
"span",
|
|
305
|
+
"strike",
|
|
306
|
+
"strong",
|
|
307
|
+
"style",
|
|
308
|
+
"sub",
|
|
309
|
+
"summary",
|
|
310
|
+
"sup",
|
|
311
|
+
"table",
|
|
312
|
+
"tbody",
|
|
313
|
+
"td",
|
|
314
|
+
"template",
|
|
315
|
+
"textarea",
|
|
316
|
+
"tfoot",
|
|
317
|
+
"th",
|
|
318
|
+
"thead",
|
|
319
|
+
"time",
|
|
320
|
+
"tr",
|
|
321
|
+
"track",
|
|
322
|
+
"tt",
|
|
323
|
+
"u",
|
|
324
|
+
"ul",
|
|
325
|
+
"var",
|
|
326
|
+
"video",
|
|
327
|
+
"wbr"
|
|
328
|
+
]), ce = A([
|
|
329
|
+
"svg",
|
|
330
|
+
"a",
|
|
331
|
+
"altglyph",
|
|
332
|
+
"altglyphdef",
|
|
333
|
+
"altglyphitem",
|
|
334
|
+
"animatecolor",
|
|
335
|
+
"animatemotion",
|
|
336
|
+
"animatetransform",
|
|
337
|
+
"circle",
|
|
338
|
+
"clippath",
|
|
339
|
+
"defs",
|
|
340
|
+
"desc",
|
|
341
|
+
"ellipse",
|
|
342
|
+
"enterkeyhint",
|
|
343
|
+
"exportparts",
|
|
344
|
+
"filter",
|
|
345
|
+
"font",
|
|
346
|
+
"g",
|
|
347
|
+
"glyph",
|
|
348
|
+
"glyphref",
|
|
349
|
+
"hkern",
|
|
350
|
+
"image",
|
|
351
|
+
"inputmode",
|
|
352
|
+
"line",
|
|
353
|
+
"lineargradient",
|
|
354
|
+
"marker",
|
|
355
|
+
"mask",
|
|
356
|
+
"metadata",
|
|
357
|
+
"mpath",
|
|
358
|
+
"part",
|
|
359
|
+
"path",
|
|
360
|
+
"pattern",
|
|
361
|
+
"polygon",
|
|
362
|
+
"polyline",
|
|
363
|
+
"radialgradient",
|
|
364
|
+
"rect",
|
|
365
|
+
"stop",
|
|
366
|
+
"style",
|
|
367
|
+
"switch",
|
|
368
|
+
"symbol",
|
|
369
|
+
"text",
|
|
370
|
+
"textpath",
|
|
371
|
+
"title",
|
|
372
|
+
"tref",
|
|
373
|
+
"tspan",
|
|
374
|
+
"view",
|
|
375
|
+
"vkern"
|
|
376
|
+
]), ue = A([
|
|
377
|
+
"feBlend",
|
|
378
|
+
"feColorMatrix",
|
|
379
|
+
"feComponentTransfer",
|
|
380
|
+
"feComposite",
|
|
381
|
+
"feConvolveMatrix",
|
|
382
|
+
"feDiffuseLighting",
|
|
383
|
+
"feDisplacementMap",
|
|
384
|
+
"feDistantLight",
|
|
385
|
+
"feDropShadow",
|
|
386
|
+
"feFlood",
|
|
387
|
+
"feFuncA",
|
|
388
|
+
"feFuncB",
|
|
389
|
+
"feFuncG",
|
|
390
|
+
"feFuncR",
|
|
391
|
+
"feGaussianBlur",
|
|
392
|
+
"feImage",
|
|
393
|
+
"feMerge",
|
|
394
|
+
"feMergeNode",
|
|
395
|
+
"feMorphology",
|
|
396
|
+
"feOffset",
|
|
397
|
+
"fePointLight",
|
|
398
|
+
"feSpecularLighting",
|
|
399
|
+
"feSpotLight",
|
|
400
|
+
"feTile",
|
|
401
|
+
"feTurbulence"
|
|
402
|
+
]), Or = A([
|
|
403
|
+
"animate",
|
|
404
|
+
"color-profile",
|
|
405
|
+
"cursor",
|
|
406
|
+
"discard",
|
|
407
|
+
"font-face",
|
|
408
|
+
"font-face-format",
|
|
409
|
+
"font-face-name",
|
|
410
|
+
"font-face-src",
|
|
411
|
+
"font-face-uri",
|
|
412
|
+
"foreignobject",
|
|
413
|
+
"hatch",
|
|
414
|
+
"hatchpath",
|
|
415
|
+
"mesh",
|
|
416
|
+
"meshgradient",
|
|
417
|
+
"meshpatch",
|
|
418
|
+
"meshrow",
|
|
419
|
+
"missing-glyph",
|
|
420
|
+
"script",
|
|
421
|
+
"set",
|
|
422
|
+
"solidcolor",
|
|
423
|
+
"unknown",
|
|
424
|
+
"use"
|
|
425
|
+
]), fe = A([
|
|
426
|
+
"math",
|
|
427
|
+
"menclose",
|
|
428
|
+
"merror",
|
|
429
|
+
"mfenced",
|
|
430
|
+
"mfrac",
|
|
431
|
+
"mglyph",
|
|
432
|
+
"mi",
|
|
433
|
+
"mlabeledtr",
|
|
434
|
+
"mmultiscripts",
|
|
435
|
+
"mn",
|
|
436
|
+
"mo",
|
|
437
|
+
"mover",
|
|
438
|
+
"mpadded",
|
|
439
|
+
"mphantom",
|
|
440
|
+
"mroot",
|
|
441
|
+
"mrow",
|
|
442
|
+
"ms",
|
|
443
|
+
"mspace",
|
|
444
|
+
"msqrt",
|
|
445
|
+
"mstyle",
|
|
446
|
+
"msub",
|
|
447
|
+
"msup",
|
|
448
|
+
"msubsup",
|
|
449
|
+
"mtable",
|
|
450
|
+
"mtd",
|
|
451
|
+
"mtext",
|
|
452
|
+
"mtr",
|
|
453
|
+
"munder",
|
|
454
|
+
"munderover",
|
|
455
|
+
"mprescripts"
|
|
456
|
+
]), Rr = A([
|
|
457
|
+
"maction",
|
|
458
|
+
"maligngroup",
|
|
459
|
+
"malignmark",
|
|
460
|
+
"mlongdiv",
|
|
461
|
+
"mscarries",
|
|
462
|
+
"mscarry",
|
|
463
|
+
"msgroup",
|
|
464
|
+
"mstack",
|
|
465
|
+
"msline",
|
|
466
|
+
"msrow",
|
|
467
|
+
"semantics",
|
|
468
|
+
"annotation",
|
|
469
|
+
"annotation-xml",
|
|
470
|
+
"mprescripts",
|
|
471
|
+
"none"
|
|
472
|
+
]), ln = A(["#text"]), cn = A([
|
|
473
|
+
"accept",
|
|
474
|
+
"action",
|
|
475
|
+
"align",
|
|
476
|
+
"alt",
|
|
477
|
+
"autocapitalize",
|
|
478
|
+
"autocomplete",
|
|
479
|
+
"autopictureinpicture",
|
|
480
|
+
"autoplay",
|
|
481
|
+
"background",
|
|
482
|
+
"bgcolor",
|
|
483
|
+
"border",
|
|
484
|
+
"capture",
|
|
485
|
+
"cellpadding",
|
|
486
|
+
"cellspacing",
|
|
487
|
+
"checked",
|
|
488
|
+
"cite",
|
|
489
|
+
"class",
|
|
490
|
+
"clear",
|
|
491
|
+
"color",
|
|
492
|
+
"cols",
|
|
493
|
+
"colspan",
|
|
494
|
+
"command",
|
|
495
|
+
"commandfor",
|
|
496
|
+
"controls",
|
|
497
|
+
"controlslist",
|
|
498
|
+
"coords",
|
|
499
|
+
"crossorigin",
|
|
500
|
+
"datetime",
|
|
501
|
+
"decoding",
|
|
502
|
+
"default",
|
|
503
|
+
"dir",
|
|
504
|
+
"disabled",
|
|
505
|
+
"disablepictureinpicture",
|
|
506
|
+
"disableremoteplayback",
|
|
507
|
+
"download",
|
|
508
|
+
"draggable",
|
|
509
|
+
"enctype",
|
|
510
|
+
"enterkeyhint",
|
|
511
|
+
"exportparts",
|
|
512
|
+
"face",
|
|
513
|
+
"for",
|
|
514
|
+
"headers",
|
|
515
|
+
"height",
|
|
516
|
+
"hidden",
|
|
517
|
+
"high",
|
|
518
|
+
"href",
|
|
519
|
+
"hreflang",
|
|
520
|
+
"id",
|
|
521
|
+
"inert",
|
|
522
|
+
"inputmode",
|
|
523
|
+
"integrity",
|
|
524
|
+
"ismap",
|
|
525
|
+
"kind",
|
|
526
|
+
"label",
|
|
527
|
+
"lang",
|
|
528
|
+
"list",
|
|
529
|
+
"loading",
|
|
530
|
+
"loop",
|
|
531
|
+
"low",
|
|
532
|
+
"max",
|
|
533
|
+
"maxlength",
|
|
534
|
+
"media",
|
|
535
|
+
"method",
|
|
536
|
+
"min",
|
|
537
|
+
"minlength",
|
|
538
|
+
"multiple",
|
|
539
|
+
"muted",
|
|
540
|
+
"name",
|
|
541
|
+
"nonce",
|
|
542
|
+
"noshade",
|
|
543
|
+
"novalidate",
|
|
544
|
+
"nowrap",
|
|
545
|
+
"open",
|
|
546
|
+
"optimum",
|
|
547
|
+
"part",
|
|
548
|
+
"pattern",
|
|
549
|
+
"placeholder",
|
|
550
|
+
"playsinline",
|
|
551
|
+
"popover",
|
|
552
|
+
"popovertarget",
|
|
553
|
+
"popovertargetaction",
|
|
554
|
+
"poster",
|
|
555
|
+
"preload",
|
|
556
|
+
"pubdate",
|
|
557
|
+
"radiogroup",
|
|
558
|
+
"readonly",
|
|
559
|
+
"rel",
|
|
560
|
+
"required",
|
|
561
|
+
"rev",
|
|
562
|
+
"reversed",
|
|
563
|
+
"role",
|
|
564
|
+
"rows",
|
|
565
|
+
"rowspan",
|
|
566
|
+
"spellcheck",
|
|
567
|
+
"scope",
|
|
568
|
+
"selected",
|
|
569
|
+
"shape",
|
|
570
|
+
"size",
|
|
571
|
+
"sizes",
|
|
572
|
+
"slot",
|
|
573
|
+
"span",
|
|
574
|
+
"srclang",
|
|
575
|
+
"start",
|
|
576
|
+
"src",
|
|
577
|
+
"srcset",
|
|
578
|
+
"step",
|
|
579
|
+
"style",
|
|
580
|
+
"summary",
|
|
581
|
+
"tabindex",
|
|
582
|
+
"title",
|
|
583
|
+
"translate",
|
|
584
|
+
"type",
|
|
585
|
+
"usemap",
|
|
586
|
+
"valign",
|
|
587
|
+
"value",
|
|
588
|
+
"width",
|
|
589
|
+
"wrap",
|
|
590
|
+
"xmlns"
|
|
591
|
+
]), pe = A([
|
|
592
|
+
"accent-height",
|
|
593
|
+
"accumulate",
|
|
594
|
+
"additive",
|
|
595
|
+
"alignment-baseline",
|
|
596
|
+
"amplitude",
|
|
597
|
+
"ascent",
|
|
598
|
+
"attributename",
|
|
599
|
+
"attributetype",
|
|
600
|
+
"azimuth",
|
|
601
|
+
"basefrequency",
|
|
602
|
+
"baseline-shift",
|
|
603
|
+
"begin",
|
|
604
|
+
"bias",
|
|
605
|
+
"by",
|
|
606
|
+
"class",
|
|
607
|
+
"clip",
|
|
608
|
+
"clippathunits",
|
|
609
|
+
"clip-path",
|
|
610
|
+
"clip-rule",
|
|
611
|
+
"color",
|
|
612
|
+
"color-interpolation",
|
|
613
|
+
"color-interpolation-filters",
|
|
614
|
+
"color-profile",
|
|
615
|
+
"color-rendering",
|
|
616
|
+
"cx",
|
|
617
|
+
"cy",
|
|
618
|
+
"d",
|
|
619
|
+
"dx",
|
|
620
|
+
"dy",
|
|
621
|
+
"diffuseconstant",
|
|
622
|
+
"direction",
|
|
623
|
+
"display",
|
|
624
|
+
"divisor",
|
|
625
|
+
"dominant-baseline",
|
|
626
|
+
"dur",
|
|
627
|
+
"edgemode",
|
|
628
|
+
"elevation",
|
|
629
|
+
"end",
|
|
630
|
+
"exponent",
|
|
631
|
+
"fill",
|
|
632
|
+
"fill-opacity",
|
|
633
|
+
"fill-rule",
|
|
634
|
+
"filter",
|
|
635
|
+
"filterunits",
|
|
636
|
+
"flood-color",
|
|
637
|
+
"flood-opacity",
|
|
638
|
+
"font-family",
|
|
639
|
+
"font-size",
|
|
640
|
+
"font-size-adjust",
|
|
641
|
+
"font-stretch",
|
|
642
|
+
"font-style",
|
|
643
|
+
"font-variant",
|
|
644
|
+
"font-weight",
|
|
645
|
+
"fx",
|
|
646
|
+
"fy",
|
|
647
|
+
"g1",
|
|
648
|
+
"g2",
|
|
649
|
+
"glyph-name",
|
|
650
|
+
"glyphref",
|
|
651
|
+
"gradientunits",
|
|
652
|
+
"gradienttransform",
|
|
653
|
+
"height",
|
|
654
|
+
"href",
|
|
655
|
+
"id",
|
|
656
|
+
"image-rendering",
|
|
657
|
+
"in",
|
|
658
|
+
"in2",
|
|
659
|
+
"intercept",
|
|
660
|
+
"k",
|
|
661
|
+
"k1",
|
|
662
|
+
"k2",
|
|
663
|
+
"k3",
|
|
664
|
+
"k4",
|
|
665
|
+
"kerning",
|
|
666
|
+
"keypoints",
|
|
667
|
+
"keysplines",
|
|
668
|
+
"keytimes",
|
|
669
|
+
"lang",
|
|
670
|
+
"lengthadjust",
|
|
671
|
+
"letter-spacing",
|
|
672
|
+
"kernelmatrix",
|
|
673
|
+
"kernelunitlength",
|
|
674
|
+
"lighting-color",
|
|
675
|
+
"local",
|
|
676
|
+
"marker-end",
|
|
677
|
+
"marker-mid",
|
|
678
|
+
"marker-start",
|
|
679
|
+
"markerheight",
|
|
680
|
+
"markerunits",
|
|
681
|
+
"markerwidth",
|
|
682
|
+
"maskcontentunits",
|
|
683
|
+
"maskunits",
|
|
684
|
+
"max",
|
|
685
|
+
"mask",
|
|
686
|
+
"mask-type",
|
|
687
|
+
"media",
|
|
688
|
+
"method",
|
|
689
|
+
"mode",
|
|
690
|
+
"min",
|
|
691
|
+
"name",
|
|
692
|
+
"numoctaves",
|
|
693
|
+
"offset",
|
|
694
|
+
"operator",
|
|
695
|
+
"opacity",
|
|
696
|
+
"order",
|
|
697
|
+
"orient",
|
|
698
|
+
"orientation",
|
|
699
|
+
"origin",
|
|
700
|
+
"overflow",
|
|
701
|
+
"paint-order",
|
|
702
|
+
"path",
|
|
703
|
+
"pathlength",
|
|
704
|
+
"patterncontentunits",
|
|
705
|
+
"patterntransform",
|
|
706
|
+
"patternunits",
|
|
707
|
+
"pointer-events",
|
|
708
|
+
"points",
|
|
709
|
+
"preservealpha",
|
|
710
|
+
"preserveaspectratio",
|
|
711
|
+
"primitiveunits",
|
|
712
|
+
"r",
|
|
713
|
+
"rx",
|
|
714
|
+
"ry",
|
|
715
|
+
"radius",
|
|
716
|
+
"refx",
|
|
717
|
+
"refy",
|
|
718
|
+
"repeatcount",
|
|
719
|
+
"repeatdur",
|
|
720
|
+
"restart",
|
|
721
|
+
"result",
|
|
722
|
+
"rotate",
|
|
723
|
+
"scale",
|
|
724
|
+
"seed",
|
|
725
|
+
"shape-rendering",
|
|
726
|
+
"slope",
|
|
727
|
+
"specularconstant",
|
|
728
|
+
"specularexponent",
|
|
729
|
+
"spreadmethod",
|
|
730
|
+
"startoffset",
|
|
731
|
+
"stddeviation",
|
|
732
|
+
"stitchtiles",
|
|
733
|
+
"stop-color",
|
|
734
|
+
"stop-opacity",
|
|
735
|
+
"stroke-dasharray",
|
|
736
|
+
"stroke-dashoffset",
|
|
737
|
+
"stroke-linecap",
|
|
738
|
+
"stroke-linejoin",
|
|
739
|
+
"stroke-miterlimit",
|
|
740
|
+
"stroke-opacity",
|
|
741
|
+
"stroke",
|
|
742
|
+
"stroke-width",
|
|
743
|
+
"style",
|
|
744
|
+
"surfacescale",
|
|
745
|
+
"systemlanguage",
|
|
746
|
+
"tabindex",
|
|
747
|
+
"tablevalues",
|
|
748
|
+
"targetx",
|
|
749
|
+
"targety",
|
|
750
|
+
"transform",
|
|
751
|
+
"transform-origin",
|
|
752
|
+
"text-anchor",
|
|
753
|
+
"text-decoration",
|
|
754
|
+
"text-orientation",
|
|
755
|
+
"text-rendering",
|
|
756
|
+
"textlength",
|
|
757
|
+
"type",
|
|
758
|
+
"u1",
|
|
759
|
+
"u2",
|
|
760
|
+
"unicode",
|
|
761
|
+
"values",
|
|
762
|
+
"vector-effect",
|
|
763
|
+
"viewbox",
|
|
764
|
+
"visibility",
|
|
765
|
+
"version",
|
|
766
|
+
"vert-adv-y",
|
|
767
|
+
"vert-origin-x",
|
|
768
|
+
"vert-origin-y",
|
|
769
|
+
"width",
|
|
770
|
+
"word-spacing",
|
|
771
|
+
"wrap",
|
|
772
|
+
"writing-mode",
|
|
773
|
+
"xchannelselector",
|
|
774
|
+
"ychannelselector",
|
|
775
|
+
"x",
|
|
776
|
+
"x1",
|
|
777
|
+
"x2",
|
|
778
|
+
"xmlns",
|
|
779
|
+
"y",
|
|
780
|
+
"y1",
|
|
781
|
+
"y2",
|
|
782
|
+
"z",
|
|
783
|
+
"zoomandpan"
|
|
784
|
+
]), un = A([
|
|
785
|
+
"accent",
|
|
786
|
+
"accentunder",
|
|
787
|
+
"align",
|
|
788
|
+
"bevelled",
|
|
789
|
+
"close",
|
|
790
|
+
"columnalign",
|
|
791
|
+
"columnlines",
|
|
792
|
+
"columnspacing",
|
|
793
|
+
"columnspan",
|
|
794
|
+
"denomalign",
|
|
795
|
+
"depth",
|
|
796
|
+
"dir",
|
|
797
|
+
"display",
|
|
798
|
+
"displaystyle",
|
|
799
|
+
"encoding",
|
|
800
|
+
"fence",
|
|
801
|
+
"frame",
|
|
802
|
+
"height",
|
|
803
|
+
"href",
|
|
804
|
+
"id",
|
|
805
|
+
"largeop",
|
|
806
|
+
"length",
|
|
807
|
+
"linethickness",
|
|
808
|
+
"lquote",
|
|
809
|
+
"lspace",
|
|
810
|
+
"mathbackground",
|
|
811
|
+
"mathcolor",
|
|
812
|
+
"mathsize",
|
|
813
|
+
"mathvariant",
|
|
814
|
+
"maxsize",
|
|
815
|
+
"minsize",
|
|
816
|
+
"movablelimits",
|
|
817
|
+
"notation",
|
|
818
|
+
"numalign",
|
|
819
|
+
"open",
|
|
820
|
+
"rowalign",
|
|
821
|
+
"rowlines",
|
|
822
|
+
"rowspacing",
|
|
823
|
+
"rowspan",
|
|
824
|
+
"rspace",
|
|
825
|
+
"rquote",
|
|
826
|
+
"scriptlevel",
|
|
827
|
+
"scriptminsize",
|
|
828
|
+
"scriptsizemultiplier",
|
|
829
|
+
"selection",
|
|
830
|
+
"separator",
|
|
831
|
+
"separators",
|
|
832
|
+
"stretchy",
|
|
833
|
+
"subscriptshift",
|
|
834
|
+
"supscriptshift",
|
|
835
|
+
"symmetric",
|
|
836
|
+
"voffset",
|
|
837
|
+
"width",
|
|
838
|
+
"xmlns"
|
|
839
|
+
]), Ht = A([
|
|
840
|
+
"xlink:href",
|
|
841
|
+
"xml:id",
|
|
842
|
+
"xlink:title",
|
|
843
|
+
"xml:space",
|
|
844
|
+
"xmlns:xlink"
|
|
845
|
+
]), Lr = E(/{{[\w\W]*|^[\w\W]*}}/g), Ir = E(/<%[\w\W]*|^[\w\W]*%>/g), Dr = E(/\${[\w\W]*/g), Nr = E(/^data-[\-\w.\u00B7-\uFFFF]+$/), Cr = E(/^aria-[\-\w]+$/), fn = E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Mr = E(/^(?:\w+script|data):/i), xr = E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pr = E(/^html$/i), zr = E(/^[a-z][.\w]*(-[.\w]+)+$/i), pn = E(/<[/\w!]/g), mn = E(/<[/\w]/g), kr = E(/<\/no(script|embed|frames)/i), Ur = E(/\/>/i), D = {
|
|
234
846
|
element: 1,
|
|
235
847
|
attribute: 2,
|
|
236
848
|
text: 3,
|
|
237
849
|
cdataSection: 4,
|
|
238
850
|
entityReference: 5,
|
|
239
|
-
// Deprecated
|
|
240
851
|
entityNode: 6,
|
|
241
|
-
// Deprecated
|
|
242
852
|
processingInstruction: 7,
|
|
243
853
|
comment: 8,
|
|
244
854
|
document: 9,
|
|
245
855
|
documentType: 10,
|
|
246
856
|
documentFragment: 11,
|
|
247
857
|
notation: 12
|
|
248
|
-
|
|
249
|
-
|
|
858
|
+
}, yn = [
|
|
859
|
+
"style",
|
|
860
|
+
"script",
|
|
861
|
+
"xmp",
|
|
862
|
+
"iframe",
|
|
863
|
+
"noembed",
|
|
864
|
+
"noframes",
|
|
865
|
+
"plaintext",
|
|
866
|
+
"noscript"
|
|
867
|
+
], Fr = A(d({}, yn)), Hr = (function() {
|
|
868
|
+
const r = {};
|
|
869
|
+
return J(yn, (n) => {
|
|
870
|
+
r[n] = E(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
871
|
+
}), A(r);
|
|
872
|
+
})(), Gr = function() {
|
|
250
873
|
return typeof window > "u" ? null : window;
|
|
251
|
-
},
|
|
252
|
-
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
253
|
-
return null;
|
|
874
|
+
}, Wr = function(n, s) {
|
|
875
|
+
if (typeof n != "object" || typeof n.createPolicy != "function") return null;
|
|
254
876
|
let l = null;
|
|
255
877
|
const u = "data-tt-policy-suffix";
|
|
256
878
|
s && s.hasAttribute(u) && (l = s.getAttribute(u));
|
|
257
|
-
const
|
|
879
|
+
const p = "dompurify" + (l ? "#" + l : "");
|
|
258
880
|
try {
|
|
259
|
-
return n.createPolicy(
|
|
260
|
-
createHTML(
|
|
261
|
-
return
|
|
881
|
+
return n.createPolicy(p, {
|
|
882
|
+
createHTML(y) {
|
|
883
|
+
return y;
|
|
262
884
|
},
|
|
263
|
-
createScriptURL(
|
|
264
|
-
return
|
|
885
|
+
createScriptURL(y) {
|
|
886
|
+
return y;
|
|
265
887
|
}
|
|
266
888
|
});
|
|
267
889
|
} catch {
|
|
268
|
-
return console.warn("TrustedTypes policy " +
|
|
890
|
+
return console.warn("TrustedTypes policy " + p + " could not be created."), null;
|
|
269
891
|
}
|
|
270
|
-
},
|
|
892
|
+
}, dn = function() {
|
|
271
893
|
return {
|
|
272
894
|
afterSanitizeAttributes: [],
|
|
273
895
|
afterSanitizeElements: [],
|
|
@@ -279,53 +901,70 @@ const Je = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
279
901
|
uponSanitizeElement: [],
|
|
280
902
|
uponSanitizeShadowNode: []
|
|
281
903
|
};
|
|
282
|
-
},
|
|
283
|
-
return
|
|
904
|
+
}, W = function(n, s, l, u) {
|
|
905
|
+
return L(n, s) && mt(n[s]) ? d(u.base ? N(u.base) : {}, n[s], u.transform) : l;
|
|
906
|
+
}, me = function(n, s, l) {
|
|
907
|
+
const u = L(n, s) ? n[s] : void 0;
|
|
908
|
+
return u && typeof u == "object" ? N(u) : l();
|
|
284
909
|
};
|
|
285
|
-
function
|
|
286
|
-
let
|
|
287
|
-
const n = (
|
|
288
|
-
if (n.version = "3.4.
|
|
910
|
+
function Tn() {
|
|
911
|
+
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Gr();
|
|
912
|
+
const n = (o) => Tn(o);
|
|
913
|
+
if (n.version = "3.4.14", n.removed = [], !r || !r.document || r.document.nodeType !== D.document || !r.Element)
|
|
289
914
|
return n.isSupported = !1, n;
|
|
290
|
-
let s =
|
|
915
|
+
let s = r.document;
|
|
291
916
|
const l = s, u = l.currentScript;
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
917
|
+
r.DocumentFragment;
|
|
918
|
+
const p = r.HTMLTemplateElement, y = r.Node, k = r.Element, I = r.NodeFilter;
|
|
919
|
+
r.NamedNodeMap === void 0 && (r.NamedNodeMap || r.MozNamedAttrMap), r.HTMLFormElement;
|
|
920
|
+
const wt = r.DOMParser, tt = r.trustedTypes, Y = k.prototype, En = M(Y, "cloneNode"), Gt = M(Y, "remove"), Sn = M(Y, "nextSibling"), et = M(Y, "childNodes"), nt = M(Y, "parentNode"), ge = M(Y, "shadowRoot"), Wt = M(Y, "attributes"), $ = y && y.prototype ? M(y.prototype, "nodeType") : null, rt = y && y.prototype ? M(y.prototype, "nodeName") : null, Ot = y && y.prototype ? M(y.prototype, "ownerDocument") : null, dt = function(t) {
|
|
921
|
+
return $ ? $(t) : t.nodeType;
|
|
922
|
+
}, Bt = function(t) {
|
|
923
|
+
return rt ? rt(t) : t.nodeName;
|
|
924
|
+
};
|
|
925
|
+
if (typeof p == "function") {
|
|
926
|
+
const o = s.createElement("template");
|
|
927
|
+
o.content && o.content.ownerDocument && (s = o.content.ownerDocument);
|
|
299
928
|
}
|
|
300
|
-
let
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
he(), _t++;
|
|
929
|
+
let O, X = "", jt, ye = !1, ht = 0;
|
|
930
|
+
const Te = function() {
|
|
931
|
+
if (ht > 0) throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
932
|
+
}, it = function(t) {
|
|
933
|
+
Te(), ht++;
|
|
306
934
|
try {
|
|
307
|
-
return
|
|
935
|
+
return O.createHTML(t);
|
|
308
936
|
} finally {
|
|
309
|
-
|
|
937
|
+
ht--;
|
|
310
938
|
}
|
|
311
|
-
},
|
|
312
|
-
|
|
939
|
+
}, vn = function(t) {
|
|
940
|
+
Te(), ht++;
|
|
313
941
|
try {
|
|
314
|
-
return
|
|
942
|
+
return O.createScriptURL(t);
|
|
315
943
|
} finally {
|
|
316
|
-
|
|
944
|
+
ht--;
|
|
317
945
|
}
|
|
318
|
-
},
|
|
319
|
-
return
|
|
320
|
-
}, Rt = s,
|
|
321
|
-
let h =
|
|
322
|
-
n.isSupported = typeof
|
|
323
|
-
const
|
|
324
|
-
let
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
946
|
+
}, wn = function() {
|
|
947
|
+
return ye || (jt = Wr(tt, u), ye = !0), jt;
|
|
948
|
+
}, Rt = s, Yt = Rt.implementation, be = Rt.createNodeIterator, On = Rt.createDocumentFragment, Rn = Rt.getElementsByTagName, Ln = l.importNode;
|
|
949
|
+
let h = dn();
|
|
950
|
+
n.isSupported = typeof _n == "function" && typeof nt == "function" && Yt && Yt.createHTMLDocument !== void 0;
|
|
951
|
+
const In = Lr, Dn = Ir, Nn = Dr, Cn = Nr, Mn = Cr, xn = Mr, Ae = xr, Pn = zr;
|
|
952
|
+
let Ee = fn, _ = null;
|
|
953
|
+
const $t = d({}, [
|
|
954
|
+
...sn,
|
|
955
|
+
...ce,
|
|
956
|
+
...ue,
|
|
957
|
+
...fe,
|
|
958
|
+
...ln
|
|
959
|
+
]);
|
|
960
|
+
let g = null;
|
|
961
|
+
const Xt = d({}, [
|
|
962
|
+
...cn,
|
|
963
|
+
...pe,
|
|
964
|
+
...un,
|
|
965
|
+
...Ht
|
|
966
|
+
]);
|
|
967
|
+
let x = Object.seal(ft(null, {
|
|
329
968
|
tagNameCheck: {
|
|
330
969
|
writable: !0,
|
|
331
970
|
configurable: !1,
|
|
@@ -344,8 +983,8 @@ function un() {
|
|
|
344
983
|
enumerable: !0,
|
|
345
984
|
value: !1
|
|
346
985
|
}
|
|
347
|
-
})),
|
|
348
|
-
const
|
|
986
|
+
})), _t = null, Se = null;
|
|
987
|
+
const F = Object.seal(ft(null, {
|
|
349
988
|
tagCheck: {
|
|
350
989
|
writable: !0,
|
|
351
990
|
configurable: !1,
|
|
@@ -359,10 +998,10 @@ function un() {
|
|
|
359
998
|
value: null
|
|
360
999
|
}
|
|
361
1000
|
}));
|
|
362
|
-
let
|
|
1001
|
+
let ve = !0, Vt = !0, we = !1, Oe = !0, H = !1, V = !0, q = !1, qt = !1, Lt = null, It = null, Kt = !1, ot = !1, Dt = !1, Nt = !1, Re = !0, Le = !1;
|
|
363
1002
|
const Ie = "user-content-";
|
|
364
|
-
let
|
|
365
|
-
const
|
|
1003
|
+
let Zt = !0, Jt = !1, at = {}, st = null;
|
|
1004
|
+
const De = d({}, [
|
|
366
1005
|
"annotation-xml",
|
|
367
1006
|
"audio",
|
|
368
1007
|
"colgroup",
|
|
@@ -381,15 +1020,6 @@ function un() {
|
|
|
381
1020
|
"noscript",
|
|
382
1021
|
"plaintext",
|
|
383
1022
|
"script",
|
|
384
|
-
// <selectedcontent> mirrors the selected <option>'s subtree, cloned by
|
|
385
|
-
// the UA (customizable <select>) — including any on* handlers — and the
|
|
386
|
-
// engine re-mirrors synchronously whenever a removal changes which
|
|
387
|
-
// option/selectedcontent is current, even inside DOMPurify's inert
|
|
388
|
-
// DOMParser document. Hoisting its children on removal re-inserts a fresh
|
|
389
|
-
// mirror target ahead of the walk, which the engine refills, looping
|
|
390
|
-
// forever (DoS) and amplifying output. Dropping its content on removal
|
|
391
|
-
// (rather than hoisting) breaks that cascade; the content is a duplicate
|
|
392
|
-
// of the option, which is sanitized on its own. See campaign-3 F1/F6.
|
|
393
1023
|
"selectedcontent",
|
|
394
1024
|
"style",
|
|
395
1025
|
"svg",
|
|
@@ -400,575 +1030,559 @@ function un() {
|
|
|
400
1030
|
"xmp"
|
|
401
1031
|
]);
|
|
402
1032
|
let Ne = null;
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
1033
|
+
const Ce = d({}, [
|
|
1034
|
+
"audio",
|
|
1035
|
+
"video",
|
|
1036
|
+
"img",
|
|
1037
|
+
"source",
|
|
1038
|
+
"image",
|
|
1039
|
+
"track"
|
|
1040
|
+
]);
|
|
1041
|
+
let Me = null;
|
|
1042
|
+
const xe = d({}, [
|
|
1043
|
+
"alt",
|
|
1044
|
+
"class",
|
|
1045
|
+
"for",
|
|
1046
|
+
"id",
|
|
1047
|
+
"label",
|
|
1048
|
+
"name",
|
|
1049
|
+
"pattern",
|
|
1050
|
+
"placeholder",
|
|
1051
|
+
"role",
|
|
1052
|
+
"summary",
|
|
1053
|
+
"title",
|
|
1054
|
+
"value",
|
|
1055
|
+
"style",
|
|
1056
|
+
"xmlns"
|
|
1057
|
+
]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
|
|
1058
|
+
let lt = P, Qt = !1, te = null;
|
|
1059
|
+
const zn = d({}, [
|
|
1060
|
+
Ct,
|
|
1061
|
+
Mt,
|
|
1062
|
+
P
|
|
1063
|
+
], le), Pe = A([
|
|
1064
|
+
"mi",
|
|
1065
|
+
"mo",
|
|
1066
|
+
"mn",
|
|
1067
|
+
"ms",
|
|
1068
|
+
"mtext"
|
|
1069
|
+
]);
|
|
1070
|
+
let ee = d({}, Pe);
|
|
1071
|
+
const ze = A(["annotation-xml"]);
|
|
1072
|
+
let ne = d({}, ze);
|
|
1073
|
+
const kn = d({}, [
|
|
1074
|
+
"title",
|
|
1075
|
+
"style",
|
|
1076
|
+
"font",
|
|
1077
|
+
"a",
|
|
1078
|
+
"script"
|
|
1079
|
+
]);
|
|
412
1080
|
let gt = null;
|
|
413
|
-
const
|
|
414
|
-
let
|
|
415
|
-
const
|
|
1081
|
+
const Un = ["application/xhtml+xml", "text/html"], Fn = "text/html";
|
|
1082
|
+
let T = null, ct = null;
|
|
1083
|
+
const Hn = s.createElement("form"), ke = function(t) {
|
|
416
1084
|
return t instanceof RegExp || t instanceof Function;
|
|
417
|
-
},
|
|
1085
|
+
}, re = function() {
|
|
418
1086
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
419
|
-
if (
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}), Zt =
|
|
427
|
-
|
|
428
|
-
}),
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
transform: d
|
|
438
|
-
}), Ae = j(t, "FORBID_ATTR", L({}), {
|
|
439
|
-
transform: d
|
|
440
|
-
}), st = S(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? L(t.USE_PROFILES) : t.USE_PROFILES : !1, be = t.ALLOW_ARIA_ATTR !== !1, Gt = t.ALLOW_DATA_ATTR !== !1, Se = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = t.SAFE_FOR_TEMPLATES || !1, Y = t.SAFE_FOR_XML !== !1, Q = t.WHOLE_DOCUMENT || !1, rt = t.RETURN_DOM || !1, It = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, $t = t.FORCE_BODY || !1, we = t.SANITIZE_DOM !== !1, Re = t.SANITIZE_NAMED_PROPS || !1, jt = t.KEEP_CONTENT !== !1, Xt = t.IN_PLACE || !1, ge = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : nn, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : F, Jt = S(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(t.MATHML_TEXT_INTEGRATION_POINTS) : p({}, Ce), Qt = S(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? L(t.HTML_INTEGRATION_POINTS) : p({}, Me);
|
|
441
|
-
const e = S(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? L(t.CUSTOM_ELEMENT_HANDLING) : pt(null);
|
|
442
|
-
if (g = pt(null), S(e, "tagNameCheck") && ve(e.tagNameCheck) && (g.tagNameCheck = e.tagNameCheck), S(e, "attributeNameCheck") && ve(e.attributeNameCheck) && (g.attributeNameCheck = e.attributeNameCheck), S(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), w(g), W && (Gt = !1), It && (rt = !0), st && (_ = p({}, Qe), T = pt(null), st.html === !0 && (p(_, Je), p(T, tn)), st.svg === !0 && (p(_, se), p(T, ce), p(T, xt)), st.svgFilters === !0 && (p(_, ae), p(T, ce), p(T, xt)), st.mathMl === !0 && (p(_, le), p(T, en), p(T, xt))), B.tagCheck = null, B.attributeCheck = null, S(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? B.tagCheck = t.ADD_TAGS : X(t.ADD_TAGS) && (_ === ye && (_ = L(_)), p(_, t.ADD_TAGS, d))), S(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? B.attributeCheck = t.ADD_ATTR : X(t.ADD_ATTR) && (T === Ee && (T = L(T)), p(T, t.ADD_ATTR, d))), S(t, "ADD_URI_SAFE_ATTR") && X(t.ADD_URI_SAFE_ATTR) && p(qt, t.ADD_URI_SAFE_ATTR, d), S(t, "FORBID_CONTENTS") && X(t.FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.FORBID_CONTENTS, d)), S(t, "ADD_FORBID_CONTENTS") && X(t.ADD_FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.ADD_FORBID_CONTENTS, d)), jt && (_["#text"] = !0), Q && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete Tt.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
443
|
-
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
444
|
-
throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
445
|
-
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
446
|
-
throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
447
|
-
const o = D;
|
|
448
|
-
D = t.TRUSTED_TYPES_POLICY;
|
|
1087
|
+
if (ct && ct === t) return;
|
|
1088
|
+
(!t || typeof t != "object") && (t = {}), t = N(t), gt = Un.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Fn : t.PARSER_MEDIA_TYPE, T = gt === "application/xhtml+xml" ? le : Et, _ = W(t, "ALLOWED_TAGS", $t, { transform: T }), g = W(t, "ALLOWED_ATTR", Xt, { transform: T }), te = W(t, "ALLOWED_NAMESPACES", zn, { transform: le }), Me = W(t, "ADD_URI_SAFE_ATTR", xe, {
|
|
1089
|
+
transform: T,
|
|
1090
|
+
base: xe
|
|
1091
|
+
}), Ne = W(t, "ADD_DATA_URI_TAGS", Ce, {
|
|
1092
|
+
transform: T,
|
|
1093
|
+
base: Ce
|
|
1094
|
+
}), st = W(t, "FORBID_CONTENTS", De, { transform: T }), _t = W(t, "FORBID_TAGS", N({}), { transform: T }), Se = W(t, "FORBID_ATTR", N({}), { transform: T }), at = L(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, ve = t.ALLOW_ARIA_ATTR !== !1, Vt = t.ALLOW_DATA_ATTR !== !1, we = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = t.SAFE_FOR_TEMPLATES || !1, V = t.SAFE_FOR_XML !== !1, q = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Dt = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, Kt = t.FORCE_BODY || !1, Re = t.SANITIZE_DOM !== !1, Le = t.SANITIZE_NAMED_PROPS || !1, Zt = t.KEEP_CONTENT !== !1, Jt = t.IN_PLACE || !1, Ee = wr(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : fn, lt = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, ee = me(t, "MATHML_TEXT_INTEGRATION_POINTS", () => d({}, Pe)), ne = me(t, "HTML_INTEGRATION_POINTS", () => d({}, ze));
|
|
1095
|
+
const e = me(t, "CUSTOM_ELEMENT_HANDLING", () => ft(null));
|
|
1096
|
+
if (x = ft(null), L(e, "tagNameCheck") && ke(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), L(e, "attributeNameCheck") && ke(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), L(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), E(x), H && (Vt = !1), Dt && (ot = !0), at && (_ = d({}, ln), g = ft(null), at.html === !0 && (d(_, sn), d(g, cn)), at.svg === !0 && (d(_, ce), d(g, pe), d(g, Ht)), at.svgFilters === !0 && (d(_, ue), d(g, pe), d(g, Ht)), at.mathMl === !0 && (d(_, fe), d(g, un), d(g, Ht))), F.tagCheck = null, F.attributeCheck = null, L(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? F.tagCheck = t.ADD_TAGS : mt(t.ADD_TAGS) && (_ === $t && (_ = N(_)), d(_, t.ADD_TAGS, T))), L(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? F.attributeCheck = t.ADD_ATTR : mt(t.ADD_ATTR) && (g === Xt && (g = N(g)), d(g, t.ADD_ATTR, T))), L(t, "ADD_FORBID_CONTENTS") && mt(t.ADD_FORBID_CONTENTS) && (st === De && (st = N(st)), d(st, t.ADD_FORBID_CONTENTS, T)), Zt && (_["#text"] = !0), q && d(_, [
|
|
1097
|
+
"html",
|
|
1098
|
+
"head",
|
|
1099
|
+
"body"
|
|
1100
|
+
]), _.table && (d(_, ["tbody"]), delete _t.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
1101
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1102
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1103
|
+
const i = O;
|
|
1104
|
+
O = t.TRUSTED_TYPES_POLICY;
|
|
449
1105
|
try {
|
|
450
|
-
|
|
1106
|
+
X = it("");
|
|
451
1107
|
} catch (a) {
|
|
452
|
-
throw
|
|
1108
|
+
throw O = i, a;
|
|
453
1109
|
}
|
|
454
|
-
} else t.TRUSTED_TYPES_POLICY === null ? (
|
|
455
|
-
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
},
|
|
461
|
-
return e.namespaceURI ===
|
|
462
|
-
},
|
|
463
|
-
|
|
1110
|
+
} else t.TRUSTED_TYPES_POLICY === null ? (O = void 0, X = "") : (O === void 0 && (O = wn()), O && typeof X == "string" && (X = it("")));
|
|
1111
|
+
A && A(t), ct = t;
|
|
1112
|
+
}, Ue = d({}, [
|
|
1113
|
+
...ce,
|
|
1114
|
+
...ue,
|
|
1115
|
+
...Or
|
|
1116
|
+
]), Fe = d({}, [...fe, ...Rr]), Gn = function(t, e, i) {
|
|
1117
|
+
return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ee[i]) : !!Ue[t];
|
|
1118
|
+
}, Wn = function(t, e, i) {
|
|
1119
|
+
return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" && ne[i] : !!Fe[t];
|
|
1120
|
+
}, Bn = function(t, e, i) {
|
|
1121
|
+
return e.namespaceURI === Mt && !ne[i] || e.namespaceURI === Ct && !ee[i] ? !1 : !Fe[t] && (kn[t] || !Ue[t]);
|
|
1122
|
+
}, jn = function(t) {
|
|
1123
|
+
let e = nt(t);
|
|
464
1124
|
(!e || !e.tagName) && (e = {
|
|
465
|
-
namespaceURI:
|
|
1125
|
+
namespaceURI: lt,
|
|
466
1126
|
tagName: "template"
|
|
467
1127
|
});
|
|
468
|
-
const
|
|
469
|
-
return
|
|
470
|
-
},
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
1128
|
+
const i = Et(t.tagName), a = Et(e.tagName);
|
|
1129
|
+
return te[t.namespaceURI] ? t.namespaceURI === Mt ? Gn(i, e, a) : t.namespaceURI === Ct ? Wn(i, e, a) : t.namespaceURI === P ? Bn(i, e, a) : !!(gt === "application/xhtml+xml" && te[t.namespaceURI]) : !1;
|
|
1130
|
+
}, G = function(t) {
|
|
1131
|
+
Tt(n.removed, { element: t });
|
|
1132
|
+
try {
|
|
1133
|
+
nt(t).removeChild(t);
|
|
1134
|
+
} catch {
|
|
1135
|
+
if (Gt(t), !nt(t)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1136
|
+
}
|
|
1137
|
+
}, He = function(t, e, i) {
|
|
474
1138
|
try {
|
|
475
|
-
|
|
1139
|
+
t.removeAttributeNode(e);
|
|
476
1140
|
} catch {
|
|
477
|
-
|
|
478
|
-
|
|
1141
|
+
try {
|
|
1142
|
+
t.removeAttribute(i);
|
|
1143
|
+
} catch {
|
|
1144
|
+
}
|
|
479
1145
|
}
|
|
480
|
-
},
|
|
481
|
-
|
|
482
|
-
const e =
|
|
1146
|
+
}, xt = function(t) {
|
|
1147
|
+
Pt(t);
|
|
1148
|
+
const e = et(t);
|
|
483
1149
|
if (e) {
|
|
484
1150
|
const a = [];
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}),
|
|
1151
|
+
J(e, (c) => {
|
|
1152
|
+
Tt(a, c);
|
|
1153
|
+
}), J(a, (c) => {
|
|
488
1154
|
try {
|
|
489
|
-
|
|
1155
|
+
Gt(c);
|
|
490
1156
|
} catch {
|
|
491
1157
|
}
|
|
492
1158
|
});
|
|
493
1159
|
}
|
|
494
|
-
const
|
|
495
|
-
if (
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
1160
|
+
const i = Wt(t);
|
|
1161
|
+
if (i) for (let a = i.length - 1; a >= 0; --a) {
|
|
1162
|
+
const c = i[a], f = c && c.name;
|
|
1163
|
+
typeof f == "string" && He(t, c, f);
|
|
1164
|
+
}
|
|
1165
|
+
}, K = function(t, e, i) {
|
|
1166
|
+
if (!i) try {
|
|
1167
|
+
i = e.getAttributeNode(t);
|
|
1168
|
+
} catch {
|
|
1169
|
+
i = null;
|
|
1170
|
+
}
|
|
1171
|
+
Tt(n.removed, {
|
|
1172
|
+
attribute: i || null,
|
|
1173
|
+
from: e
|
|
1174
|
+
});
|
|
505
1175
|
try {
|
|
506
|
-
|
|
507
|
-
attribute: e.getAttributeNode(t),
|
|
508
|
-
from: e
|
|
509
|
-
});
|
|
1176
|
+
i ? e.removeAttributeNode(i) : e.removeAttribute(t);
|
|
510
1177
|
} catch {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
1178
|
+
try {
|
|
1179
|
+
e.removeAttribute(t);
|
|
1180
|
+
} catch {
|
|
1181
|
+
}
|
|
515
1182
|
}
|
|
516
|
-
if (
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}, xn = function(t) {
|
|
528
|
-
const e = Ft(t);
|
|
1183
|
+
if (t === "is")
|
|
1184
|
+
if (ot || Dt) try {
|
|
1185
|
+
G(e);
|
|
1186
|
+
} catch {
|
|
1187
|
+
}
|
|
1188
|
+
else try {
|
|
1189
|
+
e.setAttribute(t, "");
|
|
1190
|
+
} catch {
|
|
1191
|
+
}
|
|
1192
|
+
}, Yn = function(t) {
|
|
1193
|
+
const e = Wt(t);
|
|
529
1194
|
if (e)
|
|
530
|
-
for (let
|
|
531
|
-
const a = e[
|
|
532
|
-
|
|
533
|
-
try {
|
|
534
|
-
t.removeAttribute(c);
|
|
535
|
-
} catch {
|
|
536
|
-
}
|
|
1195
|
+
for (let i = e.length - 1; i >= 0; --i) {
|
|
1196
|
+
const a = e[i], c = a && a.name;
|
|
1197
|
+
typeof c != "string" || g[T(c)] || He(t, a, c);
|
|
537
1198
|
}
|
|
538
|
-
},
|
|
1199
|
+
}, Pt = function(t) {
|
|
539
1200
|
const e = [t];
|
|
540
1201
|
for (; e.length > 0; ) {
|
|
541
|
-
const
|
|
542
|
-
(
|
|
543
|
-
const
|
|
544
|
-
if (c)
|
|
545
|
-
for (let f = c.length - 1; f >= 0; --f)
|
|
546
|
-
e.push(c[f]);
|
|
1202
|
+
const i = e.pop();
|
|
1203
|
+
dt(i) === D.element && Yn(i);
|
|
1204
|
+
const a = et(i);
|
|
1205
|
+
if (a) for (let c = a.length - 1; c >= 0; --c) e.push(a[c]);
|
|
547
1206
|
}
|
|
548
|
-
},
|
|
549
|
-
|
|
550
|
-
|
|
1207
|
+
}, Ge = function(t, e) {
|
|
1208
|
+
return V ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
|
|
1209
|
+
}, $n = function(t) {
|
|
1210
|
+
if (!V) return;
|
|
551
1211
|
const e = [t];
|
|
552
1212
|
for (; e.length > 0; ) {
|
|
553
|
-
const
|
|
554
|
-
if (a ===
|
|
1213
|
+
const i = e.pop(), a = dt(i);
|
|
1214
|
+
if (a === D.processingInstruction || a === D.comment && S(mn, i.data)) {
|
|
555
1215
|
try {
|
|
556
|
-
|
|
1216
|
+
Gt(i);
|
|
557
1217
|
} catch {
|
|
558
1218
|
}
|
|
559
1219
|
continue;
|
|
560
1220
|
}
|
|
561
|
-
if (a ===
|
|
562
|
-
const f =
|
|
1221
|
+
if (a === D.element) {
|
|
1222
|
+
const f = i, m = T(Bt(i));
|
|
563
1223
|
try {
|
|
564
|
-
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") &&
|
|
1224
|
+
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && Ge("for", m) && f.removeAttribute("for");
|
|
565
1225
|
} catch {
|
|
566
1226
|
}
|
|
567
1227
|
}
|
|
568
|
-
const c =
|
|
569
|
-
if (c)
|
|
570
|
-
for (let f = c.length - 1; f >= 0; --f)
|
|
571
|
-
e.push(c[f]);
|
|
1228
|
+
const c = et(i);
|
|
1229
|
+
if (c) for (let f = c.length - 1; f >= 0; --f) e.push(c[f]);
|
|
572
1230
|
}
|
|
573
|
-
},
|
|
574
|
-
let e = null,
|
|
575
|
-
if (
|
|
576
|
-
t = "<remove></remove>" + t;
|
|
1231
|
+
}, We = function(t) {
|
|
1232
|
+
let e = null, i = null;
|
|
1233
|
+
if (Kt) t = "<remove></remove>" + t;
|
|
577
1234
|
else {
|
|
578
|
-
const f =
|
|
579
|
-
|
|
1235
|
+
const f = nn(t, /^[\r\n\t ]+/);
|
|
1236
|
+
i = f && f[0];
|
|
1237
|
+
}
|
|
1238
|
+
gt === "application/xhtml+xml" && lt === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
1239
|
+
const a = O ? it(t) : t;
|
|
1240
|
+
if (lt === P) try {
|
|
1241
|
+
e = new wt().parseFromString(a, gt);
|
|
1242
|
+
} catch {
|
|
580
1243
|
}
|
|
581
|
-
gt === "application/xhtml+xml" && at === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
582
|
-
const a = D ? ot(t) : t;
|
|
583
|
-
if (at === F)
|
|
584
|
-
try {
|
|
585
|
-
e = new kt().parseFromString(a, gt);
|
|
586
|
-
} catch {
|
|
587
|
-
}
|
|
588
1244
|
if (!e || !e.documentElement) {
|
|
589
|
-
e =
|
|
1245
|
+
e = Yt.createDocument(lt, "template", null);
|
|
590
1246
|
try {
|
|
591
|
-
e.documentElement.innerHTML =
|
|
1247
|
+
e.documentElement.innerHTML = Qt ? X : a;
|
|
592
1248
|
} catch {
|
|
593
1249
|
}
|
|
594
1250
|
}
|
|
595
1251
|
const c = e.body || e.documentElement;
|
|
596
|
-
return t &&
|
|
597
|
-
},
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
null
|
|
604
|
-
);
|
|
605
|
-
}, Mt = function(t) {
|
|
606
|
-
return t = Et(t, yn, " "), t = Et(t, En, " "), t = Et(t, An, " "), t;
|
|
607
|
-
}, ne = function(t) {
|
|
1252
|
+
return t && i && c.insertBefore(s.createTextNode(i), c.childNodes[0] || null), lt === P ? Rn.call(e, q ? "html" : "body")[0] : q ? e.documentElement : c;
|
|
1253
|
+
}, Be = function(t) {
|
|
1254
|
+
const e = Ot ? Ot(t) : t.ownerDocument;
|
|
1255
|
+
return be.call(e || t, t, I.SHOW_ELEMENT | I.SHOW_COMMENT | I.SHOW_TEXT | I.SHOW_PROCESSING_INSTRUCTION | I.SHOW_CDATA_SECTION, null);
|
|
1256
|
+
}, zt = function(t) {
|
|
1257
|
+
return t = bt(t, In, " "), t = bt(t, Dn, " "), t = bt(t, Nn, " "), t;
|
|
1258
|
+
}, ie = function(t) {
|
|
608
1259
|
var e;
|
|
609
1260
|
t.normalize();
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
let a = o.nextNode();
|
|
618
|
-
for (; a; )
|
|
619
|
-
a.data = Mt(a.data), a = o.nextNode();
|
|
620
|
-
const c = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
|
|
621
|
-
c && ut(c, (f) => {
|
|
622
|
-
ct(f.content) && ne(f.content);
|
|
1261
|
+
const i = Ot ? Ot(t) : t.ownerDocument, a = be.call(i || t, t, I.SHOW_TEXT | I.SHOW_COMMENT | I.SHOW_CDATA_SECTION | I.SHOW_PROCESSING_INSTRUCTION, null);
|
|
1262
|
+
let c = a.nextNode();
|
|
1263
|
+
for (; c; )
|
|
1264
|
+
c.data = zt(c.data), c = a.nextNode();
|
|
1265
|
+
const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
|
|
1266
|
+
f && J(f, (m) => {
|
|
1267
|
+
ut(m.content) && ie(m.content);
|
|
623
1268
|
});
|
|
624
|
-
},
|
|
625
|
-
const e =
|
|
626
|
-
return typeof e != "string" ||
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
630
|
-
// canonical NamedNodeMap.
|
|
631
|
-
t.attributes !== Ft(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
632
|
-
// returns the integer 1 for any Element regardless of realm; direct
|
|
633
|
-
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
634
|
-
// the named child element. Cheap addition — nodeType is read from
|
|
635
|
-
// an internal slot, no serialization cost — and removes a residual
|
|
636
|
-
// clobbering surface used by several mXSS / PI / comment branches
|
|
637
|
-
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
638
|
-
t.nodeType !== I(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
639
|
-
// "childNodes" shadows the prototype getter. Direct reads of
|
|
640
|
-
// form.childNodes from a clobbered form return the named child
|
|
641
|
-
// instead of the real NodeList, so any walk that reads it directly
|
|
642
|
-
// skips the form's real children. Compare the direct read to the
|
|
643
|
-
// cached Node.prototype getter — when the form's named-property
|
|
644
|
-
// getter intercepts the read, the two values differ and we flag
|
|
645
|
-
// the form. This catches every clobbering child type (input,
|
|
646
|
-
// select, etc.) regardless of whether the named child happens to
|
|
647
|
-
// carry a numeric .length, which a typeof-based probe would miss
|
|
648
|
-
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
649
|
-
t.childNodes !== it(t);
|
|
650
|
-
}, ct = function(t) {
|
|
651
|
-
if (!I || typeof t != "object" || t === null)
|
|
652
|
-
return !1;
|
|
1269
|
+
}, kt = function(t) {
|
|
1270
|
+
const e = rt ? rt(t) : null;
|
|
1271
|
+
return typeof e != "string" || T(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || t.attributes !== Wt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || t.nodeType !== $(t) || t.childNodes !== et(t);
|
|
1272
|
+
}, ut = function(t) {
|
|
1273
|
+
if (!$ || typeof t != "object" || t === null) return !1;
|
|
653
1274
|
try {
|
|
654
|
-
return
|
|
1275
|
+
return $(t) === D.documentFragment;
|
|
655
1276
|
} catch {
|
|
656
1277
|
return !1;
|
|
657
1278
|
}
|
|
658
1279
|
}, yt = function(t) {
|
|
659
|
-
if (
|
|
660
|
-
return !1;
|
|
1280
|
+
if (!$ || typeof t != "object" || t === null) return !1;
|
|
661
1281
|
try {
|
|
662
|
-
return typeof
|
|
1282
|
+
return typeof $(t) == "number";
|
|
663
1283
|
} catch {
|
|
664
1284
|
return !1;
|
|
665
1285
|
}
|
|
666
1286
|
};
|
|
667
|
-
function
|
|
668
|
-
|
|
669
|
-
|
|
1287
|
+
function z(o, t, e) {
|
|
1288
|
+
o.length !== 0 && J(o, (i) => {
|
|
1289
|
+
i.call(n, t, e, ct);
|
|
670
1290
|
});
|
|
671
1291
|
}
|
|
672
|
-
const
|
|
673
|
-
return !!(
|
|
674
|
-
},
|
|
675
|
-
if (
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
1292
|
+
const Xn = function(t, e) {
|
|
1293
|
+
return !!(V && t.hasChildNodes() && !yt(t.firstElementChild) && S(pn, t.textContent) && S(pn, t.innerHTML) || V && t.namespaceURI === P && Fr[e] && (yt(t.firstElementChild) || typeof t.textContent == "string" && S(Hr[e], t.textContent)) || t.nodeType === D.processingInstruction || V && t.nodeType === D.comment && S(mn, t.data));
|
|
1294
|
+
}, Ut = function(t, e) {
|
|
1295
|
+
if (t instanceof RegExp) return S(t, e);
|
|
1296
|
+
if (t instanceof Function) {
|
|
1297
|
+
for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0), c = 2; c < i; c++) a[c - 2] = arguments[c];
|
|
1298
|
+
return !!t(e, ...a);
|
|
1299
|
+
}
|
|
1300
|
+
return !1;
|
|
1301
|
+
}, Vn = function(t, e, i) {
|
|
1302
|
+
if (!_t[e] && Ve(e) && Ut(x.tagNameCheck, e)) return !1;
|
|
1303
|
+
if (Zt && !st[e]) {
|
|
1304
|
+
const a = nt(t), c = et(t);
|
|
1305
|
+
if (c && a) {
|
|
1306
|
+
const f = c.length;
|
|
1307
|
+
for (let m = f - 1; m >= 0; --m) {
|
|
1308
|
+
const v = t === i ? En(c[m], !0) : c[m];
|
|
1309
|
+
a.insertBefore(v, Sn(t));
|
|
684
1310
|
}
|
|
685
1311
|
}
|
|
686
1312
|
}
|
|
687
|
-
return
|
|
688
|
-
},
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
if (
|
|
695
|
-
|
|
1313
|
+
return G(t), !0;
|
|
1314
|
+
}, je = function(t, e, i, a) {
|
|
1315
|
+
return t.length === 0 ? e : e === i || e === a ? N(e) : e;
|
|
1316
|
+
}, Ye = function(t, e) {
|
|
1317
|
+
return t === e || nt(t) !== null ? !1 : (Jt && Pt(t), !0);
|
|
1318
|
+
}, $e = function(t, e) {
|
|
1319
|
+
if (z(h.beforeSanitizeElements, t, null), Ye(t, e)) return !0;
|
|
1320
|
+
if (kt(t))
|
|
1321
|
+
return G(t), !0;
|
|
1322
|
+
const i = T(Bt(t));
|
|
1323
|
+
if (_ = je(h.uponSanitizeElement, _, $t, Lt), z(h.uponSanitizeElement, t, {
|
|
1324
|
+
tagName: i,
|
|
696
1325
|
allowedTags: _
|
|
697
|
-
}), t
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
return c === !1 && U(h.afterSanitizeElements, t, null), c;
|
|
1326
|
+
}), Ye(t, e)) return !0;
|
|
1327
|
+
if (Xn(t, i))
|
|
1328
|
+
return G(t), !0;
|
|
1329
|
+
if (_t[i] || !(F.tagCheck instanceof Function && F.tagCheck(i)) && !_[i]) {
|
|
1330
|
+
const a = Vn(t, i, e);
|
|
1331
|
+
return a === !1 && z(h.afterSanitizeElements, t, null), a;
|
|
704
1332
|
}
|
|
705
|
-
if ((
|
|
706
|
-
return
|
|
707
|
-
if (
|
|
708
|
-
const
|
|
709
|
-
t.textContent !==
|
|
710
|
-
element: t.cloneNode()
|
|
711
|
-
}), t.textContent = c);
|
|
1333
|
+
if (dt(t) === D.element && !jn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && S(kr, t.innerHTML))
|
|
1334
|
+
return G(t), !0;
|
|
1335
|
+
if (H && t.nodeType === D.text) {
|
|
1336
|
+
const a = zt(t.textContent);
|
|
1337
|
+
t.textContent !== a && (Tt(n.removed, { element: t.cloneNode() }), t.textContent = a);
|
|
712
1338
|
}
|
|
713
|
-
return
|
|
714
|
-
},
|
|
715
|
-
if (
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
!(He(t) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && b(g.attributeNameCheck, e) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
736
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
737
|
-
e === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)))
|
|
738
|
-
) return !1;
|
|
739
|
-
}
|
|
1339
|
+
return z(h.afterSanitizeElements, t, null), !1;
|
|
1340
|
+
}, Xe = function(t, e, i) {
|
|
1341
|
+
if (Se[e] || Ge(e, t) || Re && (e === "id" || e === "name") && (i in s || i in Hn)) return !1;
|
|
1342
|
+
const a = g[e] || F.attributeCheck instanceof Function && F.attributeCheck(e, t);
|
|
1343
|
+
return Vt && S(Cn, e) || ve && S(Mn, e) ? !0 : a ? Me[e] || S(Ee, bt(i, Ae, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && rn(i, "data:") === 0 && Ne[t] || we && !S(xn, bt(i, Ae, "")) ? !0 : !i : Ve(t) && Ut(x.tagNameCheck, t) && Ut(x.attributeNameCheck, e, t) || e === "is" && x.allowCustomizedBuiltInElements && Ut(x.tagNameCheck, i);
|
|
1344
|
+
}, qn = d({}, [
|
|
1345
|
+
"annotation-xml",
|
|
1346
|
+
"color-profile",
|
|
1347
|
+
"font-face",
|
|
1348
|
+
"font-face-format",
|
|
1349
|
+
"font-face-name",
|
|
1350
|
+
"font-face-src",
|
|
1351
|
+
"font-face-uri",
|
|
1352
|
+
"missing-glyph"
|
|
1353
|
+
]), Ve = function(t) {
|
|
1354
|
+
return !qn[Et(t)] && S(Pn, t);
|
|
1355
|
+
}, Kn = function(t, e, i, a) {
|
|
1356
|
+
if (O && typeof tt == "object" && typeof tt.getAttributeType == "function" && !i) switch (tt.getAttributeType(t, e)) {
|
|
1357
|
+
case "TrustedHTML":
|
|
1358
|
+
return it(a);
|
|
1359
|
+
case "TrustedScriptURL":
|
|
1360
|
+
return vn(a);
|
|
740
1361
|
}
|
|
741
|
-
return !0;
|
|
742
|
-
}, Un = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), He = function(t) {
|
|
743
|
-
return !Un[bt(t)] && b(wn, t);
|
|
744
|
-
}, Hn = function(t, e, o, a) {
|
|
745
|
-
if (D && typeof wt == "object" && typeof wt.getAttributeType == "function" && !o)
|
|
746
|
-
switch (wt.getAttributeType(t, e)) {
|
|
747
|
-
case "TrustedHTML":
|
|
748
|
-
return ot(a);
|
|
749
|
-
case "TrustedScriptURL":
|
|
750
|
-
return dn(a);
|
|
751
|
-
}
|
|
752
1362
|
return a;
|
|
753
|
-
},
|
|
1363
|
+
}, Zn = function(t, e, i, a) {
|
|
754
1364
|
try {
|
|
755
|
-
|
|
1365
|
+
i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ? G(t) : en(n.removed);
|
|
756
1366
|
} catch {
|
|
757
|
-
|
|
1367
|
+
K(e, t);
|
|
758
1368
|
}
|
|
759
|
-
},
|
|
760
|
-
|
|
1369
|
+
}, qe = function(t) {
|
|
1370
|
+
z(h.beforeSanitizeAttributes, t, null);
|
|
761
1371
|
const e = t.attributes;
|
|
762
|
-
if (!e ||
|
|
763
|
-
|
|
764
|
-
const
|
|
1372
|
+
if (!e || kt(t)) return;
|
|
1373
|
+
g = je(h.uponSanitizeAttribute, g, Xt, It);
|
|
1374
|
+
const i = {
|
|
765
1375
|
attrName: "",
|
|
766
1376
|
attrValue: "",
|
|
767
1377
|
keepAttr: !0,
|
|
768
|
-
allowedAttributes:
|
|
1378
|
+
allowedAttributes: g,
|
|
769
1379
|
forceKeepAttr: void 0
|
|
770
1380
|
};
|
|
771
1381
|
let a = e.length;
|
|
772
|
-
const c =
|
|
1382
|
+
const c = T(t.nodeName);
|
|
773
1383
|
for (; a--; ) {
|
|
774
|
-
const f = e[a],
|
|
775
|
-
let
|
|
776
|
-
if (
|
|
777
|
-
|
|
1384
|
+
const f = e[a], m = f.name, v = f.namespaceURI, C = f.value, R = T(m), ae = C;
|
|
1385
|
+
let w = m === "value" ? ae : Tr(ae);
|
|
1386
|
+
if (i.attrName = R, i.attrValue = w, i.keepAttr = !0, i.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, i), w = i.attrValue, Le && (R === "id" || R === "name") && rn(w, Ie) !== 0 && (K(m, t, f), w = Ie + w), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, w)) {
|
|
1387
|
+
K(m, t, f);
|
|
778
1388
|
continue;
|
|
779
1389
|
}
|
|
780
|
-
if (
|
|
781
|
-
|
|
1390
|
+
if (R === "attributename" && nn(w, "href")) {
|
|
1391
|
+
K(m, t, f);
|
|
782
1392
|
continue;
|
|
783
1393
|
}
|
|
784
|
-
if (!
|
|
785
|
-
if (!
|
|
786
|
-
|
|
1394
|
+
if (!i.forceKeepAttr) {
|
|
1395
|
+
if (!i.keepAttr) {
|
|
1396
|
+
K(m, t, f);
|
|
787
1397
|
continue;
|
|
788
1398
|
}
|
|
789
|
-
if (!Oe &&
|
|
790
|
-
|
|
1399
|
+
if (!Oe && S(Ur, w)) {
|
|
1400
|
+
K(m, t, f);
|
|
791
1401
|
continue;
|
|
792
1402
|
}
|
|
793
|
-
if (
|
|
794
|
-
|
|
1403
|
+
if (H && (w = zt(w)), !Xe(c, R, w)) {
|
|
1404
|
+
K(m, t, f);
|
|
795
1405
|
continue;
|
|
796
1406
|
}
|
|
797
|
-
|
|
1407
|
+
w = Kn(c, R, v, w), w !== ae && Zn(t, m, v, w);
|
|
798
1408
|
}
|
|
799
1409
|
}
|
|
800
|
-
|
|
801
|
-
},
|
|
1410
|
+
z(h.afterSanitizeAttributes, t, null);
|
|
1411
|
+
}, Ft = function(t) {
|
|
802
1412
|
let e = null;
|
|
803
|
-
const
|
|
804
|
-
for (
|
|
805
|
-
if (
|
|
806
|
-
const
|
|
807
|
-
|
|
1413
|
+
const i = Be(t);
|
|
1414
|
+
for (z(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
|
|
1415
|
+
if (z(h.uponSanitizeShadowNode, e, null), $e(e, t), qe(e), ut(e.content) && Ft(e.content), dt(e) === D.element) {
|
|
1416
|
+
const a = ge(e);
|
|
1417
|
+
ut(a) && (oe(a), Ft(a));
|
|
808
1418
|
}
|
|
809
|
-
|
|
810
|
-
},
|
|
1419
|
+
z(h.afterSanitizeShadowDOM, t, null);
|
|
1420
|
+
}, oe = function(t) {
|
|
811
1421
|
const e = [{
|
|
812
1422
|
node: t,
|
|
813
1423
|
shadow: null
|
|
814
1424
|
}];
|
|
815
1425
|
for (; e.length > 0; ) {
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
818
|
-
|
|
1426
|
+
const i = e.pop();
|
|
1427
|
+
if (i.shadow) {
|
|
1428
|
+
Ft(i.shadow);
|
|
819
1429
|
continue;
|
|
820
1430
|
}
|
|
821
|
-
const a =
|
|
822
|
-
if (
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
ct(P) && e.push({
|
|
833
|
-
node: P,
|
|
1431
|
+
const a = i.node, c = dt(a) === D.element, f = et(a);
|
|
1432
|
+
if (f) for (let m = f.length - 1; m >= 0; --m) e.push({
|
|
1433
|
+
node: f[m],
|
|
1434
|
+
shadow: null
|
|
1435
|
+
});
|
|
1436
|
+
if (c) {
|
|
1437
|
+
const m = rt ? rt(a) : null;
|
|
1438
|
+
if (typeof m == "string" && T(m) === "template") {
|
|
1439
|
+
const v = a.content;
|
|
1440
|
+
ut(v) && e.push({
|
|
1441
|
+
node: v,
|
|
834
1442
|
shadow: null
|
|
835
1443
|
});
|
|
836
1444
|
}
|
|
837
1445
|
}
|
|
838
|
-
if (
|
|
839
|
-
const
|
|
840
|
-
|
|
1446
|
+
if (c) {
|
|
1447
|
+
const m = ge(a);
|
|
1448
|
+
ut(m) && e.push({
|
|
841
1449
|
node: null,
|
|
842
|
-
shadow:
|
|
1450
|
+
shadow: m
|
|
843
1451
|
}, {
|
|
844
|
-
node:
|
|
1452
|
+
node: m,
|
|
845
1453
|
shadow: null
|
|
846
1454
|
});
|
|
847
1455
|
}
|
|
848
1456
|
}
|
|
849
1457
|
};
|
|
850
|
-
return n.sanitize = function(
|
|
851
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null,
|
|
852
|
-
if (
|
|
853
|
-
throw
|
|
854
|
-
if (!n.isSupported)
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
const f = Xt && typeof r != "string" && yt(r);
|
|
1458
|
+
return n.sanitize = function(o) {
|
|
1459
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, c = null;
|
|
1460
|
+
if (Qt = !o, Qt && (o = "<!-->"), typeof o != "string" && !yt(o) && (o = vr(o), typeof o != "string"))
|
|
1461
|
+
throw Z("dirty is not a string, aborting");
|
|
1462
|
+
if (!n.isSupported) return o;
|
|
1463
|
+
qt ? (_ = Lt, g = It) : re(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = N(_)), h.uponSanitizeAttribute.length > 0 && (g = N(g)), n.removed = [];
|
|
1464
|
+
const f = Jt && typeof o != "string" && yt(o);
|
|
858
1465
|
if (f) {
|
|
859
|
-
|
|
860
|
-
const C =
|
|
1466
|
+
$n(o);
|
|
1467
|
+
const C = Bt(o);
|
|
861
1468
|
if (typeof C == "string") {
|
|
862
|
-
const
|
|
863
|
-
if (!_[
|
|
864
|
-
throw
|
|
1469
|
+
const R = T(C);
|
|
1470
|
+
if (!_[R] || _t[R])
|
|
1471
|
+
throw xt(o), Z("root node is forbidden and cannot be sanitized in-place");
|
|
865
1472
|
}
|
|
866
|
-
if (
|
|
867
|
-
throw
|
|
1473
|
+
if (kt(o))
|
|
1474
|
+
throw xt(o), Z("root node is clobbered and cannot be sanitized in-place");
|
|
868
1475
|
try {
|
|
869
|
-
|
|
870
|
-
} catch (
|
|
871
|
-
throw
|
|
1476
|
+
oe(o);
|
|
1477
|
+
} catch (R) {
|
|
1478
|
+
throw xt(o), R;
|
|
872
1479
|
}
|
|
873
|
-
} else if (yt(
|
|
874
|
-
e =
|
|
1480
|
+
} else if (yt(o))
|
|
1481
|
+
e = We("<!---->"), i = e.ownerDocument.importNode(o, !0), i.nodeType === D.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), oe(i);
|
|
875
1482
|
else {
|
|
876
|
-
if (!
|
|
877
|
-
|
|
878
|
-
return D && Nt ? ot(r) : r;
|
|
879
|
-
if (e = ke(r), !e)
|
|
880
|
-
return rt ? null : Nt ? J : "";
|
|
1483
|
+
if (!ot && !H && !q && o.indexOf("<") === -1) return O && Nt ? it(o) : o;
|
|
1484
|
+
if (e = We(o), !e) return ot ? null : Nt ? X : "";
|
|
881
1485
|
}
|
|
882
|
-
e &&
|
|
883
|
-
const
|
|
1486
|
+
e && Kt && G(e.firstChild);
|
|
1487
|
+
const m = f ? o : e;
|
|
884
1488
|
try {
|
|
885
|
-
|
|
886
|
-
|
|
1489
|
+
const C = Be(m);
|
|
1490
|
+
for (; a = C.nextNode(); )
|
|
1491
|
+
$e(a, m), qe(a), ut(a.content) && Ft(a.content);
|
|
887
1492
|
} catch (C) {
|
|
888
|
-
throw f && (
|
|
889
|
-
|
|
1493
|
+
throw f && (xt(o), J(n.removed, (R) => {
|
|
1494
|
+
R.element && Pt(R.element);
|
|
890
1495
|
})), C;
|
|
891
1496
|
}
|
|
892
1497
|
if (f)
|
|
893
|
-
return
|
|
894
|
-
C.element &&
|
|
895
|
-
}),
|
|
896
|
-
if (
|
|
897
|
-
if (
|
|
898
|
-
for (c =
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
c = e;
|
|
902
|
-
return (T.shadowroot || T.shadowrootmode) && (c = gn.call(l, c, !0)), c;
|
|
1498
|
+
return J(n.removed, (C) => {
|
|
1499
|
+
C.element && Pt(C.element);
|
|
1500
|
+
}), H && ie(o), o;
|
|
1501
|
+
if (ot) {
|
|
1502
|
+
if (H && ie(e), Dt)
|
|
1503
|
+
for (c = On.call(e.ownerDocument); e.firstChild; ) c.appendChild(e.firstChild);
|
|
1504
|
+
else c = e;
|
|
1505
|
+
return (g.shadowroot || g.shadowrootmode) && (c = Ln.call(l, c, !0)), c;
|
|
903
1506
|
}
|
|
904
|
-
let
|
|
905
|
-
return
|
|
906
|
-
` +
|
|
1507
|
+
let v = q ? e.outerHTML : e.innerHTML;
|
|
1508
|
+
return q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && S(Pr, e.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
|
|
1509
|
+
` + v), H && (v = zt(v)), O && Nt ? it(v) : v;
|
|
907
1510
|
}, n.setConfig = function() {
|
|
908
|
-
let
|
|
909
|
-
|
|
1511
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1512
|
+
re(o), qt = !0, Lt = _, It = g;
|
|
910
1513
|
}, n.clearConfig = function() {
|
|
911
|
-
|
|
912
|
-
}, n.isValidAttribute = function(
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
return
|
|
916
|
-
}, n.addHook = function(
|
|
917
|
-
typeof t == "function" &&
|
|
918
|
-
}, n.removeHook = function(
|
|
919
|
-
if (
|
|
1514
|
+
ct = null, qt = !1, Lt = null, It = null, O = jt, X = "";
|
|
1515
|
+
}, n.isValidAttribute = function(o, t, e) {
|
|
1516
|
+
ct || re({});
|
|
1517
|
+
const i = T(o), a = T(t);
|
|
1518
|
+
return Xe(i, a, e);
|
|
1519
|
+
}, n.addHook = function(o, t) {
|
|
1520
|
+
typeof t == "function" && L(h, o) && Tt(h[o], t);
|
|
1521
|
+
}, n.removeHook = function(o, t) {
|
|
1522
|
+
if (L(h, o)) {
|
|
920
1523
|
if (t !== void 0) {
|
|
921
|
-
const e =
|
|
922
|
-
return e === -1 ? void 0 :
|
|
1524
|
+
const e = gr(h[o], t);
|
|
1525
|
+
return e === -1 ? void 0 : yr(h[o], e, 1)[0];
|
|
923
1526
|
}
|
|
924
|
-
return
|
|
1527
|
+
return en(h[o]);
|
|
925
1528
|
}
|
|
926
|
-
}, n.removeHooks = function(
|
|
927
|
-
|
|
1529
|
+
}, n.removeHooks = function(o) {
|
|
1530
|
+
L(h, o) && (h[o] = []);
|
|
928
1531
|
}, n.removeAllHooks = function() {
|
|
929
|
-
h =
|
|
1532
|
+
h = dn();
|
|
930
1533
|
}, n;
|
|
931
1534
|
}
|
|
932
|
-
var
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1535
|
+
var Br = Tn(), St = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map();
|
|
1536
|
+
function bn(r, n) {
|
|
1537
|
+
const s = Br.sanitize(r, {
|
|
1538
|
+
USE_PROFILES: {
|
|
1539
|
+
svg: !0,
|
|
1540
|
+
svgFilters: !0
|
|
1541
|
+
},
|
|
937
1542
|
FORBID_TAGS: ["script", "use"],
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1543
|
+
FORBID_ATTR: [
|
|
1544
|
+
"onload",
|
|
1545
|
+
"onerror",
|
|
1546
|
+
"onbegin",
|
|
1547
|
+
"href",
|
|
1548
|
+
"xlink:href"
|
|
1549
|
+
]
|
|
1550
|
+
}), l = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
|
|
1551
|
+
if (!(l instanceof SVGElement)) throw new Error(`Invalid SVG from ${n}`);
|
|
1552
|
+
return l;
|
|
1553
|
+
}
|
|
1554
|
+
async function jr(r) {
|
|
1555
|
+
const n = await fetch(r);
|
|
1556
|
+
if (!n.ok) throw new Error(`Failed to load icon: ${n.status}`);
|
|
1557
|
+
return bn(await n.text(), r);
|
|
944
1558
|
}
|
|
945
|
-
async function
|
|
946
|
-
|
|
947
|
-
if (!n.ok)
|
|
948
|
-
throw new Error(`Failed to load icon: ${n.status}`);
|
|
949
|
-
return fn(await n.text(), i);
|
|
1559
|
+
async function hn(r) {
|
|
1560
|
+
return St.has(r) || St.set(r, jr(r)), (await St.get(r)).cloneNode(!0);
|
|
950
1561
|
}
|
|
951
|
-
|
|
952
|
-
|
|
1562
|
+
function Yr(r) {
|
|
1563
|
+
let n = _e.get(r);
|
|
1564
|
+
return n || (n = bn(r, "inline SVG source"), _e.set(r, n)), n.cloneNode(!0);
|
|
953
1565
|
}
|
|
954
|
-
function
|
|
955
|
-
|
|
956
|
-
return n || (n = fn(i, "inline SVG source"), pe.set(i, n)), n.cloneNode(!0);
|
|
1566
|
+
function Zr(r) {
|
|
1567
|
+
r ? St.delete(r) : (St.clear(), _e.clear());
|
|
957
1568
|
}
|
|
958
|
-
|
|
959
|
-
|
|
1569
|
+
var $r = ":host{--_nys-icon-size:var(--nys-icon-size,.7em);vertical-align:middle;width:fit-content;height:fit-content;display:inline-block;box-sizing:content-box!important}@supports (font-size:1cap){:host{--_nys-icon-size:var(--nys-icon-size,1cap)}}.nys-icon--svg{width:var(--_nys-icon-size,1em);height:var(--_nys-icon-size,1em);white-space:nowrap;display:block}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
|
|
1570
|
+
function B(r, n) {
|
|
1571
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(r, n);
|
|
960
1572
|
}
|
|
961
|
-
|
|
962
|
-
var
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
return u &&
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
constructor() {
|
|
969
|
-
super(...
|
|
1573
|
+
function j(r, n, s, l) {
|
|
1574
|
+
var u = arguments.length, p = u < 3 ? n : l === null ? l = Object.getOwnPropertyDescriptor(n, s) : l, y;
|
|
1575
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") p = Reflect.decorate(r, n, s, l);
|
|
1576
|
+
else for (var k = r.length - 1; k >= 0; k--) (y = r[k]) && (p = (u < 3 ? y(p) : u > 3 ? y(n, s, p) : y(n, s)) || p);
|
|
1577
|
+
return u > 3 && p && Object.defineProperty(n, s, p), p;
|
|
1578
|
+
}
|
|
1579
|
+
var U = class An extends or {
|
|
1580
|
+
constructor(...n) {
|
|
1581
|
+
super(...n), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
|
|
1582
|
+
}
|
|
1583
|
+
static {
|
|
1584
|
+
this.styles = tr($r);
|
|
970
1585
|
}
|
|
971
|
-
/** Resolves when the current icon load (if any) is complete. */
|
|
972
1586
|
get updateComplete() {
|
|
973
1587
|
return (async () => {
|
|
974
1588
|
const n = await super.updateComplete;
|
|
@@ -976,34 +1590,29 @@ const G = (V = class extends qn {
|
|
|
976
1590
|
})();
|
|
977
1591
|
}
|
|
978
1592
|
connectedCallback() {
|
|
979
|
-
super.connectedCallback(), this._reflectHostSemantics(),
|
|
1593
|
+
super.connectedCallback(), this._reflectHostSemantics(), Ze(this.library, this);
|
|
980
1594
|
}
|
|
981
1595
|
disconnectedCallback() {
|
|
982
|
-
super.disconnectedCallback(),
|
|
1596
|
+
super.disconnectedCallback(), Je(this.library, this);
|
|
983
1597
|
}
|
|
984
|
-
/** Called by the icon library registry when the current library changes. */
|
|
985
1598
|
redraw() {
|
|
986
1599
|
this._loadIcon();
|
|
987
1600
|
}
|
|
988
|
-
/**
|
|
989
|
-
* Lit calls firstUpdated after the first render, once all reactive
|
|
990
|
-
* properties (including those set from the template) are resolved.
|
|
991
|
-
* This guarantees the initial _loadIcon runs with the correct name
|
|
992
|
-
* and library values, avoiding the race where updated() might not
|
|
993
|
-
* fire for properties that equal their defaults.
|
|
994
|
-
*/
|
|
995
1601
|
firstUpdated() {
|
|
996
1602
|
this._loadIcon();
|
|
997
1603
|
}
|
|
1604
|
+
static {
|
|
1605
|
+
this._validName = /^[a-zA-Z0-9_-]+$/;
|
|
1606
|
+
}
|
|
998
1607
|
updated(n) {
|
|
999
|
-
if (n.has("name") && !
|
|
1608
|
+
if (n.has("name") && !An._validName.test(this.name)) {
|
|
1000
1609
|
console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
|
|
1001
1610
|
return;
|
|
1002
1611
|
}
|
|
1003
1612
|
if (n.has("name") || n.has("library")) {
|
|
1004
1613
|
if (n.has("library")) {
|
|
1005
1614
|
const s = n.get("library");
|
|
1006
|
-
s &&
|
|
1615
|
+
s && Je(s, this), Ze(this.library, this);
|
|
1007
1616
|
}
|
|
1008
1617
|
this._loadIcon();
|
|
1009
1618
|
}
|
|
@@ -1012,7 +1621,7 @@ const G = (V = class extends qn {
|
|
|
1012
1621
|
_loadIcon() {
|
|
1013
1622
|
const n = ++this._loadSeq;
|
|
1014
1623
|
this._loadPromise = (async () => {
|
|
1015
|
-
const s =
|
|
1624
|
+
const s = lr(this.library);
|
|
1016
1625
|
if (!s || !this.name) {
|
|
1017
1626
|
this._svg = null;
|
|
1018
1627
|
return;
|
|
@@ -1024,7 +1633,7 @@ const G = (V = class extends qn {
|
|
|
1024
1633
|
this._svg = null;
|
|
1025
1634
|
return;
|
|
1026
1635
|
}
|
|
1027
|
-
const u = typeof l == "string" ? await
|
|
1636
|
+
const u = typeof l == "string" ? await hn(l) : l.type === "url" ? await hn(l.href) : Yr(l.content);
|
|
1028
1637
|
if (n !== this._loadSeq) return;
|
|
1029
1638
|
s.mutator?.(u), this._applyAttributes(u), this._svg = u;
|
|
1030
1639
|
} catch {
|
|
@@ -1035,56 +1644,34 @@ const G = (V = class extends qn {
|
|
|
1035
1644
|
_applyAttributes(n) {
|
|
1036
1645
|
n.setAttribute("role", "img"), this.ariaLabel ? (n.setAttribute("aria-label", this.ariaLabel), n.removeAttribute("aria-hidden")) : (n.setAttribute("aria-hidden", "true"), n.removeAttribute("aria-label")), this.rotate && this.rotate !== "0" ? n.style.rotate = `${this.rotate}deg` : n.style.removeProperty("rotate"), n.style.color = this.color || "currentcolor", n.classList.add(`nys-icon--${this.size}`), n.classList.add("nys-icon--svg"), this.flip && n.classList.add(`nys-icon--flip-${this.flip}`), this._reflectHostSemantics();
|
|
1037
1646
|
}
|
|
1038
|
-
/**
|
|
1039
|
-
* Reflects the icon's accessible state onto the host:
|
|
1040
|
-
* - Labeled icon -> role="img" + aria-label, no aria-hidden.
|
|
1041
|
-
* - Decorative -> aria-hidden="true", no role/label.
|
|
1042
|
-
*
|
|
1043
|
-
* These are reflected as host *attributes* (rather than via
|
|
1044
|
-
* ElementInternals) on purpose: aria-hidden / role / aria-label in
|
|
1045
|
-
* attribute form have universal, consistent assistive-technology support,
|
|
1046
|
-
* whereas AT support for these states set through ElementInternals is still
|
|
1047
|
-
* uneven across browser/screen-reader combinations. The host role/label
|
|
1048
|
-
* therefore depend on runtime state (ariaLabel), so defaultRole stays null.
|
|
1049
|
-
*/
|
|
1050
1647
|
_reflectHostSemantics() {
|
|
1051
1648
|
this.ariaLabel ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.ariaLabel), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
|
|
1052
1649
|
}
|
|
1053
1650
|
render() {
|
|
1054
|
-
return this._svg ?
|
|
1651
|
+
return this._svg ? Qn`${this._svg}` : null;
|
|
1055
1652
|
}
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
],
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
],
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
q([
|
|
1073
|
-
nt({ type: String })
|
|
1074
|
-
], G.prototype, "color");
|
|
1075
|
-
q([
|
|
1076
|
-
nt({ type: String })
|
|
1077
|
-
], G.prototype, "size");
|
|
1078
|
-
q([
|
|
1079
|
-
$n()
|
|
1080
|
-
], G.prototype, "_svg");
|
|
1081
|
-
let ki = G;
|
|
1082
|
-
customElements.get("nys-icon") || customElements.define("nys-icon", ki);
|
|
1653
|
+
};
|
|
1654
|
+
j([Q({
|
|
1655
|
+
type: String,
|
|
1656
|
+
reflect: !0
|
|
1657
|
+
}), B("design:type", Object)], U.prototype, "name", void 0);
|
|
1658
|
+
j([Q({
|
|
1659
|
+
type: String,
|
|
1660
|
+
reflect: !0
|
|
1661
|
+
}), B("design:type", Object)], U.prototype, "library", void 0);
|
|
1662
|
+
j([Q({ type: String }), B("design:type", Object)], U.prototype, "ariaLabel", void 0);
|
|
1663
|
+
j([Q({ type: String }), B("design:type", Object)], U.prototype, "rotate", void 0);
|
|
1664
|
+
j([Q({ type: String }), B("design:type", Object)], U.prototype, "flip", void 0);
|
|
1665
|
+
j([Q({ type: String }), B("design:type", Object)], U.prototype, "color", void 0);
|
|
1666
|
+
j([Q({ type: String }), B("design:type", String)], U.prototype, "size", void 0);
|
|
1667
|
+
j([er(), B("design:type", Object)], U.prototype, "_svg", void 0);
|
|
1668
|
+
customElements.get("nys-icon") || customElements.define("nys-icon", U);
|
|
1083
1669
|
export {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1670
|
+
U as NysIcon,
|
|
1671
|
+
Zr as clearIconCache,
|
|
1672
|
+
lr as getIconLibrary,
|
|
1673
|
+
qr as registerIconLibrary,
|
|
1674
|
+
Kr as unregisterIconLibrary
|
|
1089
1675
|
};
|
|
1090
|
-
|
|
1676
|
+
|
|
1677
|
+
//# sourceMappingURL=nys-icon.js.map
|