1var s="safely-set-inner-html",a="sanitized-code-",d="no-content",n=class{constructor(){this.setHTML=()=>{let i=new DOMParser().parseFromString(this.nodeToSanitize,"text/html").body;this.appendChildrenToParent(i)};this.appendChildrenToParent=e=>{let r=Array.from(e.childNodes);this.removeChildElements();for(let i of r)this.parentDOMElement.appendChild(i)};this.setText=()=>{if(this.parentDOMElement){let e=document.createTextNode(this.nodeToSanitize);this.removeChildElements(),this.parentDOMElement.appendChild(e)}};this.removeChildElements=()=>{for(;this.parentDOMElement.firstChild;)this.parentDOMElement.removeChild(this.parentDOMElement.firstChild)};this.isHTML=()=>{let e=/<[^>]+>/;return this.nodeToSanitize.match(e)};this.mutationCallback=()=>{this.parentDOMElement=document.querySelector(`[${s}='${this.identifier}']`),this.parentDOMElement&&(this.isHTML()?this.setHTML():this.setText()),this.observer.disconnect()};this.startObserver=()=>{typeof MutationObserver=="undefined"||typeof document=="undefined"||(this.observer=new MutationObserver(this.mutationCallback),this.observer.observe(document.body,{attributeFilter:[s],childList:!0,subtree:!0}))};this.sanitizeHTML=e=>(this.nodeToSanitize=e.toString(),this.startObserver(),this.identifier);this.nodeToSanitize="",this.observer={},this.parentDOMElement={},this.firstLoaded=!0,this.identifier=a+Math.ceil(Math.random()*1e6)}},h=t=>t?new n().sanitizeHTML(l(t)):d,l=t=>{if(typeof t=="string"){let e=/&#(\d+);/;return t.replace(e,(i,o)=>String.fromCharCode(Number(o)))}return t},c=h;export{c as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.