1 2; /* Start:"a:4:{s:4:"full";s:101:"/bitrix/templates/.default/components/bitrix/search.tags.input/page_tags/script.min.js?16922472738053";s:6:"source";s:82:"/bitrix/templates/.default/components/bitrix/search.tags.input/page_tags/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3var Errors={result_unval:"Error in result",result_empty:"Empty result"};function JsTc(oHandler,sParams,sParser){var t=this;t.oObj="object"==typeof oHandler?oHandler:document.getElementById("TAGS"),t.sParams=sParams,t.sExp=sParser?new RegExp("["+sParser+"]+","i"):new RegExp(","),t.oLast={str:!1,arr:!1},t.oThis={str:!1,arr:!1},t.oEl={start:!1,end:!1},t.oUnfinedWords={},t.bReady=!0,t.eFocus=!0,t.aDiv=null,t.oDiv=null,t.oActive=null,t.oPointer=[],t.oPointer_default=[],t.oPointer_this="input_field",t.oObj.onblur=function(){t.eFocus=!1},t.oObj.onfocus=function(){t.eFocus||(t.eFocus=!0,setTimeout(function(){t.CheckModif("focus")},500))},t.oLast.arr=t.oObj.value.split(t.sExp),t.oLast.str=t.oLast.arr.join(":"),setTimeout(function(){t.CheckModif("this")},500),this.CheckModif=function(e){var o=!1,r=0,n=!1,s="",i={};if(t.eFocus){if(t.bReady&&0<t.oObj.value.length&&(t.oThis.arr=t.oObj.value.split(t.sExp),t.oThis.str=t.oThis.arr.join(":"),t.oThis.str&&t.oThis.str!=t.oLast.str&&(i.position=TCJsUtils.getCursorPosition(t.oObj),0<i.position.end&&!t.sExp.test(t.oObj.value.substr(i.position.end-1,1))&&(i.arr=t.oObj.value.substr(0,i.position.end).split(t.sExp),o=t.oThis.arr[i.arr.length-1],t.oEl.start=i.position.end-i.arr[i.arr.length-1].length,t.oEl.end=t.oEl.start+o.length,t.oEl.content=o,t.oLast.arr=t.oThis.arr,t.oLast.str=t.oThis.str)),o)){for(r=2;r<=o.length;r++)if(s=o.substr(0,r),"!fined"==t.oUnfinedWords[s]){n=!0;break}n||t.Send(o)}setTimeout(function(){t.CheckModif("this")},500)}},t.Send=function(sSearch){if(!sSearch)return!1;var oError=[];t.bReady=!1,BX("wait_container")&&(BX("wait_container").innerHTML=BX.message("JS_CORE_LOADING"),BX.show(BX("wait_container"))),BX.ajax.post("/bitrix/components/bitrix/search.tags.input/search.php",{search:sSearch,params:t.sParams},function(data){var result={};t.bReady=!0;try{eval("result = "+data+";")}catch(t){oError.result_unval=t}TCJsUtils.empty(result)&&(oError.result_empty=Errors.result_empty);try{if(TCJsUtils.empty(oError)&&"object"==typeof result){if(1!=result.length||result[0].NAME!=t.oEl.content)return void t.Show(result)}else t.oUnfinedWords[t.oEl.content]="!fined"}catch(t){oError.unknown_error=t}BX("wait_container")&&BX.hide(BX("wait_container"))})},t.Show=function(e){t.Destroy(),t.oDiv=document.body.appendChild(document.createElement("DIV")),t.oDiv.id=t.oObj.id+"_div",t.oDiv.className="search-popup",t.oDiv.style.position="absolute",t.aDiv=t.Print(e);var o=TCJsUtils.GetRealPos(t.oObj);t.oDiv.style.width=parseInt(o.width)+"px",TCJsUtils.show(t.oDiv,o.left,o.bottom),TCJsUtils.addEvent(document,"click",t.CheckMouse),TCJsUtils.addEvent(document,"keydown",t.CheckKeyword)},t.Print=function(e){var o=null,r=[],n=[],s=0,i=null,a=null,l=t.oDiv.id;for(var c in e)e.hasOwnProperty(c)&&(o=e[c],(n=[]).ID=o.ID&&0<o.ID.length?o.ID:s++,n.GID=l+"_"+n.ID,n.NAME=TCJsUtils.htmlspecialcharsEx(o.NAME),n["~NAME"]=o.NAME,n.CNT=o.CNT,r[n.GID]=n,t.oPointer.push(n.GID),(i=t.oDiv.appendChild(document.createElement("DIV"))).id=n.GID,i.name=l+"_div",i.className="search-popup-row",i.onmouseover=function(){t.Init(),this.className="search-popup-row-active"},i.onmouseout=function(){t.Init(),this.className="search-popup-row"},i.onclick=function(e){t.oActive=this.id,t.Replace(),t.Destroy(),BX.PreventDefault(e)},(a=i.appendChild(document.createElement("DIV"))).id=i.id+"_NAME",a.className="search-popup-el search-popup-el-cnt",a.innerHTML=n.CNT,(a=i.appendChild(document.createElement("DIV"))).id=i.id+"_NAME",a.className="search-popup-el search-popup-el-name",a.innerHTML=n.NAME);return t.oPointer.push("input_field"),t.oPointer_default=t.oPointer,r},t.Destroy=function(){try{TCJsUtils.hide(t.oDiv),t.oDiv.parentNode.removeChild(t.oDiv)}catch(t){}t.aDiv=[],t.oPointer=[],t.oPointer_default=[],t.oPointer_this="input_field",t.bReady=!0,t.eFocus=!0,t.oActive=null,TCJsUtils.removeEvent(document,"click",t.CheckMouse),TCJsUtils.removeEvent(document,"keydown",t.CheckKeyword)},t.Replace=function(){if("string"==typeof t.oActive){var e=t.aDiv[t.oActive],o="";if("object"==typeof e){var r=document.createElement("textarea");r.innerHTML=e["~NAME"],o=r.value}for(var n=t.oEl.start;n<t.oObj.value.length&&" "==t.oObj.value.substring(n,n+1);)n++;t.oObj.value=t.oObj.value.substring(0,n)+o+t.oObj.value.substr(t.oEl.end),T
3CJsUtils.setCursorPosition(t.oObj,n+o.length)}},t.Init=function(){t.oActive=!1,t.oPointer=t.oPointer_default,t.Clear(),t.oPointer_this="input_pointer"},t.Clear=function(){var e=t.oDiv.getElementsByTagName("div");if(0<e.length&&"object"==typeof e)for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];r&&"object"==typeof r&&r.name==t.oDiv.id+"_div"&&(r.className="search-popup-row")}},t.CheckMouse=function(){t.Replace(),t.Destroy()},t.CheckKeyword=function(e){e||(e=window.event);var o=null,r=null;if(37<e.keyCode&&e.keyCode<41||13==e.keyCode){switch(t.Clear(),e.keyCode){case 38:o=t.oPointer.pop(),t.oPointer_this==o&&(t.oPointer.unshift(o),o=t.oPointer.pop()),"input_field"!=o&&(t.oActive=o,"object"==typeof(r=document.getElementById(o))&&(r.className="search-popup-row-active")),t.oPointer.unshift(o);break;case 40:o=t.oPointer.shift(),t.oPointer_this==o&&(t.oPointer.push(o),o=t.oPointer.shift()),"input_field"!=o&&(t.oActive=o,"object"==typeof(r=document.getElementById(o))&&(r.className="search-popup-row-active")),t.oPointer.push(o);break;case 39:t.Replace(),t.Destroy();break;case 13:t.Replace(),t.Destroy(),TCJsUtils.IsIE()?(e.returnValue=!1,e.cancelBubble=!0):(e.preventDefault(),e.stopPropagation())}t.oPointer_this=o}else t.Destroy()}}var TCJsUtils={arEvents:[],addEvent:function(t,e,o){t.attachEvent?t.attachEvent("on"+e,o):t.addEventListener?t.addEventListener(e,o,!1):t["on"+e]=o,this.arEvents[this.arEvents.length]={element:t,event:e,fn:o}},removeEvent:function(t,e,o){t.detachEvent?t.detachEvent("on"+e,o):t.removeEventListener?t.removeEventListener(e,o,!1):t["on"+e]=null},getCursorPosition:function(t){var e={start:0,end:0};if(!t||"object"!=typeof t)return e;try{if(null!=document.selection&&null==t.selectionStart){t.focus();for(var o=document.selection.createRange(),r=o.parentElement(),n=o.getBookmark(),s=t.value,i=s,a="__"+Math.random()+"__";-1!=i.indexOf(a);)a="__"+Math.random()+"__";return!r||null==r||"textarea"!=r.type&&"text"!=r.type||(o.text=a+o.text+a,i=t.value,e.start=i.indexOf(a),i=i.replace(a,""),e.end=i.indexOf(a),t.value=s,o.moveToBookmark(n),o.select()),e}return{start:t.selectionStart,end:t.selectionEnd}}catch(t){}return e},setCursorPosition:function(t,e){if("object"!=typeof t)return!1;t.focus();try{if(null!=document.selection&&null==t.selectionStart)document.selection.createRange().select();else t.selectionStart=e,t.selectionEnd=e;return!0}catch(t){return!1}},printArray:function(t,e,o){try{var r="",n="";null==o&&(o=0),e||(e="\n");for(var s=0;s<=o;s++)n+=" ";for(var i in t)t.hasOwnProperty(i)&&("object"==typeof t[i]?r+=n+i+" = {"+e+TCJsUtils.printArray(t[i],e,o+1)+", "+e+"}"+e:r+=n+i+" = "+t[i]+"; "+e);return r}catch(t){}},empty:function(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},show:function(t,e,o){if("object"==typeof t){var r=parseInt(t.style.zIndex);return(r<=0||isNaN(r))&&(r=2200),t.style.zIndex=r,t.style.left=e+"px",t.style.top=o+"px",t}},hide:function(t){t&&(t.style.display="none")},GetRealPos:function(t){if(!t||!t.offsetParent)return!1;var e={},o=t.offsetParent;for(e.left=t.offsetLeft,e.top=t.offsetTop;o&&"BODY"!=o.tagName;)e.left+=o.offsetLeft,e.top+=o.offsetTop,o=o.offsetParent;return e.right=e.left+t.offsetWidth,e.bottom=e.top+t.offsetHeight,e.width=t.offsetWidth,e.height=t.offsetHeight,e},IsIE:function(){return document.attachEvent&&!TCJsUtils.IsOpera()},IsOpera:function(){return-1!=navigator.userAgent.toLowerCase().indexOf("opera")},htmlspecialcharsEx:function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},htmlspecialcharsback:function(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/";/g,'"').replace(/&/g,"&")}}; 4/* End */ 5;; /* /bitrix/templates/.default/components/bitrix/search.tags.input/page_tags/script.min.js?16922472738053*/
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.