"use strict";exports.KingdeeResizeObserver=class{constructor(e){this._resizeObserverAvailable="function"==typeof ResizeObserver,this._delayedResizeCallback=()=>{this._running||(this._running=!0,setTimeout(()=>{requestAnimationFrame(()=>{e(),this._running=!1})},16))},this._resizeObserverAvailable&&(this._resizeObserver=new ResizeObserver(this._delayedResizeCallback))}observe(e){this._requestAnimationId=requestAnimationFrame(()=>{this._resizeObserverAvailable?this._resizeObserver.observe(e):this._hasWindowResizeHandler||(window.addEventListener("resize",this._delayedResizeCallback),this._hasWindowResizeHandler=!0)})}disconnect(){this._resizeObserver&&this._resizeObserver.disconnect(),this._requestAnimationId&&cancelAnimationFrame(this._requestAnimationId),window.removeEventListener("resize",this._delayedResizeCallback),this._hasWindowResizeHandler=!1}};
