1function sbCustomModal(t,e,n){let i=null;if("object"!=typeof t)return t;if(i=void 0!==t.length?t[0]:t,i){let t=document.getElementById("sb-modal-overlay");if(!t){t=document.createElement("div"),t.classList.add("modal-overlay"),t.style.zIndex="1002",t.style.display="none",t.style.opacity="0.5",t.setAttribute("id","sb-modal-overlay"),t.addEventListener("click",function(){document.querySelectorAll(".salebot-modal-for-js").forEach(t=>{t.modal("close")})});const e=document.querySelectorAll(".section-wrapper");e.length>0?e[0].append(t):document.body.append(t)}if("true"!==i.getAttribute("data-sb-modal")){i.setAttribute("data-sb-modal","false"),i.classList.add("salebot-modal-for-js"),i.style.zIndex="1003",i.style.top="10%",i.style.opacity="0.3";i.querySelectorAll(".modal-close").forEach(t=>{t.style.display="block",t.addEventListener("click",function(){i.modal("close")})})}if("string"==typeof e&&("open"===e&&(i.setAttribute("data-sb-open","true"),i.style.display=n&&n.display?n.display:"block",t.style.display="block",i.style.transition="opacity 200ms ease-in-out",setTimeout(function(){i.style.opacity="1"})),"close"===e)){const e=document.getElementsByClassName('salebot-modal-for-js[data-sb-open="true"]');t.style.display=e.length<2?"none":"block",i.style.display="none",i.style.opacity="0.3"}}return t}function customButtonsHover(){$(".salebot-btns__item, .go_to_payment_btn, .custom-button").on("mouseleave mouseenter",function(t){const e=(...t)=>t.find(t=>null!=t&&""!==`${t}`.trim())||"";let n=e($(this).attr("data-color"),$(this).attr("textcolor"),$(this).attr("textColor")),i=e($(this).attr("data-background"),$(this).attr("backgroundcolor"),$(this).attr("backgroundColor")),o=e($(this).attr("data-border"),$(this).attr("bordercolor"),$(this).attr("borderColor"),i),r=e($(this).attr("data-borderWidth"),$(this).attr("data-borderwidth"),$(this).attr("data-btnBorderWidth"),$(this).attr("borderWidth"),$(this).attr("borderwidth")),a=e($(this).attr("data-hover"),$(this).attr("hovercolor"),$(this).attr("hoverColor")),s=e($(this).attr("data-hoverBackground"),$(this).attr("hoverBackgroundColor"),$(this).attr("hoverbackgroundcolor")),l=e($(this).attr("data-hoverBorder"),$(this).attr("hoverBorderColor"),$(this).attr("hoverbordercolor"),s,o);if(i.length>0||a.length>0||s.length>0||l.length)r.length>0&&$(this).css({borderWidth:/^\d+(\.\d+)?$/.test(r)?`${r}px`:r,borderStyle:"solid"}),"mouseenter"===t.type?$(this).css({color:a||n,background:s||i,borderColor:l||o}):"mouseleave"===t.type&&$(this).css({color:n,background:i,borderColor:o});else if("mouseenter"===t.type){if(!n&&$(this).hasClass("main-btn"))return;$(this).css({color:"#fff",background:n})}else"mouseleave"===t.type&&($(this).hasClass("main-btn")&&!n?$(this).css({color:"",background:""}):$(this).css({color:n,background:"transparent"}))})}function modalIdFromHref(t){let e=String(t||"").trim();if(!e)return"";const n=e.indexOf("#");return-1!==n&&(e=e.slice(n+1)),-1!==e.indexOf("/")?"":e.split("?")[0].trim()}function openSectionModal(t){if(!t||!t.length)return;const e=t[0];e.__sbModalInit||(t.modal(),e.__sbModalInit=!0),t.modal("open"),t.find(".sb-modal-close").show(),"function"==typeof initializeSwiperQuiz&&initializeSwiperQuiz(t)}function customButtonModal(){const t=$(".section_to_modal_true");t.modal("close"),$(".sb_modal_open_btn").off("click.modalOpen").on("click.modalOpen",function(t){t.preventDefault(),openSectionModal($("#"+$(this).attr("href")))}),$(document).off("click.sbSectionModal").on("click.sbSectionModal","a[href], .sb-lb-btn[href]",function(t){if(t.isDefaultPrevented())return;const e=modalIdFromHref($(this).attr("href"));if(!e)return;const n=$("#"+CSS.escape(e));n.length&&n.hasClass("section_to_modal_true")&&(t.preventDefault(),openSectionModal(n))});const e=modalIdFromHref(window.location.hash);if(e){const t=$("#"+CSS.escape(e));t.length&&t.hasClass("section_to_modal_true")&&openSectionModal(t)}t.each((t,e)=>{const n=extractColorFromString($(e).css("background"));n&&$(e).find(".sb-modal-close path").css("fill",getContrastColor(n));const i=$(e).attr("data-modal-trigger-classes");if(i&&i.trim()){const t=i.split(",").map(function(t){return(t=t.trim())&&!t.startsWith(".")&&(t="."+t),t}).filter(function(t){return t.length>1});if(t.length>0){const n=t.join(", ");$(document).on("click",n,function(t){t.preventDefault(),$(e).modal("open"),$(e).find(".sb-modal-close").show(),initializeSwiperQuiz($(e))})}}})}function getContrastColor(t){return(299*parseInt(t.slice(1,3),16)+587*parseInt(t.slice(3,5),16)+114*parseInt(t.slice(5,7),16))/1e3>128?"#000000":"#FFFFFF"}function extractColorFromString(t){const e=t.match(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);if(e){const t=parseInt(e[1]),n=parseInt(e[2]),i=parseInt(e[3]);return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}return null}function showFormWarning(t,e){const n=$(t).find(".incorrect_form_warning"),i=("undefined"!=typeof formValidationMessages?formValidationMessages:{})[e];if(!n.length||!i)return;const o=".privacy_pay_input, .privacy_input, .privacy_offer_input, .personal_privacy_input, .mailing_agreement_input";if(-1!==["privacy","offer","personal-privacy","mailing-agreement"].indexOf(e)){let e=null;$(t).find(o).each(function(){const t=$(this);t.prop("checked")||(t.attr("data-style")||t.attr("data-style",t.attr("style")||""),t.css({border:"1px solid #f95c55"}),e||(e=t[0]),setTimeout(function(){t.attr("style",t.attr("data-style")||"")},2e3))}),e&&e.scrollIntoView({behavior:"smooth",block:"center"})}n.attr("data-style")||n.attr("data-style",n.attr("style")||""),n.text(i).css({background:"#f95c55",color:"#fff",padding:"20px"}).removeClass("hidden"),setTimeout(function(){n.addClass("hidden").attr("style",n.attr("data-style")||"")},2e3)}function regularQuizWarning(t){$(t).closest(".ml_quiz").find(".invali
1d-feedback_quiz").show()}function quizWarningHide(){$(".ml_quiz").on("click",function(){$(this).find(".invalid-feedback_quiz").hide()})}function ya_metrica_init(t){var e,n,i,o,r,a,s;e=window,n=document,i="script",o="https://mc.yandex.ru/metrika/tag.js",e[r="ym"]=e[r]||function(){(e[r].a=e[r].a||[]).push(arguments)},e[r].l=1*new Date,a=n.createElement(i),s=n.getElementsByTagName(i)[0],a.async=1,a.src=o,s.parentNode.insertBefore(a,s),ym(parseInt(t),"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0}),window.global_ym_code=t}function yandexMetricaCount(t,e){e&&ym(t,"reachGoal",e)}function isJSON(t){var e=!0;try{JSON.parse(t)}catch(t){e=!1}return e}function sbSameOriginRequestUrl(t){try{const e=new URL(t,window.location.href),n=window.location.hostname,i=/^(salebot\.site|mavibot\.site|s\.zmservice\.ru|s\.localhost)$/i.test(n);if(/^\/(create_quizz_form|check_recaptcha|track_quiz_step)\/?$/.test(e.pathname))return i&&e.hostname===n&&(/mavibot/i.test(n)?e.hostname="mavibot.ai":/zmservice/i.test(n)?e.hostname="salebot.zmservice.ru":/localhost/i.test(n)?e.hostname=n.replace(/^s\./,""):e.hostname="salebot.pro"),e.href;return/^\/mini_landing\/[^/]+\/save_phone\/?$/.test(e.pathname)||/^\/quizr\/[^/]+\/?$/.test(e.pathname)?e.href:e.origin!==window.location.origin?window.location.origin+e.pathname+e.search+e.hash:e.href}catch(e){return t}}function formCreateHref(t,e,n,i,o,r,a,s,l,c,u){function d(t){let e=t.split("?")[1].split("&"),n={};return e.forEach(function(t){let e=t.split("="),i=decodeURIComponent(e[0]),o=decodeURIComponent(e[1]||"");n[i]=o}),n}function h(t){return t.split("?")[0]}let p=$(`.${n}`),f=(isJSON(e)&&JSON.parse(e),!0),m=p.find(`.${t}`);if(!m.length){let t=u&&u.nodeType?u:window.event&&window.event.target;if(t){let e=$(t).closest("[data-url]");e.length&&(m=e)}}m.length||(m=$(`.${t}`).filter("[data-url]").first());let g=m.attr("data-url");if(!g)return;let v=p.find(".privacy_input"),_=v.prop("checked"),y=p.find(".personal_privacy_input"),b=p.find(".mailing_agreement_input"),w=p.find(".link_group-main-btn"),x=p.find(".send_quiz-btn"),k=p.find(".send_quiz-btn-loader"),C=p.find(".send_quiz-btn-text");p="true"===w.text()?$(".salebot-form__container"):p;let T=p.attr("data-random_id");if(i="true"===i||"1"===i,o="true"===o||"1"===o,r="true"===r||"1"===r,a="true"===a||"1"===a,s="true"===s||"1"===s,(c="false"!=c&&c)&&(g+=`&ip_addr=${c}`),(l="true"===l||"1"===l)&&(g+=`&user_agent=${encodeURIComponent(window.navigator.userAgent.replace(/;/g,"%3B"))}`),p.find(".ml_quiz").each(function(t,e){if("none"===$(e).css("display"))return;let n,i,o="true"===$(e).find(".ml_quiz_important").text(),r=$(e).find(".ml_quiz_variable").text(),a=$(e).find(".ml_quiz_type").text();o?(n=validationFunctions[a](e,f,o),f=void 0!==n.validation?n.validation:n.validationSuccess,i=n.value):(n=validationFunctions[a](e,f,o),i=n.value),f&&quizValidationTypes[a]&&(i=encodeURIComponent(i),g+=`&${r}=${i}`),f&&!quizValidationTypes[a]&&(g+=variablesFunctions[a](e,o))}),p.length&&void 0!==window.passedCaptcha&&!window.passedCaptcha[n])return void showFormWarning(p,"recaptcha");if(y.length>0&&!y.is(":checked"))return void showFormWarning(p,"personal-privacy");if(b.length>0&&!b.is(":checked"))return void showFormWarning(p,"mailing-agreement");if(v.length>0&&!_&&showFormWarning(p,"privacy"),f||showFormWarning(p,"quiz"),!f||v.length>0&&!_)return;let z=g+mini_landing_init(i,o,r,a,s)+`&SBRandomId=${T}`;const S=($(m).attr("data-social-goal-event")||"").trim(),E=($(m).attr("data-labels")||"").trim(),I=($(m).attr("data-lists")||"").trim(),A=(p.find(".goalEvent").text()||"").trim(),q=S||A;if($(".ya-metrica-new-ml").length>0){let t=$(".yaMetrica").text();t&&q&&yandexMetricaCount(t,q)}"undefined"!=typeof fbq&&fbq("track","Lead"),sendGoalEventAnalytics(q),z.includes("?")||(z=z.replace("&","?"));let M=h(z),L=d(z);E.length>0&&(L.SBLabels=E),I.length>0&&(L.SBLists=I);let P=sanitizeObject(L);const F=["client_token","sclient_id","sclientId","client_id","clientId","recepient","recipient","telegram_id","telegramId","tg_id","tgId","tg_user_id","tgUserId","chat_id","chatId","group","bot_name","short_name"],O=new URLSearchParams(window.location.search);F.forEach(t=>{const e=O.get(t);e&&(P[t]=e)});const N=window.Telegram?.WebApp?.initDataUnsafe?.user?.id;N&&(P.telegram_id=N.toString(),P.tg_user_id=N.toString());let W=!1;if("function"==typeof window.isTelegramWebApp)try{W=window.isTelegramWebApp()}catch(t){}W||(W=!!(window.SBTelegramWebApp&&"function"==typeof window.SBTelegramWebApp.close||window.Telegram&&window.Telegram.WebApp&&/(?:[?#&])tgWebApp(?:Platform|Data|Version)=/.test(window.location.href)));const B=function(t){if(!t)return!1;if("function"==typeof window.openTelegramWebAppLink)try{return!1!==window.openTelegramWebAppLink(t)}catch(t){}let e;try{if(e=new URL(t,window.location.href),"https:"!==e.protocol||e.username||e.password||e.port)return!1;if(!/^(t\.me|telegram\.me)$/i.test(e.hostname))return!1;/^telegram\.me$/i.test(e.hostname)&&(e.hostname="t.me")}catch(t){return!1}const n=window.Telegram&&window.Telegram.WebApp;if(n&&"function"==typeof n.openTelegramLink)try{return n.openTelegramLink(e.href),!0}catch(t){}try{return window.location.href=e.href,!0}catch(t){}return!1};W?(x.css("pointer-events","none"),C.css("display","none"),k.css("display","flex"),getPixels(global_rk_vk_label,global_ml_id,$(m).find(".mes_ident").text()).then(()=>{$.ajax({url:sbSameOriginRequestUrl(M),type:"POST",data:P,success:function(t){x.css("pointer-events","auto"),C.css("display","inline-block"),k.css("display","none"),t&&t.redirect_to&&B(t.redirect_to)||("function"==typeof window.closeTelegramWebApp?window.closeTelegramWebApp():window.Telegram&&window.Telegram.WebApp&&window.Telegram.WebApp.close())},error:function(){x.css("pointer-events","auto"),C.css("display","inline-block"),k.css("display","none")},timeout:5e3})})):getPixels(global_rk_vk_label,global_ml_id,$(m).find(".mes_ident").text()).then(()=>{$.ajax({url:sbSameOriginRequestUrl(M),type:"POST",data:P,success:function(t){if("function"==typeof window.isTelegramWebApp&&window.isTelegramWebApp()){if(t&&t.redirect_to&&B(t.redirect_to))return;window.closeTelegramWebApp()}else t.redirect_to?window.location.href=t.redirect_to:console.log("\u0421\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e")},error:function(){console.log("error")}})})}function removeBracketsRecursively(t){for(;t.includes("#{");)t=t.replace(/#\{([^{}]*)\}/g,"$1");return t}function sanitizeObject(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,"string"==typeof e?removeBracketsRecursively(e):e]))}function slideDown(t){function e(e){e?($(t).find(".slide_text-btn-top").removeClass("hidden"),$(t).find(".slide_text-btn-down").addClass("hidden")):($(t).find(".slide_text-btn-top").addClass("hidden"),$(t).find(".slide_text-btn-down").removeClass("hidden"))}function n(){let n=r.height(),a=$(t).find(".slide_type").text(),s=o.height()<1;if(e(s),"1"===a)s?(o.css("height","fit-content"),r.css("transform","translateY(0px)")):(o.css("height","0"),r.css("transform","translateY(-100%)"));else{let t=n/15,e=o.height();i=s?setInterval(function(){if(e<=n){e=o.height();let i=-n+e+t>0?0:-n+e+t,a=e+t>n?"fit-content":`${e+t}px`;o.css("height",a),r.css("transform",`translateY(${i}px)`)}else clearInterval(i)},15):setInterval(function(){e>1?(e=o.height(),o.css("height",e-t+"px"),r.css("transform",`translateY(-${n-(e+t)}px)`)):clearInterval(i)},15)}}let i,o=$(t).find(".slide_text_full_text-block"),r=$(t).find(".slide_target"),a=$(t).find(".slide_text-btn");$(a).off().on("click",function(t){t.preventDefault(),i&&clearInterval(i),n()})}function studentsMobileMenu(){function t(){n.removeClass("burger-menu
1-overlay--active"),i.removeClass("burger-menu--active"),$("body").css("overflowY","auto")}const e=$(".mobile__burger_menu"),n=$(".burger-menu-overlay"),i=$(".burger-menu"),o=$(".burger-close");$(window).width()<916&&($(".header__list").css("height","0"),$(".header-lessons").css("margin","0"),$(".header-lessons-trigger").css("display","none"),$(".header__list-burger").css("display","none")),e.off("click").on("click",function(){n.addClass("burger-menu-overlay--active"),i.addClass("burger-menu--active"),$("body").css("overflowY","hidden")}),o.on("click",t),n.on("click",t)}function gallery0(){$(".gallery_0").each(function(t,e){let n=$(e).find(".img-w");n.each(function(){$(this).wrap("<div class='img-c'></div>");let t=$(this).find("img").attr("data-src");$(this).attr("data-bg",t)}),$(e).find(".img-c").click(function(){let t=$(this).outerWidth(),e=$(this).outerHeight();$(this)[0].getBoundingClientRect();$(n).find(".active").not($(this)).remove();let i=$(this).clone();i.find("img").remove(),i.css({top:12,left:123}),i.insertAfter($(this)).height(e).width(t).delay(500).addClass("active"),i.on("click",function(){$(this).remove()}),setTimeout(function(){i.addClass("positioned")},0)})})}function timer(){function t(){n.each(function(t,e){let n=$(e).find(".salebot-timer__item-nums");$(e).find(".salebot-timer__item-name");if(r[t].value<1e3)return void setTime(n,{0:"00",1:"00",2:"00",3:"00",4:"00"});r[t].value=r[t].value-1e3;let i=r[t].value,o=Math.floor(i/864e5),a=i%864e5,s=Math.floor(a/36e5),l=i%36e5,c=Math.floor(l/6e4),u=i%6e4,d=Math.floor(u/1e3);i<1e3?setTime(n,{0:"00",1:"00",2:"00",3:"00",4:"00"}):(setTime(n,{0:o<10?`0${o}`:o,1:s<10?`0${s}`:s,2:c<10?`0${c}`:c,3:d<10?`0${d}`:d,4:"00"}),n.length>4&&new Array(99).fill(1).forEach((t,e)=>{let i=99-e;setTimeout(()=>{setTime(n,{4:i<10?`0${i}`:i})},10*e)}))})}function e(t,e){let n=/^([0-9][0-9]).([0-9][0-9]).([0-9][0-9][0-9][0-9]) ([0-9][0-9]):([0-9][0-9])/gm.exec(t),i=1e3*-(new Date).getTimezoneOffset()*60-e;return Date.parse(`${n[3]}-${n[2]}-${n[1]}T${n[4]}:${n[5]}`)-Date.now()+i}let n=$(".salebot-timer");if(n.length<1)return;let i={1:"%",2:"z",3:"f",4:"@",5:"D",6:"{",7:"c",8:"&",9:"s",0:"B"," ":"h"},o={1:"n",2:"&",3:"1",4:"J",5:"k",6:"b",7:"M",8:"d",9:"s",0:"Q"},r={};n.each(function(t,n){let a=$(n).find(".timer_variable--js"),s=$(n).find(".timer_type"),l=$(n).find(".timezone"),c=$(n).find(".get-countdown-time"),u=$(n).find(".get-restart-time"),d=$(n).find(".timer_id"),h=$(n).find(".current_date");if(r[t]={},r[t].value="#{}"!==a.text()?e(a.text(),parseInt(l.text())):parseInt(c.text())||0,r[t].restartType=u.length>0,r[t].restartType){r[t].restartTimer=parseInt(u.text()),r[t].timer_id=parseInt(d.text());let e=d.text().split("").map(function(t){return o[t]}).join("");r[t].key=e;let n=localStorage.getItem(e);if(n)try{let o=n.split("").map(function(t){return Object.keys(i).find(e=>i[e]===t)}).join("").split(" ");if(r[t].value=parseInt(o[0])-parseInt(h.text()),"cycle"===s.text()&&(r[t].value||(localStorage.removeItem(e),n=null)),u.text().length>0){let e=60*parseInt(u.text())*1e3;r[t].value+e<0&&(n=null)}}catch{n=null}if(!n){let n=parseInt(c.text())||0,o=parseInt(h.text())+n;r[t].value=parseInt(c.text())||0,o=`${o}`.split("").map(function(t){return i[t]}).join(""),localStorage.setItem(e,`${o}`)}}$(c).remove(),$(d).remove(),$(h).remove(),$(u).remove()}),t();setInterval(function(){t()},1e3)}function setTime(t,e){t.each(function(t,n){if(!e[t])return;let i=`${e[t]}`.split(""),o=$(n).find("span");0===t&&i.every(t=>
1"0"===t)&&$(n).closest(".div_days").hide(),i.forEach((t,e)=>{o.eq(e).text(i[e])})})}function textSpaces(){$("p").each(function(t,e){let n=$(e).html();" "===$(e).html()||$(e).html(n.replaceAll(" "," "))})}function scrollUp(){const t=$(".sb_btn_scroll_up");let e=!1;$(window).scroll(function(){let n=$(window).scrollTop();n>=800&&!e?(e=!0,t.css({pointerEvents:"all",opacity:"1"},300)):n<800&&e&&(e=!1,t.css({pointerEvents:"none",opacity:"0"}))}),t.off().on("click",function(){$("html, body").animate({scrollTop:0},200)})}function menuButtonTextTargets(t){return t.find("a, .text")}function rememberMenuButtonTextColors(t){menuButtonTextTargets(t).each(function(){const t=$(this);void 0===t.attr("data-menu-original-color")&&t.attr("data-menu-original-color",this.style.color||"")})}function resetMenuButtonColors(t){const e=(...t)=>t.find(t=>null!=t&&""!==`${t}`.trim())||"",n=e(t.attr("textColor"),t.attr("textcolor")),i=e(t.attr("backgroundColor"),t.attr("backgroundcolor")),o=e(t.attr("borderColor"),t.attr("bordercolor")),r=e(t.attr("borderWidth"),t.attr("borderwidth"));t.css({color:n||"",background:i||"",borderColor:o||"",borderWidth:r?/^\d+(\.\d+)?$/.test(`${r}`)?`${r}px`:r:""}),n.length>0?menuButtonTextTargets(t).css("color",n):menuButtonTextTargets(t).each(function(){const t=$(this).attr("data-menu-original-color");void 0!==t&&$(this).css("color",t)})}function normalizeMenuHexColor(t){const e=String(t||"").trim();return e&&"transparent"!==e.toLowerCase()&&/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e)?4===e.length?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`.toLowerCase():e.toLowerCase():""}function menuColorsEqual(t,e){const n=normalizeMenuHexColor(t),i=normalizeMenuHexColor(e);return n.length>0&&i.length>0&&n===i}function menuHexLuminance(t){const e=normalizeMenuHexColor(t);if(!/^#[0-9a-f]{6}$/.test(e))return.92;const n=e.slice(1).match(/.{2}/g).map(t=>parseInt(t,16)/255).map(t=>t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4));return.2126*n[0]+.7152*n[1]+.0722*n[2]}function readableMenuTextColor(t,e){const n=((...t)=>t.find(t=>null!=t&&""!==`${t}`.trim())||"")(t.attr("textColor"),t.attr("textcolor"));return n&&!menuColorsEqual(n,e)?n:menuHexLuminance(e)<.42?"#ffffff":"#111111"}function buttonColorsHover(t){t.off(".menuHover").on("mouseenter.menuHover",function(){const t=$(this),e=(...t)=>t.find(t=>null!=t&&""!==`${t}`.trim())||"";let n=e(t.attr("hoverColor"),t.attr("hovercolor"));const i=e(t.attr("hoverBackgroundColor"),t.attr("hoverbackgroundcolor")),o=e(t.attr("hoverBorderColor"),t.attr("hoverbordercolor"),i);menuColorsEqual(n,i)&&(n=readableMenuTextColor(t,i)),t.closest(".header_buttons_block").find(".salebot-md__menu-btn").each(function(){resetMenuButtonColors($(this))}),(n?.length>0||i?.length>0||o?.length>0)&&(rememberMenuButtonTextColors(t),t.css({color:n||"",background:i||"",borderColor:o||""}),n.length>0&&menuButtonTextTargets(t).css("color",n))}).on("mouseleave.menuHover",function(){resetMenuButtonColors($(this))})}function menuButtonsAction(t){$(t).find("a").on("click",function(t){if("id"===$(this).attr("target")){t.preventDefault();const e=$(this).attr("href").replace("#",""),n=$("#"+e);n.length>0&&$([document.documentElement,document.body]).animate({scrollTop:n.offset().top},300)}})}function gallerySlider(){function t(t,e){$(e).css("transform",`translateX(-${100*t}vw)`)}$(".gallery_slide").each(function(e,n){function i(){u||(u=setInterval(function(){p--,p<0&&(clearInterval(u),u=void 0,o.css("opacity","0"),r.css("opacity","0"),a.css("opacity","0"))},1e3))}const o=$(n).find(".gallery_full_screen_left_btn"),r=$(n).find(".gallery_full_screen_right_btn"),a=$(n).find(".gallery_full_screen_close"),s=$(n).find(".full_screen_trigger"),l=$(n).find(".gallery_full_screen_items"),c=$(n).find(".gallery_full_screen");let u,d=0,h=!1,p=3;$(s).on("click",function(){h=!0,d=s.index($(this)),t(d,l),$(this).closest(".salebot-landing__section").removeClass("sb_fade_in active"),c.removeClass("hidden"),$(this).closest("section").find(".gallery_full_screen").appendTo("body")}),$(a).on("click",function(){h=!1,c.addClass("hidden")}),$(o).on("click",function(){0===d?d=$(s).length-1:d--,t(d,l)}),$(r).on("click",function(){d===$(s).length-1?d=0:d++,t(d,l)}),i(),c.on("mousemove",function(){p=3,o.css("opacity","1"),r.css("opacity","1"),a.css("opacity","1"),i()}),$(document).on("keyup",function(e){h&&("ArrowLeft"===e.key&&(0===d?d=$(s).length-1:d--),"ArrowRight"===e.key&&(d===$(s).length-1?d=0:d++),t(d,l))})})}function toggleHeaderMenu(){const t=$(".header_menu_burger_btn"),e=$(".header_buttons_block"),n=$("body");t.on("click",function(){e.toggleClass("header_buttons_block--active"),n.toggleClass("salebot-landing--overflow-hidden")})}
1function menuMobileBackground(){if($(window).width()<=1024){const t=$(".section__menu-header .header_buttons_block");t.css("background",$(t).attr("data-mobileBackground"))}}function scrollHeaderMenu(){$(".salebot-md__menu-btn a").off().on("click",function(t){if(1===$(this).find(".scroll_to").length){t.preventDefault(),$(".header_buttons_block").removeClass("header_buttons_block--active"),$("body").removeClass("salebot-landing--overflow-hidden");const e=$(this).attr("href").replace(/#/,""),n=$("#"+e);if(0===n.length)return;const i=n.offset();if(!i)return;const o=i.top-40;$("body,html").animate({scrollTop:o},300)}})}function sendOnlineChatMetrics(){const t=$(".online_chat_metrics span").map(function(t,e){return"true"===$(e).text()}),e=mini_landing_init(t[0],t[1],t[2],t[3],t[4]),n=document.getElementById("parent_frame").contentWindow;if($("#parent_frame").length>0&&e.length>0){const t={"salebot.zmservice.ru":"https://salebot.zmservice.ru",localhost:window.MAIN_APP_DOMAIN_JS||location.origin},i=location.hostname.includes("mavibot")?"https://mavibot.ai":"https://salebot.pro",o=t[location.hostname]||i;n.postMessage(`SendMetrics ${e}`,`${o}`)}}function grabParams(t){let e=t.parents(".salebot-form__container"),n=e.find(".personal_privacy_input"),i=e.find(".mailing_agreement_input"),o=e.find(".privacy_input"),r=o.prop("checked"),a=!0,s={};return e.find(".ml_quiz").each(function(e,l){let c,u,d="true"===$(l).find(".ml_quiz_important").text(),h=$(l).find(".ml_quiz_variable").text(),p=$(l).find(".ml_quiz_type").text();if(d?(c=validationFunctions[p](l,a,d),a=void 0!==c.validation?c.validation:c.validationSuccess,u=c.value):(c=validationFunctions[p](l,a,d),u=c.value),a&&quizValidationTypes[p]&&(s[h]=decodeURIComponent(u)),a&&!quizValidationTypes[p]){let t=variablesFunctions[p+"_obj"](l,d);s[t.name]=decodeURIComponent(t.value)}(!a||o.length>0&&!r)&&t.removeClass("disabled"),n.length>0&&!n.is(":checked")&&t.removeClass("disabled"),i.length>0&&!i.is(":checked")&&t.removeClass("disabled")}),void 0===window.passedCaptcha||window.passedCaptcha[id_for_buttons]?(o.length>0&&!r&&showFormWarning(e,"privacy"),n.length>0&&!n.is(":checked")?(showFormWarning(e,"personal-privacy"),!1):i.length>0&&!i.is(":checked")?(showFormWarning(e,"mailing-agreement"),!1):(a||showFormWarning(e,"quiz"),!(!a||o.length>0&&!r)&&s)):(showFormWarning(e,"recaptcha"),!1)}function getUTMParams(){const t=new URLSearchParams(window.location.search);return{utm_source:t.get("utm_source")||"",utm_medium:t.get("utm_medium")||"",utm_campaign:t.get("utm_campaign")||"",utm_term:t.get("utm_term")||"",utm_content:t.get("utm_content")||""}}function successMessage(){$(document).off("click.sbGoToPayment").on("click.sbGoToPayment",".go_to_payment_btn",function(t){t.preventDefault(),t.stopPropagation();const e=$(this);let n=$(this).attr("href"),i=grabParams($(this));if(!i)return;const o=(e.attr("data-labels")||"").trim(),r=(e.attr("data-lists")||"").trim();o.length>0&&(i.SBLabels=o),r.length>0&&(i.SBLists=r);let a=$(this).find(".payment_info_project_id").text(),s=$(this).find(".payment_info_name").text(),l=$(this).find(".payment_info_description").text(),c=$(this).find(".payment_info_client_id").text(),u=$(this).find(".payment_info_state_id").text(),d=$(this).find(".payment_info_price").text(),h=$(this).parents(".salebot-form__container").find(".page_section_id").text(),p=$(this).parents(".salebot-form__container").find(".proxy_page_id").text();const f={...i,client_name:i.name_from_ml,client_phone:i.phone,client_comment:i.email,...getUTMParams()};delete f.name_from_ml,delete f.phone,delete f.email;let m={order:{cost:d,new_client_name:i.name_from_ml,new_client_phone:i.phone,new_client_email:i.email,client_id:c,state_id:u,name:s,description:l,variables:JSON.stringify(f)},skip_auth:!0,page_section_id:h,proxy_page_id:p};const g={"salebot.zmservice.ru":"https://salebot.zmservice.ru",localhost:window.MAIN_APP_DOMAIN_JS||location.origin,"mavibot.ai":"https://mavibot.ai","mavibot.site":"https://mavibot.ai","salebot.site":"https://salebot.pro","s.mavibot.ai":"https://mavibot.ai"},v=location.hostname.includes("mavibot")?"https://mavibot.ai":"https://salebot.pro",_=g[location.hostname]||v;$.ajax({url:`${_}/projects/${a}/orders`,method:"POST",data:m,success:function(t){t&&t.order_id&&(i.order_id=t.order_id),$.ajax({url:n,type:"POST",data:i,success:function(t){if(t&&t.error){const n=e.closest(".salebot-form__container").find(".incorrect_form_warning").first();return n.text(t.error).removeClass("hidden").show(),void setTimeout(function(){n.addClass("hidden").hide()},6e3)}const n=e.closest(".salebot-form__container").find(".goalEvent").text().trim();n&&sendGoalEventAnalytics(n);let i=t.payment_link;if(i){const t=/iPad|iPhone|iPod/.test(navigator.userAgent),e=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/);t||e?window.location.href=i:window.open(i)}},error:function(t){console.log("DATA ERROR"+t)}})}})})}function colorListMarker(){$("li:not([class]) span").each(function(t,e){$(this).css("font-size");let n=$(this).css("background-color"),i=$(this).css("color");$(e).parent("li").css({backgroundColor:n,color:i})})}function validatePrivacyButtons(){$(".privacy_offer_input"),$(".privacy_pay_input");$(".salebot-btns__item").on("click",function(t){if(!validatePrivacy($(this))){t.preventDefault();const e=$(".salebot-notification--warning"),n=$(".salebot-notification--offer");e.show(),n.show(),setTimeout(function(){e.hide(),n.hide()},3e3),console.log(e)}})}function idMaker(t=10){let e="",n="0123456789";for(let i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*n.length));return e}function validatePrivacy(t){const e=$(t).closest(".salebot-landing__section"),n=e.find(".privacy_offer_input"),i=e.find(".privacy_pay_input");return!(n.length>0||i.length>0)||(n.is(":checked")||n.length<1)&&(i.is(":checked")||i.length<1)}function initGallery(t){t.filter((t,e)=>$(e).find(".sb-gallery-wrapper").length>0).each(function(t,e){function n(t){t>s&&"loop"===l&&(t=0),t<0&&"loop"===l&&(t=s),i.attr("data-index",t),parseInt(i.attr("data-index"))===s&&"no_loop"===l?a.hide():a.show(),0===parseInt(i.attr("data-index"))&&"no_loop"===l?r.hide():r.show();let e=100*-t+"%";i.css({transform:"translateX("+e+")",transition:`${c}s ease-in-out`})}const i=$(e).find(".sb-gallery-wrapper"),o=$(e).find(".sb-gallery-item"),r=$(e).find(".gallery-button-prev"),a=$(e).find(".gallery-button-next"),s=o.length-1,l=$(e).attr("data-settings-loop"),c=$(e).attr("data-settings-speed"),u=parseInt($(e).attr("data-settings-autoplay"));let d;if($(e).off(".galleryIntervalHover").on("mouseenter.galleryIntervalHover",function(){d=!0}),$(e).on("mouseleave.galleryIntervalHover",function(){d=!1}),i.attr("data-index")||i.attr("data-index","0"),u>0){setInterval(function(){d||n(parseInt(i.attr("data-index")||"0")+1)},1e3*u)}console.log(u),a.off().on("click",function(){n(parseInt(i.attr("data-index")||"0")+1)}),r.off().on("click",function(){n(parseInt(i.attr("data-index")||"0")-1)});const h=new Hammer(i[0]);h.on("swipeleft",function(){if(parseInt(i.attr("data-index"))<s&&"no_loop"===l){n(parseInt(i.attr("data-index")||"0")+1)}else if("loop"===l){n(parseInt(i.attr("data-index")||"0")+1)}}),h.on("swiperight",function(){if(parseInt(i.attr("data-index"))>0&&"no_loop"===l){n(parseInt(i.attr("data-index")||"0")-1)}else if("loop"===l){n(parseInt(i.attr("data-index")||"0")-1)}}),n(i.attr("data-index"))})}function setClickHandlerForImage(){function t(t){$(".modal-overlay").remove(),t.children("img").remove(),t.addClass("hidden"),history.state?.isOpenModal?history.back():history.replaceState(null,"",window.location.pathname),removeEventListener("popstate",function(){})}function e(){t($(".image-modal"))}"1"===$(".set_handler_image-js").text()&&$(".salebot-attachments__image > img, .salebot-cover__screen >
1 img, .img_input, .filter_view").off("click.modal").on("click.modal",function(){const n=this.src??$(this).attr("src");history.pushState({isOpenModal:!0},"OpenModal","?img_modal");let i=$(".image-modal").after('<div class="modal-overlay"></div>').removeClass("hidden").off("click.modal").on("click.modal",()=>t(i));i.children("svg").css({position:"absolute",width:"32px",height:"32px",right:"16px"}),i.append(`<img src="${n}" style="cursor: zoom-out; margin-left: auto; margin-right: auto; max-height: ${.8*$(window).height()+"px"}; max-width: ${.8*$(window).width()+"px"};"/>`).css({"z-index":"1003",display:"block",position:"fixed",top:"10%",width:"100%"}),i.next().css({display:"block",opacity:"0.5","z-index":"1002"}).off("click.modal").on("click.modal",()=>t(i)),window.removeEventListener("popstate",e),window.addEventListener("popstate",e)}).css("cursor","zoom-in")}function setInputHandlerForNumericForm(){$(".quiz_numeric").each(function(){let t=$(this).find(".numeric_answer"),e="true"===$(this).find(".ml_quiz_isFloat").text();t.on("input",function(){let t=$(this).val();e||$(this).val(parseInt(t.replace(/[^\d]/g,""))||"0")})})}function setAddColorToButton(){$(".sb-button").each((t,e)=>{const n=$(e).attr("data-hover"),i=$(e).attr("data-hover-text-color"),o=$(e).attr("data-color-click"),r=$(e).css("background"),a=$(e).css("color");(n||i)&&$(e).on("mouseover",()=>{$(e).css("background",n),$(e).css("color",i)}).on("mouseout",()=>{$(e).css("background",r),$(e).css("color",a)}),o&&$(e).on("mousedown",()=>{$(e).css("background",o)}).on("mouseup",()=>{$(e).css("background",r)}),$(e).on("click",function(t){const e=$(this).attr("href");if(!e)return;let n=null;try{const t=new URL(e,location.origin);t.hash&&(n=t.hash.split("?")[0].substring(1))}catch(t){e.startsWith("#")&&(n=e.substring(1).split("?")[0])}if(!n)return;const i=$("#"+CSS.escape(n));i.length&&i.hasClass("section_to_modal_true")&&(t.preventDefault(),openSectionModal(i))})})}function sectionBtnSettings(){$(".cover_btn").each((t,e)=>{const n=JSON.parse($(e).attr("data-style")||"{}");n.show?$(e).show():$(e).hide(),$(e).on("mouseenter",function(){$(e).css({color:n.hoverColor?n.hoverColor:"",background:n.hoverBackgroundColor?n.hoverBackgroundColor:"",borderColor:n.hoverBorderColor?n.hoverBorderColor:""})}).on("mouseleave",function(){$(e).css({color:n.textColor?n.textColor:"",background:n.backgroundColor?n.backgroundColor:"",borderColor:n.borderColor?n.borderColor:""})})})}function cardsHover(){const t=$(".cards_container").attr("data-hoverBackgroundColor"),e=$(".cards_container").attr("data-hoverBorderColor"),n=$(".cards_container").attr("data-backgroundColor"),i=$(".cards_container").attr("data-borderColor");$(".card_item").each((o,r)=>{$(r).on("mouseenter",function(){$(r).css({background:t,borderColor:e})}).on("mouseleave",function(){$(r).css({background:n,borderColor:i})})})}function setConditionHandler(t){t.each(function(){const t=$(this);(JSON.parse(t.find(".ml_quiz_json").text()).conditions||[]).forEach(e=>{const n=e.action||"",i=JSON.parse(e.answer||"[]").map(t=>t.id),o=e.condition,r=e.answerValue||"";let a;try{a=JSON.parse(r)}catch(t){a=[r]}let s=!0;if(i.forEach(t=>{ 2const e=$(`.ml_quiz[data-id=${t}]`);if(!e.length)return;const n=$(e).find(".ml_quiz_type").text(),{validation:i,value:r}=validationFunctions[n](e,!0);if("answered"===o)i||(s=!1);else if("notAnswered"===o)i&&(s=!1);else if("selectedAnswer"===o)if(["select","radio"].includes(n)){const t=String(Array.isArray(a)?a[0]:a);String(r)!==t&&(s=!1)}else if("checkbox"===n){const t=r.split(";").map(t=>t.trim()).filter(Boolean);a.some(e=>t.includes(e))||(s=!1)}else r!==(a[0]||"")&&(s=!1);$(e).attr("data-answered",s)}),n.length>0&&i.length>0&&o.length>0&&("show"===n?t.customShow(s):t.customShow(!s),"function"==typeof window.quizSetCalendar))try{window.quizSetCalendar()}catch(t){}})})}function conditionQuiz(){let t=$(".ml_quiz"),e=t.filter(function(){return(JSON.parse($(this).find(".ml_quiz_json").text()).conditions||[]).some(t=>"show"===t.action||"hide"===t.action)});e.length<1||(e.attr("data-answered","false"),setConditionHandler(e),t.each(function(){$(this).on("input click",function(){setConditionHandler(e)})}))}function setZindexSections(){const t=$(".salebot-landing__section-inner");t.each(function(e){$(this).css("z-index",t.length-e)})}async function getCaptchaResponse(t,e){const n=$(e).attr("class").split(" ").find(t=>t.includes("form_"));void 0===window.passedCaptcha&&(window.passedCaptcha={}),window.passedCaptcha[n]=!1,grecaptcha?t?await fetch(getDomain()+`/check_recaptcha?token=${t}&id=${$(".salebot-landing").attr("data-help")}`,{method:"GET"}).then(t=>t.json()).then(t=>{window.passedCaptcha[n]=t.data.success}).catch(t=>{console.log(t),window.passedCaptcha[n]=!1}):window.passedCaptcha[n]=!1:window.passedCaptcha[n]=!0}function menuOpacity(){$(".sb_menu_sticky_opacity").each(function(){const t=parseInt($(this).attr("data-showOffset"),10);if(!Number.isFinite(t))return;let e=window.pageYOffset,n=$(this).height()/2;e>=t?($(this).css("opacity",1),e>n?$(this).find(".section-background").css("opacity",1):$(this).find(".section-background").css("opacity",0)
2):$(this).css("opacity",0)}),$(".sb_menu_sticky").each(function(){let t=parseInt($(this).attr("data-showOffset"),10);if(!Number.isFinite(t))return;let e=window.pageYOffset;t>0&&($(this).css("position","fixed"),e>=t?$(this).css("opacity",1):$(this).css("opacity",0))})}function setBackgroundSize(){$(".gallery_4").each(function(){const t=$(this).attr("data-aspect")||"4:3",e=parseInt($(this).attr("data-row-items")||"4"),n=e>2&&window.innerWidth<641?2:e;console.log(n);const i=$(this).width()/n;console.log(galleryAspectRatios[t](i)),galleryAspectRatios[t]?$(this).find(".gallery_4_item").css("height",galleryAspectRatios[t](i)):$(this).find(".gallery_4_item").css("height",galleryAspectRatios["4:3"](i))})}function initializeSwiperQuiz(t){function e(){const t=$(c).find(".swiper-wrapper"),e="true"===t.attr("data-isAutoHeight"),n=$(c).find(".swiper-slide");let i=[];return n.each(function(){i.push($(this).height()+32)}),function(n){e&&t.css("height",i[n])}}function n(){const t=$(c).find(".progress_group__label span"),e=$(c).find(".quiz_progress__bar");let n=l.slides.length-1,i=l.activeIndex;m&&(n-=1,i-=1);const o=100*(i<0?0:i/n);$(e).css("width",`${o}%`),t.text(Math.round(o)+"%")}function i(){$(c).find(".result_container-slide").each(function(){const t=JSON.parse($(this).attr("data-item")||"{}"),e=t.operator,n=t.conditions;let i=[];if(n.forEach(t=>{const e=$(`.ml_quiz[data-id=${t.questionId}]`);switch(t.type){case"text":"include"===t.answersType?i.push($(e).find(".ml_quiz_textarea").val().includes(t.answers)):i.push(!$(e).find(".ml_quiz_textarea").val().includes(t.answers));break;case"select":i.push($(e).find(".ml_quiz_total_answer").text()===t.answers);break;case"checkbox":let n=[];$(e).find(".salebot-checkbox").each(function(){$(this).find("input").is(":checked")&&n.push($(this).find("span").text().replace(/(?:<).*?(?:>)/gm,""))});let o=!1;t.answers.forEach(t=>{let e=n.some(e=>e===t);o=e||o}),i.push(o);break;case"radio":let r="";$(e).find(".salebot-radio").each(function(){$(this).find("input").is(":checked")&&(r=$(this).find(".span_answer").text())}),i.push(r===t.answers)}}),"or"===e)i.includes(!0)?$(this).show():$(this).hide();else{i.filter(t=>t).length===i.length?$(this).show():$(this).hide()}})}function o(){let t=[];return $(f[l.activeIndex]).find(".ml_quiz").each(function(){switch($(this).attr("class").split(" ")[1]){case"quiz_checkbox":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=[];$(this).find(".salebot-checkbox").map((t,n)=>{$(n).find("input").prop("checked")?e.push(!0):e.push(!1)});let n=e.includes(!0);t.push(n),n||r($(this).find("input"))}break;case"quiz_radio":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=[];$(this).find(".salebot-radio").map((t,n)=>{const i=$(n).find("input");i.attr("data-fa-type")?e.push($(n).find("textarea").val().trim().length>0):e.push(i.is(":checked"))});let n=e.includes(!0);t.push(n),n||r($(this).find("input"))}break;case"quiz_email":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".email_input").val();t.push(e),e||r($(this).find(".email_input"))}break;case"quiz_phone":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".phone_input").val();t.push(e),e||r($(this).find(".phone_input"))}break;case"quiz_select":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".ml_quiz_total_answer").text();t.push(e),e||r($(this).find(".ml_quiz_total_answer"))}break;case"quiz_text":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".ml_quiz_textarea").val();t.push(e),e||r($(this).find(".ml_quiz_textarea"))}break;case"quiz_numeric":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".numeric_answer").val();t.push(e),e||r($(this).find(".numeric_answer"))}break;case"quiz_name":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".name_input").val();t.push(e),e||r($(this).find(".name_input"))}break;case"quiz_quiz_calendar":if("true"===$(this).find(".ml_quiz_important").text()&&"none"!==$(this).css("display")){let e=""!==$(this).find(".quiz_create_calendar").val();t.push(e),e||r($(this).find(".quiz_create_calendar"))}}}),t}function r(t){$(t).attr("data-style",$(t).attr("style")),$(t).hasClass("custom_border_quiz_checkbox")||$(t).hasClass("custom_border_quiz_radio")?$(t).css("box-shadow","0px 0px 0px 1px #e56e86"):$(t).css("border-color","#e56e86"),show
2FormWarning($(c),"required"),setTimeout(function(){$(t).attr("style",$(t).attr("data-style"))},2e3)}function a(){$(c).find(".next_btn").show(),$(c).find(".create_quizz_btn-page").hide(),d.show(),u.show(),s()}function s(){if(!l?.slides)return;const t=$(c).find(".link_group"),e=$(c).find(".next_btn"),n=$(c).find(".previous_btn"),i=$(c).find(".create_quizz_btn-page");0===l.activeIndex||1===l.activeIndex&&m?$(n).attr("disable","true"):$(n).attr("disable","false"),0===l.activeIndex?(i.hide(),m&&(t.hide(),d.hide(),u.hide())):(t.show(),i.hide()),v&&l.activeIndex===l.slides.length-1||!1===v&&l.activeIndex===l.slides.length-2?(e.hide(),i.css("display","flex")):l.activeIndex===l.slides.length-1&&t.hide();let o=l.activeIndex;m&&o>0?(o-=1,sendGoalEventAnalytics(`sb-quiz-step${o}`)):l.slides.length-1===o&&v?sendGoalEventAnalytics("sb-quiz-result"):o>0&&sendGoalEventAnalytics(`sb-quiz-step${o}`)}if("undefined"==typeof Swiper)return;let l=new Swiper(".swiper-page-quiz",{slidesPerView:1,spaceBetween:16,simulateTouch:!1,loop:!1});const c=$(t).find(".body_quizz"),u=$(c).find(".quiz_separator, .quiz_progress"),d=$(t).find(".header_quizz"),h=()=>{const t=$(c).find(".result_container-slide:not(:hidden)");new Swiper(".result_container-swiper",{slidesPerView:1,spaceBetween:8,loop:!1,navigation:{nextEl:".result_container-swiper .swiper-button-next",prevEl:".result_container-swiper .swiper-button-prev"},slideActiveClass:"result_container-slide-active",slideClass:"result_container-slide",slideNextClass:"result_container-slide-next",slidePrevClass:"result_container-slide-prev",breakpoints:{800:{slidesPerView:t.length>=3?3:t.length}}});1===t.length&&(t.addClass("result_container-slide__single"),c.find(".result_page_header").hide())},p=e();p(l.activeIndex);let f=$(c).find(".swiper-slide");$(c).find(".incorrect_form_warning-pages");const m="true"===$(c).find(".swiper-page-quiz .swiper-wrapper").attr("data-haveStartPage");let g=$(c).find(".swiper-page-quiz .swiper-wrapper").attr("data-haveresults");const v=g&&g.length>2&&"null"!==g;$(c).find(".next_btn-start").on("click",function(){l.slideNext(),p(l.activeIndex),$(c).find(".link_group").show(),d.show(),u.show(),n(),sendGoalEventAnalytics("sb-quiz-start")}),$(c).find(".previous_btn").on("click",function(){if(0===l.activeIndex||1===l.activeIndex&&m);else{let t=l.activeIndex-1;for(;t>=0;){if($(l.slides[t]).find("> div:visible").length)break;t--}t>=0&&l.slideTo(t),p(l.activeIndex),a(),n()}}),$(c).find(".create_quizz_btn-page").off(".nextSlide").on("click.nextSlide",function(){let t=$(this).closest(".body_quizz");customFormValidation(t).valid&&!o().includes(!1)&&privacyValidation(t)&&($(".success_survey_form").hide(),l.slideNext(),p(l.activeIndex),a(),i(),h(),d.hide(),u.hide(),setTimeout(()=>{$(".success_survey_form").show()},1e4),$(this).hide())}),$(c).find(".next_btn").on("click",function(){let t=$(this).closest(".body_quizz");if(customFormValidation(t).valid&&!o().includes(!1)){let t=l.activeIndex+1;const e=l.slides.length;for(;t<e;){if($(l.slides[t]).find("> div:visible").length)break;t++}t<e&&l.slideTo(t),p(l.activeIndex),a()}n()}),s()}function notifications(){$(".salebot-landing__notification-section").each((t,e)=>{const n=`sb_notification_${$(e).attr("data-help")}`,i=$(e).find(".notification-section__button, .custom-button"),o=localStorage.getItem(n);i.on("click keypress",t=>{("keypress"===t.type&&"Enter"===t.key||"click"===t.type)&&(t.preventDefault(),localStorage.setItem(n,"true"),$(e).remove())}),o||($("body").append(e),$(e).removeClass("salebot-landing__notification-section--checking"))})}function sendGoalEventAnalytics(t){if(!t)return;const e=window.global_ym_code;if(e?.length&&"undefined"!=typeof ym)try{ym(e,"reachGoal",t)}catch(t){}if(window.gtag&&"function"==typeof window.gtag&&window.gtag("event",t),window.fbq&&"function"==typeof window.fbq)try{window.fbq("trackCustom",t)}catch(t){}if(window.global_rk_vk_label&&window._tmr&&Array.isArray(window._tmr))try{const e=("function"==typeof utm_data?utm_data():{})||{};window._tmr.push({type:"reachGoal",id:window.global_rk_vk_label,goal:t,params:{...e}}),"function"==typeof tmr_send&&tmr_send(document,window,"tmr-code")}catch(t){}}function renderPDFPreview(t,e){function n(){if("undefined"==typeof pdfjsLib){const t=document.createElement("script");return t.src="https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.min.js",t.onload=()=>{n()},void document.head.appendChild(t)}pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.worker.min.js",i.empty();const e=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);pdfjsLib.disableWorker=!0,pdfjsLib.getDocument(t).promise.then(t=>{const n=t.numPages,o=10,r=1.5,a=e?200:50;(async()=>{for(let s=0;s<n;s++){const l=[];for(let e=0;e<o&&s+e<n;e++)l.push(t.getPage(s+e+1));const c=await Promise.all(l);for(let t=0;t<c.length;t++){const n=c[t],o="pdf-canvas-"+(s+t+1),a=document.createElement("canvas");a.id=o,i[0].appendChild(a);const l=a.getContext("2d"),u=e?1:window.devicePixelRatio||1,d=n.getViewport({scale:r*u});a.height=d.height,a.width=d.width,a.style.width="100%",a.style.height="auto",a.style.display="block",a.style.marginBottom="10px",await n.render({canvasContext:l,viewport:d}).promise,n.cleanup()}s+o<n&&await new Promise(t=>setTimeout(t,a)),s+=o-1}})().catch(t=>{console.error("Error rendering PDF pages:",t)})}).catch(t=>{console.error("Error loading PDF:",t)})}if(!t||!e)return;const i=$(e);i&&n()}!function(t,e,n,i){"use strict";function o(t,e,n){return setTimeout(c(t,n),e)}function r(t,e,n){return!!Array.isArray(t)&&(a(t,n[e],n),!0)}function a(t,e,n){var o;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==i)for(o=0;o<t.length;)e.call(n,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function s(e,n,i){var o="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,i),e.apply(this,arguments)}}function l(t,e,n){var i,o=e.prototype;(i=t.prototype=Object.create(o)).constructor=t,i._super=o,n&&dt(i,n)}function c(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==ft?t.apply(e&&e[0]||i,e):t}function d(t,e){return t===i?e:t}function h(t,e,n){a(g(e),function(e){t.addEventListener(e,n,!1)})}function p(t,e,n){a(g(e),function(e){t.removeEventListener(e,n,!1)})}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function g(t){return t.trim().split(/\s+/g)}
vendor: 10,795 bytes, line 2
2function v(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function _(t){return Array.prototype.slice.call(t,0)}function y(t,e,n){for(var i=[],o=[],r=0;r<t.length;){var a=e?t[r][e]:t[r];v(o,a)<0&&i.push(t[r]),o[r]=a,r++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function $(t,e){for(var n,o,r=e[0].toUpperCase()+e.slice(1),a=0;a<ht.length;){if((o=(n=ht[a])?n+r:e)in t)return o;a++}return i}function b(){return $t++}function w(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}function x(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){u(t.options.enable,[t])&&n.handler(e)},this.init()}function k(t){var e=t.options.inputClass;return new(e||(xt?N:kt?D:wt?H:O))(t,C)}function C(t,e,n){var i=n.pointers.length,o=n.changedPointers.length,r=e&It&&i-o===0,a=e&(qt|Mt)&&i-o===0;n.isFirst=!!r,n.isFinal=!!a,r&&(t.session={}),n.eventType=e,T(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function T(t,e){var n=t.session,i=e.pointers,o=i.length;n.firstInput||(n.firstInput=E(e)),o>1&&!n.firstMultiple?n.firstMultiple=E(e):1===o&&(n.firstMultiple=!1);var r=n.firstInput,a=n.firstMultiple,s=a?a.center:r.center,l=e.center=I(i);e.timeStamp=vt(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=L(s,l),e.distance=M(s,l),z(n,e),e.offsetDirection=q(e.deltaX,e.deltaY);var c=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=gt(c.x)>gt(c.y)?c.x:c.y,e.scale=a?F(a.pointers,i):1,e.rotation=a?P(a.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,S(n,e);var u=t.element;f(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function z(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==It&&r.eventType!==qt||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}function S(t,e){var n,o,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=Mt&&(l>Et||s.velocity===i)){var c=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,d=A(l,c,u);o=d.x,r=d.y,n=gt(d.x)>gt(d.y)?d.x:d.y,a=q(c,u),t.lastInterval=e}else n=s.velocity,o=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=o,e.velocityY=r,e.direction=a}function E(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:mt(t.pointers[n].clientX),clientY:mt(t.pointers[n].clientY)},n++;return{timeStamp:vt(),pointers:e,center:I(e),deltaX:t.deltaX,deltaY:t.deltaY}}function I(t){var e=t.length;if(1===e)return{x:mt(t[0].clientX),y:mt(t[0].clientY)};for(var n=0,i=0,o=0;e>o;)n+=t[o].clientX,i+=t[o].clientY,o++;return{x:mt(n/e),y:mt(i/e)}}function A(t,e,n){return{x:e/t||0,y:n/t||0}}function q(t,e){return t===e?Lt:gt(t)>=gt(e)?0>t?Pt:Ft:0>e?Ot:Nt}function M(t,e,n){n||(n=Rt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function L(t,e,n){n||(n=Rt);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}function P(t,e){return L(e[1],e[0],Ht)+L(t[1],t[0],Ht)}function F(t,e){return M(e[0],e[1],Ht)/M(t[0],t[1],Ht)}function O(){this.evEl=Ut,this.evWin=Vt,this.pressed=!1,x.apply(this,arguments)}function N(){this.evEl=Gt,this.evWin=Jt,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=Qt,this.evWin=Kt,this.started=!1,x.apply(this,arguments)}function B(t,e){var n=_(t.touches),i=_(t.changedTouches);return e&(qt|Mt)&&(n=y(n.concat(i),"identifier",!0)),[n,i]}function D(){this.evTarget=ee,this.targetIds={},x.apply(this,arguments)}function R(t,e){var n=_(t.touches),i=this.targetIds;if(e&(It|At)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,a=_(t.changedTouches),s=[],l=this.target;if(r=n.filter(function(t){return f(t.target,l)}),e===It)for(o=0;o<r.length;)i[r[o].identifier]=!0,o++;for(o=0;o<a.length;)i[a[o].identifier]&&s.push(a[o]),e&(qt|Mt)&&delete i[a[o].identifier],o++;return s.length?[y(r.concat(s),"identifier",!0),s]:void 0}function H(){x.apply(this,arguments);var t=c(this.handler,this);this.touch=new D(this.manager,t),this.mouse=new O(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function j(t,e){t&It?(this.primaryTouch=e.changedPointers[0].identifier,U.call(this,e)):t&(qt|Mt)&&U.call(this,e)}function U(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,o=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(o,ne)}}function V(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(e-o.x),a=Math.abs(n-o.y);if(ie>=r&&ie>=a)return!0}return!1}function Y(t,e){this.manager=t,this.set(e)}function X(t){if(m(t,ce))return ce;var e=m(t,ue),n=m(t,de);return e&&n?ce:e||n?e?ue:de:m(t,le)?le:se}function G(){if(!re)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){e[i]=!n||t.CSS.supports("touch-action",i)}),e}function J(t){this.options=dt({},this.defaults,t||{}),this.id=b(),this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=pe,this.simultaneous={},this.requireFail=[]}function Z(t){return t&_e?"cancel":t&ge?"end":t&me?"move":t&fe?"start":""}function Q(t){return t==Nt?"down":t==Ot?"up":t==Pt?"left":t==Ft?"right":""}function K(t,e){var n=e.manager;return n?n.get(t):t}function tt(){J.apply(this,arguments)}function et(){tt.apply(this,arguments),this.pX=null,this.pY=null}function nt(){tt.apply(this,arguments)}function it(){J.apply(this,arguments),this._timer=null,this._input=null}function ot(){tt.apply(this,arguments)}function rt(){tt.apply(this,arguments)}function at(){J.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function st(t,e){return(e=e||{}).recognizers=d(e.recognizers,st.defaults.preset),new lt(t,e)}function lt(t,e){this.options=dt({},st.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=k(this),this.touchAction=new Y(this,this.options.touchAction),ct(this,!0),a(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function ct(t,e){var n,i=t.element;i.style&&(a(t.options.cssProps,function(o,r){n=$(i.style,r),e?(t.oldCssProps[n]=i.style[n],i.style[n]=o):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}function ut(t,n){var i=e.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=n,n.target.dispatchEvent(i)}var dt,ht=["","webkit","Moz","MS","ms","o"],pt=e.createElement("div"),ft="function",mt=Math.round,gt=Math.abs,vt=Date.now;dt="function"!=typeof Object.assign?function(t){if(t===i||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==i&&null!==o)for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r])}return e}:Object.assign;var _t=s(function(t,e,n){for(var o=Object.keys(e),r=0;r<o.length;)(!n||n&&t[o[r]]===i)&&(t[o[r]]=e[o[r]]),r++;return t},"extend","Use `assign`."),yt=s(function(t,e){return _t(t,e,!0)},"merge","Use `assign`."),$t=1,bt=/mobile|tablet|ip(ad|hone|od)|android/i,wt="ontouchstart"in t,xt=$(t,"PointerEvent")!==i,kt=wt&&bt.test(navigator.userAgent),Ct="touch",Tt="pen",zt="mouse",St="kinect",Et=25,It=1,At=2,qt=4,Mt=8,Lt=1,Pt=2,Ft=4,Ot=8,Nt=16,Wt=Pt|Ft,Bt=Ot|Nt,Dt=Wt|Bt,Rt=["x","y"],Ht=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(w(this.element),this.evWin,this.domHandler)}};var jt={mousedown:It,mousemove:At,mouseup:qt},Ut="mousedown",Vt="mousemove mouseup";l(O,x,{handler:function(t){var e=jt[t.type];e&It&&0===t.button&&(this.pressed=!0),e&At&&1!==t.which&&(e=qt),this.pressed&&(e&qt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:zt,srcEvent:t}))}});var Yt={pointerdown:It,pointermove:At,pointerup:qt,pointercancel:Mt,pointerout:Mt},Xt={2:Ct,3:Tt,4:zt,5:St},Gt="pointerdown",Jt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Gt="MSPointerDown",Jt="MSPointerMove MSPointerUp MSPointerCancel"),l(N,x,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=Yt[i],r=Xt[t.pointerType]||t.pointerType,a=r==Ct,s=v(e,t.pointerId,"pointerId");o&It&&(0===t.button||a)?0>s&&(e.push(t),s=e.length-1):o&(qt|Mt)&&(n=!0),0>s||(e[s]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(s,1))}});var Zt={touchstart:It,touchmove:At,touchend:qt,touchcancel:Mt},Qt="touchstart",Kt="touchstart touchmove touchend touchcancel";l(W,x,{handler:function(t){var e=Zt[t.type];if(e===It&&(this.started=!0),this.started){var n=B.call(this,t,e);e&(qt|Mt)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Ct,srcEvent:t})}}});var te={touchstart:It,touchmove:At,touchend:qt,touchcancel:Mt},ee="touchstart touchmove touchend touchcancel";l(D,x,{handler:function(t){var e=te[t.type],n=R.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Ct,srcEvent:t})}});var ne=2500,ie=25;l(H,x,{handler:function(t,e,n){var i=n.pointerType==Ct,o=n.pointerType==zt;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)j.call(this,e,n);else if(o&&V.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var oe=$(pt.style,"touchAction"),re=oe!==i,ae="compute",se="auto",le="manipulation",ce="none",ue="pan-x",de="pan-y",he=G();Y.prototype={set:function(t){t==ae&&(t=this.compute()),re&&this.manager.element.style&&he[t]&&(this.manager.element.style[oe]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return a(this.manager.recognizers,function(e){u(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),X(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(!this.manager.session.prevented){var i=this.actions,o=m(i,ce)&&!he[ce],r=m(i,de)&&!he[de],a=m(i,ue)&&!he[ue];if(o){var s=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;
vendor: 8,983 bytes, lines 2-3
2if(s&&l&&c)return}return a&&r?void 0:o||r&&n&Wt||a&&n&Bt?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var pe=1,fe=2,me=4,ge=8,ve=ge,_e=16,ye=32;J.prototype={defaults:{},set:function(t){return dt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(r(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=K(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return r(t,"dropRecognizeWith",this)||(t=K(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(r(t,"requireFailure",this))return this;var e=this.requireFail;return-1===v(e,t=K(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(r(t,"dropRequireFailure",this))return this;t=K(t,this);var e=v(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,i=this.state;ge>i&&e(n.options.event+Z(i)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),i>=ge&&e(n.options.event+Z(i))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ye)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(ye|pe)))return!1;t++}return!0},recognize:function(t){var e=dt({},t);return u(this.options.enable,[this,e])?(this.state&(ve|_e|ye)&&(this.state=pe),this.state=this.process(e),void(this.state&(fe|me|ge|_e)&&this.tryEmit(e))):(this.reset(),void(this.state=ye))},process:function(){},getTouchAction:function(){},reset:function(){}},l(tt,J,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(fe|me),o=this.attrTest(t);return i&&(n&Mt||!o)?e|_e:i||o?n&qt?e|ge:e&fe?e|me:fe:ye}}),l(et,tt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Dt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Wt&&e.push(de),t&Bt&&e.push(ue),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,o=t.direction,r=t.deltaX,a=t.deltaY;return o&e.direction||(e.direction&Wt?(o=0===r?Lt:0>r?Pt:Ft,n=r!=this.pX,i=Math.abs(t.deltaX)):(o=0===a?Lt:0>a?Ot:Nt,n=a!=this.pY,i=Math.abs(t.deltaY))),t.direction=o,n&&i>e.threshold&&o&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&fe||!(this.state&fe)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),l(nt,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ce]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&fe)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),l(it,J,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(qt|Mt)&&!r)this.reset();else if(t.eventType&It)this.reset(),this._timer=o(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&qt)return ve;return ye},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&qt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=vt(),this.manager.emit(this.options.event,this._input)))}}),l(ot,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ce]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&fe)}}),l(rt,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Wt|Bt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Wt|Bt)?e=t.overallVelocity:n&Wt?e=t.overallVelocityX:n&Bt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&>(e)>this.options.velocity&&t.eventType&qt},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),l(at,J,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[le]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&It&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=qt)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||M(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=o(function(){this.state=ve,this.tryEmit()},e.interval,this),fe):ve}return ye},failTimeout:function(){return this._timer=o(function(){this.state=ye},this.options.interval,this),ye},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),st.VERSION="2.0.8",st.defaults={domEvents:!1,touchAction:ae,enable:!0,inputTarget:null,inputClass:null,preset:[[ot,{enable:!1}],[nt,{enable:!1},["rotate"]],[rt,{direction:Wt}],[et,{direction:Wt},["swipe"]],[at],[at,{event:"doubletap",taps:2},["tap"]],[it]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var $e=1,be=2;lt.prototype={set:function(t){return dt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?be:$e},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,o=e.curRecognizer;(!o||o&&o.state&ve)&&(o=e.curRecognizer=null);for(var r=0;r<i.length;)n=i[r],e.stopped===be||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(t),!o&&n.state&(fe|me|ge)&&(o=e.curRecognizer=n),r++}},get:function(t){if(t instanceof J)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(r(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(r(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=v(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==i&&e!==i){var n=this.handlers;return a(g(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==i){var n=this.handlers;return a(g(t),function(t){e?n[t]&&n[t].splice(v(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&ut(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&ct(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},dt(st,{INPUT_START:It,INPUT_MOVE:At,INPUT_END:qt,INPUT_CANCEL:Mt,STATE_POSSIBLE:pe,STATE_BEGAN:fe,STATE_CHANGED:me,STATE_ENDED:ge,STATE_RECOGNIZED:ve,STATE_CANCELLED:_e,STATE_FAILED:ye,DIRECTION_NONE:Lt,DIRECTION_LEFT:Pt,DIRECTION_RIGHT:Ft,DIRECTION_UP:Ot,DIRECTION_DOWN:Nt,DIRECTION_HORIZONTAL:Wt,DIRECTION_VERTICAL:Bt,DIRECTION_ALL:Dt,Manager:lt,Input:x,TouchAction:Y,TouchInput:D,MouseInput:O,PointerEventInput:N,TouchMouseInput:H,SingleTouchInput:W,Recognizer:J,AttrRecognizer:tt,Tap:at,Pan:et,Swipe:rt,Pinch:nt,Rotate:ot,Press:it,on:h,off:p,each:a,merge:yt,extend:_t,assign:dt,inherit:l,bindFn:c,prefixed:$}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=st,"function"==typeof define&&define.amd?define(function(){return st}):"undefined"!=typeof module&&module.exports?module.exports=st:t[n]=st}(window,document,"Hammer"),function(t){"use strict";function e(){if(void 0!==t.L)return Promise.resolve(!0);if(u)return u 3;var e=t.SB_LEAFLET_ASSETS;return e&&e.js?u=new Promise(function(n){if(e.css){var i=document.createElement("link");i.rel="stylesheet",i.href=e.css,document.head.appendChild(i)}var o=document.createElement("script");o.src=e.js,o.onload=function(){n(void 0!==t.L)},o.onerror=function(){n(!1)},document.head.appendChild(o)}):Promise.resolve(!1)}function n(e,n,o,r){var a=t.L.map(e,{scrollWheelZoom:!1}
3).setView([n,o],parseInt(r.zoom,10)||15);a.attributionControl.setPrefix(""),t.L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(a),t.L.marker([n,o],{icon:i()}).addTo(a),setTimeout(function(){a.invalidateSize()},0)}function i(){return t.L.divIcon({className:"sb-map__pin",html:'<span style="display:block;width:18px;height:18px;border-radius:50%;background:#2f6fed;border:3px solid #fff;box-shadow:0 1px 6px rgba(0,0,0,.4)"></span>',iconSize:[18,18],iconAnchor:[9,9]})}function o(t){return t.lat.toFixed(6)+", "+t.lng.toFixed(6)}function r(e,n,i){var o=document.createElement("div");o.className="sb-map-picker",o.style.cssText=["position:absolute","left:50%","bottom:16px","transform:translateX(-50%)","z-index:1000","display:flex","flex-direction:column","gap:8px","padding:12px 14px","border-radius:12px","background:#fff","box-shadow:0 6px 24px rgba(16,24,40,.18)","font-size:14px","line-height:20px","max-width:calc(100% - 32px)"].join(";");var r=document.createElement("div");r.textContent=e.hint||"",r.style.cssText="color:#61748E;font-size:12px;line-height:16px";var a=document.createElement("div");a.style.cssText="display:flex;align-items:center;gap:12px;flex-wrap:wrap";var s=document.createElement("span");s.className="sb-map-picker__value",s.style.cssText="font-variant-numeric:tabular-nums;color:#0E172C;white-space:nowrap";var l=document.createElement("button");l.type="button",l.textContent=e.cancel||"Cancel",l.style.cssText="cursor:pointer;border:1px solid #E1E6F0;background:#fff;color:#0E172C;border-radius:8px;padding:8px 14px;font:inherit";var c=document.createElement("button");return c.type="button",c.textContent=e.apply||"Apply",c.style.cssText="cursor:pointer;border:0;background:#2f6fed;color:#fff;border-radius:8px;padding:8px 16px;font:inherit;font-weight:500",l.addEventListener("click",i),c.addEventListener("click",n),a.appendChild(s),a.appendChild(l),a.appendChild(c),r.textContent&&o.appendChild(r),o.appendChild(a),t.L&&t.L.DomEvent&&(t.L.DomEvent.disableClickPropagation(o),t.L.DomEvent.disableScrollPropagation(o)),o.setValue=function(t){s.textContent=t},o}function a(e,n,i,a,s,l){function c(){var t=g.getPosition();return[t.lat(),t.lng()]}function u(t,e){document.removeEventListener("keydown",d),"function"==typeof t&&t(e)}function d(t){"Escape"===t.key&&u(s.onCancel,[n,i]),"Enter"===t.key&&u(s.onApply,c())}function p(t){var e={lat:t.lat(),lng:t.lng()};v.setValue(o(e)),"function"==typeof l&&l([e.lat,e.lng])}e.style.position=e.style.position||"relative";var f=document.createElement("div");f.style.cssText="width:100%;height:100%;min-height:inherit",e.appendChild(f);var m=new t.google.maps.Map(f,{center:{lat:n,lng:i},zoom:parseInt(a.zoom,10)||15,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1}),g=new t.google.maps.Marker({position:{lat:n,lng:i},map:m,draggable:!0}),v=r(a.labels||{},function(){u(s.onApply,c())},function(){u(s.onCancel,[n,i])});return v.addEventListener("click",function(t){t.stopPropagation()}),v.addEventListener("mousedown",function(t){t.stopPropagation()}),v.setValue(o({lat:n,lng:i})),e.appendChild(v),document.addEventListener("keydown",d),g.addListener("dragend",function(){p(g.getPosition())}),m.addListener("click",function(t){g.setPosition(t.latLng),p(t.latLng)}),h={el:e,detach:function(){document.removeEventListener("keydown",d)},destroy:function(){document.removeEventListener("keydown",d),g.setMap(null),e.innerHTML=""}},!0}function s(e,n){return{path:t.google.maps.SymbolPath.CIRCLE,scale:n?11:8,fillColor:e,fillOpacity:1,strokeColor:"#fff",strokeWeight:3}}function l(e,n){if(!c.googleReady())return null;var i=n||{},o=i.center;Array.isArray(o)&&!(o.length<2)&&isFinite(o[0])&&isFinite(o[1])||(o=p);var r=new t.google.maps.Map(e,{center:{lat:o[0],lng:o[1]},zoom:parseInt(i.zoom,10)||10,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!0,zoomControl:!0}),a=new t.google.maps.InfoWindow,l={},u={};return{setPoints:function(e,n){var i=n||{};Object.keys(l).forEach(function(t){l[t].setMap(null)}),l={},u={}
3,(e||[]).forEach(function(e){var n=String(e.id)===String(i.selectedId),o=new t.google.maps.Marker({position:{lat:e.lat,lng:e.lon},map:r,icon:s(n?i.activeColor||"#d33":i.color||"#3f51b5",n)});e.popup&&(u[e.id]=e.popup),o.addListener("click",function(){"function"==typeof i.onSelect&&i.onSelect(e.id)}),l[e.id]=o})},highlight:function(t,e,n){Object.keys(l).forEach(function(i){var o=i===String(t);l[i].setIcon(s(o?n||"#d33":e||"#3f51b5",o))})},panTo:function(t){r.panTo({lat:t[0],lng:t[1]})},setView:function(t,e,n){r.setCenter({lat:t,lng:e}),r.setZoom("number"==typeof n?n:16)},openPopup:function(t){var e=l[t],n=u[t];e&&n&&(a.setContent(n),a.open({map:r,anchor:e}))},fitBounds:function(e){t.google.maps.event.trigger(r,"resize");var n=e[0],i=e[1];if(n[0]===i[0]&&n[1]===i[1])return r.setCenter({lat:n[0],lng:n[1]}),void r.setZoom(14);var o=new t.google.maps.LatLngBounds({lat:n[0],lng:n[1]},{lat:i[0],lng:i[1]});r.fitBounds(o,40),t.google.maps.event.addListenerOnce(r,"idle",function(){r.getZoom()>14&&r.setZoom(14)})},invalidate:function(){t.google.maps.event.trigger(r,"resize")}}}var c={provider:function(){return t.MAVI_PRODUCTION_JS?"google":"yandex"},isYandex:function(){return"yandex"===c.provider()},isGoogle:function(){return"google"===c.provider()},googleReady:function(){return!!(t.google&&t.google.maps&&t.google.maps.Map)},osmEmbedUrl:function(t,e,n,i,o){var r=parseInt(n,10);(!r||r<=0)&&(r=15);var a=parseFloat(i)>0?parseFloat(i):600,s=parseFloat(o)>0?parseFloat(o):400,l=360/(256*Math.pow(2,r)),c=a/2*l,u=s/2*(l*Math.cos(t*Math.PI/180));return"https://www.openstreetmap.org/export/embed.html?bbox="+[(e-c).toFixed(6),(t-u).toFixed(6),(e+c).toFixed(6),(t+u).toFixed(6)].join(",")+"&layer=mapnik&marker="+t.toFixed(6)+","+e.toFixed(6)},osmLinkUrl:function(t,e,n){return"https://www.openstreetmap.org/?mlat="+t+"&mlon="+e+"#map="+(parseInt(n,10)||15)+"/"+t+"/"+e},googleEmbedUrl:function(t,e,n){var i=parseInt(n,10)||15;return"https://www.google.com/maps?q="+encodeURIComponent(t+","+e)+"&z="+i+"&output=embed"},googleLinkUrl:function(t,e){return"https://www.google.com/maps/search/?api=1&query="+encodeURIComponent(t+","+e)}},u=null;c.renderPoint=function(t,i,o){function r(){var t=h.clientWidth||a.clientWidth,e=h.clientHeight||a.clientHeight;h.src=c.osmEmbedUrl(s,l,u.zoom,t,e)}if(c.isYandex())return!1;var a=t&&t.jquery?t[0]:t;if(!a||!i||i.length<2)return!1;var s=parseFloat(i[0]),l=parseFloat(i[1]);if(isNaN(s)||isNaN(l))return!1;var u=o||{},d=document.createElement("div");d.style.width="100%",d.style.height="100%",d.style.minHeight="inherit",d.style.display="flex",d.style.flexDirection="column";var h=document.createElement("iframe");h.setAttribute("loading","lazy"),h.setAttribute("title",u.title||""),h.style.border="0",h.style.width="100%",h.style.height="100%",h.style.display="block",h.setAttribute("referrerpolicy","no-referrer-when-downgrade"),h.style.flex="1 1 auto",h.style.minHeight="0",d.appendChild(h);var p=[u.title,u.text].filter(function(t){return t&&String(t).trim()});if(p.length){var f=document.createElement("div");f.className="sb-map__caption",f.style.flex="0 0 auto",f.style.padding="8px 12px",f.style.fontSize="14px",f.style.lineHeight="20px",p.forEach(function(t,e){var n=document.createElement(0===e?"strong":"span");n.style.display="block",n.textContent=String(t),f.appendChild(n)}),d.appendChild(f)}return a.innerHTML="",a.appendChild(d),c.isGoogle()?(h.src=c.googleEmbedUrl(s,l,u.zoom),!0):(e().then(function(t){if(t&&a.isConnected&&d.clientHeight){var e=document.createElement("div");e.style.cssText="width:100%;flex:1 1 auto;min-height:0",d.replaceChild(e,h),n(e,s,l,u)}}),r(),h.clientHeight||setTimeout(r,0),!0)};var d='<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">Leaflet</a>',h=null;c.canPick=function(){return!c.isYandex()&&(c.isGoogle()?c.googleReady():void 0!==t.L)},c.startPicking=function(e,n,s,l){function u(t,e){document.removeEventListener("keydown",p),"function"==typeof t&&t(e)}function p(t){"Escape"===t.key&&u(_.onCancel,[g,v]),"Enter"===t.key&&u(_.onApply,[w.getLatLng().lat,w.getLatLng().lng])}function f(t){x.setValue(o(t)),"function"==typeof y&&y([t.lat,t.lng])}if(!c.canPick())return!1;var m=e&&e.jquery?e[0]:e;if(!m)return!1;var g=parseFloat(n&&n[0]),v=parseFloat(n&&n[1]);if(isNaN(g)||isNaN(v))return!1;var _=l||{},y="function"==typeof _?_:_.onChange;c.stopPicking();var $=s||{};if(m.innerHTML="",c.isGoogle())return a(m,g,v,$,_,y);var b=t.L.map(m,{attributionControl:!0}
3).setView([g,v],parseInt($.zoom,10)||15);b.attributionControl.setPrefix(d),t.L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:"\xa9 OpenStreetMap"}).addTo(b);var w=t.L.marker([g,v],{draggable:!0,icon:i()}).addTo(b),x=r($.labels||{},function(){u(_.onApply,[w.getLatLng().lat,w.getLatLng().lng])},function(){u(_.onCancel,[g,v])});return x.setValue(o(w.getLatLng())),m.appendChild(x),document.addEventListener("keydown",p),w.on("dragend",function(){f(w.getLatLng())}),b.on("click",function(t){w.setLatLng(t.latlng),f(t.latlng)}),setTimeout(function(){b.invalidateSize()},0),h={map:b,el:m,detach:function(){document.removeEventListener("keydown",p)}},!0},c.stopPicking=function(){return!!h&&(h.destroy?h.destroy():(h.detach&&h.detach(),h.map&&"function"==typeof h.map.remove&&h.map.remove(),h.el.innerHTML=""),h=null,!0)},c.isPicking=function(){return null!==h},c.createPointsMap=function(e,n){function i(e,n){var i=n?22:16;return t.L.divIcon({className:"sb-map__dot",html:'<span style="display:block;width:'+i+"px;height:"+i+"px;border-radius:50%;background:"+e+';border:3px solid #fff;box-shadow:0 1px 6px rgba(0,0,0,.35)"></span>',iconSize:[i,i],iconAnchor:[i/2,i/2]})}if(c.isYandex()||!e)return null;if(c.isGoogle())return l(e,n);if(void 0===t.L)return null;var o=n||{},r=o.center;Array.isArray(r)&&!(r.length<2)&&isFinite(r[0])&&isFinite(r[1])||(r=p);var a=t.L.map(e).setView(r,parseInt(o.zoom,10)||10);a.attributionControl.setPrefix(d),t.L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:"\xa9 OpenStreetMap"}).addTo(a);var s={};return{leaflet:a,setPoints:function(e,n){var o=n||{};Object.keys(s).forEach(function(t){a.removeLayer(s[t])}),s={},(e||[]).forEach(function(e){var n=String(e.id)===String(o.selectedId),r=t.L.marker([e.lat,e.lon],{icon:i(n?o.activeColor||"#d33":o.color||"#3f51b5",n)}).addTo(a);e.popup&&r.bindPopup(e.popup),r.on("click",function(){"function"==typeof o.onSelect&&o.onSelect(e.id)}),s[e.id]=r})},highlight:function(t,e,n){Object.keys(s).forEach(function(o){var r=o===String(t);s[o].setIcon(i(r?n||"#d33":e||"#3f51b5",r))})},panTo:function(t){a.panTo(t)},setView:function(t,e,n){a.setView([t,e],"number"==typeof n?n:16)},openPopup:function(t){var e=s[t];e&&"function"==typeof e.openPopup&&e.openPopup()},fitBounds:function(t){a.invalidateSize(),a.fitBounds(t,{padding:[40,40],maxZoom:14})},invalidate:function(){a.invalidateSize()}}};var p=[51.5074,-.1278];t.SbMaps=c}(window);var domain_with_protocol="https://salebot.pro",scripts=document.getElementsByTagName("script"),myScript=scripts[scripts.length-1];myScript.src.includes("localhost")?domain_with_protocol=window.MAIN_APP_DOMAIN_JS||location.origin:myScript.src.includes("salebot.zmservice.ru")?domain_with_protocol="https://salebot.zmservice.ru":myScript.src.includes("mavibot.ai")&&(domain_with_protocol="https://mavibot.ai"),$.fn.customShow=function(t){t?$(this).show():$(this).hide()},$.fn.modal=function(t,e){return sbCustomModal(this,t,e)},Element.prototype.modal=function(t,e){return sbCustomModal(this,t,e)};var timeoutTriggerNewML=!0,parseTextNewML=setInterval(function(){let t=!1,e=$(".quiz-variables-js, .title-text, .section-gallery--js, .salebot-attachments__content, .ml_quiz_answer, .salebot-checkbox span, .salebot-label, .salebot-radio span, .salebot-cover__title, .salebot-cover__subtitle, .sb-elem:not([data-settings-loop])");$&&(e.each(function(e,n){function i(t){return t.replace(/<(\w+)([^&]*?)>/g,"\xa7\xa7\xa7lt\xa7\xa7\xa7$1$2\xa7\xa7\xa7gt\xa7\xa7\xa7").replace(/&lt;(\w+)([^&]*?)&gt;/g,"\xa7\xa7\xa7amplt\xa7\xa7\xa7$1$2\xa7\xa7\xa7ampgt\xa7\xa7\xa7")}function o(t){return t.replace(/\xa7\xa7\xa7lt\xa7\xa7\xa7(\w+)(.*?)\xa7\xa7\xa7gt\xa7\xa7\xa7/g,"<$1$2>").replace(/\xa7\xa7\xa7amplt\xa7\xa7\xa7(\w+)(.*?)\xa7\xa7\xa7ampgt\xa7\xa7\xa7/g,"&lt;$1$2&gt;")}if(n.closest&&n.closest("sb-form"))return;if(n.querySelector&&n.querySelector("sb-form"))return;if($(n).is(".sb-elem")&&/^(image|figure|video|gallery)$/.test($(n).attr("data-type")||""))return;if($(n).find("img, video, iframe, .sb-figure, .sb-video, .sb-gallery-wrapper").length)return;let r;$(n).html()&&(t=!0),r=$(n).hasClass("escape-html--js")?o(html_escape(html_escape(i($(n).html()))).replace(/#{.+?}/g,space_destroyer)):html_escape(html_escape($(n).html())).replace(/#{.+?}/g,space_destroyer),r.replace(/(<([^>]+)>)/gi,"")?$(n).html(r):$(n).html(""),/lazyloaded|lazyloading/.test(r)&&$(n).html(r.replace(/lazyloaded|lazyloading/g,"lazyload"))}),t&&clearInterval(parseTextNewML),document.title=html_escape(document.title).replace(/#{.+?}/g,space_destroyer).replace(/(<([^>]+)>)/gi,"")),timeoutTriggerNewML&&(timeoutTriggerNewML=!1,document.dispatchEvent(new Event("newMLTimeoutCompleted")),setTimeout(function(){clearInterval(parseTextNewML)},3e4))},100),validationFunctions={quantity:function(t,e,n){let i=$(t).find(".sbf-number-stepper__input").val(),o=/^\d+$/.test(i)&&Number(i)>=1;return!o&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}},numeric:function(t,e,n){let i=$(t).find(".ml_quiz_free_answer").val(),o=i.length>0;return!o&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}},name:function(t,e,n){let i=$(t).find(".name_input").val(),o=i.replaceAll(" ","").length>0;
3return!o&&n&&$(t).find(".invalid-feedback_name").css("display","block"),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}},phone:function(t,e,n){let i,o=($(t).find(".select_mask_code").text()+$(t).find(".phone_input").val()).replace(/[+|| ]/g,""),r="";const a=$(t).find(".select_mask_code").text(),s=a&&a.includes("+")?a.split("+")[1]:void 0,l=null!=o.match(/^\s*(?:\+?(\d{1,3}))?([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/g),c="function"!=typeof phone_length_valid||!s||phone_length_valid(s,o);return l&&c?i=!0:(i=!1,n&&$(t).find(".invalid-feedback_phone_validation").css("display","block")),!1===e?{validationSuccess:e,value:r}:{validation:i,value:r}},email:function(t,e,n){let i,o=$(t).find(".email_input").val();return null!=o.match(/[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?/g)?i=!0:(i=!1,n&&$(t).find(".invalid-feedback_email_validation").css("display","block")),!1===e?{validationSuccess:e,value:o}:{validation:i,value:o}},select:function(t,e,n){let i=$(t).find(".ml_quiz_total_answer").text(),o=i.length>0;return!o&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}},checkbox:function(t,e,n){let i="",o="";return $(t).find("input:checked[type='checkbox']").each(function(){o+=$(this).parent().find("span").eq(0).text()+"; "}),i=o.length>0,!i&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:o}:{validation:i,value:o}},radio:function(t,e,n){const i=$(t).find("input:checked[type='radio']");let o=$(t).find("input:checked[type='radio']").parent().find("span").eq(0).text();i.attr("data-fa-type")&&(o=$(t).find("textarea").val().trim());let r=o.length>0;return!r&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:o}:{validation:r,value:o}},text:function(t,e,n){let i=$(t).find(".ml_quiz_free_answer").val(),o=i.length>0;return!o&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}},quiz_calendar:function(t,e,n){let i=$(t).find(".quiz_create_calendar").val(),o=i.length>0;return!o&&n&®ularQuizWarning(t),!1===e?{validationSuccess:e,value:i}:{validation:o,value:i}}},quizValidationTypes={name:!1,phone:!1,email:!1,select:!0,checkbox:!0,radio:!0,text:!0,quiz_calendar:!0,numeric:!0,quantity:!0},variablesFunctions={phone:function(t){let e=$(t).find(".phone_input").val(),n="";return void 0!==e&&e&&(e=($(t).find(".select_mask_code").text()+e).replace(/[+|| ]/g,""),n="&phone="+e),n},email:function(t,e){let n,i=$(t).find(".email_input").val();return n=e?""!==i?"&email="+i.match(/([A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?)/g)[0]:"":""!==i?"&email="+i:"",n},name:function(t){let e,n=$(t).find(".name_input").val();return e=""!=n?"&name_from_ml="+decodeURIComponent(n):"",e},phone_obj:function(t){let e=$(t).find(".phone_input").val();return void 0!==e&&e&&(e=($(t).find(".select_mask_code").text()+e).replace(/[+|| ]/g,"")),{name:"phone",value:encodeURIComponent(e)}},email_obj:function(t,e){let n,i=$(t).find(".email_input").val();return n=e?""!==i?i.match(/([A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?)/g)[0]:"":""!==i?i:"",{name:"email",value:encodeURIComponent(n)}},name_obj:function(t){let e=$(t).find(".name_input").val();return{name:"name_from_ml",value:decodeURIComponent(e)}}};$(document).on("newMLTimeoutCompleted",function(){$(".slide_text_block").each(function(t,e){slideDown(e)})}),setTimeout(()=>{$(".ml_quiz_textarea").each(function(){if($(this).data("initial-height"))return;let t=$(this).height();t||(t=this.scrollHeight),t&&($(this).data("initial-height",t),$(this).css("min-height",`${t}px`),$(this).trigger("input"))})}),$(".ml_quiz_textarea").off().on("input",function(){let t=$(this).val().replace(/\n\r?/g,"<br />"),e=$(this).closest(".ml_quiz_answers_container").find(".text-area-span");$(e).html(t);let n=$(e).height();const i=$(this).data("initial-height")||parseFloat($(this).css("min-height"))||0;n=Math.max(n,i),n<=200?$(this).height(n).css("overflow","hidden"):$(this).height(200).css("overflow","auto")}),studentsMobileMenu(),setTimeout(function(){$(".salebot-md__menu-btn").each(function(t,e){buttonColorsHover($(e)),menuButtonsAction(e)})},100),window.addEventListener("message",t=>{t.data&&"closeRobokassaFrame"===t.data.action&&$("body").find('form[target="robokassa_iframe"]').remove()}),setTimeout(function(){$(".messenger_btn_link").each(function(t,e){const n="true"===$(e).attr("data-get_params"),i=$(e).attr("data-key_word"),o=$(e).attr("data-proxy_id");let r=$(e).attr("href");n&&(r=r+window.location.search+`${window.location.search.length>0?"&":"?"}user_agent=${encodeURIComponent(window.navigator.userAgent.replace(/;/g,"%3B"))}`,r+=mini_landing_init(!0,!0,!0,!0,!0),r+=`&key_word=${i}&proxy_id=${o}`,$(e).attr("href",r))}),cardsHover()},500);var galleryAspectRatios={"16:9":function(t){return 9*t/16},"9:16":function(t){return 16*t/9},"1:1":function(t){return t},"4:3":function(t){return.75*t},"3:4":function(t){return 1.3*t},"3:2":function(t){return.66*t},"2:3":function(t){return 1.5*t}};$(function(){"undefined"!=typeof grecaptcha&&grecaptcha.ready(function(){$(".form_captcha").each(function(t,e){const n=e.closest("section"),i=$(e).attr("data-sitekey");i.length>0&&"true"===$(n).find(".secret_key_form_boolean").text()&&"true"===$(n).find(".is_on_captcha").text()&&grecaptcha.render(e,{sitekey:i,callback:function(t){getCaptchaResponse(t,$(n))}})})})}),$(window).off(".sb_gallery4").on("resize.sb_gallery4",setBackgroun
3dSize),$(window).off(".fadeInToggler").on("scroll.fadeInToggler",function(){menuOpacity()}),$(document).on("newMLTimeoutCompleted",function(){setBackgroundSize(),validatePrivacyButtons(),colorListMarker(),timer(),gallery0(),customButtonsHover(),customButtonModal(),quizWarningHide(),textSpaces(),scrollUp(),gallerySlider(),toggleHeaderMenu(),menuMobileBackground(),scrollHeaderMenu(),buttonColorsHover($(".create_quizz_btn, .send_quiz-btn, #subscribe-button, .next_btn, .previous_btn, .next_btn-start, .result_card__button")),successMessage(),setClickHandlerForImage(),setInputHandlerForNumericForm(),setAddColorToButton(),sectionBtnSettings(),conditionQuiz(),menuOpacity(),notifications()}),$(".ml_quiz_answers").off(".textAfter").on("click.textAfter",function(){if(this.closest("sb-form"))return;$(this).closest("section").css("overflow","hidden");const t=$(this).parent().find(".ml_quiz_total_answer");t.text().length>0?t.removeClass("placeholder_after"):t.addClass("placeholder_after")}),$(function(){let t=0;const e=setInterval(function(){const n=$("#parent_frame");(n.length>0||t>1e3)&&(clearInterval(e),n.on("load",sendOnlineChatMetrics)),t++},20);setZindexSections()}),$(function(){function t(t){if("boolean"==typeof t)return t;if("number"==typeof t)return 0!==t;if("string"==typeof t){const e=t.trim().toLowerCase();return!!e.length&&["true","1","yes","y","on"].includes(e)}return!1}function e(t){if(null==t)return null;const e=String(t).match(/-?\d+(?:[.,]\d+)?/g);if(!e||e.length<2)return null;const n=e.slice(0,2).map(function(t){const e=t.replace(",","."),n=Number(e);return Number.isFinite(n)?n:NaN});if(n.some(function(t){return Number.isNaN(t)}))return null;const i=n[0],o=n[1];return Math.abs(i)>90||Math.abs(o)>180?null:n}function n(n,i){function o(t){!Array.isArray(t)||t.length<2||window.SbMaps&&window.SbMaps.renderPoint(document.getElementById(n),t,{zoom:c,title:u,text:d})||"undefined"!=typeof ymaps&&ymaps.ready(function(){const e=new ymaps.Map(`${n}`,{center:t,zoom:c,controls:s?[]:void 0}),i=new ymaps.Placemark(t,{balloonContentHeader:u,balloonContentBody:d},{draggable:!1});e.geoObjects.add(i),l?(e.behaviors.disable("drag"),e.behaviors.disable("scrollZoom")):(e.behaviors.enable("drag"),e.behaviors.enable("scrollZoom"))})}const r=i.marker&&i.marker[0]?i.marker[0]:{},a=r.marker||"",s=t(i.hideControls),l=t(i.disableDragging),c=Number(i.zoom)||10,u=r.title||"",d=r.text||"",h=e(a);h&&o(h)}$("section .ymap").each(function(t,e){const i=$(e);if(i.attr("id"))return;const o=`map_${idMaker(45)}`;i.attr("id",o);let r={};try{r=JSON.parse(i.attr("data-settings")||"{}")}catch(t){r={}}n(o,r)})}),$(function(){try{location.href.includes("web_app=close")&&void 0!==window.Telegram?.WebApp?.platform&&"unknown"!==window.Telegram?.WebApp?.platform&&window.Telegram.WebApp.close()}catch(t){console.log(t)}}),window.location.href.includes("vk-apps")&&$(".section-catalog--wrapper script")?.each(function(){const t=document.createElement("script");this.src?t.src=this.src:t.text=this.innerHTML,document.body.appendChild(t)});
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.