1!function($){FormValidation.Validator.phoneconfirm={html5Attributes:{},init:function(validator,$field,options){console.log("init"),$field.on("keydown",function(){validator.resetField($field,!1)})},validate:function(validator,$field,options,validatorName){var dfd=new $.Deferred,dfd2=new $.Deferred;return dfd2.done(function(result){dfd.resolve($field,validatorName,result),setTimeout(function(){validator.resetField($field,!1)},100)}),dfd2.fail(function(result){dfd.fail(result)}),$field.closest(".phone-confirmation").data("confirmation").validate(dfd2),dfd}}}(jQuery);var PhoneConfirmation=function(root){var checkUrl="/api/public/service/check-confirmation-code",sendUrl="/api/public/service/send-code";root.data("check-url")&&(checkUrl=root.data("check-url")),root.data("send-url")&&(sendUrl=root.data("send-url"));function sendPhoneCode(evt){evt&&(evt.preventDefault(),evt.stopPropagation()),0<phoneTimeout||data.phone&&(blocks.link.addClass("disabled"),phoneTimeout=45,blocks.codeInput.val(""),$.ajax(sendUrl,{data:{phone:data.phone},success:function(json){blocks.link.removeClass("disabled"),json.error&&"phone-timeout"==json.error.code?phoneTimeout=json.error.value:json.confirmation&&(data.verification=json.confirmation,that.update());function tick(){var text;0==phoneTimeout?(clearInterval(phoneInterval),text="ÐапÑоÑиÑÑ ÐºÐ¾Ð´"):(text="ÐапÑоÑиÑÑ Ð¿Ð¾Ð²ÑоÑно ÑеÑез "+phoneTimeout+"Ñ",phoneTimeout--),blocks.link.text(text)}tick(),phoneInterval=setInterval(tick,1e3)}}))}function showError(text){text=text||"ÐевеÑнÑй код подÑвеÑждениÑ",blocks.error.text(text).show(),blocks.confirmation.addClass("has-error")}function checkPhoneCode(deferred){var code=blocks.codeInput.val();if(blocks.error.hide(),4!=code.length)return showError(),deferred&&deferred.resolve({valid:!0}),0;blocks.codeBtn.prop("disabled","disabled"),$.ajax(checkUrl,{data:{id:data.verification,code:code},success:function(json){blocks.codeBtn.prop("disabled",!1),json.error?deferred?deferred.resolve({valid:!1,message:json.error.value}):showError(json.error.value):json.check&&(data.success=!0,data.lastConfirmed=data.phone,that.update(),deferred&&deferred.resolve({valid:!0}))}})}var phone,phoneInterval,blocks={input:root.find(".js-phone"),code:root.find(".js-code"),codeInput:root.find(".js-code input"),codeBtn:root.find(".js-code button"),link:root.find(".js-link"),success:root.find(".js-success"),confirmation:root.find(".js-confirmation"),error:root.find(".js-code-error"),result:root.find(".js-result")},init=!1,that=this,data=this.data={lastConfirmed:null,phone:"",code:null,verification:null,success:root.data("confirmed"),checking:!1},phoneTimeout=0;this.update=function(){data.phone!=phone&&(data.phone=phone,init||(data.success&&(data.lastConfirmed=phone),init=!0),data.success=phone==data.lastConfirmed,data.verification=null),data.checking=5<data.phone.length&&blocks.input.intlTelInput("isValidNumber")&&!data.success,data.success?(blocks.success.removeClass("hidden"),blocks.result.val(data.verification)):(blocks.success.addClass("hidden"),blocks.result.val("")),data.checking?blocks.link.removeClass("hidden"):blocks.link.addClass("hidden"),data.verification&&!data.success?(blocks.code.removeClass("hidden"),blocks.codeInput.focus()):blocks.code.addClass("hidden")},blocks.input.on("tel:update",function(evt,tel){phone=tel,that.update()}),this.validate=function(deferr){!data.success&&data.checking?data.verification?checkPhoneCode(deferr):(sendPhoneCode(),deferr.resolve({valid:!1,message:"ÐожалÑйÑÑа, подÑвеÑдиÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона"})):deferr.resolve({valid:!0})},blocks.link.on("click",sendPhoneCode),blocks.codeBtn.on("click",function(evt){evt.preventDefault(),evt.stopPropagation(),checkPhoneCode()}),blocks.codeInput.on("focus",function(){blocks.error.hide(),blocks.confirmation.removeClass("has-error")}),blocks.input.trigger("change")};$(function(){$(".phone-confirmation").each(function(){$(this).data("confirmation",new PhoneConfirmation($(this)))})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.