@floegence/floe-webapp-core 0.107.0 → 0.107.1

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