import{color as r}from"../color/index.js";import{number as n}from"../numbers/index.js";import{isString as e,floatRegex as t,colorRegex as o,sanitize as a}from"../utils.js";function u(e){var a=[],u=0,l=e.match(o);l&&(u=l.length,e=e.replace(o,"${c}"),a.push.apply(a,l.map(r.parse)));var i=e.match(t);return i&&(e=e.replace(t,"${n}"),a.push.apply(a,i.map(n.parse))),{values:a,numColors:u,tokenised:e}}function l(r){return u(r).values}function i(n){var e=u(n),t=e.values,o=e.numColors,l=e.tokenised,i=t.length;return function(n){for(var e=l,t=0;t<i;t++)e=e.replace(t<o?"${c}":"${n}",t<o?r.transform(n[t]):a(n[t]));return e}}var s=function(r){return"number"==typeof r?0:r};var m={test:function(r){var n,a,u,l;return isNaN(r)&&e(r)&&(null!==(a=null===(n=r.match(t))||void 0===n?void 0:n.length)&&void 0!==a?a:0)+(null!==(l=null===(u=r.match(o))||void 0===u?void 0:u.length)&&void 0!==l?l:0)>0},parse:l,createTransformer:i,getAnimatableNone:function(r){var n=l(r);return i(r)(n.map(s))}};export{m as complex};
//# sourceMappingURL=index.js.map
