<commit_before>const Cookies        = require('js-cookie');
const BinarySocket   = require('./socket');
const Client         = require('../base/client');
const isEuCountry    = require('../common/country_base').isEuCountry;
const getElementById = require('../../_common/common_functions').getElementById;
const LocalStore     = require('../../_common/storage').LocalStore;
const State          = require('../../_common/storage').State;

const Footer = (() => {
    const onLoad = () => {
        BinarySocket.wait('website_status', 'authorize', 'landing_company').then(() => {
            // show CFD warning to logged in maltainvest clients or
            // logged in virtual clients with maltainvest financial landing company or
            // logged out clients with EU IP address
            if (Client.isLoggedIn()) {
                const landing_company_shortcode = Client.get('landing_company_shortcode');
                showWarning((landing_company_shortcode === 'maltainvest' ||
                    (Client.get('is_virtual') && State.getResponse('landing_company.financial_company.shortcode') === 'maltainvest')));
                setVisibilityAgeRestrictionSign(/iom|maltainvest/.test(landing_company_shortcode));
            } else {
                const is_eu_country = isEuCountry();
                showWarning(is_eu_country);
                setVisibilityAgeRestrictionSign(is_eu_country);
            }
        });
    };

    const showWarning = (should_show_warning) => {
        $('#footer-regulatory .eu-only').setVisibility(should_show_warning);<commit_msg>show +18 for MLT and hide for MF<commit_after>const Cookies        = require('js-cookie');
const BinarySocket   = require('./socket');
const Client         = require('../base/client');
const isEuCountry    = require('../common/country_base').isEuCountry;
const getElementById = require('../../_common/common_functions').getElementById;
const LocalStore     = require('../../_common/storage').LocalStore;
const State          = require('../../_common/storage').State;

const Footer = (() => {
    const onLoad = () => {
        BinarySocket.wait('website_status', 'authorize', 'landing_company').then(() => {
            // show CFD warning to logged in maltainvest clients or
            // logged in virtual clients with maltainvest financial landing company or
            // logged out clients with EU IP address
            if (Client.isLoggedIn()) {
                const landing_company_shortcode = Client.get('landing_company_shortcode');
                showWarning((landing_company_shortcode === 'maltainvest' ||
                    (Client.get('is_virtual') && State.getResponse('landing_company.financial_company.shortcode') === 'maltainvest')));
                setVisibilityAgeRestrictionSign(/^(malta|iom)$/.test(landing_company_shortcode));
            } else {
                const is_eu_country = isEuCountry();
                showWarning(is_eu_country);
                setVisibilityAgeRestrictionSign(is_eu_country);
            }
        });
    };

    const showWarning = (should_show_warning) => {
        $('#footer-regulatory .eu-only').setVisibility(should_show_warning);
{'fraction_non_alphanumeric': 0.13360578434454573, 'fraction_numerical': 0.0006287331027978623, 'mean_word_length': 2.7, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2211350', 'n_tokens_mistral': 859, 'n_tokens_neox': 813, 'n_words': 158}