protected static function encode(string $component, string $excluded): string
    {
        return preg_replace_callback(static::encodingRegex($excluded), function (array $matches) {
            return rawurlencode($matches[0]);
        }, $component);
    }