PageSourceSearch

https://gravi.org/bitrix/templates/bxmaker.mdbase/dist/app.js

js gravi.org collected 2026-09-29 16:54:49 UTC 10,481 bytes, 1 lines download raw bytes

1!function(){var e={704:function(){var e=function(){this.isDebug=!1,this.data={},this.windowResizeQueue=[]};e.prototype.init=function(e){var t=this;console.log("Composite is on: "+e),"Y"==$.cookie("bxmaker_debug")&&(this.isDebug=!0,this.log("Включен режим отладки")),t.data=window.BXmakerJsData,t.initFlags(),t.initEvents(),t.initMdbasePage(),t.initHeadResize(),$(window).on("resize",$.debounce(200,(function(){t.windowResizeWatcher()})))},e.prototype.scrollToTop=function(){$("html, body").animate({scrollTop:0},400)},e.prototype.log=function(){var e=Array.prototype.slice.call(arguments);e.unshift("bxmaker: "),console.log.apply(console,e)},e.prototype.logError=function(){var e=Array.prototype.slice.call(arguments);e.unshift("bxmaker: "),console.error.apply(console,e)},e.prototype.debug=function(e){e?($.cookie("bxmaker_debug","Y",{path:"/",expires:365}),this.isDebug=!0):($.cookie("bxmaker_debug","N",{path:"/",expires:-1}),this.isDebug=!1)},e.prototype.setData=function(e,t){window.BXmakerJsData[e]=this.data[e]=t},e.prototype.getData=function(e){return this.data[e]},e.prototype.getState=function(){return this.getData("state")},e.prototype.getJsonFromUrl=function(e){var t;if(e){var n=location.href.indexOf("?");if(-1==n)return[];t=location.href.substr(n+1)}else t=location.search.substr(1);var a={};return t.split("&").forEach((function(e){if(e){var t=(e=e.split("+").join(" ")).indexOf("="),n=t>-1?e.substr(0,t):e,o=t>-1?decodeURIComponent(e.substr(t+1)):"",i=n.indexOf("[");if(-1==i)a[decodeURIComponent(n)]=o;else{var s=n.indexOf("]",i),r=decodeURIComponent(n.substring(i+1,s));n=decodeURIComponent(n.substring(0,i)),a[n]||(a[n]=[]),r?a[n][r]=o:a[n].push(o)}}})),a},e.prototype.storageSet=function(e,t){try{return null===t?window.localStorage.removeItem(e):window.localStorage.setItem(e,JSON.stringify({data:t}))}catch(e){return e==QUOTA_EXCEEDED_ERR?this.logError("LocalStorage limit exceeded"):this.logError("localStorage:",e),!1}},e.prototype.storageGet=function(e){(new Date).getTime();try{var t=JSON.parse(window.localStorage.getItem(e));return!!t&&t.data}catch(e){return this.logError("localStorage:",e),!1}},e.prototype.getTimeFormted=function(e){return this.addZero(Math.floor(e/3600))+":"+this.addZero(Math.floor(e%3600/60))+":"+this.addZero(e%60)},e.prototype.addZero=function(e,t){var n=e+"";for(t=t||2;n.length<t;)n="0"+n;return n},e.prototype.windowResizeWatcher=function(){for(var e in this.windowResizeQueue)this.windowResizeQueue[e].call(this)},e.prototype.addToWindowResizeQueue=function(e){this.windowResizeQueue.push(e)},e.prototype.removeFromWindowResizeQueue=function(e){for(var t in this.windowResizeQueue)this.windowResizeQueue[t]==e&&delete this.windowResizeQueue[t]},e.prototype.initHighLighter=function(){hljs.initHighlightingOnLoad(),$('pre >
1 code[class^="language"]').each((function(){var e=$(this).parent();e.find(" > .span.copy").length||e.addClass("example-code").append('<span class="example-code__type" /><span class="example-code__copy" title="'+BX.message("BXMAKER_MDBASE_COPY")+'" />')}))},e.prototype.initFlags=function(){var e=[];$("#bx-panel").length&&(e.push("bxmaker-mdbase-has-panel"),$("#bx-panel").hasClass("bx-panel-folded")||$("html").addClass("bxmaker-mdbase-has-panel--wide")),navigator.clipboard&&e.push("bxmaker-mdbase-has-clipboard"),$("html").addClass(e.join(" "))},e.prototype.initEvents=function(){$("#bx-panel-hider").on("click",(function(){$("html").removeClass("bxmaker-mdbase-has-panel--wide")})),$("#bx-panel-expander").on("click",(function(){$("html").addClass("bxmaker-mdbase-has-panel--wide")})),$(".header__title").text().trim().length<=0&&$(".header__title").remove(),$(document).on("click",".example-code__copy",(function(e){e.preventDefault(),e.stopPropagation();var t=$(this).closest("pre").find("> code"),n=document.createElement("textarea");n.value=t.text().toString(),document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}))},e.prototype.initMdbasePage=function(){var e,t=this,n=$(".mdbase"),a=null,o=null,i=null;if(!n.length)return!1;i=n.find(".mdbase__submenu"),a=n.find(".mdbase-menu"),o=n.find(".mdbase-detail"),e=o.attr("data-id"),$(window).on("hashchange",(function(e){t.recalcActiveSectionLik(),t.recalcActiveSectionHeader(),t.hideMobileMenu()})),$(document).on("click",".header__menu, .mdbase-submenu__mainmenu",(function(e){e.preventDefault(),e.stopPropagation(),$(this),t.showMobileMenu()})),$(document).on("click",".mdbase__content",(function(){t.hideMobileMenu()})),$(document).on("click",".mdbase-detail__header-link",(function(e){e.preventDefault(),e.stopPropagation();var t=$(this),n=document.createElement("input"),a=document.createElement("a");a.href=t.get(0).href,a.search="",n.value=decodeURI(a.href),document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)})),$(document).on("click",".mdbase-submenu__li--level1",(function(){t.scrollToTop()})),a.find("a.mdbase-menu__link").each((function(){var n=$(this),a=$(this),s=[];if(n.attr("data-id")==e){for(n.addClass("active"),a=n;a.closest("ul").parent().find(" > a").length;)a.closest("ul").parent().find(" > a").addClass("current"),a=a.closest("ul").parent().find(" > a");var r=o.find("h1");r.length&&s.push('<li class="mdbase-submenu__li mdbase-submenu__li--level1 " ><span class="mdbase-menu__section-link" >'+r.text()+"</span></li>
1"),o.find("h2 a, h3 a, h4 a").each((function(){var e=$(this),t=["mdbase-submenu__li"];e.closest("h4").length?t.push("mdbase-submenu__li--level4"):e.closest("h3").length?t.push("mdbase-submenu__li--level3"):e.closest("h2").length&&t.push("mdbase-submenu__li--level2"),s.push('<li class="'+t.join(" ")+'" ><a href="'+e.attr("href")+'" class="mdbase-menu__section-link" >'+e.text()+"</a></li>")})),s.length&&(i.html($('<div class="mdbase-submenu"><div class="mdbase-submenu__header" ><div class="mdbase-submenu__mainmenu">'+BX.message("BXMAKER_MDBASE_OPEN_MAIN_MENU")+'</div></div><div class="mdbase-submenu__title" >'+BX.message("BXMAKER_MDBASE_SUBMENU_TITLE")+'</div><ul class="mdbase-submenu__list">'+s.join("")+"</ul></div>")),t.recalcActiveSectionLik())}})),a.find(".mdbase-menu__arrow").on("click",(function(e){e.preventDefault(),e.stopPropagation(),$(this).parent("li").toggleClass("openned")})),t.recalcActiveSectionHeader(),t.initHighLighter(),t.highlightMdBaseSearchText(),t.prepareImages();var s=$(".mdbase-menu"),r=$(".mdbase-submenu"),d=$(".mdbase-menu-area__resize"),l=($(".mdbase-menu-area"),!1),c=300,u=0,m=$.cookie("doc_menu_length");s.jScrollPane(),r.jScrollPane();var h=window.matchMedia("(max-width: 1150px)");function p(e){$.debounce(1e3,(function(){return p(e)}))}function f(e){d.css("left","var(--bxmaker-mdbase-menu-width, 300px)"),document.documentElement.style.setProperty("--bxmaker-mdbase-menu-width",e+"px")}function b(e){f(e),s.data("jsp")&&s.data("jsp").destroy&&s.data("jsp").destroy(),r.data("jsp")&&r.data("jsp").destroy&&r.data("jsp").destroy(),setTimeout((function(){s.jScrollPane(),r.jScrollPane()}),20)}function g(e){return!!l&&(c=e.pageX-u,d.css("left",c+"px"),e.pageX-u>480?(c=480,!1):e.pageX-u<300?(c=300,!1):void p(c))}function v(){l&&(l=!1,$(document).off("mousemove",g),$(document).off("mouseup",v),f(c),s.removeClass("resized"),s.jScrollPane(),$.cookie("doc_menu_length",c))}+m&&!h.matches&&b(c=Math.max(+m,c)),t.addToWindowResizeQueue((function(){window.matchMedia("(max-width: 1150px)").matches&&(c=300),b(c)})),d.on("mousedown",(function(e){$(document).on("mousemove",g),$(document).on("mouseup",v),l=!0,u=e.offsetX,s.data("jsp").destroy(),s.addClass("resized"),f(c=e.pageX-u)}));var _=$(document),w=o.find("h1, h2, h3, h4"),y=-1,x=$(".mdbase-submenu__list li");$(document).on("scroll",$.debounce(50,(function(){var e=_.scrollTop()+100,t=0,n=!1;w.each((function(){n||($(this).offset().top>e?n=!0:t++)})),t<=0&&(t=1),y!==t&&(y=t,x.filter(".mdbase-submenu__li--active").removeClass("mdbase-submenu__li--active"),x.eq(y-1).addClass("mdbase-submenu__li--active"))}))),$(document).trigger("scroll")}
1,e.prototype.recalcActiveSectionLik=function(){var e=$(".mdbase-menu"),t=location.hash;e.find("a.mdbase-menu__section-link").removeClass("active").filter((function(){var e=$(this);return e.attr("href")==t||e.attr("href")==decodeURI(t)})).addClass("active")},e.prototype.recalcActiveSectionHeader=function(){var e=$(".mdbase").find(".mdbase-detail"),t=location.hash;e.find("h2 a, h3 a, h4 a").removeClass("activeLight").filter((function(){var e=$(this);return e.attr("href")==t||e.attr("href")==decodeURI(t)})).addClass("activeLight")},e.prototype.highlightMdBaseSearchText=function(){var e=$(".mdbase").find(".mdbase-detail"),t=this.getJsonFromUrl(),n=[],a={};if(!e.length)return!1;for(var o in t.search&&(n=t.search.split(" ")),n)a[n[o]]='<span class="mdbase-search-highlight">'+n[o]+"</span>";for(var o in a)e.find("*").replaceText(new RegExp(o,"g"),a[o])},e.prototype.prepareImages=function(){var e=$(".mdbase").find(".mdbase-detail");if(!e.length)return!1;e.find("img[data-original-src]").each((function(){var e=$(this);e.parent().hasClass("mdbase-detail__facybox-link")||e.wrap('<a href="'+e.attr("data-original-src")+'" class="mdbase-detail__facybox-link"  data-fancybox="page"  />')}))},e.prototype.hideMobileMenu=function(){$("html").removeClass("mobile-menu--show"),$(".mdbase-menu")},e.prototype.showMobileMenu=function(){$("html").addClass("mobile-menu--show")}
1,e.prototype.initHeadResize=function(){var e=$("header.header"),t=e.find("> .header__menu"),n=e.find(" .header-logo__link"),a=e.find(" .header-logo__index"),o=e.find(" .header-logo__separator"),i=e.find("> .header__title"),s=e.find("> .search-line");function r(){var r=e.width(),d=40,l=[t,s,n,a,o,i];l.forEach((function(e){e.removeClass("hidden")})),l.forEach((function(e){(d+=e.outerWidth(!0))>r&&e.addClass("hidden")}))}this.addToWindowResizeQueue(r),r()},void 0!==window.frameCacheVars?BX.addCustomEvent("onFrameDataReceived",(function(t){(window.BXmakerJs=new e).init(!0)})):BX.ready((function(){(window.BXmakerJs=new e).init(!1)}))}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";n(704)}()}();

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.