define(["exports","./common/textencoding.js","./browser.js"],function(_exports,_textencoding,_browser){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var windowSize,windowSizeEventsBound,_animationEvent,_transitionEvent,supportsCaptureOption=!1;try{var opts=Object.defineProperty({},"capture",{get:function(){supportsCaptureOption=!0}});window.addEventListener("test",null,opts)}catch(e){}function addEventListenerWithOptions(target,type,handler,options){options=supportsCaptureOption?options:options.capture;target.addEventListener(type,handler,options)}function clearWindowSize(){windowSize=null}function whichAnimationEvent(){if(!_animationEvent){var t,el=document.createElement("div"),animations={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in animations)if(void 0!==el.style[t])return _animationEvent=animations[t];_animationEvent="animationend"}return _animationEvent}function supportsEventListenerOnce(){return supportsCaptureOption}function stripScriptsWithDom(s){for(var div=document.createElement("div"),scripts=(div.innerHTML=s,div.getElementsByTagName("script")),i=scripts.length;i--;)scripts[i].remove();for(var elems=div.getElementsByTagName("*"),i=0,length=elems.length;i