<commit_before>const BinarySocket   = require('../base/socket');
const FormManager    = require('../common/form_manager');
const Login          = require('../../_common/base/login');
const getElementById = require('../../_common/common_functions').getElementById;
const localize       = require('../../_common/localize').localize;

const Signup = (() => {
    let clients_country,
        $google_btn,
        $login_btn,
        $error_msg,
        $verify_email;

    const form_id = '#signup_form';

    const onLoad = () => {
        getElementById('footer').setVisibility(0); // always hide footer in this page

        $google_btn   = $('#google-signup');
        $login_btn    = $('#login');
        $verify_email = $('#verify_email');
        $error_msg    = $('.error-msg');

        BinarySocket.wait('website_status').then((response) => {
            clients_country = response.website_status.clients_country;

            FormManager.init(form_id, [
                { selector: '#email', validations: ['req', 'email'], request_field: 'verify_email' },
                { request_field: 'type', value: 'account_opening' },
            ]);
            FormManager.handleSubmit({
                form_selector       : form_id,
                fnc_response_handler: verifyEmailHandler,
                fnc_additional_check: checkCountry,
            });
            $error_msg.addClass('center-text');

            $google_btn.on('click', (e) => {
                e.preventDefault();<commit_msg>initialize variables after initialize form validation"<commit_after>const BinarySocket   = require('../base/socket');
const FormManager    = require('../common/form_manager');
const Login          = require('../../_common/base/login');
const getElementById = require('../../_common/common_functions').getElementById;
const localize       = require('../../_common/localize').localize;

const Signup = (() => {
    let clients_country,
        $google_btn,
        $login_btn,
        $error_msg,
        $verify_email;

    const form_id = '#signup_form';

    const onLoad = () => {
        getElementById('footer').setVisibility(0); // always hide footer in this page

        BinarySocket.wait('website_status').then((response) => {
            clients_country = response.website_status.clients_country;

            FormManager.init(form_id, [
                { selector: '#email', validations: ['req', 'email'], request_field: 'verify_email' },
                { request_field: 'type', value: 'account_opening' },
            ]);
            FormManager.handleSubmit({
                form_selector       : form_id,
                fnc_response_handler: verifyEmailHandler,
                fnc_additional_check: checkCountry,
            });
            $google_btn   = $('#google-signup');
            $login_btn    = $('#login');
            $verify_email = $('#verify_email');
            $error_msg    = $('.error-msg');
        }).then(() => {
            $error_msg.addClass('center-text');
            $google_btn.on('click', (e) => {
                e.preventDefault();
{'fraction_non_alphanumeric': 0.15115147583522542, 'fraction_numerical': 0.0006487187804086928, 'mean_word_length': 2.2327044025157234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '2996145', 'n_tokens_mistral': 850, 'n_tokens_neox': 811, 'n_words': 143}