(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{162:function(e,t,r){"use strict";function o(){}Object.defineProperty(t,"__esModule",{value:!0});var i=/[\u0300-\u036f]/g,a={"ı":"i","ё":"е"},n=new RegExp(Object.keys(a).join("|"),"gi");o.normalize=function(e){return String.prototype.normalize||console.error("String does'nt have normalize function"),e.normalize("NFKD")},o.toLowerCase=function(e){return e.toLowerCase().replace(i,"").replace(n,function(e){return a[e]})},o.findIndexes=function(e,t){for(var r=0,i=0,a=!1,n=0;n<e.length;n++)if(0!==o.toLowerCase(e.charAt(n)).length){if(a)break;o.toLowerCase(e.charAt(n))===o.toLowerCase(t.charAt(i))?i++:(i>0&&(n-=i),r=n+1,i=0),i===t.length&&(a=!0)}return i===t.length?[r,n-1]:null},t.default=o},458:function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){this.searchState=e,this.store=t}function a(e,t){for(var r=e.split(" "),o=[],i=0;i<r.length;i++)r[i].length>=t&&o.push(r[i]);return o}Object.defineProperty(t,"__esModule",{value:!0}),t.SearchHighlight=void 0;var n=r(101),s=o(n),l=r(108),h=r(104),g=r(162),f=o(g);i.prototype.clear=function(){this.store.commit("search/"+l.CLEAR_HIGHLIGHTS)},i.prototype.findHighlights=function(e,t){for(var r=this,o=!0,i=this.store.state.search.results,n=0,g=i.length;n<g;n++)if(i[n].pageId.toString()===t.toString()){o=!1;break}if(o)return void this.store.commit("search/"+l.ADD_HIGHLIGHTS,{key:t,query:e,value:[]});var u=function(){var o=this.responseText.split("\n"),i=[],n=f.default.toLowerCase(f.default.normalize(e))||"";n=a(n,0);for(var s=1,g=o.length;s<g;s++)for(var u=o[s],d=0,c=0,p=n.length;c<p;c++){var v=n[c],m=u.split(String.fromCharCode(2)),C=!1;if(v.length<r.searchState.searchCharactersLimit){var S=void 0!==o[s-1]?o[s-1].split(String.fromCharCode(2))[0]:"",w=o[s].split(String.fromCharCode(2))[0]||"",H=void 0!==o[s+1]?o[s+1].split(String.fromCharCode(2))[0]:"",L=f.default.toLowerCase(f.default.normalize(S+" "+w))||"",y=f.default.toLowerCase(f.default.normalize(w+" "+H))||"",I=n[c-1]||"",b=n[c],k=n[c+1]||"",P=I+" "+b,_=b+" "+k;""!==I&&-1!==L.indexOf(P)&&(C=!0),""!==k&&-1!==y.indexOf(_)&&(C=!0)}else C=!0;if(C&&v){var x=0;do{var z=f.default.toLowerCase(f.default.normalize(m[0]))||"";if(-1!==(d=z.indexOf(v,x))){var T=u.split(String.fromCharCode(4));if(T.length>1){for(var G=[],A=[],M=0,O=T.length;M<O;M++)G[M]=T[M].split(String.fromCharCode(2)),M>0&&G[M].unshift(G[0][0]),A[M]=G[M][5].split(String.fromCharCode(3));for(var D=d,R=d+v.length,j=0,q=G.length;j<q;j++)if(A[j].length<=D)D-=A[j].length,R-=A[j].length;else{var E=0;R>A[j].length?(E=A[j].length,R-=A[j].length):(E=R,R=0),D>0&&(E-=D),i.push(r.getHighlightItem(G[j],A[j],D,E)),D=0}}else{var F="R"===m[1]?m[6].split(String.fromCharCode(3)):m[5].split(String.fromCharCode(3));i.push(r.getHighlightItem(m,F,d,v.length))}x=d+v.length}}while(d>-1)}}r.store.commit("search/"+l.ADD_HIGHLIGHTS,{key:t,query:e,value:i});var J=(0,h.getStore)().state.pager;if("search"===J.lastTarget&&J.singleMode&&r.store.getters["pages/pageProp"](t,"wide")&&J.rightPage===t&&!r.store.getters["pages/isFirstPage"](t)&&!r.store.getters["pages/isLastPage"](t)){for(var B=r.store.state.pages[t].width/2,K=r.store.state.book.rightToLeft,N=!0,W=0,X=i.length;W<X;W++)if(K?i[W].rect[2]>=B:i[W].rect[2]<B){N=!1;break}N&&r.store.dispatch("pager/goToPageById",{id:t.toString(),rightWideHalf:!0})}},d=new XMLHttpRequest;d.onload=u,d.onerror=function(){};d.open("GET",(0,s.default)().translatePath("assets/common/search/search"+function(e){return("000"+e).slice(-Math.max((e+"").length,4))}(t)+".xml")),d.send()},i.prototype.getHighlightItem=function(e,t,r,o){var i="R"===e[1],a=void 0,n=void 0,s=void 0,l=void 0;i?(n=e[2]/10,a=e[3]/10,s=e[4]/1e3,l=e[5]/10):(n=e[1]/10,a=e[2]/10,s=e[3]/1e3,l=e[4]/10);var h=r+(o-1),g=0===r?0:t[r-1]/10,f=t[h]/10-g;return{rect:[f,l,n+(i?-g-f:g),a],angle:s,rotatePadding:g-(i?f:0)}},t.SearchHighlight=i}}]);