(function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.TextareaAutoSize={}))})(this,function(t){"use strict";class i{constructor(e){this.element=e,this.verticalBorderSize=this._styleProp("borderTopWidth")+this._styleProp("borderBottomWidth")||0,this._inputHandler=this._inputHandler.bind(this),e.addEventListener("input",this._inputHandler),this.update()}_inputHandler(e){this.update()}destroy(){this.removeEventListener("input",this._inputHandler),this.element=null}update(){const e=this._styleProp("fontSize");this.element.style.height=`${e}px`;const n=this.element.scrollHeight+this.verticalBorderSize;this.element.style.height=`${n}px`}_styleProp(e){const n=getComputedStyle(this.element,null);return parseInt(n[e])}}t.TextareaAutoSize=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=textarea-autosize.umd.cjs.map