document.addEventListener("DOMContentLoaded",function(e){let t=document.querySelector("#formChangePassword"),n=document.querySelector(".phone-number-mask");t&&FormValidation.formValidation(t,{fields:{newPassword:{validators:{notEmpty:{message:"Please enter new password"},stringLength:{min:8,message:"Password must be more than 8 characters"}}},confirmPassword:{validators:{notEmpty:{message:"Please confirm new password"},identical:{compare:function(){return t.querySelector('[name="newPassword"]').value},message:"The password and its confirm are not the same"},stringLength:{min:8,message:"Password must be more than 8 characters"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap5:new FormValidation.plugins.Bootstrap5({eleValidClass:"",rowSelector:".form-control-validation"}),submitButton:new FormValidation.plugins.SubmitButton,autoFocus:new FormValidation.plugins.AutoFocus},init:e=>{e.on("plugins.message.placed",function(e){e.element.parentElement.classList.contains("input-group")&&e.element.parentElement.insertAdjacentElement("afterend",e.messageElement)})}}),n&&(n.addEventListener("input",e=>{e=e.target.value.replace(/\D/g,"");n.value=formatGeneral(e,{blocks:[3,3,4],delimiters:[" "," "]})}),registerCursorTracker({input:n,delimiter:" "}))});