function t(t){return String(parseFloat(t)).length===String(t).length}function n(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(t){return parseFloat(t)}function e(t){return(e,i)=>{const a=n(e);if(a===i)return e;let o=r(e);"px"!==a&&("em"===a||"rem"===a)&&(o=r(e)*r(t));let s=o;if("px"!==i)if("em"===i)s=o/r(t);else{if("rem"!==i)return e;s=o/r(t)}return parseFloat(s.toFixed(5))+i}}function i({size:t,grid:n}){const r=t-t%n,e=r+n;return t-r<e-t?r:e}function a({lineHeight:t,pixels:n,htmlFontSize:r}){return n/(t*r)}function o({cssProperty:t,min:n,max:r,unit:e="rem",breakpoints:i=[600,900,1200],transform:a=null}){const o={[t]:`${n}${e}`},s=(r-n)/i[i.length-1];return i.forEach((r=>{let i=n+s*r;null!==a&&(i=a(i)),o[`@media (min-width:${r}px)`]={[t]:`${Math.round(1e4*i)/1e4}${e}`}})),o}export{i as a,e as c,a as f,n as g,t as i,o as r,r as t};