const extend=(e,n)=>{for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e},fitText=(e,n,t)=>{var r=extend({minFontSize:-1/0,maxFontSize:1/0,container:e},t);const i=function(e){const t=n||1,i=function(){e.style.fontSize=Math.max(Math.min((r?.container?.clientWidth||0)/(10*t),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(i(),"ResizeObserver"in window==0){const e=import("./resize-observer.js").then((()=>{window.ResizeObserver=e.ResizeObserver,new ResizeObserver(i).observe(r.container)}))}else new ResizeObserver(i).observe(r.container)};if(e.length)for(let n=0;n<e.length;n++)i(e[n]);else i(e);return e};export{fitText as f};