<td class="{{ class }}">
    {% set flag = fields.core.country is defined and fields.core.country.value is not empty ? assetGetCountryFlag(fields.core.country.value) : '' %}
    {% if flag is not empty %}
        <img src="{{ flag }}" style="max-height: 24px;" class="mr-sm" />
    {% endif %}

    {% set location = [] %}
    {% if fields.core.city is defined %}
        {% set location = location|merge([fields.core.city.value]) %}
    {% endif %}
    {% if fields.core.state is defined %}
        {% set location = location|merge([fields.core.state.value]) %}
    {% elseif fields.core.country is defined %}
        {% set location = location|merge([fields.core.country.value]) %}
    {% endif %}
    {{ location|filter(v => v is not empty)|join(', ')|purify }}
    <div class="clearfix"></div>
</td>

