@floegence/floe-webapp-core 0.81.1 → 0.81.3
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/assets/markdown.worker-DurayC72.js +59 -0
- package/dist/components/chat/blocks/SvgBlock.js +16 -10
- package/dist/components/chat/diff/diffModel.js +1 -1
- package/dist/components/chat/hooks/useMarkdown.js +5 -5
- package/dist/components/chat/markdown/markdown.js +1 -1
- package/dist/components/editor/CodeEditor.d.ts +1 -2
- package/dist/components/editor/CodeEditor.js +7 -8
- package/dist/components/editor/languages.js +37 -37
- package/dist/components/editor/monacoEnvironment.js +5 -5
- package/dist/components/editor/monacoStandaloneRuntime.d.ts +1 -1
- package/dist/components/editor/monacoStandaloneRuntime.js +7 -7
- package/dist/components/file-browser/DragPreview.js +1 -1
- package/dist/components/icons/DockIcons.js +118 -114
- package/dist/components/layout/BottomBarCompanion.js +29 -29
- package/dist/components/layout/Shell.js +1 -1
- package/dist/components/notes/NotesOverlay.js +1 -1
- package/dist/components/ui/picker/PickerNavigation.js +10 -9
- package/dist/components/workbench/WorkbenchFilterBar.js +226 -223
- package/dist/components/workbench/WorkbenchLockButton.js +1 -1
- package/dist/components/workbench/WorkbenchOverlay.js +1 -1
- package/dist/components/workbench/WorkbenchSurface.js +101 -101
- package/dist/node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.js +1480 -0
- package/dist/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.js +1141 -0
- package/dist/node_modules/.pnpm/{solid-motionone@1.0.4_solid-js@1.9.11 → solid-motionone@1.0.4_solid-js@1.9.15}/node_modules/solid-motionone/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/{tailwind-merge@3.4.0 → tailwind-merge@3.7.0}/node_modules/tailwind-merge/dist/bundle-mjs.js +653 -420
- package/dist/pdf/PdfDocumentSurface.js +1 -0
- package/dist/pdf/localization.js +2 -0
- package/dist/styles.css +1 -1
- package/dist/terminal/mockRuntime.js +118 -110
- package/dist/utils/cn.js +1 -1
- package/package.json +13 -12
- package/dist/assets/markdown.worker-xpdzahxf.js +0 -59
- package/dist/node_modules/.pnpm/marked@17.0.1/node_modules/marked/lib/marked.esm.js +0 -1114
- /package/dist/node_modules/.pnpm/{@solid-primitives_props@3.2.2_solid-js@1.9.11 → @solid-primitives_props@3.2.4_solid-js@1.9.15}/node_modules/@solid-primitives/props/dist/combineProps.js +0 -0
- /package/dist/node_modules/.pnpm/{@solid-primitives_refs@1.1.2_solid-js@1.9.11 → @solid-primitives_refs@1.1.4_solid-js@1.9.15}/node_modules/@solid-primitives/refs/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@solid-primitives_transition-group@1.1.2_solid-js@1.9.11 → @solid-primitives_transition-group@1.1.2_solid-js@1.9.15}/node_modules/@solid-primitives/transition-group/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{diff@8.0.3 → diff@8.0.4}/node_modules/diff/libesm/diff/base.js +0 -0
- /package/dist/node_modules/.pnpm/{diff@8.0.3 → diff@8.0.4}/node_modules/diff/libesm/diff/line.js +0 -0
|
@@ -0,0 +1,1480 @@
|
|
|
1
|
+
function Ye(r, i) {
|
|
2
|
+
(i == null || i > r.length) && (i = r.length);
|
|
3
|
+
for (var s = 0, c = Array(i); s < i; s++) c[s] = r[s];
|
|
4
|
+
return c;
|
|
5
|
+
}
|
|
6
|
+
function Hn(r) {
|
|
7
|
+
if (Array.isArray(r)) return r;
|
|
8
|
+
}
|
|
9
|
+
function Gn(r, i) {
|
|
10
|
+
var s = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
11
|
+
if (s != null) {
|
|
12
|
+
var c, u, d, S, ut = [], w = !0, At = !1;
|
|
13
|
+
try {
|
|
14
|
+
if (d = (s = s.call(r)).next, i !== 0) for (; !(w = (c = d.call(s)).done) && (ut.push(c.value), ut.length !== i); w = !0) ;
|
|
15
|
+
} catch (q) {
|
|
16
|
+
At = !0, u = q;
|
|
17
|
+
} finally {
|
|
18
|
+
try {
|
|
19
|
+
if (!w && s.return != null && (S = s.return(), Object(S) !== S)) return;
|
|
20
|
+
} finally {
|
|
21
|
+
if (At) throw u;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return ut;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function Wn() {
|
|
28
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
30
|
+
}
|
|
31
|
+
function Bn(r, i) {
|
|
32
|
+
return Hn(r) || Gn(r, i) || Yn(r, i) || Wn();
|
|
33
|
+
}
|
|
34
|
+
function Yn(r, i) {
|
|
35
|
+
if (r) {
|
|
36
|
+
if (typeof r == "string") return Ye(r, i);
|
|
37
|
+
var s = {}.toString.call(r).slice(8, -1);
|
|
38
|
+
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) ? Ye(r, i) : void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const an = Object.entries, je = Object.setPrototypeOf, jn = Object.isFrozen, Xn = Object.getPrototypeOf, $n = Object.getOwnPropertyDescriptor;
|
|
42
|
+
let y = Object.freeze, b = Object.seal, lt = Object.create, sn = typeof Reflect < "u" && Reflect, le = sn.apply, ce = sn.construct;
|
|
43
|
+
y || (y = function(i) {
|
|
44
|
+
return i;
|
|
45
|
+
});
|
|
46
|
+
b || (b = function(i) {
|
|
47
|
+
return i;
|
|
48
|
+
});
|
|
49
|
+
le || (le = function(i, s) {
|
|
50
|
+
for (var c = arguments.length, u = new Array(c > 2 ? c - 2 : 0), d = 2; d < c; d++) u[d - 2] = arguments[d];
|
|
51
|
+
return i.apply(s, u);
|
|
52
|
+
});
|
|
53
|
+
ce || (ce = function(i) {
|
|
54
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) c[u - 1] = arguments[u];
|
|
55
|
+
return new i(...c);
|
|
56
|
+
});
|
|
57
|
+
const V = A(Array.prototype.forEach), Vn = A(Array.prototype.lastIndexOf), Xe = A(Array.prototype.pop), ht = A(Array.prototype.push), qn = A(Array.prototype.splice), ct = Array.isArray, Et = A(String.prototype.toLowerCase), ne = A(String.prototype.toString), $e = A(String.prototype.match), _t = A(String.prototype.replace), Ve = A(String.prototype.indexOf), Kn = A(String.prototype.trim), Zn = A(Number.prototype.toString), Jn = A(Boolean.prototype.toString), qe = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), Ke = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), D = A(Object.prototype.hasOwnProperty), gt = A(Object.prototype.toString), O = A(RegExp.prototype.test), G = Qn(TypeError);
|
|
58
|
+
function A(r) {
|
|
59
|
+
return function(i) {
|
|
60
|
+
i instanceof RegExp && (i.lastIndex = 0);
|
|
61
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) c[u - 1] = arguments[u];
|
|
62
|
+
return le(r, i, c);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function Qn(r) {
|
|
66
|
+
return function() {
|
|
67
|
+
for (var i = arguments.length, s = new Array(i), c = 0; c < i; c++) s[c] = arguments[c];
|
|
68
|
+
return ce(r, s);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function m(r, i) {
|
|
72
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
|
|
73
|
+
if (je && je(r, null), !ct(i)) return r;
|
|
74
|
+
let c = i.length;
|
|
75
|
+
for (; c--; ) {
|
|
76
|
+
let u = i[c];
|
|
77
|
+
if (typeof u == "string") {
|
|
78
|
+
const d = s(u);
|
|
79
|
+
d !== u && (jn(i) || (i[c] = d), u = d);
|
|
80
|
+
}
|
|
81
|
+
r[u] = !0;
|
|
82
|
+
}
|
|
83
|
+
return r;
|
|
84
|
+
}
|
|
85
|
+
function to(r) {
|
|
86
|
+
for (let i = 0; i < r.length; i++) D(r, i) || (r[i] = null);
|
|
87
|
+
return r;
|
|
88
|
+
}
|
|
89
|
+
function C(r) {
|
|
90
|
+
const i = lt(null);
|
|
91
|
+
for (const c of an(r)) {
|
|
92
|
+
var s = Bn(c, 2);
|
|
93
|
+
const u = s[0], d = s[1];
|
|
94
|
+
D(r, u) && (ct(d) ? i[u] = to(d) : d && typeof d == "object" && d.constructor === Object ? i[u] = C(d) : i[u] = d);
|
|
95
|
+
}
|
|
96
|
+
return i;
|
|
97
|
+
}
|
|
98
|
+
function eo(r) {
|
|
99
|
+
switch (typeof r) {
|
|
100
|
+
case "string":
|
|
101
|
+
return r;
|
|
102
|
+
case "number":
|
|
103
|
+
return Zn(r);
|
|
104
|
+
case "boolean":
|
|
105
|
+
return Jn(r);
|
|
106
|
+
case "bigint":
|
|
107
|
+
return qe ? qe(r) : "0";
|
|
108
|
+
case "symbol":
|
|
109
|
+
return Ke ? Ke(r) : "Symbol()";
|
|
110
|
+
case "undefined":
|
|
111
|
+
return gt(r);
|
|
112
|
+
case "function":
|
|
113
|
+
case "object": {
|
|
114
|
+
if (r === null) return gt(r);
|
|
115
|
+
const i = r, s = P(i, "toString");
|
|
116
|
+
if (typeof s == "function") {
|
|
117
|
+
const c = s(i);
|
|
118
|
+
return typeof c == "string" ? c : gt(c);
|
|
119
|
+
}
|
|
120
|
+
return gt(r);
|
|
121
|
+
}
|
|
122
|
+
default:
|
|
123
|
+
return gt(r);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function P(r, i) {
|
|
127
|
+
for (; r !== null; ) {
|
|
128
|
+
const c = $n(r, i);
|
|
129
|
+
if (c) {
|
|
130
|
+
if (c.get) return A(c.get);
|
|
131
|
+
if (typeof c.value == "function") return A(c.value);
|
|
132
|
+
}
|
|
133
|
+
r = Xn(r);
|
|
134
|
+
}
|
|
135
|
+
function s() {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return s;
|
|
139
|
+
}
|
|
140
|
+
function no(r) {
|
|
141
|
+
try {
|
|
142
|
+
return O(r, ""), !0;
|
|
143
|
+
} catch {
|
|
144
|
+
return !1;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const Ze = y([
|
|
148
|
+
"a",
|
|
149
|
+
"abbr",
|
|
150
|
+
"acronym",
|
|
151
|
+
"address",
|
|
152
|
+
"area",
|
|
153
|
+
"article",
|
|
154
|
+
"aside",
|
|
155
|
+
"audio",
|
|
156
|
+
"b",
|
|
157
|
+
"bdi",
|
|
158
|
+
"bdo",
|
|
159
|
+
"big",
|
|
160
|
+
"blink",
|
|
161
|
+
"blockquote",
|
|
162
|
+
"body",
|
|
163
|
+
"br",
|
|
164
|
+
"button",
|
|
165
|
+
"canvas",
|
|
166
|
+
"caption",
|
|
167
|
+
"center",
|
|
168
|
+
"cite",
|
|
169
|
+
"code",
|
|
170
|
+
"col",
|
|
171
|
+
"colgroup",
|
|
172
|
+
"content",
|
|
173
|
+
"data",
|
|
174
|
+
"datalist",
|
|
175
|
+
"dd",
|
|
176
|
+
"decorator",
|
|
177
|
+
"del",
|
|
178
|
+
"details",
|
|
179
|
+
"dfn",
|
|
180
|
+
"dialog",
|
|
181
|
+
"dir",
|
|
182
|
+
"div",
|
|
183
|
+
"dl",
|
|
184
|
+
"dt",
|
|
185
|
+
"element",
|
|
186
|
+
"em",
|
|
187
|
+
"fieldset",
|
|
188
|
+
"figcaption",
|
|
189
|
+
"figure",
|
|
190
|
+
"font",
|
|
191
|
+
"footer",
|
|
192
|
+
"form",
|
|
193
|
+
"h1",
|
|
194
|
+
"h2",
|
|
195
|
+
"h3",
|
|
196
|
+
"h4",
|
|
197
|
+
"h5",
|
|
198
|
+
"h6",
|
|
199
|
+
"head",
|
|
200
|
+
"header",
|
|
201
|
+
"hgroup",
|
|
202
|
+
"hr",
|
|
203
|
+
"html",
|
|
204
|
+
"i",
|
|
205
|
+
"img",
|
|
206
|
+
"input",
|
|
207
|
+
"ins",
|
|
208
|
+
"kbd",
|
|
209
|
+
"label",
|
|
210
|
+
"legend",
|
|
211
|
+
"li",
|
|
212
|
+
"main",
|
|
213
|
+
"map",
|
|
214
|
+
"mark",
|
|
215
|
+
"marquee",
|
|
216
|
+
"menu",
|
|
217
|
+
"menuitem",
|
|
218
|
+
"meter",
|
|
219
|
+
"nav",
|
|
220
|
+
"nobr",
|
|
221
|
+
"ol",
|
|
222
|
+
"optgroup",
|
|
223
|
+
"option",
|
|
224
|
+
"output",
|
|
225
|
+
"p",
|
|
226
|
+
"picture",
|
|
227
|
+
"pre",
|
|
228
|
+
"progress",
|
|
229
|
+
"q",
|
|
230
|
+
"rp",
|
|
231
|
+
"rt",
|
|
232
|
+
"ruby",
|
|
233
|
+
"s",
|
|
234
|
+
"samp",
|
|
235
|
+
"search",
|
|
236
|
+
"section",
|
|
237
|
+
"select",
|
|
238
|
+
"shadow",
|
|
239
|
+
"slot",
|
|
240
|
+
"small",
|
|
241
|
+
"source",
|
|
242
|
+
"spacer",
|
|
243
|
+
"span",
|
|
244
|
+
"strike",
|
|
245
|
+
"strong",
|
|
246
|
+
"style",
|
|
247
|
+
"sub",
|
|
248
|
+
"summary",
|
|
249
|
+
"sup",
|
|
250
|
+
"table",
|
|
251
|
+
"tbody",
|
|
252
|
+
"td",
|
|
253
|
+
"template",
|
|
254
|
+
"textarea",
|
|
255
|
+
"tfoot",
|
|
256
|
+
"th",
|
|
257
|
+
"thead",
|
|
258
|
+
"time",
|
|
259
|
+
"tr",
|
|
260
|
+
"track",
|
|
261
|
+
"tt",
|
|
262
|
+
"u",
|
|
263
|
+
"ul",
|
|
264
|
+
"var",
|
|
265
|
+
"video",
|
|
266
|
+
"wbr"
|
|
267
|
+
]), oe = y([
|
|
268
|
+
"svg",
|
|
269
|
+
"a",
|
|
270
|
+
"altglyph",
|
|
271
|
+
"altglyphdef",
|
|
272
|
+
"altglyphitem",
|
|
273
|
+
"animatecolor",
|
|
274
|
+
"animatemotion",
|
|
275
|
+
"animatetransform",
|
|
276
|
+
"circle",
|
|
277
|
+
"clippath",
|
|
278
|
+
"defs",
|
|
279
|
+
"desc",
|
|
280
|
+
"ellipse",
|
|
281
|
+
"enterkeyhint",
|
|
282
|
+
"exportparts",
|
|
283
|
+
"filter",
|
|
284
|
+
"font",
|
|
285
|
+
"g",
|
|
286
|
+
"glyph",
|
|
287
|
+
"glyphref",
|
|
288
|
+
"hkern",
|
|
289
|
+
"image",
|
|
290
|
+
"inputmode",
|
|
291
|
+
"line",
|
|
292
|
+
"lineargradient",
|
|
293
|
+
"marker",
|
|
294
|
+
"mask",
|
|
295
|
+
"metadata",
|
|
296
|
+
"mpath",
|
|
297
|
+
"part",
|
|
298
|
+
"path",
|
|
299
|
+
"pattern",
|
|
300
|
+
"polygon",
|
|
301
|
+
"polyline",
|
|
302
|
+
"radialgradient",
|
|
303
|
+
"rect",
|
|
304
|
+
"stop",
|
|
305
|
+
"style",
|
|
306
|
+
"switch",
|
|
307
|
+
"symbol",
|
|
308
|
+
"text",
|
|
309
|
+
"textpath",
|
|
310
|
+
"title",
|
|
311
|
+
"tref",
|
|
312
|
+
"tspan",
|
|
313
|
+
"view",
|
|
314
|
+
"vkern"
|
|
315
|
+
]), re = y([
|
|
316
|
+
"feBlend",
|
|
317
|
+
"feColorMatrix",
|
|
318
|
+
"feComponentTransfer",
|
|
319
|
+
"feComposite",
|
|
320
|
+
"feConvolveMatrix",
|
|
321
|
+
"feDiffuseLighting",
|
|
322
|
+
"feDisplacementMap",
|
|
323
|
+
"feDistantLight",
|
|
324
|
+
"feDropShadow",
|
|
325
|
+
"feFlood",
|
|
326
|
+
"feFuncA",
|
|
327
|
+
"feFuncB",
|
|
328
|
+
"feFuncG",
|
|
329
|
+
"feFuncR",
|
|
330
|
+
"feGaussianBlur",
|
|
331
|
+
"feImage",
|
|
332
|
+
"feMerge",
|
|
333
|
+
"feMergeNode",
|
|
334
|
+
"feMorphology",
|
|
335
|
+
"feOffset",
|
|
336
|
+
"fePointLight",
|
|
337
|
+
"feSpecularLighting",
|
|
338
|
+
"feSpotLight",
|
|
339
|
+
"feTile",
|
|
340
|
+
"feTurbulence"
|
|
341
|
+
]), oo = y([
|
|
342
|
+
"animate",
|
|
343
|
+
"color-profile",
|
|
344
|
+
"cursor",
|
|
345
|
+
"discard",
|
|
346
|
+
"font-face",
|
|
347
|
+
"font-face-format",
|
|
348
|
+
"font-face-name",
|
|
349
|
+
"font-face-src",
|
|
350
|
+
"font-face-uri",
|
|
351
|
+
"foreignobject",
|
|
352
|
+
"hatch",
|
|
353
|
+
"hatchpath",
|
|
354
|
+
"mesh",
|
|
355
|
+
"meshgradient",
|
|
356
|
+
"meshpatch",
|
|
357
|
+
"meshrow",
|
|
358
|
+
"missing-glyph",
|
|
359
|
+
"script",
|
|
360
|
+
"set",
|
|
361
|
+
"solidcolor",
|
|
362
|
+
"unknown",
|
|
363
|
+
"use"
|
|
364
|
+
]), ie = y([
|
|
365
|
+
"math",
|
|
366
|
+
"menclose",
|
|
367
|
+
"merror",
|
|
368
|
+
"mfenced",
|
|
369
|
+
"mfrac",
|
|
370
|
+
"mglyph",
|
|
371
|
+
"mi",
|
|
372
|
+
"mlabeledtr",
|
|
373
|
+
"mmultiscripts",
|
|
374
|
+
"mn",
|
|
375
|
+
"mo",
|
|
376
|
+
"mover",
|
|
377
|
+
"mpadded",
|
|
378
|
+
"mphantom",
|
|
379
|
+
"mroot",
|
|
380
|
+
"mrow",
|
|
381
|
+
"ms",
|
|
382
|
+
"mspace",
|
|
383
|
+
"msqrt",
|
|
384
|
+
"mstyle",
|
|
385
|
+
"msub",
|
|
386
|
+
"msup",
|
|
387
|
+
"msubsup",
|
|
388
|
+
"mtable",
|
|
389
|
+
"mtd",
|
|
390
|
+
"mtext",
|
|
391
|
+
"mtr",
|
|
392
|
+
"munder",
|
|
393
|
+
"munderover",
|
|
394
|
+
"mprescripts"
|
|
395
|
+
]), ro = y([
|
|
396
|
+
"maction",
|
|
397
|
+
"maligngroup",
|
|
398
|
+
"malignmark",
|
|
399
|
+
"mlongdiv",
|
|
400
|
+
"mscarries",
|
|
401
|
+
"mscarry",
|
|
402
|
+
"msgroup",
|
|
403
|
+
"mstack",
|
|
404
|
+
"msline",
|
|
405
|
+
"msrow",
|
|
406
|
+
"semantics",
|
|
407
|
+
"annotation",
|
|
408
|
+
"annotation-xml",
|
|
409
|
+
"mprescripts",
|
|
410
|
+
"none"
|
|
411
|
+
]), Je = y(["#text"]), Qe = y([
|
|
412
|
+
"accept",
|
|
413
|
+
"action",
|
|
414
|
+
"align",
|
|
415
|
+
"alt",
|
|
416
|
+
"autocapitalize",
|
|
417
|
+
"autocomplete",
|
|
418
|
+
"autopictureinpicture",
|
|
419
|
+
"autoplay",
|
|
420
|
+
"background",
|
|
421
|
+
"bgcolor",
|
|
422
|
+
"border",
|
|
423
|
+
"capture",
|
|
424
|
+
"cellpadding",
|
|
425
|
+
"cellspacing",
|
|
426
|
+
"checked",
|
|
427
|
+
"cite",
|
|
428
|
+
"class",
|
|
429
|
+
"clear",
|
|
430
|
+
"color",
|
|
431
|
+
"cols",
|
|
432
|
+
"colspan",
|
|
433
|
+
"command",
|
|
434
|
+
"commandfor",
|
|
435
|
+
"controls",
|
|
436
|
+
"controlslist",
|
|
437
|
+
"coords",
|
|
438
|
+
"crossorigin",
|
|
439
|
+
"datetime",
|
|
440
|
+
"decoding",
|
|
441
|
+
"default",
|
|
442
|
+
"dir",
|
|
443
|
+
"disabled",
|
|
444
|
+
"disablepictureinpicture",
|
|
445
|
+
"disableremoteplayback",
|
|
446
|
+
"download",
|
|
447
|
+
"draggable",
|
|
448
|
+
"enctype",
|
|
449
|
+
"enterkeyhint",
|
|
450
|
+
"exportparts",
|
|
451
|
+
"face",
|
|
452
|
+
"for",
|
|
453
|
+
"headers",
|
|
454
|
+
"height",
|
|
455
|
+
"hidden",
|
|
456
|
+
"high",
|
|
457
|
+
"href",
|
|
458
|
+
"hreflang",
|
|
459
|
+
"id",
|
|
460
|
+
"inert",
|
|
461
|
+
"inputmode",
|
|
462
|
+
"integrity",
|
|
463
|
+
"ismap",
|
|
464
|
+
"kind",
|
|
465
|
+
"label",
|
|
466
|
+
"lang",
|
|
467
|
+
"list",
|
|
468
|
+
"loading",
|
|
469
|
+
"loop",
|
|
470
|
+
"low",
|
|
471
|
+
"max",
|
|
472
|
+
"maxlength",
|
|
473
|
+
"media",
|
|
474
|
+
"method",
|
|
475
|
+
"min",
|
|
476
|
+
"minlength",
|
|
477
|
+
"multiple",
|
|
478
|
+
"muted",
|
|
479
|
+
"name",
|
|
480
|
+
"nonce",
|
|
481
|
+
"noshade",
|
|
482
|
+
"novalidate",
|
|
483
|
+
"nowrap",
|
|
484
|
+
"open",
|
|
485
|
+
"optimum",
|
|
486
|
+
"part",
|
|
487
|
+
"pattern",
|
|
488
|
+
"placeholder",
|
|
489
|
+
"playsinline",
|
|
490
|
+
"popover",
|
|
491
|
+
"popovertarget",
|
|
492
|
+
"popovertargetaction",
|
|
493
|
+
"poster",
|
|
494
|
+
"preload",
|
|
495
|
+
"pubdate",
|
|
496
|
+
"radiogroup",
|
|
497
|
+
"readonly",
|
|
498
|
+
"rel",
|
|
499
|
+
"required",
|
|
500
|
+
"rev",
|
|
501
|
+
"reversed",
|
|
502
|
+
"role",
|
|
503
|
+
"rows",
|
|
504
|
+
"rowspan",
|
|
505
|
+
"spellcheck",
|
|
506
|
+
"scope",
|
|
507
|
+
"selected",
|
|
508
|
+
"shape",
|
|
509
|
+
"size",
|
|
510
|
+
"sizes",
|
|
511
|
+
"slot",
|
|
512
|
+
"span",
|
|
513
|
+
"srclang",
|
|
514
|
+
"start",
|
|
515
|
+
"src",
|
|
516
|
+
"srcset",
|
|
517
|
+
"step",
|
|
518
|
+
"style",
|
|
519
|
+
"summary",
|
|
520
|
+
"tabindex",
|
|
521
|
+
"title",
|
|
522
|
+
"translate",
|
|
523
|
+
"type",
|
|
524
|
+
"usemap",
|
|
525
|
+
"valign",
|
|
526
|
+
"value",
|
|
527
|
+
"width",
|
|
528
|
+
"wrap",
|
|
529
|
+
"xmlns"
|
|
530
|
+
]), ae = y([
|
|
531
|
+
"accent-height",
|
|
532
|
+
"accumulate",
|
|
533
|
+
"additive",
|
|
534
|
+
"alignment-baseline",
|
|
535
|
+
"amplitude",
|
|
536
|
+
"ascent",
|
|
537
|
+
"attributename",
|
|
538
|
+
"attributetype",
|
|
539
|
+
"azimuth",
|
|
540
|
+
"basefrequency",
|
|
541
|
+
"baseline-shift",
|
|
542
|
+
"begin",
|
|
543
|
+
"bias",
|
|
544
|
+
"by",
|
|
545
|
+
"class",
|
|
546
|
+
"clip",
|
|
547
|
+
"clippathunits",
|
|
548
|
+
"clip-path",
|
|
549
|
+
"clip-rule",
|
|
550
|
+
"color",
|
|
551
|
+
"color-interpolation",
|
|
552
|
+
"color-interpolation-filters",
|
|
553
|
+
"color-profile",
|
|
554
|
+
"color-rendering",
|
|
555
|
+
"cx",
|
|
556
|
+
"cy",
|
|
557
|
+
"d",
|
|
558
|
+
"dx",
|
|
559
|
+
"dy",
|
|
560
|
+
"diffuseconstant",
|
|
561
|
+
"direction",
|
|
562
|
+
"display",
|
|
563
|
+
"divisor",
|
|
564
|
+
"dominant-baseline",
|
|
565
|
+
"dur",
|
|
566
|
+
"edgemode",
|
|
567
|
+
"elevation",
|
|
568
|
+
"end",
|
|
569
|
+
"exponent",
|
|
570
|
+
"fill",
|
|
571
|
+
"fill-opacity",
|
|
572
|
+
"fill-rule",
|
|
573
|
+
"filter",
|
|
574
|
+
"filterunits",
|
|
575
|
+
"flood-color",
|
|
576
|
+
"flood-opacity",
|
|
577
|
+
"font-family",
|
|
578
|
+
"font-size",
|
|
579
|
+
"font-size-adjust",
|
|
580
|
+
"font-stretch",
|
|
581
|
+
"font-style",
|
|
582
|
+
"font-variant",
|
|
583
|
+
"font-weight",
|
|
584
|
+
"fx",
|
|
585
|
+
"fy",
|
|
586
|
+
"g1",
|
|
587
|
+
"g2",
|
|
588
|
+
"glyph-name",
|
|
589
|
+
"glyphref",
|
|
590
|
+
"gradientunits",
|
|
591
|
+
"gradienttransform",
|
|
592
|
+
"height",
|
|
593
|
+
"href",
|
|
594
|
+
"id",
|
|
595
|
+
"image-rendering",
|
|
596
|
+
"in",
|
|
597
|
+
"in2",
|
|
598
|
+
"intercept",
|
|
599
|
+
"k",
|
|
600
|
+
"k1",
|
|
601
|
+
"k2",
|
|
602
|
+
"k3",
|
|
603
|
+
"k4",
|
|
604
|
+
"kerning",
|
|
605
|
+
"keypoints",
|
|
606
|
+
"keysplines",
|
|
607
|
+
"keytimes",
|
|
608
|
+
"lang",
|
|
609
|
+
"lengthadjust",
|
|
610
|
+
"letter-spacing",
|
|
611
|
+
"kernelmatrix",
|
|
612
|
+
"kernelunitlength",
|
|
613
|
+
"lighting-color",
|
|
614
|
+
"local",
|
|
615
|
+
"marker-end",
|
|
616
|
+
"marker-mid",
|
|
617
|
+
"marker-start",
|
|
618
|
+
"markerheight",
|
|
619
|
+
"markerunits",
|
|
620
|
+
"markerwidth",
|
|
621
|
+
"maskcontentunits",
|
|
622
|
+
"maskunits",
|
|
623
|
+
"max",
|
|
624
|
+
"mask",
|
|
625
|
+
"mask-type",
|
|
626
|
+
"media",
|
|
627
|
+
"method",
|
|
628
|
+
"mode",
|
|
629
|
+
"min",
|
|
630
|
+
"name",
|
|
631
|
+
"numoctaves",
|
|
632
|
+
"offset",
|
|
633
|
+
"operator",
|
|
634
|
+
"opacity",
|
|
635
|
+
"order",
|
|
636
|
+
"orient",
|
|
637
|
+
"orientation",
|
|
638
|
+
"origin",
|
|
639
|
+
"overflow",
|
|
640
|
+
"paint-order",
|
|
641
|
+
"path",
|
|
642
|
+
"pathlength",
|
|
643
|
+
"patterncontentunits",
|
|
644
|
+
"patterntransform",
|
|
645
|
+
"patternunits",
|
|
646
|
+
"pointer-events",
|
|
647
|
+
"points",
|
|
648
|
+
"preservealpha",
|
|
649
|
+
"preserveaspectratio",
|
|
650
|
+
"primitiveunits",
|
|
651
|
+
"r",
|
|
652
|
+
"rx",
|
|
653
|
+
"ry",
|
|
654
|
+
"radius",
|
|
655
|
+
"refx",
|
|
656
|
+
"refy",
|
|
657
|
+
"repeatcount",
|
|
658
|
+
"repeatdur",
|
|
659
|
+
"restart",
|
|
660
|
+
"result",
|
|
661
|
+
"rotate",
|
|
662
|
+
"scale",
|
|
663
|
+
"seed",
|
|
664
|
+
"shape-rendering",
|
|
665
|
+
"slope",
|
|
666
|
+
"specularconstant",
|
|
667
|
+
"specularexponent",
|
|
668
|
+
"spreadmethod",
|
|
669
|
+
"startoffset",
|
|
670
|
+
"stddeviation",
|
|
671
|
+
"stitchtiles",
|
|
672
|
+
"stop-color",
|
|
673
|
+
"stop-opacity",
|
|
674
|
+
"stroke-dasharray",
|
|
675
|
+
"stroke-dashoffset",
|
|
676
|
+
"stroke-linecap",
|
|
677
|
+
"stroke-linejoin",
|
|
678
|
+
"stroke-miterlimit",
|
|
679
|
+
"stroke-opacity",
|
|
680
|
+
"stroke",
|
|
681
|
+
"stroke-width",
|
|
682
|
+
"style",
|
|
683
|
+
"surfacescale",
|
|
684
|
+
"systemlanguage",
|
|
685
|
+
"tabindex",
|
|
686
|
+
"tablevalues",
|
|
687
|
+
"targetx",
|
|
688
|
+
"targety",
|
|
689
|
+
"transform",
|
|
690
|
+
"transform-origin",
|
|
691
|
+
"text-anchor",
|
|
692
|
+
"text-decoration",
|
|
693
|
+
"text-orientation",
|
|
694
|
+
"text-rendering",
|
|
695
|
+
"textlength",
|
|
696
|
+
"type",
|
|
697
|
+
"u1",
|
|
698
|
+
"u2",
|
|
699
|
+
"unicode",
|
|
700
|
+
"values",
|
|
701
|
+
"vector-effect",
|
|
702
|
+
"viewbox",
|
|
703
|
+
"visibility",
|
|
704
|
+
"version",
|
|
705
|
+
"vert-adv-y",
|
|
706
|
+
"vert-origin-x",
|
|
707
|
+
"vert-origin-y",
|
|
708
|
+
"width",
|
|
709
|
+
"word-spacing",
|
|
710
|
+
"wrap",
|
|
711
|
+
"writing-mode",
|
|
712
|
+
"xchannelselector",
|
|
713
|
+
"ychannelselector",
|
|
714
|
+
"x",
|
|
715
|
+
"x1",
|
|
716
|
+
"x2",
|
|
717
|
+
"xmlns",
|
|
718
|
+
"y",
|
|
719
|
+
"y1",
|
|
720
|
+
"y2",
|
|
721
|
+
"z",
|
|
722
|
+
"zoomandpan"
|
|
723
|
+
]), tn = y([
|
|
724
|
+
"accent",
|
|
725
|
+
"accentunder",
|
|
726
|
+
"align",
|
|
727
|
+
"bevelled",
|
|
728
|
+
"close",
|
|
729
|
+
"columnalign",
|
|
730
|
+
"columnlines",
|
|
731
|
+
"columnspacing",
|
|
732
|
+
"columnspan",
|
|
733
|
+
"denomalign",
|
|
734
|
+
"depth",
|
|
735
|
+
"dir",
|
|
736
|
+
"display",
|
|
737
|
+
"displaystyle",
|
|
738
|
+
"encoding",
|
|
739
|
+
"fence",
|
|
740
|
+
"frame",
|
|
741
|
+
"height",
|
|
742
|
+
"href",
|
|
743
|
+
"id",
|
|
744
|
+
"largeop",
|
|
745
|
+
"length",
|
|
746
|
+
"linethickness",
|
|
747
|
+
"lquote",
|
|
748
|
+
"lspace",
|
|
749
|
+
"mathbackground",
|
|
750
|
+
"mathcolor",
|
|
751
|
+
"mathsize",
|
|
752
|
+
"mathvariant",
|
|
753
|
+
"maxsize",
|
|
754
|
+
"minsize",
|
|
755
|
+
"movablelimits",
|
|
756
|
+
"notation",
|
|
757
|
+
"numalign",
|
|
758
|
+
"open",
|
|
759
|
+
"rowalign",
|
|
760
|
+
"rowlines",
|
|
761
|
+
"rowspacing",
|
|
762
|
+
"rowspan",
|
|
763
|
+
"rspace",
|
|
764
|
+
"rquote",
|
|
765
|
+
"scriptlevel",
|
|
766
|
+
"scriptminsize",
|
|
767
|
+
"scriptsizemultiplier",
|
|
768
|
+
"selection",
|
|
769
|
+
"separator",
|
|
770
|
+
"separators",
|
|
771
|
+
"stretchy",
|
|
772
|
+
"subscriptshift",
|
|
773
|
+
"supscriptshift",
|
|
774
|
+
"symmetric",
|
|
775
|
+
"voffset",
|
|
776
|
+
"width",
|
|
777
|
+
"xmlns"
|
|
778
|
+
]), xt = y([
|
|
779
|
+
"xlink:href",
|
|
780
|
+
"xml:id",
|
|
781
|
+
"xlink:title",
|
|
782
|
+
"xml:space",
|
|
783
|
+
"xmlns:xlink"
|
|
784
|
+
]), io = b(/{{[\w\W]*|^[\w\W]*}}/g), ao = b(/<%[\w\W]*|^[\w\W]*%>/g), so = b(/\${[\w\W]*/g), lo = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), co = b(/^aria-[\-\w]+$/), en = b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), uo = b(/^(?:\w+script|data):/i), fo = b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), po = b(/^html$/i), mo = b(/^[a-z][.\w]*(-[.\w]+)+$/i), nn = b(/<[/\w!]/g), on = b(/<[/\w]/g), To = b(/<\/no(script|embed|frames)/i), ho = b(/\/>/i), N = {
|
|
785
|
+
element: 1,
|
|
786
|
+
attribute: 2,
|
|
787
|
+
text: 3,
|
|
788
|
+
cdataSection: 4,
|
|
789
|
+
entityReference: 5,
|
|
790
|
+
entityNode: 6,
|
|
791
|
+
processingInstruction: 7,
|
|
792
|
+
comment: 8,
|
|
793
|
+
document: 9,
|
|
794
|
+
documentType: 10,
|
|
795
|
+
documentFragment: 11,
|
|
796
|
+
notation: 12
|
|
797
|
+
}, ln = [
|
|
798
|
+
"style",
|
|
799
|
+
"script",
|
|
800
|
+
"xmp",
|
|
801
|
+
"iframe",
|
|
802
|
+
"noembed",
|
|
803
|
+
"noframes",
|
|
804
|
+
"plaintext",
|
|
805
|
+
"noscript"
|
|
806
|
+
], _o = y(m({}, ln)), go = (function() {
|
|
807
|
+
const r = {};
|
|
808
|
+
return V(ln, (i) => {
|
|
809
|
+
r[i] = b(new RegExp("</" + i + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
810
|
+
}), y(r);
|
|
811
|
+
})(), Eo = function() {
|
|
812
|
+
return typeof window > "u" ? null : window;
|
|
813
|
+
}, Ao = function(i, s) {
|
|
814
|
+
if (typeof i != "object" || typeof i.createPolicy != "function") return null;
|
|
815
|
+
let c = null;
|
|
816
|
+
const u = "data-tt-policy-suffix";
|
|
817
|
+
s && s.hasAttribute(u) && (c = s.getAttribute(u));
|
|
818
|
+
const d = "dompurify" + (c ? "#" + c : "");
|
|
819
|
+
try {
|
|
820
|
+
return i.createPolicy(d, {
|
|
821
|
+
createHTML(S) {
|
|
822
|
+
return S;
|
|
823
|
+
},
|
|
824
|
+
createScriptURL(S) {
|
|
825
|
+
return S;
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
} catch {
|
|
829
|
+
return console.warn("TrustedTypes policy " + d + " could not be created."), null;
|
|
830
|
+
}
|
|
831
|
+
}, rn = function() {
|
|
832
|
+
return {
|
|
833
|
+
afterSanitizeAttributes: [],
|
|
834
|
+
afterSanitizeElements: [],
|
|
835
|
+
afterSanitizeShadowDOM: [],
|
|
836
|
+
beforeSanitizeAttributes: [],
|
|
837
|
+
beforeSanitizeElements: [],
|
|
838
|
+
beforeSanitizeShadowDOM: [],
|
|
839
|
+
uponSanitizeAttribute: [],
|
|
840
|
+
uponSanitizeElement: [],
|
|
841
|
+
uponSanitizeShadowNode: []
|
|
842
|
+
};
|
|
843
|
+
}, W = function(i, s, c, u) {
|
|
844
|
+
return D(i, s) && ct(i[s]) ? m(u.base ? C(u.base) : {}, i[s], u.transform) : c;
|
|
845
|
+
}, se = function(i, s, c) {
|
|
846
|
+
const u = D(i, s) ? i[s] : void 0;
|
|
847
|
+
return u && typeof u == "object" ? C(u) : c();
|
|
848
|
+
};
|
|
849
|
+
function cn() {
|
|
850
|
+
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Eo();
|
|
851
|
+
const i = (o) => cn(o);
|
|
852
|
+
if (i.version = "3.4.16", i.removed = [], !r || !r.document || r.document.nodeType !== N.document || !r.Element)
|
|
853
|
+
return i.isSupported = !1, i;
|
|
854
|
+
let s = r.document;
|
|
855
|
+
const c = s, u = c.currentScript;
|
|
856
|
+
r.DocumentFragment;
|
|
857
|
+
const d = r.HTMLTemplateElement, S = r.Node, ut = r.Element, w = r.NodeFilter;
|
|
858
|
+
r.NamedNodeMap === void 0 && (r.NamedNodeMap || r.MozNamedAttrMap), r.HTMLFormElement;
|
|
859
|
+
const At = r.DOMParser, q = r.trustedTypes, U = ut.prototype, un = P(U, "cloneNode"), kt = P(U, "remove"), ue = P(U, "removeAttributeNode"), fn = P(U, "nextSibling"), K = P(U, "childNodes"), Z = P(U, "parentNode"), fe = P(U, "shadowRoot"), Ut = P(U, "attributes"), B = S && S.prototype ? P(S.prototype, "nodeType") : null, J = S && S.prototype ? P(S.prototype, "nodeName") : null, yt = S && S.prototype ? P(S.prototype, "ownerDocument") : null, ft = function(t) {
|
|
860
|
+
return B ? B(t) : t.nodeType;
|
|
861
|
+
}, Ft = function(t) {
|
|
862
|
+
return J ? J(t) : t.nodeName;
|
|
863
|
+
};
|
|
864
|
+
if (typeof d == "function") {
|
|
865
|
+
const o = s.createElement("template");
|
|
866
|
+
o.content && o.content.ownerDocument && (s = o.content.ownerDocument);
|
|
867
|
+
}
|
|
868
|
+
let L, Y = "", zt, pe = !1, pt = 0;
|
|
869
|
+
const me = function() {
|
|
870
|
+
if (pt > 0) throw G('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.');
|
|
871
|
+
}, Q = function(t) {
|
|
872
|
+
me(), pt++;
|
|
873
|
+
try {
|
|
874
|
+
return L.createHTML(t);
|
|
875
|
+
} finally {
|
|
876
|
+
pt--;
|
|
877
|
+
}
|
|
878
|
+
}, pn = function(t) {
|
|
879
|
+
me(), pt++;
|
|
880
|
+
try {
|
|
881
|
+
return L.createScriptURL(t);
|
|
882
|
+
} finally {
|
|
883
|
+
pt--;
|
|
884
|
+
}
|
|
885
|
+
}, mn = function() {
|
|
886
|
+
return pe || (zt = Ao(q, u), pe = !0), zt;
|
|
887
|
+
}, St = s, Ht = St.implementation, de = St.createNodeIterator, dn = St.createDocumentFragment, Tn = St.getElementsByTagName, hn = c.importNode;
|
|
888
|
+
let T = rn();
|
|
889
|
+
i.isSupported = typeof an == "function" && typeof Z == "function" && Ht && Ht.createHTMLDocument !== void 0;
|
|
890
|
+
const _n = io, gn = ao, En = so, An = lo, yn = co, Sn = uo, Te = fo, bn = mo;
|
|
891
|
+
let he = en, h = null;
|
|
892
|
+
const Gt = m({}, [
|
|
893
|
+
...Ze,
|
|
894
|
+
...oe,
|
|
895
|
+
...re,
|
|
896
|
+
...ie,
|
|
897
|
+
...Je
|
|
898
|
+
]);
|
|
899
|
+
let _ = null;
|
|
900
|
+
const Wt = m({}, [
|
|
901
|
+
...Qe,
|
|
902
|
+
...ae,
|
|
903
|
+
...tn,
|
|
904
|
+
...xt
|
|
905
|
+
]);
|
|
906
|
+
let v = Object.seal(lt(null, {
|
|
907
|
+
tagNameCheck: {
|
|
908
|
+
writable: !0,
|
|
909
|
+
configurable: !1,
|
|
910
|
+
enumerable: !0,
|
|
911
|
+
value: null
|
|
912
|
+
},
|
|
913
|
+
attributeNameCheck: {
|
|
914
|
+
writable: !0,
|
|
915
|
+
configurable: !1,
|
|
916
|
+
enumerable: !0,
|
|
917
|
+
value: null
|
|
918
|
+
},
|
|
919
|
+
allowCustomizedBuiltInElements: {
|
|
920
|
+
writable: !0,
|
|
921
|
+
configurable: !1,
|
|
922
|
+
enumerable: !0,
|
|
923
|
+
value: !1
|
|
924
|
+
}
|
|
925
|
+
})), mt = null, _e = null;
|
|
926
|
+
const F = Object.seal(lt(null, {
|
|
927
|
+
tagCheck: {
|
|
928
|
+
writable: !0,
|
|
929
|
+
configurable: !1,
|
|
930
|
+
enumerable: !0,
|
|
931
|
+
value: null
|
|
932
|
+
},
|
|
933
|
+
attributeCheck: {
|
|
934
|
+
writable: !0,
|
|
935
|
+
configurable: !1,
|
|
936
|
+
enumerable: !0,
|
|
937
|
+
value: null
|
|
938
|
+
}
|
|
939
|
+
}));
|
|
940
|
+
let ge = !0, Bt = !0, Ee = !1, Ae = !0, z = !1, j = !0, X = !1, Yt = !1, bt = null, Ot = null, jt = !1, tt = !1, Rt = !1, Lt = !1, ye = !0, Se = !1;
|
|
941
|
+
const be = "user-content-";
|
|
942
|
+
let Xt = !0, $t = !1, et = {}, nt = null;
|
|
943
|
+
const Oe = m({}, [
|
|
944
|
+
"annotation-xml",
|
|
945
|
+
"audio",
|
|
946
|
+
"colgroup",
|
|
947
|
+
"desc",
|
|
948
|
+
"foreignobject",
|
|
949
|
+
"head",
|
|
950
|
+
"iframe",
|
|
951
|
+
"math",
|
|
952
|
+
"mi",
|
|
953
|
+
"mn",
|
|
954
|
+
"mo",
|
|
955
|
+
"ms",
|
|
956
|
+
"mtext",
|
|
957
|
+
"noembed",
|
|
958
|
+
"noframes",
|
|
959
|
+
"noscript",
|
|
960
|
+
"plaintext",
|
|
961
|
+
"script",
|
|
962
|
+
"selectedcontent",
|
|
963
|
+
"style",
|
|
964
|
+
"svg",
|
|
965
|
+
"template",
|
|
966
|
+
"thead",
|
|
967
|
+
"title",
|
|
968
|
+
"video",
|
|
969
|
+
"xmp"
|
|
970
|
+
]);
|
|
971
|
+
let Re = null;
|
|
972
|
+
const Le = m({}, [
|
|
973
|
+
"audio",
|
|
974
|
+
"video",
|
|
975
|
+
"img",
|
|
976
|
+
"source",
|
|
977
|
+
"image",
|
|
978
|
+
"track"
|
|
979
|
+
]);
|
|
980
|
+
let De = null;
|
|
981
|
+
const we = m({}, [
|
|
982
|
+
"alt",
|
|
983
|
+
"class",
|
|
984
|
+
"for",
|
|
985
|
+
"id",
|
|
986
|
+
"label",
|
|
987
|
+
"name",
|
|
988
|
+
"pattern",
|
|
989
|
+
"placeholder",
|
|
990
|
+
"role",
|
|
991
|
+
"summary",
|
|
992
|
+
"title",
|
|
993
|
+
"value",
|
|
994
|
+
"style",
|
|
995
|
+
"xmlns"
|
|
996
|
+
]), Dt = "http://www.w3.org/1998/Math/MathML", wt = "http://www.w3.org/2000/svg", x = "http://www.w3.org/1999/xhtml";
|
|
997
|
+
let ot = x, Vt = !1, qt = null;
|
|
998
|
+
const On = m({}, [
|
|
999
|
+
Dt,
|
|
1000
|
+
wt,
|
|
1001
|
+
x
|
|
1002
|
+
], ne), Ie = y([
|
|
1003
|
+
"mi",
|
|
1004
|
+
"mo",
|
|
1005
|
+
"mn",
|
|
1006
|
+
"ms",
|
|
1007
|
+
"mtext"
|
|
1008
|
+
]);
|
|
1009
|
+
let Kt = m({}, Ie);
|
|
1010
|
+
const Ne = y(["annotation-xml"]);
|
|
1011
|
+
let Zt = m({}, Ne);
|
|
1012
|
+
const Rn = m({}, [
|
|
1013
|
+
"title",
|
|
1014
|
+
"style",
|
|
1015
|
+
"font",
|
|
1016
|
+
"a",
|
|
1017
|
+
"script"
|
|
1018
|
+
]);
|
|
1019
|
+
let dt = null;
|
|
1020
|
+
const Ln = ["application/xhtml+xml", "text/html"], Dn = "text/html";
|
|
1021
|
+
let E = null, rt = null;
|
|
1022
|
+
const wn = s.createElement("form"), Ce = function(t) {
|
|
1023
|
+
return t instanceof RegExp || t instanceof Function;
|
|
1024
|
+
}, Jt = function() {
|
|
1025
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1026
|
+
if (rt && rt === t) return;
|
|
1027
|
+
(!t || typeof t != "object") && (t = {}), t = C(t), dt = Ln.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Dn : t.PARSER_MEDIA_TYPE, E = dt === "application/xhtml+xml" ? ne : Et, h = W(t, "ALLOWED_TAGS", Gt, { transform: E }), _ = W(t, "ALLOWED_ATTR", Wt, { transform: E }), qt = W(t, "ALLOWED_NAMESPACES", On, { transform: ne }), De = W(t, "ADD_URI_SAFE_ATTR", we, {
|
|
1028
|
+
transform: E,
|
|
1029
|
+
base: we
|
|
1030
|
+
}), Re = W(t, "ADD_DATA_URI_TAGS", Le, {
|
|
1031
|
+
transform: E,
|
|
1032
|
+
base: Le
|
|
1033
|
+
}), nt = W(t, "FORBID_CONTENTS", Oe, { transform: E }), mt = W(t, "FORBID_TAGS", C({}), { transform: E }), _e = W(t, "FORBID_ATTR", C({}), { transform: E }), et = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? C(t.USE_PROFILES) : t.USE_PROFILES : !1, ge = t.ALLOW_ARIA_ATTR !== !1, Bt = t.ALLOW_DATA_ATTR !== !1, Ee = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ae = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z = t.SAFE_FOR_TEMPLATES || !1, j = t.SAFE_FOR_XML !== !1, X = t.WHOLE_DOCUMENT || !1, tt = t.RETURN_DOM || !1, Rt = t.RETURN_DOM_FRAGMENT || !1, Lt = t.RETURN_TRUSTED_TYPE || !1, jt = t.FORCE_BODY || !1, ye = t.SANITIZE_DOM !== !1, Se = t.SANITIZE_NAMED_PROPS || !1, Xt = t.KEEP_CONTENT !== !1, $t = t.IN_PLACE || !1, he = no(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : en, ot = typeof t.NAMESPACE == "string" ? t.NAMESPACE : x, Kt = se(t, "MATHML_TEXT_INTEGRATION_POINTS", () => m({}, Ie)), Zt = se(t, "HTML_INTEGRATION_POINTS", () => m({}, Ne));
|
|
1034
|
+
const e = se(t, "CUSTOM_ELEMENT_HANDLING", () => lt(null));
|
|
1035
|
+
if (v = lt(null), D(e, "tagNameCheck") && Ce(e.tagNameCheck) && (v.tagNameCheck = e.tagNameCheck), D(e, "attributeNameCheck") && Ce(e.attributeNameCheck) && (v.attributeNameCheck = e.attributeNameCheck), D(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (v.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), b(v), z && (Bt = !1), Rt && (tt = !0), et && (h = m({}, Je), _ = lt(null), et.html === !0 && (m(h, Ze), m(_, Qe)), et.svg === !0 && (m(h, oe), m(_, ae), m(_, xt)), et.svgFilters === !0 && (m(h, re), m(_, ae), m(_, xt)), et.mathMl === !0 && (m(h, ie), m(_, tn), m(_, xt))), F.tagCheck = null, F.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? F.tagCheck = t.ADD_TAGS : ct(t.ADD_TAGS) && (h === Gt && (h = C(h)), m(h, t.ADD_TAGS, E))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? F.attributeCheck = t.ADD_ATTR : ct(t.ADD_ATTR) && (_ === Wt && (_ = C(_)), m(_, t.ADD_ATTR, E))), D(t, "ADD_FORBID_CONTENTS") && ct(t.ADD_FORBID_CONTENTS) && (nt === Oe && (nt = C(nt)), m(nt, t.ADD_FORBID_CONTENTS, E)), Xt && (h["#text"] = !0), X && m(h, [
|
|
1036
|
+
"html",
|
|
1037
|
+
"head",
|
|
1038
|
+
"body"
|
|
1039
|
+
]), h.table && (m(h, ["tbody"]), delete mt.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
1040
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function") throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1041
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw G('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1042
|
+
const n = L;
|
|
1043
|
+
L = t.TRUSTED_TYPES_POLICY;
|
|
1044
|
+
try {
|
|
1045
|
+
Y = Q("");
|
|
1046
|
+
} catch (a) {
|
|
1047
|
+
throw L = n, a;
|
|
1048
|
+
}
|
|
1049
|
+
} else t.TRUSTED_TYPES_POLICY === null ? (L = void 0, Y = "") : (L === void 0 && (L = mn()), L && typeof Y == "string" && (Y = Q("")));
|
|
1050
|
+
y && y(t), rt = t;
|
|
1051
|
+
}, Me = m({}, [
|
|
1052
|
+
...oe,
|
|
1053
|
+
...re,
|
|
1054
|
+
...oo
|
|
1055
|
+
]), Pe = m({}, [...ie, ...ro]), In = function(t, e, n) {
|
|
1056
|
+
return e.namespaceURI === x ? t === "svg" : e.namespaceURI === Dt ? t === "svg" && (n === "annotation-xml" || Kt[n]) : !!Me[t];
|
|
1057
|
+
}, Nn = function(t, e, n) {
|
|
1058
|
+
return e.namespaceURI === x ? t === "math" : e.namespaceURI === wt ? t === "math" && Zt[n] : !!Pe[t];
|
|
1059
|
+
}, Cn = function(t, e, n) {
|
|
1060
|
+
return e.namespaceURI === wt && !Zt[n] || e.namespaceURI === Dt && !Kt[n] ? !1 : !Pe[t] && (Rn[t] || !Me[t]);
|
|
1061
|
+
}, Mn = function(t) {
|
|
1062
|
+
let e = Z(t);
|
|
1063
|
+
(!e || !e.tagName) && (e = {
|
|
1064
|
+
namespaceURI: ot,
|
|
1065
|
+
tagName: "template"
|
|
1066
|
+
});
|
|
1067
|
+
const n = Et(t.tagName), a = Et(e.tagName);
|
|
1068
|
+
return qt[t.namespaceURI] ? t.namespaceURI === wt ? In(n, e, a) : t.namespaceURI === Dt ? Nn(n, e, a) : t.namespaceURI === x ? Cn(n, e, a) : !!(dt === "application/xhtml+xml" && qt[t.namespaceURI]) : !1;
|
|
1069
|
+
}, H = function(t) {
|
|
1070
|
+
ht(i.removed, { element: t });
|
|
1071
|
+
try {
|
|
1072
|
+
Z(t).removeChild(t);
|
|
1073
|
+
} catch {
|
|
1074
|
+
if (kt(t), !Z(t)) throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1075
|
+
}
|
|
1076
|
+
}, ve = function(t, e, n) {
|
|
1077
|
+
try {
|
|
1078
|
+
ue(t, e);
|
|
1079
|
+
} catch {
|
|
1080
|
+
try {
|
|
1081
|
+
t.removeAttribute(n);
|
|
1082
|
+
} catch {
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}, It = function(t) {
|
|
1086
|
+
Nt(t);
|
|
1087
|
+
const e = K(t);
|
|
1088
|
+
if (e) {
|
|
1089
|
+
const a = [];
|
|
1090
|
+
V(e, (l) => {
|
|
1091
|
+
ht(a, l);
|
|
1092
|
+
}), V(a, (l) => {
|
|
1093
|
+
try {
|
|
1094
|
+
kt(l);
|
|
1095
|
+
} catch {
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
const n = Ut(t);
|
|
1100
|
+
if (n) for (let a = n.length - 1; a >= 0; --a) {
|
|
1101
|
+
const l = n[a], f = l && l.name;
|
|
1102
|
+
typeof f == "string" && ve(t, l, f);
|
|
1103
|
+
}
|
|
1104
|
+
}, $ = function(t, e, n) {
|
|
1105
|
+
if (!n) try {
|
|
1106
|
+
n = e.getAttributeNode(t);
|
|
1107
|
+
} catch {
|
|
1108
|
+
n = null;
|
|
1109
|
+
}
|
|
1110
|
+
ht(i.removed, {
|
|
1111
|
+
attribute: n || null,
|
|
1112
|
+
from: e
|
|
1113
|
+
});
|
|
1114
|
+
try {
|
|
1115
|
+
n ? ue(e, n) : e.removeAttribute(t);
|
|
1116
|
+
} catch {
|
|
1117
|
+
try {
|
|
1118
|
+
e.removeAttribute(t);
|
|
1119
|
+
} catch {
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
if (t === "is")
|
|
1123
|
+
if (tt || Rt) try {
|
|
1124
|
+
H(e);
|
|
1125
|
+
} catch {
|
|
1126
|
+
}
|
|
1127
|
+
else try {
|
|
1128
|
+
e.setAttribute(t, "");
|
|
1129
|
+
} catch {
|
|
1130
|
+
}
|
|
1131
|
+
}, Pn = function(t) {
|
|
1132
|
+
const e = Ut(t);
|
|
1133
|
+
if (e)
|
|
1134
|
+
for (let n = e.length - 1; n >= 0; --n) {
|
|
1135
|
+
const a = e[n], l = a && a.name;
|
|
1136
|
+
typeof l != "string" || _[E(l)] || ve(t, a, l);
|
|
1137
|
+
}
|
|
1138
|
+
}, Nt = function(t) {
|
|
1139
|
+
const e = [t];
|
|
1140
|
+
for (; e.length > 0; ) {
|
|
1141
|
+
const n = e.pop();
|
|
1142
|
+
ft(n) === N.element && Pn(n);
|
|
1143
|
+
const a = K(n);
|
|
1144
|
+
if (a) for (let l = a.length - 1; l >= 0; --l) e.push(a[l]);
|
|
1145
|
+
}
|
|
1146
|
+
}, xe = function(t, e) {
|
|
1147
|
+
return j ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
|
|
1148
|
+
}, vn = function(t) {
|
|
1149
|
+
if (!j) return;
|
|
1150
|
+
const e = [t];
|
|
1151
|
+
for (; e.length > 0; ) {
|
|
1152
|
+
const n = e.pop(), a = ft(n);
|
|
1153
|
+
if (a === N.processingInstruction || a === N.comment && O(on, n.data)) {
|
|
1154
|
+
try {
|
|
1155
|
+
kt(n);
|
|
1156
|
+
} catch {
|
|
1157
|
+
}
|
|
1158
|
+
continue;
|
|
1159
|
+
}
|
|
1160
|
+
if (a === N.element) {
|
|
1161
|
+
const f = n, p = E(Ft(n));
|
|
1162
|
+
try {
|
|
1163
|
+
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && xe("for", p) && f.removeAttribute("for");
|
|
1164
|
+
} catch {
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
const l = K(n);
|
|
1168
|
+
if (l) for (let f = l.length - 1; f >= 0; --f) e.push(l[f]);
|
|
1169
|
+
}
|
|
1170
|
+
}, ke = function(t) {
|
|
1171
|
+
let e = null, n = null;
|
|
1172
|
+
if (jt) t = "<remove></remove>" + t;
|
|
1173
|
+
else {
|
|
1174
|
+
const f = $e(t, /^[\r\n\t ]+/);
|
|
1175
|
+
n = f && f[0];
|
|
1176
|
+
}
|
|
1177
|
+
dt === "application/xhtml+xml" && ot === x && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
1178
|
+
const a = L ? Q(t) : t;
|
|
1179
|
+
if (ot === x) try {
|
|
1180
|
+
e = new At().parseFromString(a, dt);
|
|
1181
|
+
} catch {
|
|
1182
|
+
}
|
|
1183
|
+
if (!e || !e.documentElement) {
|
|
1184
|
+
e = Ht.createDocument(ot, "template", null);
|
|
1185
|
+
try {
|
|
1186
|
+
e.documentElement.innerHTML = Vt ? Y : a;
|
|
1187
|
+
} catch {
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
const l = e.body || e.documentElement;
|
|
1191
|
+
return t && n && l.insertBefore(s.createTextNode(n), l.childNodes[0] || null), ot === x ? Tn.call(e, X ? "html" : "body")[0] : X ? e.documentElement : l;
|
|
1192
|
+
}, Ue = function(t) {
|
|
1193
|
+
const e = yt ? yt(t) : t.ownerDocument;
|
|
1194
|
+
return de.call(e || t, t, w.SHOW_ELEMENT | w.SHOW_COMMENT | w.SHOW_TEXT | w.SHOW_PROCESSING_INSTRUCTION | w.SHOW_CDATA_SECTION, null);
|
|
1195
|
+
}, Ct = function(t) {
|
|
1196
|
+
return t = _t(t, _n, " "), t = _t(t, gn, " "), t = _t(t, En, " "), t;
|
|
1197
|
+
}, Qt = function(t) {
|
|
1198
|
+
var e;
|
|
1199
|
+
t.normalize();
|
|
1200
|
+
const n = yt ? yt(t) : t.ownerDocument, a = de.call(n || t, t, w.SHOW_TEXT | w.SHOW_COMMENT | w.SHOW_CDATA_SECTION | w.SHOW_PROCESSING_INSTRUCTION, null);
|
|
1201
|
+
let l = a.nextNode();
|
|
1202
|
+
for (; l; )
|
|
1203
|
+
l.data = Ct(l.data), l = a.nextNode();
|
|
1204
|
+
const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
|
|
1205
|
+
f && V(f, (p) => {
|
|
1206
|
+
it(p.content) && Qt(p.content);
|
|
1207
|
+
});
|
|
1208
|
+
}, Mt = function(t) {
|
|
1209
|
+
const e = J ? J(t) : null;
|
|
1210
|
+
return typeof e != "string" || E(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || t.attributes !== Ut(t) || typeof t.removeAttribute != "function" || typeof t.removeAttributeNode != "function" || typeof t.getAttributeNode != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || t.nodeType !== B(t) || t.childNodes !== K(t);
|
|
1211
|
+
}, it = function(t) {
|
|
1212
|
+
if (!B || typeof t != "object" || t === null) return !1;
|
|
1213
|
+
try {
|
|
1214
|
+
return B(t) === N.documentFragment;
|
|
1215
|
+
} catch {
|
|
1216
|
+
return !1;
|
|
1217
|
+
}
|
|
1218
|
+
}, Tt = function(t) {
|
|
1219
|
+
if (!B || typeof t != "object" || t === null) return !1;
|
|
1220
|
+
try {
|
|
1221
|
+
return typeof B(t) == "number";
|
|
1222
|
+
} catch {
|
|
1223
|
+
return !1;
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
function k(o, t, e) {
|
|
1227
|
+
o.length !== 0 && V(o, (n) => {
|
|
1228
|
+
n.call(i, t, e, rt);
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
const xn = function(t, e) {
|
|
1232
|
+
return !!(j && t.hasChildNodes() && !Tt(t.firstElementChild) && O(nn, t.textContent) && O(nn, t.innerHTML) || j && t.namespaceURI === x && _o[e] && (Tt(t.firstElementChild) || typeof t.textContent == "string" && O(go[e], t.textContent)) || t.nodeType === N.processingInstruction || j && t.nodeType === N.comment && O(on, t.data));
|
|
1233
|
+
}, Pt = function(t, e) {
|
|
1234
|
+
if (t instanceof RegExp) return O(t, e);
|
|
1235
|
+
if (t instanceof Function) {
|
|
1236
|
+
for (var n = arguments.length, a = new Array(n > 2 ? n - 2 : 0), l = 2; l < n; l++) a[l - 2] = arguments[l];
|
|
1237
|
+
return !!t(e, ...a);
|
|
1238
|
+
}
|
|
1239
|
+
return !1;
|
|
1240
|
+
}, kn = function(t, e, n) {
|
|
1241
|
+
if (!mt[e] && Ge(e) && Pt(v.tagNameCheck, e)) return !1;
|
|
1242
|
+
if (Xt && !nt[e]) {
|
|
1243
|
+
const a = Z(t), l = K(t);
|
|
1244
|
+
if (l && a) {
|
|
1245
|
+
const f = l.length;
|
|
1246
|
+
for (let p = f - 1; p >= 0; --p) {
|
|
1247
|
+
const g = t === n ? un(l[p], !0) : l[p];
|
|
1248
|
+
a.insertBefore(g, fn(t));
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
return H(t), !0;
|
|
1253
|
+
}, Fe = function(t, e, n, a) {
|
|
1254
|
+
return t.length === 0 ? e : e === n || e === a ? C(e) : e;
|
|
1255
|
+
}, at = function(t, e) {
|
|
1256
|
+
return t === e || Z(t) !== null ? !1 : ($t && Nt(t), !0);
|
|
1257
|
+
}, ze = function(t, e) {
|
|
1258
|
+
if (k(T.beforeSanitizeElements, t, null), at(t, e)) return !0;
|
|
1259
|
+
if (Mt(t))
|
|
1260
|
+
return H(t), !0;
|
|
1261
|
+
const n = E(Ft(t));
|
|
1262
|
+
if (h = Fe(T.uponSanitizeElement, h, Gt, bt), k(T.uponSanitizeElement, t, {
|
|
1263
|
+
tagName: n,
|
|
1264
|
+
allowedTags: h
|
|
1265
|
+
}), at(t, e)) return !0;
|
|
1266
|
+
if (xn(t, n))
|
|
1267
|
+
return H(t), !0;
|
|
1268
|
+
if (mt[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !h[n]) {
|
|
1269
|
+
const a = kn(t, n, e);
|
|
1270
|
+
return a === !1 && (k(T.afterSanitizeElements, t, null), at(t, e)) ? !0 : a;
|
|
1271
|
+
}
|
|
1272
|
+
if (ft(t) === N.element && !Mn(t) || (n === "noscript" || n === "noembed" || n === "noframes") && O(To, t.innerHTML))
|
|
1273
|
+
return H(t), !0;
|
|
1274
|
+
if (z && t.nodeType === N.text) {
|
|
1275
|
+
const a = Ct(t.textContent);
|
|
1276
|
+
t.textContent !== a && (ht(i.removed, { element: t.cloneNode() }), t.textContent = a);
|
|
1277
|
+
}
|
|
1278
|
+
return k(T.afterSanitizeElements, t, null), at(t, e);
|
|
1279
|
+
}, He = function(t, e, n) {
|
|
1280
|
+
if (_e[e] || xe(e, t) || ye && (e === "id" || e === "name") && (n in s || n in wn)) return !1;
|
|
1281
|
+
const a = _[e] || F.attributeCheck instanceof Function && F.attributeCheck(e, t);
|
|
1282
|
+
return Bt && O(An, e) || ge && O(yn, e) ? !0 : a ? De[e] || O(he, _t(n, Te, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && Ve(n, "data:") === 0 && Re[t] || Ee && !O(Sn, _t(n, Te, "")) ? !0 : !n : Ge(t) && Pt(v.tagNameCheck, t) && Pt(v.attributeNameCheck, e, t) || e === "is" && v.allowCustomizedBuiltInElements && Pt(v.tagNameCheck, n);
|
|
1283
|
+
}, Un = m({}, [
|
|
1284
|
+
"annotation-xml",
|
|
1285
|
+
"color-profile",
|
|
1286
|
+
"font-face",
|
|
1287
|
+
"font-face-format",
|
|
1288
|
+
"font-face-name",
|
|
1289
|
+
"font-face-src",
|
|
1290
|
+
"font-face-uri",
|
|
1291
|
+
"missing-glyph"
|
|
1292
|
+
]), Ge = function(t) {
|
|
1293
|
+
return !Un[Et(t)] && O(bn, t);
|
|
1294
|
+
}, Fn = function(t, e, n, a) {
|
|
1295
|
+
if (L && typeof q == "object" && typeof q.getAttributeType == "function" && !n) switch (q.getAttributeType(t, e)) {
|
|
1296
|
+
case "TrustedHTML":
|
|
1297
|
+
return Q(a);
|
|
1298
|
+
case "TrustedScriptURL":
|
|
1299
|
+
return pn(a);
|
|
1300
|
+
}
|
|
1301
|
+
return a;
|
|
1302
|
+
}, zn = function(t, e, n, a) {
|
|
1303
|
+
try {
|
|
1304
|
+
return n ? t.setAttributeNS(n, e, a) : t.setAttribute(e, a), Mt(t) ? (H(t), !1) : !0;
|
|
1305
|
+
} catch {
|
|
1306
|
+
return $(e, t), !1;
|
|
1307
|
+
}
|
|
1308
|
+
}, We = function(t, e) {
|
|
1309
|
+
if (k(T.beforeSanitizeAttributes, t, null), at(t, e)) return;
|
|
1310
|
+
const n = t.attributes;
|
|
1311
|
+
if (!n || Mt(t)) return;
|
|
1312
|
+
_ = Fe(T.uponSanitizeAttribute, _, Wt, Ot);
|
|
1313
|
+
const a = {
|
|
1314
|
+
attrName: "",
|
|
1315
|
+
attrValue: "",
|
|
1316
|
+
keepAttr: !0,
|
|
1317
|
+
allowedAttributes: _,
|
|
1318
|
+
forceKeepAttr: void 0
|
|
1319
|
+
};
|
|
1320
|
+
let l = n.length;
|
|
1321
|
+
const f = E(t.nodeName);
|
|
1322
|
+
for (; l--; ) {
|
|
1323
|
+
const p = n[l], g = p.name, M = p.namespaceURI, I = p.value, st = E(g), ee = I;
|
|
1324
|
+
let R = g === "value" ? ee : Kn(ee), Be = !1;
|
|
1325
|
+
if (a.attrName = st, a.attrValue = R, a.keepAttr = !0, a.forceKeepAttr = void 0, k(T.uponSanitizeAttribute, t, a), R = a.attrValue, Se && (st === "id" || st === "name") && Ve(R, be) !== 0 && ($(g, t, p), R = be + R, Be = !0), j && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
|
|
1326
|
+
$(g, t, p);
|
|
1327
|
+
continue;
|
|
1328
|
+
}
|
|
1329
|
+
if (st === "attributename" && $e(R, "href")) {
|
|
1330
|
+
$(g, t, p);
|
|
1331
|
+
continue;
|
|
1332
|
+
}
|
|
1333
|
+
if (!a.forceKeepAttr) {
|
|
1334
|
+
if (!a.keepAttr) {
|
|
1335
|
+
$(g, t, p);
|
|
1336
|
+
continue;
|
|
1337
|
+
}
|
|
1338
|
+
if (!Ae && O(ho, R)) {
|
|
1339
|
+
$(g, t, p);
|
|
1340
|
+
continue;
|
|
1341
|
+
}
|
|
1342
|
+
if (z && (R = Ct(R)), !He(f, st, R)) {
|
|
1343
|
+
$(g, t, p);
|
|
1344
|
+
continue;
|
|
1345
|
+
}
|
|
1346
|
+
R = Fn(f, st, M, R), R !== ee && zn(t, g, M, R) && Be && Xe(i.removed);
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
k(T.afterSanitizeAttributes, t, null), at(t, e);
|
|
1350
|
+
}, vt = function(t) {
|
|
1351
|
+
let e = null;
|
|
1352
|
+
const n = Ue(t);
|
|
1353
|
+
for (k(T.beforeSanitizeShadowDOM, t, null); e = n.nextNode(); )
|
|
1354
|
+
if (k(T.uponSanitizeShadowNode, e, null), ze(e, t), We(e, t), it(e.content) && vt(e.content), ft(e) === N.element) {
|
|
1355
|
+
const a = fe(e);
|
|
1356
|
+
it(a) && (te(a), vt(a));
|
|
1357
|
+
}
|
|
1358
|
+
k(T.afterSanitizeShadowDOM, t, null);
|
|
1359
|
+
}, te = function(t) {
|
|
1360
|
+
const e = [{
|
|
1361
|
+
node: t,
|
|
1362
|
+
shadow: null
|
|
1363
|
+
}];
|
|
1364
|
+
for (; e.length > 0; ) {
|
|
1365
|
+
const n = e.pop();
|
|
1366
|
+
if (n.shadow) {
|
|
1367
|
+
vt(n.shadow);
|
|
1368
|
+
continue;
|
|
1369
|
+
}
|
|
1370
|
+
const a = n.node, l = ft(a) === N.element, f = K(a);
|
|
1371
|
+
if (f) for (let p = f.length - 1; p >= 0; --p) e.push({
|
|
1372
|
+
node: f[p],
|
|
1373
|
+
shadow: null
|
|
1374
|
+
});
|
|
1375
|
+
if (l) {
|
|
1376
|
+
const p = J ? J(a) : null;
|
|
1377
|
+
if (typeof p == "string" && E(p) === "template") {
|
|
1378
|
+
const g = a.content;
|
|
1379
|
+
it(g) && e.push({
|
|
1380
|
+
node: g,
|
|
1381
|
+
shadow: null
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
if (l) {
|
|
1386
|
+
const p = fe(a);
|
|
1387
|
+
it(p) && e.push({
|
|
1388
|
+
node: null,
|
|
1389
|
+
shadow: p
|
|
1390
|
+
}, {
|
|
1391
|
+
node: p,
|
|
1392
|
+
shadow: null
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
return i.sanitize = function(o) {
|
|
1398
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, n = null, a = null, l = null;
|
|
1399
|
+
if (Vt = !o, Vt && (o = "<!-->"), typeof o != "string" && !Tt(o) && (o = eo(o), typeof o != "string"))
|
|
1400
|
+
throw G("dirty is not a string, aborting");
|
|
1401
|
+
if (!i.isSupported) return o;
|
|
1402
|
+
Yt ? (h = bt, _ = Ot) : Jt(t), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (h = C(h)), T.uponSanitizeAttribute.length > 0 && (_ = C(_)), i.removed = [];
|
|
1403
|
+
const f = $t && typeof o != "string" && Tt(o);
|
|
1404
|
+
if (f) {
|
|
1405
|
+
vn(o);
|
|
1406
|
+
const M = Ft(o);
|
|
1407
|
+
if (typeof M == "string") {
|
|
1408
|
+
const I = E(M);
|
|
1409
|
+
if (!h[I] || mt[I])
|
|
1410
|
+
throw It(o), G("root node is forbidden and cannot be sanitized in-place");
|
|
1411
|
+
}
|
|
1412
|
+
if (Mt(o))
|
|
1413
|
+
throw It(o), G("root node is clobbered and cannot be sanitized in-place");
|
|
1414
|
+
try {
|
|
1415
|
+
te(o);
|
|
1416
|
+
} catch (I) {
|
|
1417
|
+
throw It(o), I;
|
|
1418
|
+
}
|
|
1419
|
+
} else if (Tt(o))
|
|
1420
|
+
e = ke("<!---->"), n = e.ownerDocument.importNode(o, !0), n.nodeType === N.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? e = n : e.appendChild(n), te(e);
|
|
1421
|
+
else {
|
|
1422
|
+
if (!tt && !z && !X && o.indexOf("<") === -1) return L && Lt ? Q(o) : o;
|
|
1423
|
+
if (e = ke(o), !e) return tt ? null : Lt ? Y : "";
|
|
1424
|
+
}
|
|
1425
|
+
e && jt && H(e.firstChild);
|
|
1426
|
+
const p = f ? o : e;
|
|
1427
|
+
try {
|
|
1428
|
+
const M = Ue(p);
|
|
1429
|
+
for (; a = M.nextNode(); )
|
|
1430
|
+
ze(a, p), We(a, p), it(a.content) && vt(a.content);
|
|
1431
|
+
} catch (M) {
|
|
1432
|
+
throw f && (It(o), V(i.removed, (I) => {
|
|
1433
|
+
I.element && Nt(I.element);
|
|
1434
|
+
})), M;
|
|
1435
|
+
}
|
|
1436
|
+
if (f) {
|
|
1437
|
+
let M = !1;
|
|
1438
|
+
if (V(i.removed, (I) => {
|
|
1439
|
+
I.element && (I.element === o && (M = !0), Nt(I.element));
|
|
1440
|
+
}), M) throw G("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
1441
|
+
return z && Qt(o), o;
|
|
1442
|
+
}
|
|
1443
|
+
if (tt) {
|
|
1444
|
+
if (z && Qt(e), Rt)
|
|
1445
|
+
for (l = dn.call(e.ownerDocument); e.firstChild; ) l.appendChild(e.firstChild);
|
|
1446
|
+
else l = e;
|
|
1447
|
+
return (_.shadowroot || _.shadowrootmode) && (l = hn.call(c, l, !0)), l;
|
|
1448
|
+
}
|
|
1449
|
+
let g = X ? e.outerHTML : e.innerHTML;
|
|
1450
|
+
return X && h["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && O(po, e.ownerDocument.doctype.name) && (g = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
|
|
1451
|
+
` + g), z && (g = Ct(g)), L && Lt ? Q(g) : g;
|
|
1452
|
+
}, i.setConfig = function() {
|
|
1453
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1454
|
+
Jt(o), Yt = !0, bt = h, Ot = _;
|
|
1455
|
+
}, i.clearConfig = function() {
|
|
1456
|
+
rt = null, Yt = !1, bt = null, Ot = null, L = zt, Y = "";
|
|
1457
|
+
}, i.isValidAttribute = function(o, t, e) {
|
|
1458
|
+
rt || Jt({});
|
|
1459
|
+
const n = E(o), a = E(t);
|
|
1460
|
+
return He(n, a, e);
|
|
1461
|
+
}, i.addHook = function(o, t) {
|
|
1462
|
+
typeof t == "function" && D(T, o) && ht(T[o], t);
|
|
1463
|
+
}, i.removeHook = function(o, t) {
|
|
1464
|
+
if (D(T, o)) {
|
|
1465
|
+
if (t !== void 0) {
|
|
1466
|
+
const e = Vn(T[o], t);
|
|
1467
|
+
return e === -1 ? void 0 : qn(T[o], e, 1)[0];
|
|
1468
|
+
}
|
|
1469
|
+
return Xe(T[o]);
|
|
1470
|
+
}
|
|
1471
|
+
}, i.removeHooks = function(o) {
|
|
1472
|
+
D(T, o) && (T[o] = []);
|
|
1473
|
+
}, i.removeAllHooks = function() {
|
|
1474
|
+
T = rn();
|
|
1475
|
+
}, i;
|
|
1476
|
+
}
|
|
1477
|
+
var yo = cn();
|
|
1478
|
+
export {
|
|
1479
|
+
yo as default
|
|
1480
|
+
};
|