PATH:
home
/
lab2454c
/
costbloc.com
/
public
/
dist
/
js
/
custom
/
site
"use strict";$("#password_confirm, #password_seller").keyup(function(){let a=$("#password_seller").val(),b=$("#password_confirm").val();a.length&&b.length&&(a==b?$(".password-validation-match-error").text(""):($(".password-validation-match-error").addClass("text-red-500"),$(".password-validation-match-error").text(jsLang("Passwords does not match!")),$(".password-validation-error").text(""))),$(".password-validation-error").text("")});function formValidation(){var a=!0,b=!0,c="",d=[];return uppercase&&0>$(".password-validation").val().search(/[A-Z]/)&&(d.push(jsLang("uppercase")),a=b=!1),lowercase&&0>$(".password-validation").val().search(/[a-z]/)&&(d.push(jsLang("lowercase")),a=b=!1),number&&0>$(".password-validation").val().search(/[0-9]/)&&(d.push(jsLang("numbers")),a=b=!1),symbol&&0>$(".password-validation").val().search(/[#?!@$%^&*-]/)&&(d.push(jsLang("symbols")),a=b=!1),0<d.length&&(c=jsLang("Password must contain :x"),c=c.replace(":x",d.join(", "))),length&&$(".password-validation").val().length<length&&(0<c.length?(c=jsLang("Password must contain :x and :y characters long."),c=c.replace(":x",d.join(", ")),c=c.replace(":y",length)):(c=jsLang("Password must be at least :x characters."),c=c.replace(":x",length)),a=b=!1),!1==a?(b||$(".password-validation-error").addClass("text-red-500").text(c),!1):!0==a||void 0}$(document).on("click",".toggle-password",function(){let a=$("#password_seller");"password"===a.attr("type")?(a.attr("type","text"),$(".pass-hide").removeClass("hidden"),$(".pass-show").addClass("hidden")):(a.attr("type","password"),$(".pass-show").removeClass("hidden"),$(".pass-hide").addClass("hidden"))}),$(document).ready(function(){function a(a){a?($("#state").html(""),"null"==oldCity&&$("#city").html(d),$.ajax({url:SITE_URL+"/geo-locale/countries/"+a+"/states",type:"GET",dataType:"json",beforeSend:function(){$("#state").attr("disabled","true"),$("#state").html(c)},success:function(a){$("#state").html(e),$.each(a.data,function(a,b){$("#state").append(`'<option ${b.code==oldState?"Selected":""} data-state="${b.code}" value="${b.code}">${b.name}</option>'`)}),$("#state").removeAttr("disabled"),0>=a.length&&0>=a.data.length&&(f=f.replace(":x","State"),$("#state").html(`<option value="">${f}</option>`))}})):($("#state").html(e),$("#city").html(d))}function b(a,b){a&&b?($("#city").html(""),$.ajax({url:SITE_URL+"/geo-locale/countries/"+b+"/states/"+a+"/cities",type:"GET",dataType:"json",beforeSend:function(){$("#city").html(c),$("#city").attr("disabled","true")},success:function(a){$("#city").html(d),$.each(a.data,function(a,b){$("#city").append(`<option ${b.name==oldCity?"Selected":""} value="${b.name}">${b.name}</option>`)}),$("#city").removeAttr("disabled"),0>=a.length&&0>=a.data.length&&(f=f.replace(":x","City"),$("#city").html(`<option value="">${f}</option>`))}})):$("#city").html(d)}$(".addressSelect").select2(),$(document).on("select2:open",a=>{const b=a.target.id;$(".select2-search__field[aria-controls='select2-"+b+"-results']").each(function(a,b){b.focus()})});let c=`<option value="">${jsLang("Loading")}...</option>`,d=`<option value="">${jsLang("Select City")}</option>`,e=`<option value="">${jsLang("Select State")}</option>`,f=jsLang(":x is not available.");$.ajax({url:SITE_URL+"/geo-locale/countries",type:"GET",dataType:"json",beforeSend:function(){$("#country").html(c),$("#country").attr("disabled","true")},success:function(a){$("#country").html("<option value=\"\">"+jsLang("Select Country")+"</option>"),$.each(a,function(a,b){$("#country").append(`'<option ${b.code==oldCountry?"Selected":""} data-country="${b.code}" value="${b.code}">${b.name}</option>'`)}),$("#country").removeAttr("disabled")}}),"null"!=oldState&&a(oldCountry),"null"!=oldCity&&b(oldState,oldCountry),$("#country").on("change",function(){$(this).find(":selected").html();oldCity="null",a($("#country").find(":selected").attr("data-country"))}),$("#state").on("change",function(){$(this).find(":selected").html();b($("#state").find(":selected").attr("data-state"),$("#country").find(":selected").attr("data-country"))})}),$(document).on("click","#btnSubmits",function(){setTimeout(goToErrorMessage,0)});function goToErrorMessage(){$([document.documentElement,document.body]).animate({scrollTop:$(".error").offset().top-170},500)}
[-] checkout.js
[edit]
[-] be-seller.min.js
[edit]
[-] res-filter.min.js
[edit]
[-] sign_up.js
[edit]
[-] wishlist.min.js
[edit]
[-] filter.min.js
[edit]
[-] home.js
[edit]
[-] notification-popup.js
[edit]
[-] order-track.js
[edit]
[-] notification-popup.min.js
[edit]
[-] wishlist.js
[edit]
[-] description-tabs.js
[edit]
[-] vendor-profile.js
[edit]
[-] seller-registration.min.js
[edit]
[-] formatting.min.js
[edit]
[-] product-details.js
[edit]
[+]
..
[-] cart.min.js
[edit]
[-] be-seller.js
[edit]
[-] animation.min.js
[edit]
[-] product-view.min.js
[edit]
[-] address.js
[edit]
[-] lang.js
[edit]
[-] alpine.js
[edit]
[-] product-details.min.js
[edit]
[-] common.min.js
[edit]
[-] res-filter.js
[edit]
[-] order-track.min.js
[edit]
[-] common.js
[edit]
[-] drawer.js
[edit]
[-] seller.min.js
[edit]
[-] settings.js
[edit]
[-] checkout.min.js
[edit]
[-] coupon.js
[edit]
[-] login.js
[edit]
[-] seller.js
[edit]
[-] user_download.js
[edit]
[-] site.min.js
[edit]
[-] lang.min.js
[edit]
[-] seller-registration.js
[edit]
[-] password-validation.js
[edit]
[-] drawer.min.js
[edit]
[-] login.min.js
[edit]
[-] delivery-address.min.js
[edit]
[-] home.min.js
[edit]
[-] compare.js
[edit]
[-] description-tabs.min.js
[edit]
[-] all-categories.min.js
[edit]
[-] flatpickr.min.js
[edit]
[-] filter.js
[edit]
[-] cart.js
[edit]
[-] site.js
[edit]
[-] compare.min.js
[edit]
[-] animation.js
[edit]
[-] user_download.min.js
[edit]
[-] settings.min.js
[edit]
[-] vendor-profile.min.js
[edit]
[-] product-view.js
[edit]
[-] password-validation.min.js
[edit]
[-] address.min.js
[edit]
[-] formatting.js
[edit]
[-] coupon.min.js
[edit]
[-] delivery-address.js
[edit]
[-] sign_up.min.js
[edit]
[-] all-categories.js
[edit]