PageSourceSearch

https://okoptica.ru/local/templates/.default/js/common.min.js?17726388973345

js okoptica.ru collected 2026-10-07 16:32:53 UTC 3,345 bytes, 1 lines download raw bytes

1(()=>{var l=(e,t,n)=>new Promise((o,r)=>{var c=d=>{try{a(n.next(d))}catch(s){r(s)}},i=d=>{try{a(n.throw(d))}catch(s){r(s)}},a=d=>d.done?o(d.value):Promise.resolve(d.value).then(c,i);a((n=n.apply(e,t)).next())});var u=!1;document.addEventListener("DOMContentLoaded",()=>{m(),f()},{once:!0});function f(){var e;location.search.includes("action=send")&&(u=!0,(e=document.querySelector("button[data-load-component]"))==null||e.click())}function m(){document.addEventListener("click",e=>l(this,null,function*(){let t=e.target.closest("[data-load-component]");if(!t)return;let n=t.dataset.loadComponent;if(!n||t.dataset.used==="y")return;t.dataset.used="y",u&&(u=!1);let o=document.querySelector(`[data-loaded-from="${n}"]`);o?p(o):yield w(n),delete t.dataset.used}))}function w(e,t=!1){return l(this,null,function*(){let o=yield(yield fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}})).text(),r=new DOMParser().parseFromString(o,"text/html"),c=r.querySelector("div"),i=r.querySelector("link"),a=r.querySelector("script");if(t)return{componentHtml:c,js:a,css:i};c&&v(c,e),i&&y(i),a&&h(a)})}function v(e,t){document.querySelector(`[data-loaded-from="${t}"]`)||(e.dataset.loadedFrom=t,p(e),document.body.append(e))}function y(e){if(document.querySelector(`link[href="${e.href}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e.href,t.media="all",document.head.append(t)}function h(e){if(document.querySelector(`script[src="${e.src}"]`))return;let t=document.createElement("script");t.src=e.src,document.head.append(t)}function p(e){e&&(window.initForm?(window.initForm(e),e.classList.add("active"),document.body.classList.add("popup-active")):setTimeout(()=>{p(e)},300))}window.sendMetrikaGoal=function(e){e&&typeof window.yaCounter83890315=="object"&&yaCounter83890315.reachGoal(e)};window.sendVkGoal=function(e){if(window._tmr&&e)return window._tmr.push({type:"reachGoal",id:3464241,goal:e})};window.clearErrors=function(e){e.classList.contains("d-none")||(e.classList.add("d-none"),e.textContent="")};window.addError=function(e,t){let n=document.createElement("p");n.textContent=t,e.append(n),e.classList.contains("d-none")&&e.classList.remove("d-none")};window.maskPhone=function(e){e.oninput=t=>{if(e.value==="+7 "&&!t.data){e.value="";return}let n=e.value;if(n.length===1&&n.startsWith("+")||n.length===2&&n.startsWith("+7")){e.value=n;return}else if(n.length===1&&n.startsWith("9")){e.value="+7 (9";return}n=n.replace(/\D/g,"");let o="+7 (";n[0]==="9"&&(o+="9"),e.value=n.replace(/^(\d)/,o).replace(/^(\+7 \(\d{3})(\d)/,"$1) $2").replace(/(\d{3})(\d{1,3})/,"$1-$2").replace(/(-\d{2})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+$/,"$1")}};window.maskDate=function(e){e.oninput=t=>{if(!t.data&&e.value[e.value.length-1]==="."){e.value=e.value.slice(0,-1);return}e.value=e.value.replace(/\D/g,"").replace(/^(\d{2})/,"$1.").replace(/(\.\d{2})/,"$1.").replace(/(\d{4})\d+/,"$1")}};window.addLoader=function(e=null){let t=document.createElement("div"),n=document.createElement("div");t.classList.add("loader-wrapper"),n.classList.add("loader"),t.append(n),e?(t.classList.add("loader-wrapper--absolute"),e.style.position="relative",e.append(t)):document.body.append(t)};window.removeLoader=function(e=null){e&&(e.style.position="");let n=(e||document).querySelector(".loader-wrapper");n&&n.remove()};})();

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.