PageSourceSearch

https://book24.ua/local/templates/.default/components/bitrix/search.title/corp/script.min.js?16177846146556

js book24.ua collected 2026-09-24 21:07:51 UTC 6,556 bytes, 1 lines download raw bytes

1function JCTitleSearch4(t){var o=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,INPUT_ID_TMP:t.INPUT_ID_TMP,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN)},t.WAIT_IMAGE&&(this.arParams.WAIT_IMAGE=t.WAIT_IMAGE),t.MIN_QUERY_LEN<=0&&(t.MIN_QUERY_LEN=1),this.cache=[],this.cache_key=null,this.startText="",this.running=!1,this.needRunAgain=!1,this.currentRow=-1,this.RESULT=null,this.CONTAINER=null,this.INPUT=null,this.WAIT=null,this.ShowResult=function(t){BX.type.isString(t)&&(o.RESULT.innerHTML=t),o.RESULT.style.display=""!==o.RESULT.innerHTML?"block":"none";var e,s,n,i=o.adjustResultNode(),a=BX.findChild(o.RESULT,{tag:"table",class:"title-search-result"},!0);if(a&&(s=BX.findChild(a,{tag:"th"},!0)),s){var r=BX.pos(a);r.width=r.right-r.left;var l=BX.pos(s);l.width=l.right-l.left,s.style.width=l.width+"px",o.RESULT.style.width=i.width+l.width+"px",o.RESULT.style.left="0px",r.width-l.width>i.width&&(o.RESULT.style.width=i.width+l.width-1+"px"),r=BX.pos(a),(e=BX.pos(o.RESULT)).right>r.right&&(o.RESULT.style.width=r.right-r.left+"px")}a&&(n=BX.findChild(o.RESULT,{class:"title-search-fader"},!0)),n&&s&&(e=BX.pos(o.RESULT),n.style.left=e.right-e.left-18+"px",n.style.width="18px",n.style.top="0px",n.style.height=e.bottom-e.top+"px",n.style.display="block"),$(".bx_searche.scrollbar").mCustomScrollbar({mouseWheel:{scrollAmount:150,preventDefault:!0}})},this.onKeyPress=function(t){var e,s=BX.findChild(o.RESULT,{tag:"table",class:"title-search-result"},!0);if(!s)return!1;var n=s.rows.length;switch(t){case 27:return o.RESULT.style.display="none",o.currentRow=-1,o.UnSelectAll(),!0;case 40:"none"==o.RESULT.style.display&&(o.RESULT.style.display="block");var i=-1;for(e=0;e<n;e++)if(!BX.findChild(s.rows[e],{class:"title-search-separator"},!0)){if(-1==i&&(i=e),o.currentRow<e){o.currentRow=e;break}"title-search-selected"==s.rows[e].className&&(s.rows[e].className="")}return e==n&&o.currentRow!=e&&(o.currentRow=i),s.rows[o.currentRow].className="title-search-selected",!0;case 38:"none"==o.RESULT.style.display&&(o.RESULT.style.display="block");var a=-1;for(e=n-1;0<=e;e--)if(!BX.findChild(s.rows[e],{class:"title-search-separator"},!0)){if(-1==a&&(a=e),o.currentRow>e){o.currentRow=e;break}"title-search-selected"==s.rows[e].className&&(s.rows[e].className="")}return e<0&&o.currentRow!=e&&(o.currentRow=a),s.rows[o.currentRow].className="title-search-selected",!0;case 13:if("block"==o.RESULT.style.display)for(e=0;e<n;e++)if(o.currentRow==e&&!BX.findChild(s.rows[e],{class:"title-search-separator"},!0)){var r=BX.findChild(s.rows[e],{tag:"a"},!0);if(r)return window.location=r.href,!0}return!1}return!1},this.onTimeout=function(){o.onChange(function(){setTimeout(o.onTimeout,500)})},this.onChange=function(e){if(o.running)o.needRunAgain=!0;else{if(o.running=!0,o.INPUT.value!=o.oldValue&&o.INPUT.value!=o.startText)if(o.oldValue=o.INPUT.value,o.INPUT.value.length>=o.arParams.MIN_QUERY_LEN){if(o.cache_key=o.arParams.INPUT_ID+"|"+o.INPUT.value,null==o.cache[o.cache_key]){if(o.WAIT){var t=BX.pos(o.INPUT),s=t.bottom-t.top-2;o.WAIT.style.top=t.top+1+"px",o.WAIT.style.height=s+"px",o.WAIT.style.width=s+"px",o.WAIT.style.left=t.right-s+2+"px",o.WAIT.style.display="block"}return void BX.ajax.post(o.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:o.arParams.INPUT_ID_TMP,q:o.INPUT.value,l:o.arParams.MIN_QUERY_LEN},function(t){o.cache[o.cache_key]=t,o.ShowResult(t),o.currentRow=-1,o.EnableMouseEvents(),o.WAIT&&(o.WAIT.style.display="none"),e&&e(),o.running=!1,o.needRunAgain&&(o.needRunAgain=!1,o.onChange(e))})}o.ShowResult(o.cache[o.cache_key]),o.currentRow=-1,o.EnableMouseEvents()}else o.RESULT.style.display="none",o.currentRow=-1,o.UnSelectAll();e&&e(),o.running=!1}},this.UnSelectAll=function(){var t=BX.findChild(o.RESULT,{tag:"table",class:"title-search-result"},!0);if(t)for(var e=t.rows.length,s=0;s<e;s++)t.rows[s].className=""},this.EnableMouseEvents=function(){var t=BX.findChild(o.RESULT,{tag:"table",class:"title-search-result"},!0);if(t)for(var e=t.rows.length,s=0;s<e;s++)BX.findChild(t.rows[s],{class:"title-search-separator"},!0)||(t.rows[s].id="row_"+s,t.rows[s].onmouseover=function(t){o.currentRow!=this.id.substr(4)&&(o.UnSelectAll(),this.className="title-search-selected",o.currentRow=this.id.substr(4))},t.rows[s].onmouseout=function(t){this.className="",o.currentRow=-1})},this.onFocusLost=function(t){setTimeout(function(){o.RESULT.style.display="none"},300)},this.onFocusGain=function(){o.RESULT.innerHTML.length&&o.ShowResult()},this.onKeyDown=function(t){if(t=t||window.event,"block"==o.RESULT.style.display&&o.onKeyPress(t.keyCode))return BX.PreventDefault(t)},this.adjustResultNode=function(){var t,e;BX.findParent(o.CONTAINER,BX.is_fixed);return o.RESULT.style.position="absolute",t=BX.pos(o.CONTAINER),e=BX.pos(o.INPUT),t.width=t.right-t.left,o.RESULT.style.top="100%",o.RESULT.style.left="0px",$(o.INPUT).closest(".inline-search-block.with-close").length?o.RESULT.style.width=e.width+"px":o.RESULT.style.width=t.width+"px",t},this._onContainerLayoutChange=function(){"none"!==o.RESULT.style.display&&""!==o.RESULT.innerHTML&&o.adjustResultNode()},this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID),BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange),this.RESULT=document.body.appendChild(document.createElement("DIV")),this.RESULT.className="title-search-result "+this.arParams.INPUT_ID,this.INPUT=document.getElementById(this.arParams.INPUT_ID),this.startText=this.oldValue=this.INPUT.value,BX.bind(this.INPUT,"focus",function(t){o.onFocusGain()}),BX.bind(this.INPUT,"blur",function(t){$(t.relatedTarget).hasClass("bx_item_block")||o.onFocusLost()}),BX.browser.IsSafari()||BX.browser.IsIE()?this.INPUT.onkeydown=this.onKeyDown:this.INPUT.onkeypress=this.onKeyDown,this.arParams.WAIT_IMAGE&&(this.WAIT=document.body.appendChild(document.createElement("DIV")),this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')",BX.browser.IsIE()||(this.WAIT.style.backgroundRepeat="none"),this.WAIT.style.display="none",this.WAIT.style.position="absolute",this.WAIT.style.zIndex="1100"),BX.bind(this.INPUT,"bxchange",function(t){o.onChange()})},BX.ready(function(){o.Init(t)})}$(document).ready(function(){var t=$(".title-search-input_fixed").detach();$("#title-search_fixed").append(t)}),$(document).ready(function(){var t=$(".title-search-input_fixedtf").detach();$("#title-search_fixedtf").append(t)}),$(document).ready(function(){var t=$(".title-search-input").detach();$("#title-search").append(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.