/i,m)){pt(a,e);continue}Ce&&u([le,ce,se],e=>{m=h(m,e," ")});const p=tt(e.nodeName);if(vt(p,s,m)){if(!Ie||"id"!==s&&"name"!==s||(pt(a,e),m=Me+m),Q&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(p,s)){case"TrustedHTML":m=Q.createHTML(m);break;case"TrustedScriptURL":m=Q.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),f(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const o=gt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof s&&e(n.content),bt(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!yt(e)){if("function"!=typeof e.toString)throw v("toString is not a function");if("string"!=typeof(e=e.toString()))throw v("dirty is not a string, aborting")}if(!o.isSupported)return e;if(we||it(t),o.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||ve[t])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ke&&!Ce&&!Re&&-1===e.indexOf("<"))return Q&&Le?Q.createHTML(e):e;if(n=dt(e),!n)return ke?null:Le?ee:""}n&&xe&&mt(n.firstChild);const c=gt(Pe?e:n);for(;i=c.nextNode();)Et(i)||(i.content instanceof s&&_t(i.content),bt(i));if(Pe)return e;if(ke){if(De)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let f=Re?n.outerHTML:n.innerHTML;return Re&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(Y,n.ownerDocument.doctype.name)&&(f="\n"+f),Ce&&u([le,ce,se],e=>{f=h(f,e," ")}),Q&&Le?Q.createHTML(f):f},o.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),we=!0},o.clearConfig=function(){nt=null,we=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return vt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],m(ae[e],t))},o.removeHook=function(e){if(ae[e])return f(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}()}()},542652:(e,t,n)=>{var o,r,i;i=function(){function e(){for(var e=0,t={};e