(()=>{var o;(o=jQuery)(document).ready(function(){function a(){o(".tabs .tab-links a").on("click",function(e){var t=o(this).attr("href");o(".tabs "+t).show().siblings().hide(),o(this).parent("li").addClass("active").siblings().removeClass("active"),e.preventDefault()}),o(".nextButton").on("click",function(){o(".tab-links li.active");var e=o(this).closest(".tabs"),t=e.find("li.active").index();e.find("li").eq(t+1).find("a").on("click")}),o(".prevButton").on("click",function(){o(".tab-links li.active");var e=o(this).closest(".tabs"),t=e.find("li.active").index();e.find("li").eq(t-1).find("a").on("click")})}function e(e){var t=e.value;t.trim().length<1||null===t||0===t.length?(t=o(e).prev().text(),o(e).next().text("Please Enter your "+t),o(e).addClass("is-invalid")):(o(e).next().empty(),o(e).removeClass("is-invalid"),o("#customer-pop-cont").removeClass("nextButton"))}o("input[name='customer_first_name']").on("change",function(){e(this)}),o("input[name='customer_last_name'] ").on("change",function(){""!==o("#customer-last-name").val()?(o("#customer-pop-cont").addClass("nextButton"),a(),o(".cs-pop-vali").each(function(e,t){o(this).is(":empty")})):o("#customer-pop-cont").removeClass("nextButton"),e(this)}),o("#customer-email-address").on("keyup",function(e){e.preventDefault();return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(o("#customer-email-address").val())?(o("#customer-email-address").removeClass("is-invalid"),o("#customer-email-address").next().empty(),!0):(o("#customer-email-address").addClass("is-invalid"),o("#customer-email-address").next().text("Please enter valid email address"),!1)}),o("input[name='customer_last_name']").on("change",function(e){e.preventDefault(),""===o("input[name='customer_last_name']").val()&&o("#customer-pop-cont").removeClass("nextButton")}),o("#customer-pop-cont, .customer-pop-cont, .customer-design-cont").on("click",function(e){e.preventDefault();var e=o("input[name='customer_email_address']").val(),t=o("input[name='customer_first_name']").val(),s=o("input[name='customer_last_name']").val(),n=!0;return""===t||null==t?(o("#customer-first-name").addClass("is-invalid"),o("#customer-first-name").next().text("Please Enter your First Name "),n=!1):(o("#customer-first-name").removeClass("is-invalid"),o("#customer-first-name").next().empty()),""===s||null==s?(o("#customer-last-name").addClass("is-invalid"),o("#customer-last-name").next().text("Please Enter your last Name "),n=!1):(o("#customer-last-name").removeClass("is-invalid"),o("#customer-last-name").next().empty()),""===e||null==e?(o("#customer-email-address").addClass("is-invalid"),o("#customer-email-address").next().text("Please Enter your email address"),n=!1):/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)?(o("#customer-email-address").removeClass("is-invalid"),o("#customer-email-address").next().empty()):(o("#customer-email-address").addClass("is-invalid"),o("#customer-email-address").next().text("Please enter valid email address"),n=!1),n?(a(),o("#front-customer-info").addClass("d-none"),o("#customer-pop-cont").addClass("d-none"),o("#front-customer-pay").removeClass("d-none"),o("#customer-pop-Confirm").removeClass("d-none"),o("#customer-pop-back").removeClass("d-none"),!0):(o("#customer-pop-cont").removeClass("nextButton"),!1)}),o("#customer-pop-back").on("click",function(){o(this).addClass("d-none"),o("#front-customer-info").removeClass("d-none"),o("#customer-pop-cont").removeClass("d-none"),o("#front-customer-pay").addClass("d-none"),o("#customer-pop-Confirm").addClass("d-none")}),o("#customer-pop-cont").on("change",function(e){e.preventDefault()}),0===o(".cs-pop-vali").length?o("#customer-pop-cont").addClass("nextButton"):o("#customer-pop-cont").removeClass("nextButton"),0===o(".cs-pop-vali").length&&a()})})();