"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../color/index.mjs.js"),t=require("../utils/color-regex.mjs.js"),s=require("../utils/float-regex.mjs.js"),r=require("../utils/sanitize.mjs.js");const o="number",n="color",u="var",l="var(",a="${}",i=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function c(t){const s=t.toString(),r=[],c={color:[],number:[],var:[]},p=[];let m=0;const f=s.replace(i,(t=>(e.color.test(t)?(c.color.push(m),p.push(n),r.push(e.color.parse(t))):t.startsWith(l)?(c.var.push(m),p.push(u),r.push(t)):(c.number.push(m),p.push(o),r.push(parseFloat(t))),++m,a))).split(a);return{values:r,split:f,indexes:c,types:p}}function p(t){let{split:s,types:u}=t;const l=s.length;return t=>{let a="";for(let i=0;i<l;i++)if(a+=s[i],void 0!==t[i]){const s=u[i];a+=s===o?r.sanitize(t[i]):s===n?e.color.transform(t[i]):t[i]}return a}}const m=(t,s)=>{return"number"==typeof t?s?.trim().endsWith("/")?t:0:"number"==typeof(r=t)?0:e.color.test(r)?e.color.getAnimatableNone(r):r;var r};const f={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(s.floatRegex)?.length||0)+(e.match(t.colorRegex)?.length||0)>0},parse:function(e){return c(e).values},createTransformer:function(e){return p(c(e))},getAnimatableNone:function(e){const t=c(e);return p(t)(t.values.map(((e,s)=>m(e,t.split[s]))))}};exports.analyseComplexValue=c,exports.complex=f;
//# sourceMappingURL=index.mjs.js.map
