diff --git a/controllers/almanach_contents_edit.go b/controllers/almanach_contents_edit.go index bf5ac3a..61e618c 100644 --- a/controllers/almanach_contents_edit.go +++ b/controllers/almanach_contents_edit.go @@ -81,7 +81,7 @@ func (p *AlmanachContentsEditPage) GET(engine *templating.Engine, app core.App) data["pagination_values"] = paginationValuesSorted() data["agent_relations"] = dbmodels.AGENT_RELATIONS - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } data["edit_content_id"] = strings.TrimSpace(e.Request.URL.Query().Get("edit_content")) @@ -165,7 +165,7 @@ func (p *AlmanachContentsEditPage) GETItemEdit(engine *templating.Engine, app co data["content_index"] = contentIndex data["content_total"] = contentTotal - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } @@ -588,7 +588,8 @@ func (p *AlmanachContentsEditPage) POSTSave(engine *templating.Engine, app core. go updateContentsFTS5(app, entry, touched) } - savedMessage := url.QueryEscape("Änderungen gespeichert.") + saveAction := strings.TrimSpace(e.Request.FormValue("save_action")) + savedMessage := "Änderungen gespeichert." if contentID != "" { effectiveContentID := contentID if mappedID, ok := tempToCreated[effectiveContentID]; ok { @@ -596,12 +597,18 @@ func (p *AlmanachContentsEditPage) POSTSave(engine *templating.Engine, app core. } if effectiveContentID != "" { if resolved, err := dbmodels.Contents_IDs(app, []any{effectiveContentID}); err == nil && len(resolved) > 0 { - redirect := fmt.Sprintf("/almanach/%s/contents/%d/edit?saved_message=%s", id, resolved[0].MusenalmID(), savedMessage) + if saveAction == "view" { + redirect := fmt.Sprintf("/beitrag/%d", resolved[0].MusenalmID()) + return e.Redirect(http.StatusSeeOther, redirect) + } + setFlashSuccess(e, savedMessage) + redirect := fmt.Sprintf("/almanach/%s/contents/%d/edit", id, resolved[0].MusenalmID()) return e.Redirect(http.StatusSeeOther, redirect) } } } - redirect := fmt.Sprintf("/almanach/%s/contents/edit?saved_message=%s", id, savedMessage) + setFlashSuccess(e, savedMessage) + redirect := fmt.Sprintf("/almanach/%s/contents/edit", id) return e.Redirect(http.StatusSeeOther, redirect) } } @@ -641,7 +648,8 @@ func (p *AlmanachContentsEditPage) POSTUpdateExtent(engine *templating.Engine, a } }(app, entry) - redirect := fmt.Sprintf("/almanach/%s/contents/edit?saved_message=%s", id, url.QueryEscape("Struktur/Umfang gespeichert.")) + setFlashSuccess(e, "Struktur/Umfang gespeichert.") + redirect := fmt.Sprintf("/almanach/%s/contents/edit", id) return e.Redirect(http.StatusSeeOther, redirect) } } diff --git a/controllers/almanach_edit.go b/controllers/almanach_edit.go index 78f4a3c..fc237c2 100644 --- a/controllers/almanach_edit.go +++ b/controllers/almanach_edit.go @@ -67,7 +67,7 @@ func (p *AlmanachEditPage) GET(engine *templating.Engine, app core.App) HandleFu data["agent_relations"] = dbmodels.AGENT_RELATIONS data["series_relations"] = dbmodels.SERIES_RELATIONS - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } @@ -225,6 +225,7 @@ func (p *AlmanachEditPage) POSTSave(engine *templating.Engine, app core.App) Han updatedInfo["user"] = user.Name } + setFlashSuccess(e, "Änderungen gespeichert.") return e.JSON(http.StatusOK, map[string]any{ "success": true, "message": "Änderungen gespeichert.", diff --git a/controllers/flash.go b/controllers/flash.go new file mode 100644 index 0000000..5ba18fa --- /dev/null +++ b/controllers/flash.go @@ -0,0 +1,47 @@ +package controllers + +import ( + "net/http" + "net/url" + + "github.com/pocketbase/pocketbase/core" +) + +const flashSuccessCookieName = "flash_success" + +func setFlashSuccess(e *core.RequestEvent, message string) { + if e == nil || message == "" { + return + } + e.SetCookie(&http.Cookie{ + Name: flashSuccessCookieName, + Value: url.QueryEscape(message), + Path: "/", + MaxAge: 60, + HttpOnly: true, + SameSite: http.SameSiteLaxMode, + }) +} + +func popFlashSuccess(e *core.RequestEvent) string { + if e == nil || e.Request == nil { + return "" + } + cookie, err := e.Request.Cookie(flashSuccessCookieName) + if err != nil || cookie == nil || cookie.Value == "" { + return "" + } + e.SetCookie(&http.Cookie{ + Name: flashSuccessCookieName, + Value: "", + Path: "/", + MaxAge: -1, + HttpOnly: true, + SameSite: http.SameSiteLaxMode, + }) + value, err := url.QueryUnescape(cookie.Value) + if err != nil { + return "" + } + return value +} diff --git a/controllers/ort_edit.go b/controllers/ort_edit.go index ca03a63..f34147b 100644 --- a/controllers/ort_edit.go +++ b/controllers/ort_edit.go @@ -3,7 +3,6 @@ package controllers import ( "fmt" "net/http" - "net/url" "slices" "strings" @@ -110,7 +109,7 @@ func (p *OrtEditPage) GET(engine *templating.Engine, app core.App) HandleFunc { req := templating.NewRequest(e) data["csrf_token"] = req.Session().Token - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } @@ -142,6 +141,7 @@ func (p *OrtEditPage) renderError(engine *templating.Engine, app core.App, e *co type ortEditForm struct { CSRFToken string `form:"csrf_token"` LastEdited string `form:"last_edited"` + SaveAction string `form:"save_action"` Name string `form:"name"` Pseudonyms string `form:"pseudonyms"` Annotation string `form:"annotation"` @@ -237,7 +237,16 @@ func (p *OrtEditPage) POST(engine *templating.Engine, app core.App) HandleFunc { } }(app, place.Id, nameChanged) - redirect := fmt.Sprintf("/ort/%s/edit?saved_message=%s", id, url.QueryEscape("Änderungen gespeichert.")) + if strings.TrimSpace(formdata.SaveAction) == "view" { + redirect := fmt.Sprintf("/reihen/?place=%s", id) + return e.Redirect(http.StatusSeeOther, redirect) + } + if strings.TrimSpace(formdata.SaveAction) == "view" { + redirect := fmt.Sprintf("/ort/%s", id) + return e.Redirect(http.StatusSeeOther, redirect) + } + setFlashSuccess(e, "Änderungen gespeichert.") + redirect := fmt.Sprintf("/ort/%s/edit", id) return e.Redirect(http.StatusSeeOther, redirect) } } diff --git a/controllers/ort_new.go b/controllers/ort_new.go index 9bce809..4970693 100644 --- a/controllers/ort_new.go +++ b/controllers/ort_new.go @@ -3,7 +3,6 @@ package controllers import ( "fmt" "net/http" - "net/url" "slices" "strings" @@ -143,7 +142,8 @@ func (p *OrtNewPage) POST(engine *templating.Engine, app core.App) HandleFunc { } }(app, createdPlace.Id) - redirect := fmt.Sprintf("/ort/%s/edit?saved_message=%s", createdPlace.Id, url.QueryEscape("Änderungen gespeichert.")) + setFlashSuccess(e, "Änderungen gespeichert.") + redirect := fmt.Sprintf("/ort/%s/edit", createdPlace.Id) return e.Redirect(http.StatusSeeOther, redirect) } } diff --git a/controllers/person_edit.go b/controllers/person_edit.go index 9ed5e7f..34b6b9c 100644 --- a/controllers/person_edit.go +++ b/controllers/person_edit.go @@ -122,7 +122,7 @@ func (p *PersonEditPage) GET(engine *templating.Engine, app core.App) HandleFunc req := templating.NewRequest(e) data["csrf_token"] = req.Session().Token - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } @@ -240,6 +240,7 @@ func agentContentsDetails(app core.App, agentID string) ([]*dbmodels.Content, ma type personEditForm struct { CSRFToken string `form:"csrf_token"` LastEdited string `form:"last_edited"` + SaveAction string `form:"save_action"` Name string `form:"name"` Pseudonyms string `form:"pseudonyms"` BiographicalData string `form:"biographical_data"` @@ -348,7 +349,12 @@ func (p *PersonEditPage) POST(engine *templating.Engine, app core.App) HandleFun } }(app, agent.Id, nameChanged) - redirect := fmt.Sprintf("/person/%s", id) + if strings.TrimSpace(formdata.SaveAction) == "view" { + redirect := fmt.Sprintf("/person/%s", id) + return e.Redirect(http.StatusSeeOther, redirect) + } + setFlashSuccess(e, "Änderungen gespeichert.") + redirect := fmt.Sprintf("/person/%s/edit", id) return e.Redirect(http.StatusSeeOther, redirect) } } diff --git a/controllers/reihe_edit.go b/controllers/reihe_edit.go index fb2ec49..f61a68b 100644 --- a/controllers/reihe_edit.go +++ b/controllers/reihe_edit.go @@ -131,7 +131,7 @@ func (p *ReiheEditPage) GET(engine *templating.Engine, app core.App) HandleFunc req := templating.NewRequest(e) data["csrf_token"] = req.Session().Token - if msg := e.Request.URL.Query().Get("saved_message"); msg != "" { + if msg := popFlashSuccess(e); msg != "" { data["success"] = msg } @@ -353,6 +353,7 @@ func preferredSeriesEntries(app core.App, seriesID string) ([]*dbmodels.Entry, e type reiheEditForm struct { CSRFToken string `form:"csrf_token"` LastEdited string `form:"last_edited"` + SaveAction string `form:"save_action"` Title string `form:"title"` Pseudonyms string `form:"pseudonyms"` Annotation string `form:"annotation"` @@ -448,7 +449,12 @@ func (p *ReiheEditPage) POST(engine *templating.Engine, app core.App) HandleFunc } }(app, series.Id, titleChanged) - redirect := fmt.Sprintf("/reihe/%s/", id) + if strings.TrimSpace(formdata.SaveAction) == "view" { + redirect := fmt.Sprintf("/reihe/%s/", id) + return e.Redirect(http.StatusSeeOther, redirect) + } + setFlashSuccess(e, "Änderungen gespeichert.") + redirect := fmt.Sprintf("/reihe/%s/edit", id) return e.Redirect(http.StatusSeeOther, redirect) } } diff --git a/views/assets/scripts.js b/views/assets/scripts.js index a5afc56..d56501c 100644 --- a/views/assets/scripts.js +++ b/views/assets/scripts.js @@ -1,22 +1,22 @@ -var Xa = Object.defineProperty; -var ps = (s) => { +var Qa = Object.defineProperty; +var fs = (s) => { throw TypeError(s); }; -var Qa = (s, t, e) => t in s ? Xa(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e; -var Xt = (s, t, e) => Qa(s, typeof t != "symbol" ? t + "" : t, e), Oi = (s, t, e) => t.has(s) || ps("Cannot " + e); -var Bi = (s, t, e) => (Oi(s, t, "read from private field"), e ? e.call(s) : t.get(s)), he = (s, t, e) => t.has(s) ? ps("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), Ve = (s, t, e, i) => (Oi(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e), je = (s, t, e) => (Oi(s, t, "access private method"), e); -var Za = "2.1.16"; -const Mt = "[data-trix-attachment]", Nn = { preview: { presentation: "gallery", caption: { name: !0, size: !0 } }, file: { caption: { size: !0 } } }, X = { default: { tagName: "div", parse: !1 }, quote: { tagName: "blockquote", nestable: !0 }, heading1: { tagName: "h1", terminal: !0, breakOnReturn: !0, group: !1 }, code: { tagName: "pre", terminal: !0, htmlAttributes: ["language"], text: { plaintext: !0 } }, bulletList: { tagName: "ul", parse: !1 }, bullet: { tagName: "li", listAttribute: "bulletList", group: !1, nestable: !0, test(s) { - return fs(s.parentNode) === X[this.listAttribute].tagName; +var Za = (s, t, e) => t in s ? Qa(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e; +var Xt = (s, t, e) => Za(s, typeof t != "symbol" ? t + "" : t, e), Oi = (s, t, e) => t.has(s) || fs("Cannot " + e); +var Bi = (s, t, e) => (Oi(s, t, "read from private field"), e ? e.call(s) : t.get(s)), he = (s, t, e) => t.has(s) ? fs("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), Ve = (s, t, e, i) => (Oi(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e), je = (s, t, e) => (Oi(s, t, "access private method"), e); +var to = "2.1.16"; +const Mt = "[data-trix-attachment]", Pn = { preview: { presentation: "gallery", caption: { name: !0, size: !0 } }, file: { caption: { size: !0 } } }, X = { default: { tagName: "div", parse: !1 }, quote: { tagName: "blockquote", nestable: !0 }, heading1: { tagName: "h1", terminal: !0, breakOnReturn: !0, group: !1 }, code: { tagName: "pre", terminal: !0, htmlAttributes: ["language"], text: { plaintext: !0 } }, bulletList: { tagName: "ul", parse: !1 }, bullet: { tagName: "li", listAttribute: "bulletList", group: !1, nestable: !0, test(s) { + return bs(s.parentNode) === X[this.listAttribute].tagName; } }, numberList: { tagName: "ol", parse: !1 }, number: { tagName: "li", listAttribute: "numberList", group: !1, nestable: !0, test(s) { - return fs(s.parentNode) === X[this.listAttribute].tagName; -} }, attachmentGallery: { tagName: "div", exclusive: !0, terminal: !0, parse: !1, group: !1 } }, fs = (s) => { + return bs(s.parentNode) === X[this.listAttribute].tagName; +} }, attachmentGallery: { tagName: "div", exclusive: !0, terminal: !0, parse: !1, group: !1 } }, bs = (s) => { var t; return s == null || (t = s.tagName) === null || t === void 0 ? void 0 : t.toLowerCase(); -}, bs = navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i), Mi = bs && parseInt(bs[1]); -var Oe = { composesExistingText: /Android.*Chrome/.test(navigator.userAgent), recentAndroid: Mi && Mi > 12, samsungAndroid: Mi && navigator.userAgent.match(/Android.*SM-/), forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent), supportsInputEvents: typeof InputEvent < "u" && ["data", "getTargetRanges", "inputType"].every((s) => s in InputEvent.prototype) }, Kr = { ADD_ATTR: ["language"], SAFE_FOR_XML: !1, RETURN_DOM: !0 }, v = { attachFiles: "Attach Files", bold: "Bold", bullets: "Bullets", byte: "Byte", bytes: "Bytes", captionPlaceholder: "Add a caption…", code: "Code", heading1: "Heading", indent: "Increase Level", italic: "Italic", link: "Link", numbers: "Numbers", outdent: "Decrease Level", quote: "Quote", redo: "Redo", remove: "Remove", strike: "Strikethrough", undo: "Undo", unlink: "Unlink", url: "URL", urlPlaceholder: "Enter a URL…", GB: "GB", KB: "KB", MB: "MB", PB: "PB", TB: "TB" }; -const to = [v.bytes, v.KB, v.MB, v.GB, v.TB, v.PB]; -var Gr = { prefix: "IEC", precision: 2, formatter(s) { +}, _s = navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i), Mi = _s && parseInt(_s[1]); +var Oe = { composesExistingText: /Android.*Chrome/.test(navigator.userAgent), recentAndroid: Mi && Mi > 12, samsungAndroid: Mi && navigator.userAgent.match(/Android.*SM-/), forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent), supportsInputEvents: typeof InputEvent < "u" && ["data", "getTargetRanges", "inputType"].every((s) => s in InputEvent.prototype) }, Gr = { ADD_ATTR: ["language"], SAFE_FOR_XML: !1, RETURN_DOM: !0 }, v = { attachFiles: "Attach Files", bold: "Bold", bullets: "Bullets", byte: "Byte", bytes: "Bytes", captionPlaceholder: "Add a caption…", code: "Code", heading1: "Heading", indent: "Increase Level", italic: "Italic", link: "Link", numbers: "Numbers", outdent: "Decrease Level", quote: "Quote", redo: "Redo", remove: "Remove", strike: "Strikethrough", undo: "Undo", unlink: "Unlink", url: "URL", urlPlaceholder: "Enter a URL…", GB: "GB", KB: "KB", MB: "MB", PB: "PB", TB: "TB" }; +const eo = [v.bytes, v.KB, v.MB, v.GB, v.TB, v.PB]; +var Jr = { prefix: "IEC", precision: 2, formatter(s) { switch (s) { case 0: return "0 ".concat(v.bytes); @@ -26,34 +26,34 @@ var Gr = { prefix: "IEC", precision: 2, formatter(s) { let t; this.prefix === "SI" ? t = 1e3 : this.prefix === "IEC" && (t = 1024); const e = Math.floor(Math.log(s) / Math.log(t)), i = (s / Math.pow(t, e)).toFixed(this.precision).replace(/0*$/, "").replace(/\.$/, ""); - return "".concat(i, " ").concat(to[e]); + return "".concat(i, " ").concat(eo[e]); } } }; -const ui = "\uFEFF", St = " ", Jr = function(s) { +const ui = "\uFEFF", St = " ", Yr = function(s) { for (const t in s) { const e = s[t]; this[t] = e; } return this; -}, Pn = document.documentElement, eo = Pn.matches, B = function(s) { +}, Fn = document.documentElement, io = Fn.matches, B = function(s) { let { onElement: t, matchingSelector: e, withCallback: i, inPhase: n, preventDefault: r, times: a } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - const o = t || Pn, l = e, c = n === "capturing", u = function(h) { + const o = t || Fn, l = e, c = n === "capturing", u = function(h) { a != null && --a == 0 && u.destroy(); const m = Lt(h.target, { matchingSelector: l }); m != null && (i == null || i.call(m, h, m), r && h.preventDefault()); }; return u.destroy = () => o.removeEventListener(s, u, c), o.addEventListener(s, u, c), u; -}, Yr = function(s) { +}, Xr = function(s) { let { bubbles: t, cancelable: e, attributes: i } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; t = t !== !1, e = e !== !1; const n = document.createEvent("Events"); - return n.initEvent(s, t, e), i != null && Jr.call(n, i), n; + return n.initEvent(s, t, e), i != null && Yr.call(n, i), n; }, Ae = function(s) { let { onElement: t, bubbles: e, cancelable: i, attributes: n } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - const r = t ?? Pn, a = Yr(s, { bubbles: e, cancelable: i, attributes: n }); + const r = t ?? Fn, a = Xr(s, { bubbles: e, cancelable: i, attributes: n }); return r.dispatchEvent(a); -}, Xr = function(s, t) { - if ((s == null ? void 0 : s.nodeType) === 1) return eo.call(s, t); +}, Qr = function(s, t) { + if ((s == null ? void 0 : s.nodeType) === 1) return io.call(s, t); }, Lt = function(s) { let { matchingSelector: t, untilNode: e } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; for (; s && s.nodeType !== Node.ELEMENT_NODE; ) s = s.parentNode; @@ -61,11 +61,11 @@ const ui = "\uFEFF", St = " ", Jr = function(s) { if (t == null) return s; if (s.closest && e == null) return s.closest(t); for (; s && s !== e; ) { - if (Xr(s, t)) return s; + if (Qr(s, t)) return s; s = s.parentNode; } } -}, Fn = (s) => document.activeElement !== s && Ot(s, document.activeElement), Ot = function(s, t) { +}, Hn = (s) => document.activeElement !== s && Ot(s, document.activeElement), Ot = function(s, t) { if (s && t) for (; t; ) { if (t === s) return !0; t = t.parentNode; @@ -119,15 +119,15 @@ const Ee = function() { t.tagName && ue.push(t.tagName); } return ue; -}, Pi = (s) => ee(s == null ? void 0 : s.firstChild), _s = function(s) { +}, Pi = (s) => ee(s == null ? void 0 : s.firstChild), vs = function(s) { let { strict: t } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { strict: !0 }; return t ? ee(s) : ee(s) || !ee(s.firstChild) && function(e) { return Ee().includes(Y(e)) && !Ee().includes(Y(e.firstChild)); }(s); -}, ee = (s) => io(s) && (s == null ? void 0 : s.data) === "block", io = (s) => (s == null ? void 0 : s.nodeType) === Node.COMMENT_NODE, ie = function(s) { +}, ee = (s) => no(s) && (s == null ? void 0 : s.data) === "block", no = (s) => (s == null ? void 0 : s.nodeType) === Node.COMMENT_NODE, ie = function(s) { let { name: t } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (s) return xe(s) ? s.data === ui ? !t || s.parentNode.dataset.trixCursorTarget === t : void 0 : ie(s.firstChild); -}, Nt = (s) => Xr(s, Mt), Qr = (s) => xe(s) && (s == null ? void 0 : s.data) === "", xe = (s) => (s == null ? void 0 : s.nodeType) === Node.TEXT_NODE, Hn = { level2Enabled: !0, getLevel() { +}, Nt = (s) => Qr(s, Mt), Zr = (s) => xe(s) && (s == null ? void 0 : s.data) === "", xe = (s) => (s == null ? void 0 : s.nodeType) === Node.TEXT_NODE, qn = { level2Enabled: !0, getLevel() { return this.level2Enabled && Oe.supportsInputEvents ? 2 : 0; }, pickFiles(s) { const t = x("input", { type: "file", multiple: !0, hidden: !0, id: this.fileInputId }); @@ -142,7 +142,7 @@ var ii = { removeBlankTableCells: !1, tableCellSeparator: " | ", tableRowSeparat } }, italic: { tagName: "em", inheritable: !0, parser: (s) => window.getComputedStyle(s).fontStyle === "italic" }, href: { groupTagName: "a", parser(s) { const t = "a:not(".concat(Mt, ")"), e = s.closest(t); if (e) return e.getAttribute("href"); -} }, strike: { tagName: "del", inheritable: !0 }, frozen: { style: { backgroundColor: "highlight" } } }, Zr = { getDefaultHTML: () => `
`) }; const An = { interval: 5e3 }; -var Be = Object.freeze({ __proto__: null, attachments: Nn, blockAttributes: X, browser: Oe, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, dompurify: Kr, fileSize: Gr, input: Hn, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: v, parser: ii, textAttributes: Ft, toolbar: Zr, undo: An }); +var Be = Object.freeze({ __proto__: null, attachments: Pn, blockAttributes: X, browser: Oe, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, dompurify: Gr, fileSize: Jr, input: qn, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: v, parser: ii, textAttributes: Ft, toolbar: ta, undo: An }); class q { static proxyMethod(t) { - const { name: e, toMethod: i, toProperty: n, optional: r } = no(t); + const { name: e, toMethod: i, toProperty: n, optional: r } = so(t); this.prototype[e] = function() { let a, o; var l, c; - return i ? o = r ? (l = this[i]) === null || l === void 0 ? void 0 : l.call(this) : this[i]() : n && (o = this[n]), r ? (a = (c = o) === null || c === void 0 ? void 0 : c[e], a ? vs.call(a, o, arguments) : void 0) : (a = o[e], vs.call(a, o, arguments)); + return i ? o = r ? (l = this[i]) === null || l === void 0 ? void 0 : l.call(this) : this[i]() : n && (o = this[n]), r ? (a = (c = o) === null || c === void 0 ? void 0 : c[e], a ? ys.call(a, o, arguments) : void 0) : (a = o[e], ys.call(a, o, arguments)); }; } } -const no = function(s) { - const t = s.match(so); +const so = function(s) { + const t = s.match(ro); if (!t) throw new Error("can't parse @proxyMethod expression: ".concat(s)); const e = { name: t[4] }; return t[2] != null ? e.toMethod = t[1] : e.toProperty = t[1], t[3] != null && (e.optional = !0), e; -}, { apply: vs } = Function.prototype, so = new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"); +}, { apply: ys } = Function.prototype, ro = new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"); var Fi, Hi, qi; class ke extends q { static box() { @@ -241,9 +241,9 @@ class ke extends q { return this.ucs2String; } } -const ro = ((Fi = Array.from) === null || Fi === void 0 ? void 0 : Fi.call(Array, "👼").length) === 1, ao = ((Hi = " ".codePointAt) === null || Hi === void 0 ? void 0 : Hi.call(" ", 0)) != null, oo = ((qi = String.fromCodePoint) === null || qi === void 0 ? void 0 : qi.call(String, 32, 128124)) === " 👼"; +const ao = ((Fi = Array.from) === null || Fi === void 0 ? void 0 : Fi.call(Array, "👼").length) === 1, oo = ((Hi = " ".codePointAt) === null || Hi === void 0 ? void 0 : Hi.call(" ", 0)) != null, lo = ((qi = String.fromCodePoint) === null || qi === void 0 ? void 0 : qi.call(String, 32, 128124)) === " 👼"; let En, xn; -En = ro && ao ? (s) => Array.from(s).map((t) => t.codePointAt(0)) : function(s) { +En = ao && oo ? (s) => Array.from(s).map((t) => t.codePointAt(0)) : function(s) { const t = []; let e = 0; const { length: i } = s; @@ -256,7 +256,7 @@ En = ro && ao ? (s) => Array.from(s).map((t) => t.codePointAt(0)) : function(s) t.push(n); } return t; -}, xn = oo ? (s) => String.fromCodePoint(...Array.from(s || [])) : function(s) { +}, xn = lo ? (s) => String.fromCodePoint(...Array.from(s || [])) : function(s) { return (() => { const t = []; return Array.from(s).forEach((e) => { @@ -265,13 +265,13 @@ En = ro && ao ? (s) => Array.from(s).map((t) => t.codePointAt(0)) : function(s) }), t; })().join(""); }; -let lo = 0; +let co = 0; class $t extends q { static fromJSONString(t) { return this.fromJSON(JSON.parse(t)); } constructor() { - super(...arguments), this.id = ++lo; + super(...arguments), this.id = ++co; } hasSameConstructorAs(t) { return this.constructor === (t == null ? void 0 : t.constructor); @@ -305,11 +305,11 @@ const Ht = function() { for (let e = 0; e < s.length; e++) if (s[e] !== t[e]) return !1; return !0; -}, qn = function(s) { +}, $n = function(s) { const t = s.slice(0); for (var e = arguments.length, i = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) i[n - 1] = arguments[n]; return t.splice(...i), t; -}, co = /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/, ho = function() { +}, ho = /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/, uo = function() { const s = x("input", { dir: "auto", name: "x", dirName: "x.dir" }), t = x("textarea", { dir: "auto", name: "y", dirName: "y.dir" }), e = x("form"); e.appendChild(s), e.appendChild(t); const i = function() { @@ -331,31 +331,31 @@ const Ht = function() { return s.value = r, s.matches(":dir(rtl)") ? "rtl" : "ltr"; } : function(r) { const a = r.trim().charAt(0); - return co.test(a) ? "rtl" : "ltr"; + return ho.test(a) ? "rtl" : "ltr"; }; }(); let $i = null, Ui = null, Vi = null, We = null; -const Sn = () => ($i || ($i = mo().concat(uo())), $i), F = (s) => X[s], uo = () => (Ui || (Ui = Object.keys(X)), Ui), Ln = (s) => Ft[s], mo = () => (Vi || (Vi = Object.keys(Ft)), Vi), ta = function(s, t) { - go(s).textContent = t.replace(/%t/g, s); -}, go = function(s) { +const Sn = () => ($i || ($i = go().concat(mo())), $i), F = (s) => X[s], mo = () => (Ui || (Ui = Object.keys(X)), Ui), Ln = (s) => Ft[s], go = () => (Vi || (Vi = Object.keys(Ft)), Vi), ea = function(s, t) { + po(s).textContent = t.replace(/%t/g, s); +}, po = function(s) { const t = document.createElement("style"); t.setAttribute("type", "text/css"), t.setAttribute("data-tag-name", s.toLowerCase()); - const e = po(); + const e = fo(); return e && t.setAttribute("nonce", e), document.head.insertBefore(t, document.head.firstChild), t; -}, po = function() { - const s = ys("trix-csp-nonce") || ys("csp-nonce"); +}, fo = function() { + const s = As("trix-csp-nonce") || As("csp-nonce"); if (s) { const { nonce: t, content: e } = s; return t == "" ? e : t; } -}, ys = (s) => document.head.querySelector("meta[name=".concat(s, "]")), As = { "application/x-trix-feature-detection": "test" }, ea = function(s) { +}, As = (s) => document.head.querySelector("meta[name=".concat(s, "]")), Es = { "application/x-trix-feature-detection": "test" }, ia = function(s) { const t = s.getData("text/plain"), e = s.getData("text/html"); if (!t || !e) return t == null ? void 0 : t.length; { const { body: i } = new DOMParser().parseFromString(e, "text/html"); if (i.textContent === t) return !i.querySelector("*"); } -}, ia = /Mac|^iP/.test(navigator.platform) ? (s) => s.metaKey : (s) => s.ctrlKey, $n = (s) => setTimeout(s, 1), na = function() { +}, na = /Mac|^iP/.test(navigator.platform) ? (s) => s.metaKey : (s) => s.ctrlKey, Un = (s) => setTimeout(s, 1), sa = function() { let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; const t = {}; for (const e in s) { @@ -370,7 +370,7 @@ const Sn = () => ($i || ($i = mo().concat(uo())), $i), F = (s) => X[s], uo = () if (s[e] !== t[e]) return !1; return !0; }, k = function(s) { - if (s != null) return Array.isArray(s) || (s = [s, s]), [Es(s[0]), Es(s[1] != null ? s[1] : s[0])]; + if (s != null) return Array.isArray(s) || (s = [s, s]), [xs(s[0]), xs(s[1] != null ? s[1] : s[0])]; }, vt = function(s) { if (s == null) return; const [t, e] = k(s); @@ -379,12 +379,12 @@ const Sn = () => ($i || ($i = mo().concat(uo())), $i), F = (s) => X[s], uo = () if (s == null || t == null) return; const [e, i] = k(s), [n, r] = k(t); return Cn(e, n) && Cn(i, r); -}, Es = function(s) { - return typeof s == "number" ? s : na(s); +}, xs = function(s) { + return typeof s == "number" ? s : sa(s); }, Cn = function(s, t) { return typeof s == "number" ? s === t : re(s, t); }; -class sa extends q { +class ra extends q { constructor() { super(...arguments), this.update = this.update.bind(this), this.selectionManagers = []; } @@ -410,17 +410,17 @@ class sa extends q { this.update(); } } -const qt = new sa(), ra = function() { +const qt = new ra(), aa = function() { const s = window.getSelection(); if (s.rangeCount > 0) return s; }, Se = function() { var s; - const t = (s = ra()) === null || s === void 0 ? void 0 : s.getRangeAt(0); - if (t && !fo(t)) return t; -}, aa = function(s) { + const t = (s = aa()) === null || s === void 0 ? void 0 : s.getRangeAt(0); + if (t && !bo(t)) return t; +}, oa = function(s) { const t = window.getSelection(); return t.removeAllRanges(), t.addRange(s), qt.update(); -}, fo = (s) => xs(s.startContainer) || xs(s.endContainer), xs = (s) => !Object.getPrototypeOf(s), ye = (s) => s.replace(new RegExp("".concat(ui), "g"), "").replace(new RegExp("".concat(St), "g"), " "), Un = new RegExp("[^\\S".concat(St, "]")), Vn = (s) => s.replace(new RegExp("".concat(Un.source), "g"), " ").replace(/\ {2,}/g, " "), Ss = function(s, t) { +}, bo = (s) => Ss(s.startContainer) || Ss(s.endContainer), Ss = (s) => !Object.getPrototypeOf(s), ye = (s) => s.replace(new RegExp("".concat(ui), "g"), "").replace(new RegExp("".concat(St), "g"), " "), Vn = new RegExp("[^\\S".concat(St, "]")), jn = (s) => s.replace(new RegExp("".concat(Vn.source), "g"), " ").replace(/\ {2,}/g, " "), Ls = function(s, t) { if (s.isEqualTo(t)) return ["", ""]; const e = ji(s, t), { length: i } = e.utf16String; let n; @@ -452,7 +452,7 @@ class et extends $t { super(...arguments), this.values = ni(t); } add(t, e) { - return this.merge(bo(t, e)); + return this.merge(_o(t, e)); } remove(t) { return new et(ni(this.values, t)); @@ -464,7 +464,7 @@ class et extends $t { return t in this.values; } merge(t) { - return new et(_o(this.values, vo(t))); + return new et(vo(this.values, yo(t))); } slice(t) { const e = {}; @@ -505,10 +505,10 @@ class et extends $t { return { values: JSON.stringify(this.values) }; } } -const bo = function(s, t) { +const _o = function(s, t) { const e = {}; return e[s] = t, e; -}, _o = function(s, t) { +}, vo = function(s, t) { const e = ni(s); for (const i in t) { const n = t[i]; @@ -522,10 +522,10 @@ const bo = function(s, t) { }), e; }, me = function(s) { return s instanceof et ? s : new et(s); -}, vo = function(s) { +}, yo = function(s) { return s instanceof et ? s.values : s; }; -class jn { +class Wn { static groupObjects() { let t, e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], { depth: i, asTree: n } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; n && i == null && (i = 0); @@ -557,7 +557,7 @@ class jn { }), t.join("/"); } } -class yo extends q { +class Ao extends q { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []; super(...arguments), this.objects = {}, Array.from(t).forEach((e) => { @@ -570,16 +570,16 @@ class yo extends q { return this.objects[e]; } } -class Ao { +class Eo { constructor(t) { this.reset(t); } add(t) { - const e = Ls(t); + const e = Cs(t); this.elements[e] = t; } remove(t) { - const e = Ls(t), i = this.elements[e]; + const e = Cs(t), i = this.elements[e]; if (i) return delete this.elements[e], i; } reset() { @@ -589,7 +589,7 @@ class Ao { }), t; } } -const Ls = (s) => s.dataset.trixStoreKey; +const Cs = (s) => s.dataset.trixStoreKey; class oi extends q { isPerforming() { return this.performing === !0; @@ -639,7 +639,7 @@ class Ut extends q { } createChildView(t, e) { let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - e instanceof jn && (i.viewClass = t, t = Eo); + e instanceof Wn && (i.viewClass = t, t = xo); const n = new t(e, i); return this.recordChildView(n); } @@ -690,7 +690,7 @@ class Ut extends q { } } } -class Eo extends Ut { +class xo extends Ut { constructor() { super(...arguments), this.objectGroup = this.object, this.viewClass = this.options.viewClass, delete this.options.viewClass; } @@ -713,8 +713,8 @@ class Eo extends Ut { } } /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */ -const { entries: oa, setPrototypeOf: Cs, isFrozen: xo, getPrototypeOf: So, getOwnPropertyDescriptor: Lo } = Object; -let { freeze: Q, seal: st, create: la } = Object, { apply: wn, construct: Tn } = typeof Reflect < "u" && Reflect; +const { entries: la, setPrototypeOf: ws, isFrozen: So, getPrototypeOf: Lo, getOwnPropertyDescriptor: Co } = Object; +let { freeze: Q, seal: st, create: da } = Object, { apply: wn, construct: Tn } = typeof Reflect < "u" && Reflect; Q || (Q = function(s) { return s; }), st || (st = function(s) { @@ -726,11 +726,11 @@ Q || (Q = function(s) { for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) e[i - 1] = arguments[i]; return new s(...e); }); -const ze = Z(Array.prototype.forEach), Co = Z(Array.prototype.lastIndexOf), ws = Z(Array.prototype.pop), ge = Z(Array.prototype.push), wo = Z(Array.prototype.splice), si = Z(String.prototype.toLowerCase), Wi = Z(String.prototype.toString), zi = Z(String.prototype.match), pe = Z(String.prototype.replace), To = Z(String.prototype.indexOf), ko = Z(String.prototype.trim), lt = Z(Object.prototype.hasOwnProperty), J = Z(RegExp.prototype.test), fe = (Ts = TypeError, function() { +const ze = Z(Array.prototype.forEach), wo = Z(Array.prototype.lastIndexOf), Ts = Z(Array.prototype.pop), ge = Z(Array.prototype.push), To = Z(Array.prototype.splice), si = Z(String.prototype.toLowerCase), Wi = Z(String.prototype.toString), zi = Z(String.prototype.match), pe = Z(String.prototype.replace), ko = Z(String.prototype.indexOf), Io = Z(String.prototype.trim), lt = Z(Object.prototype.hasOwnProperty), J = Z(RegExp.prototype.test), fe = (ks = TypeError, function() { for (var s = arguments.length, t = new Array(s), e = 0; e < s; e++) t[e] = arguments[e]; - return Tn(Ts, t); + return Tn(ks, t); }); -var Ts; +var ks; function Z(s) { return function(t) { t instanceof RegExp && (t.lastIndex = 0); @@ -740,51 +740,51 @@ function Z(s) { } function L(s, t) { let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : si; - Cs && Cs(s, null); + ws && ws(s, null); let i = t.length; for (; i--; ) { let n = t[i]; if (typeof n == "string") { const r = e(n); - r !== n && (xo(t) || (t[i] = r), n = r); + r !== n && (So(t) || (t[i] = r), n = r); } s[n] = !0; } return s; } -function Io(s) { +function Ro(s) { for (let t = 0; t < s.length; t++) lt(s, t) || (s[t] = null); return s; } function ft(s) { - const t = la(null); - for (const [e, i] of oa(s)) - lt(s, e) && (Array.isArray(i) ? t[e] = Io(i) : i && typeof i == "object" && i.constructor === Object ? t[e] = ft(i) : t[e] = i); + const t = da(null); + for (const [e, i] of la(s)) + lt(s, e) && (Array.isArray(i) ? t[e] = Ro(i) : i && typeof i == "object" && i.constructor === Object ? t[e] = ft(i) : t[e] = i); return t; } function be(s, t) { for (; s !== null; ) { - const e = Lo(s, t); + const e = Co(s, t); if (e) { if (e.get) return Z(e.get); if (typeof e.value == "function") return Z(e.value); } - s = So(s); + s = Lo(s); } return function() { return null; }; } -const ks = Q(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ki = Q(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Gi = Q(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ro = Q(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ji = Q(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Do = Q(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Is = Q(["#text"]), Rs = Q(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yi = Q(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ds = Q(["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"]), Ke = Q(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Oo = st(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Bo = st(/<%[\w\W]*|[\w\W]*%>/gm), Mo = st(/\$\{[\w\W]*/gm), No = st(/^data-[\-\w.\u00B7-\uFFFF]+$/), Po = st(/^aria-[\-\w]+$/), da = st(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Fo = st(/^(?:\w+script|data):/i), Ho = st(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), ca = st(/^html$/i), qo = st(/^[a-z][.\w]*(-[.\w]+)+$/i); -var Os = Object.freeze({ __proto__: null, ARIA_ATTR: Po, ATTR_WHITESPACE: Ho, CUSTOM_ELEMENT: qo, DATA_ATTR: No, DOCTYPE_NAME: ca, ERB_EXPR: Bo, IS_ALLOWED_URI: da, IS_SCRIPT_OR_DATA: Fo, MUSTACHE_EXPR: Oo, TMPLIT_EXPR: Mo }); -const $o = 1, Uo = 3, Vo = 7, jo = 8, Wo = 9, zo = function() { +const Is = Q(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ki = Q(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Gi = Q(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Do = Q(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ji = Q(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Oo = Q(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Rs = Q(["#text"]), Ds = Q(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yi = Q(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Os = Q(["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"]), Ke = Q(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Bo = st(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Mo = st(/<%[\w\W]*|[\w\W]*%>/gm), No = st(/\$\{[\w\W]*/gm), Po = st(/^data-[\-\w.\u00B7-\uFFFF]+$/), Fo = st(/^aria-[\-\w]+$/), ca = st(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ho = st(/^(?:\w+script|data):/i), qo = st(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), ha = st(/^html$/i), $o = st(/^[a-z][.\w]*(-[.\w]+)+$/i); +var Bs = Object.freeze({ __proto__: null, ARIA_ATTR: Fo, ATTR_WHITESPACE: qo, CUSTOM_ELEMENT: $o, DATA_ATTR: Po, DOCTYPE_NAME: ha, ERB_EXPR: Mo, IS_ALLOWED_URI: ca, IS_SCRIPT_OR_DATA: Ho, MUSTACHE_EXPR: Bo, TMPLIT_EXPR: No }); +const Uo = 1, Vo = 3, jo = 7, Wo = 8, zo = 9, Ko = function() { return typeof window > "u" ? null : window; }; var Ie = function s() { - let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : zo(); + let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ko(); const e = (d) => s(d); - if (e.version = "3.2.7", e.removed = [], !t || !t.document || t.document.nodeType !== Wo || !t.Element) return e.isSupported = !1, e; + if (e.version = "3.2.7", e.removed = [], !t || !t.document || t.document.nodeType !== zo || !t.Element) return e.isSupported = !1, e; let { document: i } = t; const n = i, r = n.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: l, Element: c, NodeFilter: u, NamedNodeMap: h = t.NamedNodeMap || t.MozNamedAttrMap, HTMLFormElement: m, DOMParser: g, trustedTypes: b } = t, A = c.prototype, I = be(A, "cloneNode"), $ = be(A, "remove"), R = be(A, "nextSibling"), U = be(A, "childNodes"), _ = be(A, "parentNode"); if (typeof o == "function") { @@ -794,31 +794,31 @@ var Ie = function s() { let S, E = ""; const { implementation: z, createNodeIterator: ct, createDocumentFragment: wt, getElementsByTagName: mt } = i, { importNode: bi } = n; let V = { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] }; - e.isSupported = typeof oa == "function" && typeof _ == "function" && z && z.createHTMLDocument !== void 0; - const { MUSTACHE_EXPR: Tt, ERB_EXPR: jt, TMPLIT_EXPR: tt, DATA_ATTR: _i, ARIA_ATTR: vi, IS_SCRIPT_OR_DATA: yi, ATTR_WHITESPACE: Me, CUSTOM_ELEMENT: Ai } = Os; - let { IS_ALLOWED_URI: oe } = Os, M = null; - const H = L({}, [...ks, ...Ki, ...Gi, ...Ji, ...Is]); + e.isSupported = typeof la == "function" && typeof _ == "function" && z && z.createHTMLDocument !== void 0; + const { MUSTACHE_EXPR: Tt, ERB_EXPR: jt, TMPLIT_EXPR: tt, DATA_ATTR: _i, ARIA_ATTR: vi, IS_SCRIPT_OR_DATA: yi, ATTR_WHITESPACE: Me, CUSTOM_ELEMENT: Ai } = Bs; + let { IS_ALLOWED_URI: oe } = Bs, M = null; + const H = L({}, [...Is, ...Ki, ...Gi, ...Ji, ...Rs]); let D = null; - const Kn = L({}, [...Rs, ...Yi, ...Ds, ...Ke]); - let N = Object.seal(la(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 } })), le = null, Ei = null, Gn = !0, xi = !0, Jn = !1, Yn = !0, Wt = !1, Ne = !0, kt = !1, Si = !1, Li = !1, zt = !1, Pe = !1, Fe = !1, Xn = !0, Qn = !1, Ci = !0, de = !1, Kt = {}, Gt = null; - const Zn = L({}, ["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"]); - let ts = null; - const es = L({}, ["audio", "video", "img", "source", "image", "track"]); + const Gn = L({}, [...Ds, ...Yi, ...Os, ...Ke]); + let N = Object.seal(da(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 } })), le = null, Ei = null, Jn = !0, xi = !0, Yn = !1, Xn = !0, Wt = !1, Ne = !0, kt = !1, Si = !1, Li = !1, zt = !1, Pe = !1, Fe = !1, Qn = !0, Zn = !1, Ci = !0, de = !1, Kt = {}, Gt = null; + const ts = L({}, ["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"]); + let es = null; + const is = L({}, ["audio", "video", "img", "source", "image", "track"]); let wi = null; - const is = L({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), He = "http://www.w3.org/1998/Math/MathML", qe = "http://www.w3.org/2000/svg", gt = "http://www.w3.org/1999/xhtml"; + const ns = L({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), He = "http://www.w3.org/1998/Math/MathML", qe = "http://www.w3.org/2000/svg", gt = "http://www.w3.org/1999/xhtml"; let Jt = gt, Ti = !1, ki = null; - const za = L({}, [He, qe, gt], Wi); + const Ka = L({}, [He, qe, gt], Wi); let $e = L({}, ["mi", "mo", "mn", "ms", "mtext"]), Ue = L({}, ["annotation-xml"]); - const Ka = L({}, ["title", "style", "font", "a", "script"]); + const Ga = L({}, ["title", "style", "font", "a", "script"]); let ce = null; - const Ga = ["application/xhtml+xml", "text/html"]; + const Ja = ["application/xhtml+xml", "text/html"]; let W = null, Yt = null; - const Ja = i.createElement("form"), ns = function(d) { + const Ya = i.createElement("form"), ss = function(d) { return d instanceof RegExp || d instanceof Function; }, Ii = function() { let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; if (!Yt || Yt !== d) { - if (d && typeof d == "object" || (d = {}), d = ft(d), ce = Ga.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? "text/html" : d.PARSER_MEDIA_TYPE, W = ce === "application/xhtml+xml" ? Wi : si, M = lt(d, "ALLOWED_TAGS") ? L({}, d.ALLOWED_TAGS, W) : H, D = lt(d, "ALLOWED_ATTR") ? L({}, d.ALLOWED_ATTR, W) : Kn, ki = lt(d, "ALLOWED_NAMESPACES") ? L({}, d.ALLOWED_NAMESPACES, Wi) : za, wi = lt(d, "ADD_URI_SAFE_ATTR") ? L(ft(is), d.ADD_URI_SAFE_ATTR, W) : is, ts = lt(d, "ADD_DATA_URI_TAGS") ? L(ft(es), d.ADD_DATA_URI_TAGS, W) : es, Gt = lt(d, "FORBID_CONTENTS") ? L({}, d.FORBID_CONTENTS, W) : Zn, le = lt(d, "FORBID_TAGS") ? L({}, d.FORBID_TAGS, W) : ft({}), Ei = lt(d, "FORBID_ATTR") ? L({}, d.FORBID_ATTR, W) : ft({}), Kt = !!lt(d, "USE_PROFILES") && d.USE_PROFILES, Gn = d.ALLOW_ARIA_ATTR !== !1, xi = d.ALLOW_DATA_ATTR !== !1, Jn = d.ALLOW_UNKNOWN_PROTOCOLS || !1, Yn = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Wt = d.SAFE_FOR_TEMPLATES || !1, Ne = d.SAFE_FOR_XML !== !1, kt = d.WHOLE_DOCUMENT || !1, zt = d.RETURN_DOM || !1, Pe = d.RETURN_DOM_FRAGMENT || !1, Fe = d.RETURN_TRUSTED_TYPE || !1, Li = d.FORCE_BODY || !1, Xn = d.SANITIZE_DOM !== !1, Qn = d.SANITIZE_NAMED_PROPS || !1, Ci = d.KEEP_CONTENT !== !1, de = d.IN_PLACE || !1, oe = d.ALLOWED_URI_REGEXP || da, Jt = d.NAMESPACE || gt, $e = d.MATHML_TEXT_INTEGRATION_POINTS || $e, Ue = d.HTML_INTEGRATION_POINTS || Ue, N = d.CUSTOM_ELEMENT_HANDLING || {}, d.CUSTOM_ELEMENT_HANDLING && ns(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && ns(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Wt && (xi = !1), Pe && (zt = !0), Kt && (M = L({}, Is), D = [], Kt.html === !0 && (L(M, ks), L(D, Rs)), Kt.svg === !0 && (L(M, Ki), L(D, Yi), L(D, Ke)), Kt.svgFilters === !0 && (L(M, Gi), L(D, Yi), L(D, Ke)), Kt.mathMl === !0 && (L(M, Ji), L(D, Ds), L(D, Ke))), d.ADD_TAGS && (M === H && (M = ft(M)), L(M, d.ADD_TAGS, W)), d.ADD_ATTR && (D === Kn && (D = ft(D)), L(D, d.ADD_ATTR, W)), d.ADD_URI_SAFE_ATTR && L(wi, d.ADD_URI_SAFE_ATTR, W), d.FORBID_CONTENTS && (Gt === Zn && (Gt = ft(Gt)), L(Gt, d.FORBID_CONTENTS, W)), Ci && (M["#text"] = !0), kt && L(M, ["html", "head", "body"]), M.table && (L(M, ["tbody"]), delete le.tbody), d.TRUSTED_TYPES_POLICY) { + if (d && typeof d == "object" || (d = {}), d = ft(d), ce = Ja.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? "text/html" : d.PARSER_MEDIA_TYPE, W = ce === "application/xhtml+xml" ? Wi : si, M = lt(d, "ALLOWED_TAGS") ? L({}, d.ALLOWED_TAGS, W) : H, D = lt(d, "ALLOWED_ATTR") ? L({}, d.ALLOWED_ATTR, W) : Gn, ki = lt(d, "ALLOWED_NAMESPACES") ? L({}, d.ALLOWED_NAMESPACES, Wi) : Ka, wi = lt(d, "ADD_URI_SAFE_ATTR") ? L(ft(ns), d.ADD_URI_SAFE_ATTR, W) : ns, es = lt(d, "ADD_DATA_URI_TAGS") ? L(ft(is), d.ADD_DATA_URI_TAGS, W) : is, Gt = lt(d, "FORBID_CONTENTS") ? L({}, d.FORBID_CONTENTS, W) : ts, le = lt(d, "FORBID_TAGS") ? L({}, d.FORBID_TAGS, W) : ft({}), Ei = lt(d, "FORBID_ATTR") ? L({}, d.FORBID_ATTR, W) : ft({}), Kt = !!lt(d, "USE_PROFILES") && d.USE_PROFILES, Jn = d.ALLOW_ARIA_ATTR !== !1, xi = d.ALLOW_DATA_ATTR !== !1, Yn = d.ALLOW_UNKNOWN_PROTOCOLS || !1, Xn = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Wt = d.SAFE_FOR_TEMPLATES || !1, Ne = d.SAFE_FOR_XML !== !1, kt = d.WHOLE_DOCUMENT || !1, zt = d.RETURN_DOM || !1, Pe = d.RETURN_DOM_FRAGMENT || !1, Fe = d.RETURN_TRUSTED_TYPE || !1, Li = d.FORCE_BODY || !1, Qn = d.SANITIZE_DOM !== !1, Zn = d.SANITIZE_NAMED_PROPS || !1, Ci = d.KEEP_CONTENT !== !1, de = d.IN_PLACE || !1, oe = d.ALLOWED_URI_REGEXP || ca, Jt = d.NAMESPACE || gt, $e = d.MATHML_TEXT_INTEGRATION_POINTS || $e, Ue = d.HTML_INTEGRATION_POINTS || Ue, N = d.CUSTOM_ELEMENT_HANDLING || {}, d.CUSTOM_ELEMENT_HANDLING && ss(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && ss(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Wt && (xi = !1), Pe && (zt = !0), Kt && (M = L({}, Rs), D = [], Kt.html === !0 && (L(M, Is), L(D, Ds)), Kt.svg === !0 && (L(M, Ki), L(D, Yi), L(D, Ke)), Kt.svgFilters === !0 && (L(M, Gi), L(D, Yi), L(D, Ke)), Kt.mathMl === !0 && (L(M, Ji), L(D, Os), L(D, Ke))), d.ADD_TAGS && (M === H && (M = ft(M)), L(M, d.ADD_TAGS, W)), d.ADD_ATTR && (D === Gn && (D = ft(D)), L(D, d.ADD_ATTR, W)), d.ADD_URI_SAFE_ATTR && L(wi, d.ADD_URI_SAFE_ATTR, W), d.FORBID_CONTENTS && (Gt === ts && (Gt = ft(Gt)), L(Gt, d.FORBID_CONTENTS, W)), Ci && (M["#text"] = !0), kt && L(M, ["html", "head", "body"]), M.table && (L(M, ["tbody"]), delete le.tbody), d.TRUSTED_TYPES_POLICY) { if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function") throw fe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw fe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); S = d.TRUSTED_TYPES_POLICY, E = S.createHTML(""); @@ -836,7 +836,7 @@ var Ie = function s() { }(b, r)), S !== null && typeof E == "string" && (E = S.createHTML("")); Q && Q(d), Yt = d; } - }, ss = L({}, [...Ki, ...Gi, ...Ro]), rs = L({}, [...Ji, ...Do]), ht = function(d) { + }, rs = L({}, [...Ki, ...Gi, ...Do]), as = L({}, [...Ji, ...Oo]), ht = function(d) { ge(e.removed, { element: d }); try { _(d).removeChild(d); @@ -857,7 +857,7 @@ var Ie = function s() { f.setAttribute(d, ""); } catch { } - }, as = function(d) { + }, os = function(d) { let f = null, p = null; if (Li) d = "