/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token, found '$'
(1,2): run-time error CSS1019: Unexpected token, found '('
(1,11): run-time error CSS1031: Expected selector, found ')'
(1,11): run-time error CSS1025: Expected comma or open brace, found ')'
(3,2): run-time error CSS1019: Unexpected token, found ')'
(4,1): run-time error CSS1019: Unexpected token, found '$'
(4,2): run-time error CSS1019: Unexpected token, found '('
(4,11): run-time error CSS1031: Expected selector, found ')'
(4,11): run-time error CSS1025: Expected comma or open brace, found ')'
(21,2): run-time error CSS1019: Unexpected token, found ')'
(23,10): run-time error CSS1031: Expected selector, found 'onRegisterSubmit('
(23,10): run-time error CSS1025: Expected comma or open brace, found 'onRegisterSubmit('
(28,10): run-time error CSS1031: Expected selector, found 'initScaleCards('
(28,10): run-time error CSS1025: Expected comma or open brace, found 'initScaleCards('
(37,10): run-time error CSS1031: Expected selector, found 'selectScale('
(37,10): run-time error CSS1025: Expected comma or open brace, found 'selectScale('
(43,1): run-time error CSS1019: Unexpected token, found '$'
(43,2): run-time error CSS1019: Unexpected token, found '('
(43,11): run-time error CSS1031: Expected selector, found ')'
(43,11): run-time error CSS1025: Expected comma or open brace, found ')'
(52,2): run-time error CSS1019: Unexpected token, found ')'
 */
$(document).ready(function () {
    gsap.to('.g-up', { opacity: 1, y: 0, duration: 0.55, stagger: 0.06, ease: 'power2.out', delay: 0.1 });
});
$(document).ready(function () {
    initScaleCards();

    gsap.to('.g-up', { opacity: 1, y: 0, duration: 0.5, stagger: 0.045, ease: 'power2.out', delay: 0.1 });

    $("#AssessmentTest").on("click", function () {
        openQuiz(0, questionGroupId, 0, questionType);
    });

    $(".field-input").each(function (index, element) {
        var $input = $(this);
        $input.on("keypress", function (e) {
            if (e.which === 13) {
                onRegisterSubmit();
            }
        });
    })
});

function onRegisterSubmit() {
    gtag('event', 'sign_up', { method: 'Email' });
    $("#register-form").submit();
}

function initScaleCards() {
    $('#scalePick').on('click', '.scale-opt', function () {
        selectScale($(this));
    });

    // default: first scale selected
    selectScale($('#scalePick .scale-opt').first());
}

function selectScale($opt) {
    $('#scalePick .scale-opt').removeClass('sel');
    $opt.addClass('sel');
    $('#scaleValue').val($opt.data('scale'));
    $('#scaleErr').removeClass('show');
}
$(document).ready(function () {
    $(document).on('click', '#eye-icon', function () {
        let passwordInput = $(this).siblings('input[name]');

        let type = passwordInput.attr('type') === 'password' ? 'text' : 'password';
        passwordInput.attr('type', type); 

        $(this).toggleClass('fa-eye fa-eye-slash');
    });
});
