"use strict";(self.webpackChunkgulp_template=self.webpackChunkgulp_template||[]).push([[6966],{3218:function(e,t,n){function i(){const e=document.body,t=window.innerWidth-e.clientWidth;if(e.style.transition="margin-right 0.3s easy-in-out",e.style.marginRight=`${t}px`,e.style.overflow="hidden",!window.matchMedia("(min-width: 996px)").matches){const t=window.pageYOffset;e.style.top=-t+"px",e.style.position="fixed",e.style.width="100%"}}function o(){const e=document.body;if(e.style.transition="margin-right 0s easy-in-out",e.style.marginRight="0",e.style.overflow="unset",!window.matchMedia("(min-width: 996px)").matches){const t=Math.abs(parseInt(e.style.top||0,10));e.style.position="static",e.style.width="auto",e.style.removeProperty("top"),window.scrollTo(0,t||0)}}n.d(t,{$:function(){return i},W:function(){return o}})},2585:function(e,t,n){n.r(t),n.d(t,{default:function(){return o}});var i=n(3218);function o(e,t=null,n=[]){const o=document.querySelector(".js-navigation");e&&(o.classList.contains("navigation__fixed--white")||o.classList.add("navigation__fixed--white"),e.on("show",(()=>{(0,i.$)(),t&&t(...n)})),e.on("hide",(()=>{(0,i.W)(),e.destroy()})),e.show())}},883:function(e,t,n){n.d(t,{A:function(){return a}});var i=n(3016);function o(e,t,n,i,o,s,a){try{var r=e[s](a),l=r.value}catch(e){return void n(e)}r.done?t(l):Promise.resolve(l).then(i,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(i,s){var a=e.apply(t,n);function r(e){o(a,i,s,r,l,"next",e)}function l(e){o(a,i,s,r,l,"throw",e)}r(void 0)}))}}function a(e,t,n=!0){e&&e.addEventListener("submit",function(){var o=s((function*(o){o.preventDefault();const s=this.querySelectorAll(".js-input-base[data-validations]:not(.novalidate)"),a=this.querySelectorAll(".js-select[data-validations]:not(.novalidate)"),r=Array.from(a).map((e=>(e.selectedOptions[0].classList.add(".js-select-option"),e.selectedOptions[0].dataset.validations=e.dataset.validations,e.selectedOptions[0]))),l=(0,i.MG)([...s,...r]);if(n&&l)if(e.classList.contains("js-registration-form")){let n=new FormData(e),i=yield fetch("/local/templates/stenova/ajax/checkEmail.php",{method:"POST",body:JSON.stringify({EMAIL:n.get("REGISTER[EMAIL]")})}),o=yield i.json();if(o.success)"function"==typeof t&&t(),function(e){const t=e.querySelectorAll('[name="UF_INN"]');let n="";for(const e of t)e.value?n=e.value:e.value=n;e.submit()}(e);else{const t=e.querySelector('[name="REGISTER[EMAIL]"]').closest(".input-base");t.classList.add("error"),t.querySelector(".input-base__error").textContent=o.message,t.style.marginBottom="2.8rem",t.scrollIntoView({block:"center",behavior:"smooth"})}}else e.classList.contains("js-buy-cards-form")?(document.addEventListener("capchaVerified",(()=>{ym(25098083,"reachGoal","oplata_cards"),this.submit()})),window.smartCaptcha.reset(),window.smartCaptcha.execute()):("function"==typeof t&&t(),this.submit())}));return function(e){return o.apply(this,arguments)}}())}},3016:function(e,t,n){n.d(t,{LF:function(){return s},M2:function(){return c},MG:function(){return g},Nh:function(){return m},X5:function(){return u},bB:function(){return a},lZ:function(){return o},tJ:function(){return d}});const i=e=>!isNaN(Number(e.trim())),o=e=>11===String(e).replace(/[^\d]/g,"").substring(0,11).length,s=e=>new RegExp(/^(\+?\d)\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{2})[- ]?(\d{2})$/).test(e),a=e=>i(e)&&12===String(e.trim()).length,r=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)+\w$/).test(e)||0===e.trim().length,l=e=>new RegExp(/^[^@]+@[\w\-]+(\.\w+)*\.ru$/).test(e)||0===e.trim().length,c=e=>i(e)&&6===String(e).length,d=e=>{let t=!0;for(let n=0;n10){t=!1;break}return t},u=e=>e.files.length<=10,m=(e,t,n=".input-base",i="RU")=>{const o=e.closest(n);if(o){const e=o.querySelector(`${n}__error`);o.classList.add(f),e&&(e.innerText=p[t].text[i])}},h=e=>{const t=e.closest(".input-base-captcha")||e.closest(".input-base")||e.closest(".input-file-base")||e.closest(".js-select-wrapper"),n=document.querySelector(".js-navigation");if(t&&n){const e=t.getBoundingClientRect();document.querySelector('.dialog:not([aria-hidden="true"])')?document.querySelector('.dialog:not([aria-hidden="true"]) .dialog-wrapper').scrollTo({top:t.offsetTop-30,behavior:"smooth"}):window.scrollTo({top:e.top+window.pageYOffset-n.clientHeight-60,behavior:"smooth"})}},p={required:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>0!==String(e).length},requiredFiles:{text:{RU:"Поле должно быть заполнено",EN:"Field must be filled"},action:e=>e.files&&e.files.length},phone:{text:{RU:"Номер телефона должен состоять из 11 цифр",EN:"Phone number must be 11 digits"},action:o},inn:{text:{RU:"ИНН должен состоять из 10 или 12 цифр",EN:"TIN must be 10 or 12 digits"},action:e=>i(e)&&(10===String(e.trim()).length||12===String(e.trim()).length)},innIP:{text:{RU:"ИНН должен состоять из 12 цифр",EN:"TIN must be 12 digits"},action:a},kpp:{text:{RU:"КПП должен состоять из 9 цифр",EN:"PPC must consist of 9 digits"},action:e=>i(e)&&9===String(e.trim()).length||0===String(e.trim()).length},email:{text:{RU:"Формат почты: name@domain.ru",EN:"Mail format: name@domain.ru"},action:r},emailWithRuDomain:{text:{RU:"Допустимы только адреса в домене .ru",EN:"Only addresses in domain . ru"},action:l},onlyNumbers:{text:{RU:"Поле должно содержать только цифры",EN:"The field must contain only numbers"},action:i},cardNumber:{text:{RU:"Номер карты должен состоять из 15 цифр",EN:"Card number must be 15 digits"},action:e=>{const t=e.replace(/\s/g,"");return 15===t.length&&i(t)||0===t.length}},cost:{text:{RU:"Поле должно состоять только из цифр",EN:"The field must contain only numbers"},action:e=>{const t=e.replace(/\s/g,"");return i(t)||0===t.length}},password:{text:{RU:"Пароль должен содержать не менее 8 символов",EN:"Password must contain at least 8 characters"},action:e=>e.length>7||0===e.length},confirmPassword:{text:{RU:"Пароли должны совпадать",EN:"Passwords must match"},action:({oldPassword:e,newPassword:t})=>e===t},korCheck:{text:{RU:"Корреспондентский счет должен состоять из 11 цифр",EN:"Correspondent account must be 11 digits"},action:e=>i(e)&&11===String(e.trim()).length||0===String(e.trim()).length},payCheck:{text:{RU:"Расчетный счет должен состоять из 14 цифр",EN:"Account must be 14 digits long"},action:e=>i(e)&&14===String(e.trim()).length||0===String(e.trim()).length},bik:{text:{RU:"БИК должен состоять из 12 цифр",EN:"BIC must be 12 digits"},action:e=>i(e)&&12===String(e.trim()).length||0===String(e.trim()).length},phoneOrEmail:{text:{RU:"Не корректно заполнен email или телефон",EN:"Incorrectly filled email or phone"},action:e=>s(e)||r(e)||0===String(e.trim()).length},phoneOrEmailWithRuDomain:{text:{RU:"Не корректно заполнен email (допустимы адреса в домене .ru) или телефон",EN:"Incorrectly filled email (only addresses in domain . ru) or phone"},action:e=>s(e)||r(e)&&l(e)||0===String(e.trim()).length},confirmCode:{text:{RU:"Код должен состоять из 6 цифр",EN:"Code must be 6 digits"},action:c},fileMaxWeight:{text:{RU:"Вес одного файла должен быть не более 10 Мбайт",EN:"The weight of one file should be no more than 10 MB"},action:d},filesMaxCount:{text:{RU:"Можно загрузить не более 10 файлов",EN:"You can upload a maximum of 10 files"},action:u},doNotConfirmPhone:{text:{RU:"Номер должен быть подтвержден",EN:"Number must be confirmed"},action:e=>!1},nominalMin1000:{text:{RU:"Номинал карты не может быть менее 1000",EN:"The denomination of the card cannot be less than 1000"},action:e=>e>=1e3}},f="error";function g(e){let t=!0,n=null;if(e.length){const i=document.querySelectorAll(".js-language-radio");let o="RU";if(0!==i.length){const e=Array.from(i).find((e=>e.checked));o=e.value}e.forEach((e=>{const i=e.dataset.validations.split(",");for(let n of i){let i=".input-base",a=e.classList.contains("js-file-input")?{files:e.files,maxWeight:10}:e.value;if(e.classList.contains("js-file-input")&&(i=".input-file-base"),e.classList.contains(".js-select-option")&&(i=".select-wrapper"),"confirmPassword"===n){const t=e.closest(".js-form-container");if(t){var s;const n=(null===(s=t.querySelector(".js-input-password"))||void 0===s?void 0:s.value)||null;n&&(a={oldPassword:n,newPassword:e.value})}}if(!p[n].action(a)){t&&(t=!1),m(e,n,i,o);break}}t||n||(n=e)}))}return n&&h(n),t}},1836:function(e,t,n){var i=n(7083),o=n(2585),s=n(3016);function a(e){document.querySelectorAll(".js-copy-to-clipboard").forEach((t=>{t.dataset.copy=e,t.classList.contains("init")||(t.classList.add("init"),t.addEventListener("click",(()=>{const e=t.dataset.copy;function n(){const e=t.querySelector(".js-copy-icon-action"),n=t.querySelector(".js-copy-icon-done");e.style.opacity="0",n.style.opacity="1",setTimeout((()=>{e.style.opacity="1",n.style.opacity="0"}),2e3)}navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(n).catch((()=>{r(e,n)})):r(e,n)})))}))}function r(e,t){const n=document.querySelector(".js-dialog-auth-call")||document.body,i=document.createElement("textarea");i.value=e,i.style.cssText="position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:200px;height:30px;font-size:16px;opacity:0.01;z-index:99999;",n.appendChild(i),i.focus(),i.select(),i.setSelectionRange(0,e.length);try{document.execCommand("copy")&&t()}catch(e){console.error("Copy failed",e)}n.removeChild(i)}var l=n(883);window.addEventListener("DOMContentLoaded",(()=>{!function(){const e=document.querySelector(".js-dialog-auth-integration:not(.active)");e&&setTimeout((()=>(0,o.default)(new i.default(e))),1)}(),function(){const e=document.querySelector(".js-dialog-auth-call"),t=document.querySelectorAll(".js-auth-call-btn");e&&t.forEach((t=>{t.addEventListener("click",(()=>{let t=new i.default(e);(0,o.default)(t)}))}))}(),function(){const e=document.querySelector(".js-input-phone-call"),t=document.querySelector(".js-number-for-call"),n=document.querySelector(".js-btn-send-phone-call"),i=document.querySelector(".js-link-for-call"),o=document.querySelector(".js-call-alert-error"),r=document.querySelector(".js-dialog-auth-call");let l=null,c=null,d=null;const u={1:{el:document.querySelector('[data-auth-by-phone-step="1"]')},2:{el:document.querySelector('[data-auth-by-phone-step="2"]')}};function m(e){Object.entries(u).forEach((([t,n])=>{const{el:i}=n;+t===e?i.classList.remove("hidden"):i.classList.add("hidden")}))}function h(){l&&(clearInterval(l),l=null)}function p(){document.removeEventListener("capchaVerified",p),BX.ajax.runComponentAction("bitrix:main.auth.form","callCheck",{mode:"ajax",data:{USER_PHONE:e.value,sessid:BX.message("bitrix_sessid"),token:document.querySelector('[name="smart-token"]').value}}).then((e=>{const n=JSON.parse(e.data);n.error?(o.textContent=n.error,o.classList.remove("hidden")):(o.classList.add("hidden"),c=n.check_id,d=n.sign,t.textContent=n.call_phone_pretty,i.setAttribute("href",`tel:${n.call_phone}`),a(n.call_phone),m(2),h(),l=setInterval((()=>{BX.ajax.runComponentAction("bitrix:main.auth.form","completeCallCheck",{mode:"ajax",data:{CHECK_ID:c,sessid:BX.message("bitrix_sessid"),SIGNED_DATA:d}}).then((e=>{const t=JSON.parse(e.data);t.success?(o.classList.add("hidden"),h(),window.location.reload()):t.error&&(o.textContent=t.error,o.classList.remove("hidden"))})).catch((()=>{h()}))}),15e3))}))}n.addEventListener("click",(()=>{(0,s.MG)([e])&&(window.smartCaptcha.reset(),window.smartCaptcha.execute(),document.addEventListener("capchaVerified",p))})),m(1),new MutationObserver((()=>{"true"===r.getAttribute("aria-hidden")&&h()})).observe(r,{attributes:!0,attributeFilter:["aria-hidden"]})}();const e=document.querySelector(".js-choose-user"),t=document.querySelector(".js-approve-form");if(e&&t){const n=t.querySelector(".js-choose-user-value"),i={email:t.querySelector(".js-approve-email"),phone:t.querySelector(".js-approve-phone"),inputHidden:t.querySelector(".js-choose-user-hidden-input")},o=i.email.closest(".input-base"),s=i.phone.closest(".input-base");e.addEventListener("click",(a=>{const r=a.target.closest(".js-choose-user-item");if(!r)return;const c={phone:r.dataset.phone,email:r.dataset.email,hiddenField:"string"==typeof r.dataset.hiddenField?r.dataset.hiddenField.toLowerCase():r.dataset.hiddenField},d="email"==c.hiddenField;if(i.inputHidden.value=d?c.phone:c.email,i.inputHidden.setAttribute("name",d?"PHONE":"EMAIL"),d?(i.email.classList.remove("novalidate"),i.email.removeAttribute("disabled"),i.phone.classList.add("novalidate"),i.phone.setAttribute("disabled","1"),o.classList.remove("hidden"),s.classList.add("hidden")):(i.phone.classList.remove("novalidate"),i.phone.removeAttribute("disabled"),i.email.classList.add("novalidate"),i.email.setAttribute("disabled","1"),o.classList.add("hidden"),s.classList.remove("hidden")),d)n.textContent=n.textContent.replace("#FIELD#","email");else{const e=t.querySelector(".js-approve-lang");n.textContent=n.textContent.replace("#FIELD#",e.textContent)}n.textContent=n.textContent.replace("#VALUE#",c[c.hiddenField]),(0,l.A)(t),t.classList.remove("hidden"),e.classList.add("hidden")}))}}))}},function(e){e.O(0,[8096],(function(){return e(e.s=1836)})),e.O()}]);