function findPattern(parts, propertyName) {
    var partsLength = parts.length,
        tokens = [],
        indexes = [];
    var numbers = void 0;
    // First tokenise the strings - these have all values, we will pull
    // numbers later.
    for (var part = 0; part < partsLength; part++) {
        if (isString(parts[part])) {
            if (parts[part] === "") {
                tokens[part] = [""];
            } else {
                tokens[part] = cloneArray(parts[part].match(rxToken));
            }
            indexes[part] = 0;
            // If it matches more than one thing then we've got a number.
            numbers = numbers || tokens[part].length > 1;
            //console.log(`tokens:`, parts[part], tokens[part])
        } else {
            // We have an incomplete lineup, it will get tried again later...
            return;
        }
    }
    var sequence = [],
        pattern = sequence.pattern = [],
        addString = function addString(text) {
        if (isString(pattern[pattern.length - 1])) {
            pattern[pattern.length - 1] += text;
        } else if (text) {
            pattern.push(text);
            for (var _part = 0; _part < partsLength; _part++) {
                sequence[_part].push(null);
            }
        }
    },
        returnStringType = function returnStringType() {
        if (numbers || pattern.length > 1) {
            //console.error(`Velocity: Trying to pattern match mis-matched strings "${propertyName}":`, parts);
            return;
        }
        var isDisplay = propertyName === "display",
            isVisibility = propertyName === "visibility";
        for (var _part2 = 0; _part2 < partsLength; _part2++) {
            var value = parts[_part2];
            sequence[_part2][0] = value;
            // Don't care about duration...
            sequence[_part2].easing = validateEasing(isDisplay && value === "none" || isVisibility && value === "hidden" || !isDisplay && !isVisibility ? "at-end" : "at-start", 400);
        }
        pattern[0] = false;
        return sequence;
    };
    var more = true;
    for (var _part3 = 0; _part3 < partsLength; _part3++) {
        sequence[_part3] = [];
    }
    while (more) {
        var bits = [],
            units = [];
        var text = void 0,
            isUnitless = false,
            hasNumbers = false;
        for (var _part4 = 0; _part4 < partsLength; _part4++) {
            var index = indexes[_part4]++,
                token = tokens[_part4][index];
            if (token) {
                var num = token.match(rxNumber); // [ignore, change, number, unit]
                if (num) {
                    // It's a number, possibly with a += change and unit.
                    if (text) {
                        return returnStringType();
                    }
                    var digits = parseFloat(num[2]),
                        unit = num[3],
                        change = num[1] ? num[1][0] + unit : undefined,
                        changeOrUnit = change || unit;
                    if (digits && !units.includes(changeOrUnit)) {
                        // Will be an empty string at the least.
                        units.push(changeOrUnit);
                    }
                    if (!unit) {
                        if (digits) {
                            hasNumbers = true;
                        } else {
                            isUnitless = true;
                        }
                    }
                    bits[_part4] = change ? [digits, changeOrUnit, true] : [digits, changeOrUnit];
                } else if (bits.length) {
                    return returnStringType();
                } else {
                    // It's a string.
                    if (!text) {
                        text = token;
                    } else if (text !== token) {
                        return returnStringType();
                    }
                }
            } else if (!_part4) {
                for (; _part4 < partsLength; _part4++) {
                    var index2 = indexes[_part4]++;
                    if (tokens[_part4][index2]) {
                        return returnStringType();
                    }
                }
                // IMPORTANT: This is the exit point.
                more = false;
                break;
            } else {
                // Different
                return;
            }
        }
        if (text) {
            addString(text);
        } else if (units.length) {
            if (units.length === 2 && isUnitless && !hasNumbers) {
                // If we only have two units, and one is empty, and it's only empty on "0", then treat us as having one unit
                units.splice(units[0] ? 1 : 0, 1);
            }
            if (units.length === 1) {
                // All the same units, so append number then unit.
                var _unit = units[0],
                    firstLetter = _unit[0];
                switch (firstLetter) {
                    case "+":
                    case "-":
                    case "*":
                    case "/":
                        if (propertyName) {
                            console.error("Velocity: The first property must not contain a relative function \"" + propertyName + "\":", parts);
                        }
                        return;
                }
                pattern.push(false);
                for (var _part5 = 0; _part5 < partsLength; _part5++) {
                    sequence[_part5].push(bits[_part5][0]);
                }
                addString(_unit);
            } else {
                // Multiple units, so must be inside a calc.
                addString("calc(");
                var patternCalc = pattern.length - 1; // Store the beginning of our calc.
                for (var i = 0; i < units.length; i++) {
                    var _unit2 = units[i],
                        _firstLetter = _unit2[0],
                        isComplex = _firstLetter === "*" || _firstLetter === "/",
                        isMaths = isComplex || _firstLetter === "+" || _firstLetter === "-";
                    if (isComplex) {
                        // TODO: Not sure this should be done automatically!
                        pattern[patternCalc] += "(";
                        addString(")");
                    }
                    if (i) {
                        addString(" " + (isMaths ? _firstLetter : "+") + " ");
                    }
                    pattern.push(false);
                    for (var _part6 = 0; _part6 < partsLength; _part6++) {
                        var bit = bits[_part6],
                            value = bit[1] === _unit2 ? bit[0] : bit.length === 3 ? sequence[_part6 - 1][sequence[_part6 - 1].length - 1] : isComplex ? 1 : 0;
                        sequence[_part6].push(value);
                    }
                    addString(isMaths ? _unit2.substring(1) : _unit2);
                }
                addString(")");
            }
        }
    }
    // We've got here, so a valid sequence - now check and fix RGB rounding
    // and calc() nesting...
    // TODO: Nested calc(a + calc(b + c)) -> calc(a + (b + c))
    for (var _i = 0, inRGB = 0; _i < pattern.length; _i++) {
        var _text = pattern[_i];
        if (isString(_text)) {
            if (inRGB && _text.indexOf(",") >= 0) {
                inRGB++;
            } else if (_text.indexOf("rgb") >= 0) {
                inRGB = 1;
            }
        } else if (inRGB) {
            if (inRGB < 4) {
                pattern[_i] = true;
            } else {
                inRGB = 0;
            }
        }
    }
    return sequence;
}
Find a pattern between multiple strings, return a VelocitySequence with
the pattern and the tokenised values.

If number then animate.
If a string then must match.
If units then convert between them by wrapping in a calc().
- If already in a calc then nest another layer.
If in an rgba() then the first three numbers are rounded.