import "../../chunks/chunk.QU3DSPNU.js";
function resizeObserver() {
  return (proto, propertyKey, descriptor) => {
    const connectedCallback = proto.connectedCallback;
    const disconnectedCallback = proto.disconnectedCallback;
    proto.connectedCallback = function() {
      connectedCallback?.call(this);
      this.__resizeObservers = this.__resizeObservers || {};
      this.__resizeObserver_tids = this.__resizeObserver_tids || {};
      this.__resizeObservers[propertyKey] = new ResizeObserver(() => {
        this.__resizeObserver_tids[propertyKey] && clearTimeout(this.__resizeObserver_tids[propertyKey]);
        this.__resizeObserver_tids[propertyKey] = setTimeout(() => {
          descriptor.value?.call(this);
        }, 20);
      });
      this.__resizeObservers[propertyKey].observe(this);
    };
    proto.disconnectedCallback = function() {
      disconnectedCallback?.call(this);
      this.__resizeObservers[propertyKey].disconnect();
    };
  };
}
export {
  resizeObserver
};
