import { a as e } from "./chunk-foFoljWS-B6lua3v-.js";
var t = (/* @__PURE__ */ e(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.DOMPurify = r());
	})(e, (function() {
		function e(t) {
			"@babel/helpers - typeof";
			return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
				return typeof e;
			} : function(e) {
				return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
			}, e(t);
		}
		function t(e, n) {
			return t = Object.setPrototypeOf || function(e, t) {
				return e.__proto__ = t, e;
			}, t(e, n);
		}
		function n() {
			if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
			if (typeof Proxy == "function") return !0;
			try {
				return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})), !0;
			} catch {
				return !1;
			}
		}
		function r(e, i, a) {
			return r = n() ? Reflect.construct : function(e, n, r) {
				var i = [null];
				i.push.apply(i, n);
				var a = new (Function.bind.apply(e, i))();
				return r && t(a, r.prototype), a;
			}, r.apply(null, arguments);
		}
		function i(e) {
			return a(e) || o(e) || s(e) || l();
		}
		function a(e) {
			if (Array.isArray(e)) return c(e);
		}
		function o(e) {
			if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
		}
		function s(e, t) {
			if (e) {
				if (typeof e == "string") return c(e, t);
				var n = Object.prototype.toString.call(e).slice(8, -1);
				if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
				if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return c(e, t);
			}
		}
		function c(e, t) {
			(t == null || t > e.length) && (t = e.length);
			for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
			return r;
		}
		function l() {
			throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
		}
		var u = Object.hasOwnProperty, d = Object.setPrototypeOf, f = Object.isFrozen, ee = Object.getPrototypeOf, te = Object.getOwnPropertyDescriptor, p = Object.freeze, m = Object.seal, h = Object.create, ne = typeof Reflect < "u" && Reflect, g = ne.apply, re = ne.construct;
		g ||= function(e, t, n) {
			return e.apply(t, n);
		}, p ||= function(e) {
			return e;
		}, m ||= function(e) {
			return e;
		}, re ||= function(e, t) {
			return r(e, i(t));
		};
		var ie = x(Array.prototype.forEach), ae = x(Array.prototype.pop), _ = x(Array.prototype.push), v = x(String.prototype.toLowerCase), oe = x(String.prototype.toString), se = x(String.prototype.match), y = x(String.prototype.replace), ce = x(String.prototype.indexOf), le = x(String.prototype.trim), b = x(RegExp.prototype.test), ue = S(TypeError);
		function x(e) {
			return function(t) {
				var n = [...arguments].slice(1);
				return g(e, t, n);
			};
		}
		function S(e) {
			return function() {
				return re(e, [...arguments]);
			};
		}
		function C(e, t, n) {
			n ??= v, d && d(e, null);
			for (var r = t.length; r--;) {
				var i = t[r];
				if (typeof i == "string") {
					var a = n(i);
					a !== i && (f(t) || (t[r] = a), i = a);
				}
				e[i] = !0;
			}
			return e;
		}
		function w(e) {
			var t = h(null), n;
			for (n in e) g(u, e, [n]) === !0 && (t[n] = e[n]);
			return t;
		}
		function T(e, t) {
			for (; e !== null;) {
				var n = te(e, t);
				if (n) {
					if (n.get) return x(n.get);
					if (typeof n.value == "function") return x(n.value);
				}
				e = ee(e);
			}
			function r(e) {
				return console.warn("fallback value for", e), null;
			}
			return r;
		}
		var de = p(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.section.select.shadow.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), fe = p(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), pe = p([
			"feBlend",
			"feColorMatrix",
			"feComponentTransfer",
			"feComposite",
			"feConvolveMatrix",
			"feDiffuseLighting",
			"feDisplacementMap",
			"feDistantLight",
			"feFlood",
			"feFuncA",
			"feFuncB",
			"feFuncG",
			"feFuncR",
			"feGaussianBlur",
			"feImage",
			"feMerge",
			"feMergeNode",
			"feMorphology",
			"feOffset",
			"fePointLight",
			"feSpecularLighting",
			"feSpotLight",
			"feTile",
			"feTurbulence"
		]), me = p([
			"animate",
			"color-profile",
			"cursor",
			"discard",
			"fedropshadow",
			"font-face",
			"font-face-format",
			"font-face-name",
			"font-face-src",
			"font-face-uri",
			"foreignobject",
			"hatch",
			"hatchpath",
			"mesh",
			"meshgradient",
			"meshpatch",
			"meshrow",
			"missing-glyph",
			"script",
			"set",
			"solidcolor",
			"unknown",
			"use"
		]), he = p(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover".split(".")), ge = p([
			"maction",
			"maligngroup",
			"malignmark",
			"mlongdiv",
			"mscarries",
			"mscarry",
			"msgroup",
			"mstack",
			"msline",
			"msrow",
			"semantics",
			"annotation",
			"annotation-xml",
			"mprescripts",
			"none"
		]), _e = p(["#text"]), ve = p(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.face.for.headers.height.hidden.high.href.hreflang.id.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.pattern.placeholder.playsinline.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.xmlns.slot".split(".")), ye = p(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), be = p(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), E = p([
			"xlink:href",
			"xml:id",
			"xlink:title",
			"xml:space",
			"xmlns:xlink"
		]), xe = m(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Se = m(/<%[\w\W]*|[\w\W]*%>/gm), Ce = m(/\${[\w\W]*}/gm), we = m(/^data-[\-\w.\u00B7-\uFFFF]+$/), Te = m(/^aria-[\-\w]+$/), Ee = m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), De = m(/^(?:\w+script|data):/i), Oe = m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), ke = m(/^html$/i), Ae = m(/^[a-z][.\w]*(-[.\w]+)+$/i), je = function() {
			return typeof window > "u" ? null : window;
		}, Me = function(t, n) {
			if (e(t) !== "object" || typeof t.createPolicy != "function") return null;
			var r = null, i = "data-tt-policy-suffix";
			n.currentScript && n.currentScript.hasAttribute(i) && (r = n.currentScript.getAttribute(i));
			var a = "dompurify" + (r ? "#" + r : "");
			try {
				return t.createPolicy(a, {
					createHTML: function(e) {
						return e;
					},
					createScriptURL: function(e) {
						return e;
					}
				});
			} catch {
				return console.warn("TrustedTypes policy " + a + " could not be created."), null;
			}
		};
		function Ne() {
			var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : je(), n = function(e) {
				return Ne(e);
			};
			if (n.version = "2.5.9", n.removed = [], !t || !t.document || t.document.nodeType !== 9) return n.isSupported = !1, n;
			var r = t.document, a = t.document, o = t.DocumentFragment, s = t.HTMLTemplateElement, c = t.Node, l = t.Element, u = t.NodeFilter, d = t.NamedNodeMap, f = d === void 0 ? t.NamedNodeMap || t.MozNamedAttrMap : d, ee = t.HTMLFormElement, te = t.DOMParser, m = t.trustedTypes, h = l.prototype, ne = T(h, "cloneNode"), g = T(h, "nextSibling"), re = T(h, "childNodes"), x = T(h, "parentNode");
			if (typeof s == "function") {
				var S = a.createElement("template");
				S.content && S.content.ownerDocument && (a = S.content.ownerDocument);
			}
			var D = Me(m, r), Pe = D ? D.createHTML("") : "", O = a, Fe = O.implementation, Ie = O.createNodeIterator, Le = O.createDocumentFragment, Re = O.getElementsByTagName, ze = r.importNode, Be = {};
			try {
				Be = w(a).documentMode ? a.documentMode : {};
			} catch {}
			var k = {};
			n.isSupported = typeof x == "function" && Fe && Fe.createHTMLDocument !== void 0 && Be !== 9;
			var Ve = xe, He = Se, Ue = Ce, We = we, Ge = Te, Ke = De, qe = Oe, Je = Ae, Ye = Ee, A = null, Xe = C({}, [].concat(i(de), i(fe), i(pe), i(he), i(_e))), j = null, Ze = C({}, [].concat(i(ve), i(ye), i(be), i(E))), M = Object.seal(Object.create(null, {
				tagNameCheck: {
					writable: !0,
					configurable: !1,
					enumerable: !0,
					value: null
				},
				attributeNameCheck: {
					writable: !0,
					configurable: !1,
					enumerable: !0,
					value: null
				},
				allowCustomizedBuiltInElements: {
					writable: !0,
					configurable: !1,
					enumerable: !0,
					value: !1
				}
			})), N = null, Qe = null, $e = !0, et = !0, tt = !1, nt = !0, P = !1, rt = !0, F = !1, it = !1, at = !1, I = !1, L = !1, R = !1, ot = !0, st = !1, ct = "user-content-", lt = !0, z = !1, B = {}, V = null, ut = C({}, [
				"annotation-xml",
				"audio",
				"colgroup",
				"desc",
				"foreignobject",
				"head",
				"iframe",
				"math",
				"mi",
				"mn",
				"mo",
				"ms",
				"mtext",
				"noembed",
				"noframes",
				"noscript",
				"plaintext",
				"script",
				"style",
				"svg",
				"template",
				"thead",
				"title",
				"video",
				"xmp"
			]), dt = null, ft = C({}, [
				"audio",
				"video",
				"img",
				"source",
				"image",
				"track"
			]), pt = null, mt = C({}, [
				"alt",
				"class",
				"for",
				"id",
				"label",
				"name",
				"pattern",
				"placeholder",
				"role",
				"summary",
				"title",
				"value",
				"style",
				"xmlns"
			]), H = "http://www.w3.org/1998/Math/MathML", U = "http://www.w3.org/2000/svg", W = "http://www.w3.org/1999/xhtml", G = W, ht = !1, gt = null, _t = C({}, [
				H,
				U,
				W
			], oe), K, vt = ["application/xhtml+xml", "text/html"], yt = "text/html", q, J = null, bt = a.createElement("form"), xt = function(e) {
				return e instanceof RegExp || e instanceof Function;
			}, St = function(t) {
				J && J === t || ((!t || e(t) !== "object") && (t = {}), t = w(t), K = K = vt.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? yt : t.PARSER_MEDIA_TYPE, q = K === "application/xhtml+xml" ? oe : v, A = "ALLOWED_TAGS" in t ? C({}, t.ALLOWED_TAGS, q) : Xe, j = "ALLOWED_ATTR" in t ? C({}, t.ALLOWED_ATTR, q) : Ze, gt = "ALLOWED_NAMESPACES" in t ? C({}, t.ALLOWED_NAMESPACES, oe) : _t, pt = "ADD_URI_SAFE_ATTR" in t ? C(w(mt), t.ADD_URI_SAFE_ATTR, q) : mt, dt = "ADD_DATA_URI_TAGS" in t ? C(w(ft), t.ADD_DATA_URI_TAGS, q) : ft, V = "FORBID_CONTENTS" in t ? C({}, t.FORBID_CONTENTS, q) : ut, N = "FORBID_TAGS" in t ? C({}, t.FORBID_TAGS, q) : {}, Qe = "FORBID_ATTR" in t ? C({}, t.FORBID_ATTR, q) : {}, B = "USE_PROFILES" in t ? t.USE_PROFILES : !1, $e = t.ALLOW_ARIA_ATTR !== !1, et = t.ALLOW_DATA_ATTR !== !1, tt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, nt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, P = t.SAFE_FOR_TEMPLATES || !1, rt = t.SAFE_FOR_XML !== !1, F = t.WHOLE_DOCUMENT || !1, I = t.RETURN_DOM || !1, L = t.RETURN_DOM_FRAGMENT || !1, R = t.RETURN_TRUSTED_TYPE || !1, at = t.FORCE_BODY || !1, ot = t.SANITIZE_DOM !== !1, st = t.SANITIZE_NAMED_PROPS || !1, lt = t.KEEP_CONTENT !== !1, z = t.IN_PLACE || !1, Ye = t.ALLOWED_URI_REGEXP || Ye, G = t.NAMESPACE || W, M = t.CUSTOM_ELEMENT_HANDLING || {}, t.CUSTOM_ELEMENT_HANDLING && xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (M.tagNameCheck = t.CUSTOM_ELEMENT_HANDLING.tagNameCheck), t.CUSTOM_ELEMENT_HANDLING && xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (M.attributeNameCheck = t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (M.allowCustomizedBuiltInElements = t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), P && (et = !1), L && (I = !0), B && (A = C({}, i(_e)), j = [], B.html === !0 && (C(A, de), C(j, ve)), B.svg === !0 && (C(A, fe), C(j, ye), C(j, E)), B.svgFilters === !0 && (C(A, pe), C(j, ye), C(j, E)), B.mathMl === !0 && (C(A, he), C(j, be), C(j, E))), t.ADD_TAGS && (A === Xe && (A = w(A)), C(A, t.ADD_TAGS, q)), t.ADD_ATTR && (j === Ze && (j = w(j)), C(j, t.ADD_ATTR, q)), t.ADD_URI_SAFE_ATTR && C(pt, t.ADD_URI_SAFE_ATTR, q), t.FORBID_CONTENTS && (V === ut && (V = w(V)), C(V, t.FORBID_CONTENTS, q)), lt && (A["#text"] = !0), F && C(A, [
					"html",
					"head",
					"body"
				]), A.table && (C(A, ["tbody"]), delete N.tbody), p && p(t), J = t);
			}, Ct = C({}, [
				"mi",
				"mo",
				"mn",
				"ms",
				"mtext"
			]), wt = C({}, ["annotation-xml"]), Tt = C({}, [
				"title",
				"style",
				"font",
				"a",
				"script"
			]), Y = C({}, fe);
			C(Y, pe), C(Y, me);
			var Et = C({}, he);
			C(Et, ge);
			var Dt = function(e) {
				var t = x(e);
				(!t || !t.tagName) && (t = {
					namespaceURI: G,
					tagName: "template"
				});
				var n = v(e.tagName), r = v(t.tagName);
				return gt[e.namespaceURI] ? e.namespaceURI === U ? t.namespaceURI === W ? n === "svg" : t.namespaceURI === H ? n === "svg" && (r === "annotation-xml" || Ct[r]) : !!Y[n] : e.namespaceURI === H ? t.namespaceURI === W ? n === "math" : t.namespaceURI === U ? n === "math" && wt[r] : !!Et[n] : e.namespaceURI === W ? t.namespaceURI === U && !wt[r] || t.namespaceURI === H && !Ct[r] ? !1 : !Et[n] && (Tt[n] || !Y[n]) : !!(K === "application/xhtml+xml" && gt[e.namespaceURI]) : !1;
			}, X = function(e) {
				_(n.removed, { element: e });
				try {
					e.parentNode.removeChild(e);
				} catch {
					try {
						e.outerHTML = Pe;
					} catch {
						e.remove();
					}
				}
			}, Z = function(e, t) {
				try {
					_(n.removed, {
						attribute: t.getAttributeNode(e),
						from: t
					});
				} catch {
					_(n.removed, {
						attribute: null,
						from: t
					});
				}
				if (t.removeAttribute(e), e === "is" && !j[e]) if (I || L) try {
					X(t);
				} catch {}
				else try {
					t.setAttribute(e, "");
				} catch {}
			}, Ot = function(e) {
				var t, n;
				if (at) e = "<remove></remove>" + e;
				else {
					var r = se(e, /^[\r\n\t ]+/);
					n = r && r[0];
				}
				K === "application/xhtml+xml" && G === W && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
				var i = D ? D.createHTML(e) : e;
				if (G === W) try {
					t = new te().parseFromString(i, K);
				} catch {}
				if (!t || !t.documentElement) {
					t = Fe.createDocument(G, "template", null);
					try {
						t.documentElement.innerHTML = ht ? Pe : i;
					} catch {}
				}
				var o = t.body || t.documentElement;
				return e && n && o.insertBefore(a.createTextNode(n), o.childNodes[0] || null), G === W ? Re.call(t, F ? "html" : "body")[0] : F ? t.documentElement : o;
			}, kt = function(e) {
				return Ie.call(e.ownerDocument || e, e, u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION, null, !1);
			}, At = function(e) {
				return e instanceof ee && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof f) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
			}, Q = function(t) {
				return e(c) === "object" ? t instanceof c : t && e(t) === "object" && typeof t.nodeType == "number" && typeof t.nodeName == "string";
			}, $ = function(e, t, r) {
				k[e] && ie(k[e], function(e) {
					e.call(n, t, r, J);
				});
			}, jt = function(e) {
				var t;
				if ($("beforeSanitizeElements", e, null), At(e) || b(/[\u0080-\uFFFF]/, e.nodeName)) return X(e), !0;
				var r = q(e.nodeName);
				if ($("uponSanitizeElement", e, {
					tagName: r,
					allowedTags: A
				}), e.hasChildNodes() && !Q(e.firstElementChild) && (!Q(e.content) || !Q(e.content.firstElementChild)) && b(/<[/\w]/g, e.innerHTML) && b(/<[/\w]/g, e.textContent) || r === "select" && b(/<template/i, e.innerHTML) || e.nodeType === 7 || rt && e.nodeType === 8 && b(/<[/\w]/g, e.data)) return X(e), !0;
				if (!A[r] || N[r]) {
					if (!N[r] && Nt(r) && (M.tagNameCheck instanceof RegExp && b(M.tagNameCheck, r) || M.tagNameCheck instanceof Function && M.tagNameCheck(r))) return !1;
					if (lt && !V[r]) {
						var i = x(e) || e.parentNode, a = re(e) || e.childNodes;
						if (a && i) for (var o = a.length - 1; o >= 0; --o) {
							var s = ne(a[o], !0);
							s.__removalCount = (e.__removalCount || 0) + 1, i.insertBefore(s, g(e));
						}
					}
					return X(e), !0;
				}
				return e instanceof l && !Dt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && b(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (P && e.nodeType === 3 && (t = e.textContent, t = y(t, Ve, " "), t = y(t, He, " "), t = y(t, Ue, " "), e.textContent !== t && (_(n.removed, { element: e.cloneNode() }), e.textContent = t)), $("afterSanitizeElements", e, null), !1);
			}, Mt = function(e, t, n) {
				if (ot && (t === "id" || t === "name") && (n in a || n in bt)) return !1;
				if (!(et && !Qe[t] && b(We, t)) && !($e && b(Ge, t))) {
					if (!j[t] || Qe[t]) {
						if (!(Nt(e) && (M.tagNameCheck instanceof RegExp && b(M.tagNameCheck, e) || M.tagNameCheck instanceof Function && M.tagNameCheck(e)) && (M.attributeNameCheck instanceof RegExp && b(M.attributeNameCheck, t) || M.attributeNameCheck instanceof Function && M.attributeNameCheck(t)) || t === "is" && M.allowCustomizedBuiltInElements && (M.tagNameCheck instanceof RegExp && b(M.tagNameCheck, n) || M.tagNameCheck instanceof Function && M.tagNameCheck(n)))) return !1;
					} else if (!pt[t] && !b(Ye, y(n, qe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ce(n, "data:") === 0 && dt[e]) && !(tt && !b(Ke, y(n, qe, ""))) && n) return !1;
				}
				return !0;
			}, Nt = function(e) {
				return e !== "annotation-xml" && se(e, Je);
			}, Pt = function(t) {
				var r, i, a, o;
				$("beforeSanitizeAttributes", t, null);
				var s = t.attributes;
				if (!(!s || At(t))) {
					var c = {
						attrName: "",
						attrValue: "",
						keepAttr: !0,
						allowedAttributes: j
					};
					for (o = s.length; o--;) {
						r = s[o];
						var l = r, u = l.name, d = l.namespaceURI;
						if (i = u === "value" ? r.value : le(r.value), a = q(u), c.attrName = a, c.attrValue = i, c.keepAttr = !0, c.forceKeepAttr = void 0, $("uponSanitizeAttribute", t, c), i = c.attrValue, !c.forceKeepAttr && (Z(u, t), c.keepAttr)) {
							if (!nt && b(/\/>/i, i)) {
								Z(u, t);
								continue;
							}
							P && (i = y(i, Ve, " "), i = y(i, He, " "), i = y(i, Ue, " "));
							var f = q(t.nodeName);
							if (Mt(f, a, i)) {
								if (st && (a === "id" || a === "name") && (Z(u, t), i = ct + i), rt && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, i)) {
									Z(u, t);
									continue;
								}
								if (D && e(m) === "object" && typeof m.getAttributeType == "function" && !d) switch (m.getAttributeType(f, a)) {
									case "TrustedHTML":
										i = D.createHTML(i);
										break;
									case "TrustedScriptURL":
										i = D.createScriptURL(i);
										break;
								}
								try {
									d ? t.setAttributeNS(d, u, i) : t.setAttribute(u, i), At(t) ? X(t) : ae(n.removed);
								} catch {}
							}
						}
					}
					$("afterSanitizeAttributes", t, null);
				}
			}, Ft = function e(t) {
				var n, r = kt(t);
				for ($("beforeSanitizeShadowDOM", t, null); n = r.nextNode();) $("uponSanitizeShadowNode", n, null), jt(n), Pt(n), n.content instanceof o && e(n.content);
				$("afterSanitizeShadowDOM", t, null);
			};
			return n.sanitize = function(i) {
				var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, l, u, d, f;
				if (ht = !i, ht && (i = "<!-->"), typeof i != "string" && !Q(i)) if (typeof i.toString == "function") {
					if (i = i.toString(), typeof i != "string") throw ue("dirty is not a string, aborting");
				} else throw ue("toString is not a function");
				if (!n.isSupported) {
					if (e(t.toStaticHTML) === "object" || typeof t.toStaticHTML == "function") {
						if (typeof i == "string") return t.toStaticHTML(i);
						if (Q(i)) return t.toStaticHTML(i.outerHTML);
					}
					return i;
				}
				if (it || St(a), n.removed = [], typeof i == "string" && (z = !1), z) {
					if (i.nodeName) {
						var ee = q(i.nodeName);
						if (!A[ee] || N[ee]) throw ue("root node is forbidden and cannot be sanitized in-place");
					}
				} else if (i instanceof c) s = Ot("<!---->"), l = s.ownerDocument.importNode(i, !0), l.nodeType === 1 && l.nodeName === "BODY" || l.nodeName === "HTML" ? s = l : s.appendChild(l);
				else {
					if (!I && !P && !F && i.indexOf("<") === -1) return D && R ? D.createHTML(i) : i;
					if (s = Ot(i), !s) return I ? null : R ? Pe : "";
				}
				s && at && X(s.firstChild);
				for (var te = kt(z ? i : s); u = te.nextNode();) u.nodeType === 3 && u === d || (jt(u), Pt(u), u.content instanceof o && Ft(u.content), d = u);
				if (d = null, z) return i;
				if (I) {
					if (L) for (f = Le.call(s.ownerDocument); s.firstChild;) f.appendChild(s.firstChild);
					else f = s;
					return (j.shadowroot || j.shadowrootmod) && (f = ze.call(r, f, !0)), f;
				}
				var p = F ? s.outerHTML : s.innerHTML;
				return F && A["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && b(ke, s.ownerDocument.doctype.name) && (p = "<!DOCTYPE " + s.ownerDocument.doctype.name + ">\n" + p), P && (p = y(p, Ve, " "), p = y(p, He, " "), p = y(p, Ue, " ")), D && R ? D.createHTML(p) : p;
			}, n.setConfig = function(e) {
				St(e), it = !0;
			}, n.clearConfig = function() {
				J = null, it = !1;
			}, n.isValidAttribute = function(e, t, n) {
				return J || St({}), Mt(q(e), q(t), n);
			}, n.addHook = function(e, t) {
				typeof t == "function" && (k[e] = k[e] || [], _(k[e], t));
			}, n.removeHook = function(e) {
				if (k[e]) return ae(k[e]);
			}, n.removeHooks = function(e) {
				k[e] && (k[e] = []);
			}, n.removeAllHooks = function() {
				k = {};
			}, n;
		}
		return Ne();
	}));
})))();
//#endregion
export { t as default };
