(function(e){"use strict";var t="undefined"==typeof window?null:window;"function"==typeof define&&define.amd?define(function(){return e(t)}):"undefined"!=typeof module?module.exports=e(t):t.DOMPurify=e(t)})(function e(t){"use strict";var n=function(t){return e(t)};if(n.version="0.9.0",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=r,i=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,s=t.NodeFilter,c=t.NamedNodeMap||t.MozNamedAttrMap,u=t.Text,d=t.Comment,m=t.DOMParser,p=t.XMLHttpRequest,f=t.encodeURI,h=!1,g=!1;if("function"==typeof a){var y=r.createElement("template");y.content&&y.content.ownerDocument&&(r=y.content.ownerDocument)}var v=r.implementation,T=r.createNodeIterator,b=r.getElementsByTagName,A=r.createDocumentFragment,x=o.importNode,k={};n.isSupported=void 0!==v.createHTMLDocument&&9!==r.documentMode;var S=function(e,t){for(var n=t.length;n--;)"string"==typeof t[n]&&(t[n]=t[n].toLowerCase()),e[t[n]]=!0;return e},w=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},E=null,N=S({},["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","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","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","svg","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","switch","symbol","text","textpath","title","tref","tspan","view","vkern","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","#text"]),O=null,D=S({},["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","span","srclang","start","src","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns","accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","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","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","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mode","min","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","surfacescale","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan","accent","accentunder","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","display","displaystyle","fence","frame","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","xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M=null,L=null,_=!0,C=!0,R=!1,z=!1,F=!1,H=!1,I=!1,j=!1,W=!1,q=!1,B=!1,G=!0,U=!0,P=S({},["audio","head","math","script","style","template","svg","video"]),V=S({},["audio","video","img","source","image"]),Y=S({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),K=null,X=r.createElement("form"),$=function(e){"object"!=typeof e&&(e={}),E="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):N,O="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):D,M="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},L="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},_=e.ALLOW_ARIA_ATTR!==!1,C=e.ALLOW_DATA_ATTR!==!1,R=e.ALLOW_UNKNOWN_PROTOCOLS||!1,z=e.SAFE_FOR_JQUERY||!1,F=e.SAFE_FOR_TEMPLATES||!1,H=e.WHOLE_DOCUMENT||!1,W=e.RETURN_DOM||!1,q=e.RETURN_DOM_FRAGMENT||!1,B=e.RETURN_DOM_IMPORT||!1,j=e.FORCE_BODY||!1,G=e.SANITIZE_DOM!==!1,U=e.KEEP_CONTENT!==!1,F&&(C=!1),q&&(W=!0),e.ADD_TAGS&&(E===N&&(E=w(E)),S(E,e.ADD_TAGS)),e.ADD_ATTR&&(O===D&&(O=w(O)),S(O,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(Y,e.ADD_URI_SAFE_ATTR),U&&(E["#text"]=!0),Object&&"freeze"in Object&&Object.freeze(e),K=e},J=function(e){n.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=""}},Q=function(e,t){n.removed.push({attribute:t.getAttributeNode(e),from:t}),t.removeAttribute(e)},Z=function(e){var t,n;if(j&&(e=""+e),h){try{e=f(e)}catch(e){}var r=new p;r.responseType="document",r.open("GET","data:text/html;charset=utf-8,"+e,!1),r.send(null),t=r.response}if(g)try{t=(new m).parseFromString(e,"text/html")}catch(e){}return t&&t.documentElement||(t=v.createHTMLDocument(""),n=t.body,n.parentNode.removeChild(n.parentNode.firstElementChild),n.outerHTML=e),b.call(t,H?"html":"body")[0]};n.isSupported&&(function(){var e=Z('');e.querySelector("svg")||(h=!0),e=Z(''),e.querySelector("svg img")&&(g=!0)})();var ee=function(e){return T.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,function(){return s.FILTER_ACCEPT},!1)},te=function(e){return!(e instanceof u||e instanceof d)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof c&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute)},ne=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},re=function(e){var t,r;if(de("beforeSanitizeElements",e,null),te(e))return J(e),!0;if(t=e.nodeName.toLowerCase(),de("uponSanitizeElement",e,{tagName:t,allowedTags:E}),!E[t]||M[t]){if(U&&!P[t]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return J(e),!0}return!z||e.firstElementChild||e.content&&e.content.firstElementChild||!//gm," "),e.textContent!==r&&(n.removed.push({element:e.cloneNode()}),e.textContent=r)),de("afterSanitizeElements",e,null),!1},oe=/^data-[\-\w.\u00B7-\uFFFF]/,ie=/^aria-[\-\w]+$/,ae=/^(?:(?:(?:f|ht)tps?|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,le=/^(?:\w+script|data):/i,se=/[\x00-\x20\xA0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,ce=function(e){var o,i,a,l,s,c,u,d;if(de("beforeSanitizeAttributes",e,null),c=e.attributes){for(u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O},d=c.length;d--;){if(o=c[d],i=o.name,a=o.value.trim(),l=i.toLowerCase(),u.attrName=l,u.attrValue=a,u.keepAttr=!0,de("uponSanitizeAttribute",e,u),a=u.attrValue,"name"===l&&"IMG"===e.nodeName&&c.id)s=c.id,c=Array.prototype.slice.apply(c),Q("id",e),Q(i,e),c.indexOf(s)>d&&e.setAttribute("id",s.value);else{if("INPUT"===e.nodeName&&"type"===l&&"file"===a&&(O[l]||!L[l]))continue;"id"===i&&e.setAttribute(i,""),Q(i,e)}if(u.keepAttr&&(!G||"id"!==l&&"name"!==l||!(a in t||a in r||a in X))){if(F&&(a=a.replace(/\{\{[\s\S]*|[\s\S]*\}\}/gm," "),a=a.replace(/<%[\s\S]*|[\s\S]*%>/gm," ")),C&&oe.test(l));else if(_&&ie.test(l));else{if(!O[l]||L[l])continue;if(Y[l]);else if(ae.test(a.replace(se,"")));else if("src"!==l&&"xlink:href"!==l||0!==a.indexOf("data:")||!V[e.nodeName.toLowerCase()]){if(R&&!le.test(a.replace(se,"")));else if(a)continue}else;}try{e.setAttribute(i,a),n.removed.pop()}catch(e){}}}de("afterSanitizeAttributes",e,null)}},ue=function(e){var t,n=ee(e);for(de("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)de("uponSanitizeShadowNode",t,null),re(t)||(t.content instanceof i&&ue(t.content),ce(t));de("afterSanitizeShadowDOM",e,null)},de=function(e,t,r){k[e]&&k[e].forEach(function(e){e.call(n,t,r,K)})};return n.sanitize=function(e,r){var a,s,c,u,d,m;if(e||(e=""),"string"!=typeof e&&!ne(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");e=e.toString()}if(!n.isSupported){if("object"==typeof t.toStaticHTML||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ne(e))return t.toStaticHTML(e.outerHTML)}return e}if(I||$(r),n.removed=[],e instanceof l)a=Z(""),s=a.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName?a=s:a.appendChild(s);else{if(!W&&!H&&e.indexOf("<")===-1)return e;if(a=Z(e),!a)return W?null:""}for(j&&J(a.firstChild),d=ee(a);c=d.nextNode();)3===c.nodeType&&c===u||re(c)||(c.content instanceof i&&ue(c.content),ce(c),u=c);if(W){if(q)for(m=A.call(a.ownerDocument);a.firstChild;)m.appendChild(a.firstChild);else m=a;return B&&(m=x.call(o,m,!0)),m}return H?a.outerHTML:a.innerHTML},n.setConfig=function(e){$(e),I=!0},n.clearConfig=function(){K=null,I=!1},n.addHook=function(e,t){"function"==typeof t&&(k[e]=k[e]||[],k[e].push(t))},n.removeHook=function(e){k[e]&&k[e].pop()},n.removeHooks=function(e){k[e]&&(k[e]=[])},n.removeAllHooks=function(){k={}},n}); //# sourceMappingURL=purify.min.js-vflCv0H3d.map
'),e.querySelector("svg img")&&(g=!0)})();var ee=function(e){return T.call(e.ownerDocument||e,e,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,function(){return s.FILTER_ACCEPT},!1)},te=function(e){return!(e instanceof u||e instanceof d)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof c&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute)},ne=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},re=function(e){var t,r;if(de("beforeSanitizeElements",e,null),te(e))return J(e),!0;if(t=e.nodeName.toLowerCase(),de("uponSanitizeElement",e,{tagName:t,allowedTags:E}),!E[t]||M[t]){if(U&&!P[t]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return J(e),!0}return!z||e.firstElementChild||e.content&&e.content.firstElementChild||!//gm," "),e.textContent!==r&&(n.removed.push({element:e.cloneNode()}),e.textContent=r)),de("afterSanitizeElements",e,null),!1},oe=/^data-[\-\w.\u00B7-\uFFFF]/,ie=/^aria-[\-\w]+$/,ae=/^(?:(?:(?:f|ht)tps?|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,le=/^(?:\w+script|data):/i,se=/[\x00-\x20\xA0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,ce=function(e){var o,i,a,l,s,c,u,d;if(de("beforeSanitizeAttributes",e,null),c=e.attributes){for(u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O},d=c.length;d--;){if(o=c[d],i=o.name,a=o.value.trim(),l=i.toLowerCase(),u.attrName=l,u.attrValue=a,u.keepAttr=!0,de("uponSanitizeAttribute",e,u),a=u.attrValue,"name"===l&&"IMG"===e.nodeName&&c.id)s=c.id,c=Array.prototype.slice.apply(c),Q("id",e),Q(i,e),c.indexOf(s)>d&&e.setAttribute("id",s.value);else{if("INPUT"===e.nodeName&&"type"===l&&"file"===a&&(O[l]||!L[l]))continue;"id"===i&&e.setAttribute(i,""),Q(i,e)}if(u.keepAttr&&(!G||"id"!==l&&"name"!==l||!(a in t||a in r||a in X))){if(F&&(a=a.replace(/\{\{[\s\S]*|[\s\S]*\}\}/gm," "),a=a.replace(/<%[\s\S]*|[\s\S]*%>/gm," ")),C&&oe.test(l));else if(_&&ie.test(l));else{if(!O[l]||L[l])continue;if(Y[l]);else if(ae.test(a.replace(se,"")));else if("src"!==l&&"xlink:href"!==l||0!==a.indexOf("data:")||!V[e.nodeName.toLowerCase()]){if(R&&!le.test(a.replace(se,"")));else if(a)continue}else;}try{e.setAttribute(i,a),n.removed.pop()}catch(e){}}}de("afterSanitizeAttributes",e,null)}},ue=function(e){var t,n=ee(e);for(de("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)de("uponSanitizeShadowNode",t,null),re(t)||(t.content instanceof i&&ue(t.content),ce(t));de("afterSanitizeShadowDOM",e,null)},de=function(e,t,r){k[e]&&k[e].forEach(function(e){e.call(n,t,r,K)})};return n.sanitize=function(e,r){var a,s,c,u,d,m;if(e||(e=""),"string"!=typeof e&&!ne(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");e=e.toString()}if(!n.isSupported){if("object"==typeof t.toStaticHTML||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ne(e))return t.toStaticHTML(e.outerHTML)}return e}if(I||$(r),n.removed=[],e instanceof l)a=Z(""),s=a.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName?a=s:a.appendChild(s);else{if(!W&&!H&&e.indexOf("<")===-1)return e;if(a=Z(e),!a)return W?null:""}for(j&&J(a.firstChild),d=ee(a);c=d.nextNode();)3===c.nodeType&&c===u||re(c)||(c.content instanceof i&&ue(c.content),ce(c),u=c);if(W){if(q)for(m=A.call(a.ownerDocument);a.firstChild;)m.appendChild(a.firstChild);else m=a;return B&&(m=x.call(o,m,!0)),m}return H?a.outerHTML:a.innerHTML},n.setConfig=function(e){$(e),I=!0},n.clearConfig=function(){K=null,I=!1},n.addHook=function(e,t){"function"==typeof t&&(k[e]=k[e]||[],k[e].push(t))},n.removeHook=function(e){k[e]&&k[e].pop()},n.removeHooks=function(e){k[e]&&(k[e]=[])},n.removeAllHooks=function(){k={}},n}); //# sourceMappingURL=purify.min.js-vflCv0H3d.map