",""].join("\n"),n=new Blob([t],{type:"text/html;charset=UTF-8"});return URL.createObjectURL(n)});A.exports=class{static execute(A){return new Promise(e=>{const t=o(),n=A=>{var i,r,o;(i=A,r=t,o=n,new Promise(A=>{if(!i.data.payload)return;if(i.data.payload.id!==r.dataset.id)return;const e=i.data.payload;window.removeEventListener("message",o);try{const A=r.src;URL.revokeObjectURL(A)}catch(A){console.warn("failed to revoke url of iframe sandboxed eval")}r.remove(),A(e)})).then(A=>{e({success:A.success,value:A.value})})};window.addEventListener("message",n),t.src=s(A,t)})}}},function(A,e,t){(function(e){A.exports=class{bufferToArray(A,e){A=new DataView(A);const t=[],n="function"==typeof e?e:A=>A;for(let e=0;eA;const n=new ArrayBuffer(A.length),i=new DataView(n);return A.forEach((A,e)=>{A=t(A),i.setUint8(e,A)}),i.buffer}bufferToString(A,e,t){e||(e=" ");return this.bufferToArray(A).map("function"==typeof t?t:A=>A.toString(16)).map(A=>A.length<2?"0".concat(A):A).join(e)}}}).call(this,t(40))},function(A,e){function t(A,e,t){return(e=function(A){var e=function(A,e){if("object"!=typeof A||!A)return A;var t=A[Symbol.toPrimitive];if(void 0!==t){var n=t.call(A,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(A)}(A,"string");return"symbol"==typeof e?e:e+""}(e))in A?Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):A[e]=t,A}class n{static get skipPermissionRequest(){return!!vm&&(!!vm.runtime&&!0===vm.runtime.isProjectPermissionManagerDisabled)}static GenerateCode(A){return Array.from(new Array(A).keys()).map(()=>Math.round(9*Math.random())).join("")}static EditPromptForAcceptCheck(A){return String(A).replace(/ /gim,"").toLowerCase()}static RequestPermission(A){if(!0===n.skipPermissionRequest)return!0;if(n.disabledPermissions.includes(A))return!1;for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i{r+="▪ ".concat(A,"\n")});let o="ok";n.requiresCode.includes(A)&&(o=n.GenerateCode(6)),r+='\nType "'.concat(o,'" to allow, or type "stop" to never ask for this permission again.');const s=n.EditPromptForAcceptCheck(prompt(r,""));if("stop"==s)return n.disabledPermissions.push(A),!1;const a=s===String(o);return"limitedWebsite"==A?!!a&&(n.permissions.limitedWebsites[t[0]]=!0,!0):(n.permissions[A]=a,a)}static RequestAllPermissions(){if(!0===n.skipPermissionRequest)return!0;if(n.disabledPermissions.includes("all"))return!1;const A=[];Object.getOwnPropertyNames(n.permissions).forEach(e=>{"boolean"==typeof n.permissions[e]&&A.push(e)});let e="Give all permissions to this project?";e+="\n\nThis will allow the project to:\n",A.forEach(A=>{n.permissionDrawbacks[A].forEach(A=>{e+="▪ ".concat(A,"\n")})});const t=n.GenerateCode(8);e+='\nType "'.concat(t,'" to allow, or type "stop" to never ask for all permissions again.');const i=n.EditPromptForAcceptCheck(prompt(e,""));if("stop"==i)return n.disabledPermissions.push("all"),!1;return i===String(t)&&(Object.getOwnPropertyNames(n.permissions).forEach(A=>{"boolean"==typeof n.permissions[A]&&(n.permissions[A]=!0)}),!0)}static CanCreateURLObject(A){let e=!0;try{new URL(A)}catch(A){e=!1}return e}static IsDataUrl(A){if(!this.CanCreateURLObject(A))return!1;return"data:"===new URL(A).protocol}static IsUrlSafe(A){if(!this.CanCreateURLObject(A))return!1;if(n.IsDataUrl(A))return!0;const e=new URL(A).origin.toLowerCase();let t=!0;return(e.includes("xxx")||e.includes("adult")||e.includes(atob("c2V4"))||e.includes(atob("cG9ybg=="))||e.includes(atob("Ym9vcnU="))||e.includes(atob("aGVudGFp")))&&(t=!1),t}}t(n,"permissions",{javascript:!0,camera:!0,allWebsites:!0,cameraPictures:!1,scratchSignIn:!0,limitedWebsites:{}}),t(n,"permissionMessages",{javascript:"use custom code in JavaScript",camera:"turn on your camera",allWebsites:"display all websites",cameraPictures:"take screenshots while your camera is on",scratchSignIn:"sign in with Scratch",limitedWebsite:"display $0"}),t(n,"permissionDrawbacks",{javascript:[],camera:[],allWebsites:[],cameraPictures:["take a screenshot while your camera is visible"],scratchSignIn:[],limitedWebsite:[]}),t(n,"requiresCode",[]),t(n,"disabledPermissions",[]),A.exports=n},function(A,e){A.exports={manhattan:function(A,e){return A+e},euclidean:function(A,e){return Math.sqrt(A*A+e*e)},octile:function(A,e){var t=Math.SQRT2-1;return AA.length)return!1;for(var i=e;i=0&&a(A.charCodeAt(e));e--);return e+1},findWhiteSpaceEnd:function(A,e){for(;eA/200%1,shapeChanges:!1},fisheye:{uniformName:"u_fisheye",mask:2,converter:A=>Math.max(0,(A+100)/100),shapeChanges:!0},whirl:{uniformName:"u_whirl",mask:4,converter:A=>-A*Math.PI/180,shapeChanges:!0},pixelate:{uniformName:"u_pixelate",mask:8,converter:A=>Math.abs(A)/10,shapeChanges:!0},mosaic:{uniformName:"u_mosaic",mask:16,converter:A=>(A=Math.round((Math.abs(A)+10)/10),Math.max(1,Math.min(A,512))),shapeChanges:!0},brightness:{uniformName:"u_brightness",mask:32,converter:A=>Math.max(-100,Math.min(A,100))/100,shapeChanges:!1},ghost:{uniformName:"u_ghost",mask:64,converter:A=>1-Math.max(0,Math.min(A,100))/100,shapeChanges:!1},red:{uniformName:"u_red",mask:128,converter:A=>i(A,-100,100)/100*4+1,shapeChanges:!1},green:{uniformName:"u_green",mask:256,converter:A=>i(A,-100,100)/100*4+1,shapeChanges:!1},blue:{uniformName:"u_blue",mask:512,converter:A=>i(A,-100,100)/100*4+1,shapeChanges:!1},opaque:{uniformName:"u_opaque",mask:1024,converter:A=>i(Math.ceil(A),1,100),shapeChanges:!1}},r.EFFECTS=Object.keys(r.EFFECT_INFO),r.DRAW_MODE={default:"default",straightAlpha:"straightAlpha",silhouette:"silhouette",colorMask:"colorMask",line:"line",background:"background"},A.exports=r},function(A,e){var t,n,i=A.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(A){if(t===setTimeout)return setTimeout(A,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch(e){try{return t.call(null,A,0)}catch(e){return t.call(this,A,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(A){t=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(A){n=o}}();var a,c=[],g=!1,u=-1;function l(){g&&a&&(g=!1,a.length?c=a.concat(c):u=-1,c.length&&B())}function B(){if(!g){var A=s(l);g=!0;for(var e=c.length;e;){for(a=c,c=[];++u1)for(var t=1;t&'"]/g,A=>{switch(A){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}})}},function(A,e){A.exports=function(A,e){let t="";for(const A in e){let n=e[A].value;"CURRENTMENU"===A&&(n=n.toLowerCase()),t+="_".concat(n)}return"".concat(A).concat(t)}},function(A,e,t){const n=t(6),i=[];class r{constructor(A){this.isLoop=!1,this.warpMode=A,this.justReported=null,this.reporting="",this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null}reset(){return this.isLoop=!1,this.warpMode=!1,this.justReported=null,this.reported=null,this.waitingReporter=null,this.params=null,this.executionContext=null,this}reuse(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.warpMode;return this.reset(),this.warpMode=Boolean(A),this}static create(A){const e=i.pop();return void 0!==e?(e.warpMode=Boolean(A),e):new r(A)}static release(A){void 0!==A&&i.push(A.reset())}}class o{constructor(A){this.topBlock=A,this.stack=[],this.stackFrames=[],this.status=0,this.isKilled=!1,this.target=null,this.blockContainer=null,this.requestScriptGlowInFrame=!1,this.blockGlowInFrame=null,this.warpTimer=null,this.justReported=null,this.triedToCompile=!1,this.isCompiled=!1,this.timer=null,this.generator=null,this.procedures=null}static get STATUS_RUNNING(){return 0}static get STATUS_PROMISE_WAIT(){return 1}static get STATUS_YIELD(){return 2}static get STATUS_YIELD_TICK(){return 3}static get STATUS_DONE(){return 4}static getIdFromTargetAndBlock(A,e){return"".concat(A.id,"&").concat(e)}getId(){return o.getIdFromTargetAndBlock(this.target,this.topBlock)}pushStack(A){if(this.stack.push(A),this.stack.length>this.stackFrames.length){const A=this.stackFrames[this.stackFrames.length-1];this.stackFrames.push(r.create(void 0!==A&&A.warpMode))}}reuseStackForNextBlock(A){this.stack[this.stack.length-1]=A,this.stackFrames[this.stackFrames.length-1].reuse()}popStack(){return r.release(this.stackFrames.pop()),this.stack.pop()}stopThisScript(){let A=this.peekStack();for(;null!==A;){const e=this.target.blocks.getBlock(A);if(void 0!==e&&"procedures_call"===e.opcode)break;this.popStack(),A=this.peekStack()}0===this.stack.length&&(this.requestScriptGlowInFrame=!1,this.status=o.STATUS_DONE)}peekStack(){return this.stack.length>0?this.stack[this.stack.length-1]:null}peekStackFrame(){return this.stackFrames.length>0?this.stackFrames[this.stackFrames.length-1]:null}peekParentStackFrame(){return this.stackFrames.length>1?this.stackFrames[this.stackFrames.length-2]:null}pushReportedValue(A){this.justReported=void 0===A?null:A}initParams(){const A=this.peekStackFrame();null===A.params&&(A.params={})}pushParam(A,e){this.peekStackFrame().params[A]=e}getParam(A){for(let e=this.stackFrames.length-1;e>=0;e--){const t=this.stackFrames[e];if(null!==t.params)return t.params.hasOwnProperty(A)?t.params[A]:null}return null}getAllparams(){return this.peekStackFrame().params}atStackTop(){return this.peekStack()===this.topBlock}goToNextBlock(){const A=this.target.blocks.getNextBlock(this.peekStack());this.reuseStackForNextBlock(A)}isRecursiveCall(A){let e=5;for(let t=this.stack.length-1-1;t>=0;t--){const n=this.target.blocks.getBlock(this.stack[t]);if("procedures_call"===n.opcode&&n.mutation.proccode===A)return!0;if(--e<0)return!1}return!1}tryCompile(){if(!this.blockContainer)return;const A=t(255);this.triedToCompile=!0;const e=this.topBlock,i=this.blockContainer.getBlock(e)?this.blockContainer:this.target.runtime.flyoutBlocks,r=i.getCachedCompileResult(e);if(r&&!r.success)return;let o;if(r)o=r.value;else try{o=A(this),i.cacheCompileResult(e,o)}catch(A){return n.error("cannot compile script",this.target.getName(),A),i.cacheCompileError(e,A),void this.target.runtime.visualReport(this.peekStack(),"Error: "+A)}this.procedures={};for(const A of Object.keys(o.procedures))this.procedures[A]=o.procedures[A](this);this.generator=o.startingFunction(this)(),this.blockContainer.forceNoGlow||(this.blockGlowInFrame=this.topBlock,this.requestScriptGlowInFrame=!0),this.isCompiled=!0}}A.exports=o},function(A,e,t){A.exports=t(352)},function(A,e,t){var n=t(45),i=t(23),r=t(36);t(11);function o(A){A=A||{},this.heuristic=A.heuristic||r.manhattan,this.trackJumpRecursion=A.trackJumpRecursion||!1}o.prototype.findPath=function(A,e,t,r,o){var s,a=this.openList=new n((function(A,e){return A.f-e.f})),c=this.startNode=o.getNodeAt(A,e),g=this.endNode=o.getNodeAt(t,r);for(this.grid=o,c.g=0,c.f=0,a.push(c),c.opened=!0;!a.empty();){if((s=a.pop()).closed=!0,s===g)return i.expandPath(i.backtrace(g));this._identifySuccessors(s)}return[]},o.prototype._identifySuccessors=function(A){var e,t,n,i,o,s,a,c,g,u,l=this.grid,B=this.heuristic,C=this.openList,h=this.endNode.x,I=this.endNode.y,d=A.x,w=A.y,E=Math.abs;Math.max;for(i=0,o=(e=this._findNeighbors(A)).length;iA.length)&&(e=A.length);for(var t=0,n=new Array(e);t1?t-1:0),i=1;i/gm),V=l(/\${[\w\W]*}/gm),O=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),Z=l(/^aria-[\-\w]+$/),K=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),X=l(/^(?:\w+script|data):/i),_=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=l(/^html$/i),$=l(/^[a-z][.\w]*(-[.\w]+)+$/i),AA=function(){return"undefined"==typeof window?null:window},eA=function(e,t){if("object"!==A(e)||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(A){return A},createScriptURL:function(A){return A}})}catch(A){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AA(),n=function(A){return e(A)};if(n.version="2.5.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,c=t.Node,g=t.Element,l=t.NodeFilter,B=t.NamedNodeMap,C=void 0===B?t.NamedNodeMap||t.MozNamedAttrMap:B,h=t.HTMLFormElement,I=t.DOMParser,d=t.trustedTypes,b=g.prototype,tA=U(b,"cloneNode"),nA=U(b,"nextSibling"),iA=U(b,"childNodes"),rA=U(b,"parentNode");if("function"==typeof a){var oA=o.createElement("template");oA.content&&oA.content.ownerDocument&&(o=oA.content.ownerDocument)}var sA=eA(d,r),aA=sA?sA.createHTML(""):"",cA=o,gA=cA.implementation,uA=cA.createNodeIterator,lA=cA.createDocumentFragment,BA=cA.getElementsByTagName,CA=r.importNode,hA={};try{hA=G(o).documentMode?o.documentMode:{}}catch(A){}var IA={};n.isSupported="function"==typeof rA&&gA&&void 0!==gA.createHTMLDocument&&9!==hA;var dA,wA,EA=L,pA=P,QA=V,mA=O,fA=Z,MA=X,DA=_,YA=$,FA=K,yA=null,bA=N({},[].concat(i(v),i(x),i(R),i(T),i(H))),NA=null,GA=N({},[].concat(i(J),i(j),i(z),i(W))),UA=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}})),vA=null,xA=null,RA=!0,SA=!0,TA=!1,kA=!0,HA=!1,JA=!0,jA=!1,zA=!1,WA=!1,LA=!1,PA=!1,VA=!1,OA=!0,ZA=!1,KA="user-content-",XA=!0,_A=!1,qA={},$A=null,Ae=N({},["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"]),ee=null,te=N({},["audio","video","img","source","image","track"]),ne=null,ie=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",se="http://www.w3.org/1999/xhtml",ae=se,ce=!1,ge=null,ue=N({},[re,oe,se],m),le=["application/xhtml+xml","text/html"],Be="text/html",Ce=null,he=o.createElement("form"),Ie=function(A){return A instanceof RegExp||A instanceof Function},de=function(e){Ce&&Ce===e||(e&&"object"===A(e)||(e={}),e=G(e),dA=dA=-1===le.indexOf(e.PARSER_MEDIA_TYPE)?Be:e.PARSER_MEDIA_TYPE,wA="application/xhtml+xml"===dA?m:Q,yA="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,wA):bA,NA="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,wA):GA,ge="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,m):ue,ne="ADD_URI_SAFE_ATTR"in e?N(G(ie),e.ADD_URI_SAFE_ATTR,wA):ie,ee="ADD_DATA_URI_TAGS"in e?N(G(te),e.ADD_DATA_URI_TAGS,wA):te,$A="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,wA):Ae,vA="FORBID_TAGS"in e?N({},e.FORBID_TAGS,wA):{},xA="FORBID_ATTR"in e?N({},e.FORBID_ATTR,wA):{},qA="USE_PROFILES"in e&&e.USE_PROFILES,RA=!1!==e.ALLOW_ARIA_ATTR,SA=!1!==e.ALLOW_DATA_ATTR,TA=e.ALLOW_UNKNOWN_PROTOCOLS||!1,kA=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,HA=e.SAFE_FOR_TEMPLATES||!1,JA=!1!==e.SAFE_FOR_XML,jA=e.WHOLE_DOCUMENT||!1,LA=e.RETURN_DOM||!1,PA=e.RETURN_DOM_FRAGMENT||!1,VA=e.RETURN_TRUSTED_TYPE||!1,WA=e.FORCE_BODY||!1,OA=!1!==e.SANITIZE_DOM,ZA=e.SANITIZE_NAMED_PROPS||!1,XA=!1!==e.KEEP_CONTENT,_A=e.IN_PLACE||!1,FA=e.ALLOWED_URI_REGEXP||FA,ae=e.NAMESPACE||se,UA=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(UA.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(UA.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(UA.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),HA&&(SA=!1),PA&&(LA=!0),qA&&(yA=N({},i(H)),NA=[],!0===qA.html&&(N(yA,v),N(NA,J)),!0===qA.svg&&(N(yA,x),N(NA,j),N(NA,W)),!0===qA.svgFilters&&(N(yA,R),N(NA,j),N(NA,W)),!0===qA.mathMl&&(N(yA,T),N(NA,z),N(NA,W))),e.ADD_TAGS&&(yA===bA&&(yA=G(yA)),N(yA,e.ADD_TAGS,wA)),e.ADD_ATTR&&(NA===GA&&(NA=G(NA)),N(NA,e.ADD_ATTR,wA)),e.ADD_URI_SAFE_ATTR&&N(ne,e.ADD_URI_SAFE_ATTR,wA),e.FORBID_CONTENTS&&($A===Ae&&($A=G($A)),N($A,e.FORBID_CONTENTS,wA)),XA&&(yA["#text"]=!0),jA&&N(yA,["html","head","body"]),yA.table&&(N(yA,["tbody"]),delete vA.tbody),u&&u(e),Ce=e)},we=N({},["mi","mo","mn","ms","mtext"]),Ee=N({},["annotation-xml"]),pe=N({},["title","style","font","a","script"]),Qe=N({},x);N(Qe,R),N(Qe,S);var me=N({},T);N(me,k);var fe=function(A){var e=rA(A);e&&e.tagName||(e={namespaceURI:ae,tagName:"template"});var t=Q(A.tagName),n=Q(e.tagName);return!!ge[A.namespaceURI]&&(A.namespaceURI===oe?e.namespaceURI===se?"svg"===t:e.namespaceURI===re?"svg"===t&&("annotation-xml"===n||we[n]):Boolean(Qe[t]):A.namespaceURI===re?e.namespaceURI===se?"math"===t:e.namespaceURI===oe?"math"===t&&Ee[n]:Boolean(me[t]):A.namespaceURI===se?!(e.namespaceURI===oe&&!Ee[n])&&!(e.namespaceURI===re&&!we[n])&&!me[t]&&(pe[t]||!Qe[t]):!("application/xhtml+xml"!==dA||!ge[A.namespaceURI]))},Me=function(A){p(n.removed,{element:A});try{A.parentNode.removeChild(A)}catch(e){try{A.outerHTML=aA}catch(e){A.remove()}}},De=function(A,e){try{p(n.removed,{attribute:e.getAttributeNode(A),from:e})}catch(A){p(n.removed,{attribute:null,from:e})}if(e.removeAttribute(A),"is"===A&&!NA[A])if(LA||PA)try{Me(e)}catch(A){}else try{e.setAttribute(A,"")}catch(A){}},Ye=function(A){var e,t;if(WA)A=""+A;else{var n=f(A,/^[\r\n\t ]+/);t=n&&n[0]}"application/xhtml+xml"===dA&&ae===se&&(A=''+A+"");var i=sA?sA.createHTML(A):A;if(ae===se)try{e=(new I).parseFromString(i,dA)}catch(A){}if(!e||!e.documentElement){e=gA.createDocument(ae,"template",null);try{e.documentElement.innerHTML=ce?aA:i}catch(A){}}var r=e.body||e.documentElement;return A&&t&&r.insertBefore(o.createTextNode(t),r.childNodes[0]||null),ae===se?BA.call(e,jA?"html":"body")[0]:jA?e.documentElement:r},Fe=function(A){return uA.call(A.ownerDocument||A,A,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null,!1)},ye=function(A){return A instanceof h&&("string"!=typeof A.nodeName||"string"!=typeof A.textContent||"function"!=typeof A.removeChild||!(A.attributes instanceof C)||"function"!=typeof A.removeAttribute||"function"!=typeof A.setAttribute||"string"!=typeof A.namespaceURI||"function"!=typeof A.insertBefore||"function"!=typeof A.hasChildNodes)},be=function(e){return"object"===A(c)?e instanceof c:e&&"object"===A(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ne=function(A,e,t){IA[A]&&w(IA[A],(function(A){A.call(n,e,t,Ce)}))},Ge=function(A){var e;if(Ne("beforeSanitizeElements",A,null),ye(A))return Me(A),!0;if(F(/[\u0080-\uFFFF]/,A.nodeName))return Me(A),!0;var t=wA(A.nodeName);if(Ne("uponSanitizeElement",A,{tagName:t,allowedTags:yA}),A.hasChildNodes()&&!be(A.firstElementChild)&&(!be(A.content)||!be(A.content.firstElementChild))&&F(/<[/\w]/g,A.innerHTML)&&F(/<[/\w]/g,A.textContent))return Me(A),!0;if("select"===t&&F(/