function getBrowserLocale(i,h){var g=(h||[]).length?h:["ru","en","es"];for(var f in localeSubstitutions){if(g.indexOf(localeSubstitutions[f])>=0){g.push(f)}}var e=d(g)||c(g)||b(g,i)||g[0];return localeSubstitutions[e]||e;function d(j){var k=window.location&&window.location.search||"";return j.reduce(function(m,l){return new RegExp("[?&]lang=("+l+")","i").test(k)?l.toLowerCase():m},"")}function c(k){var j=((navigator.languages&&navigator.languages.length)?navigator.languages[0]:(navigator.language||navigator.userLanguage||"")).slice(0,2);return a(k,j)}function b(k,j){return a(k,j)}function a(k,j){if(!j){return""}return k.reduce(function(m,l){return l.toLowerCase()===j.toLowerCase()?l.toLowerCase():m},"")}}function serialRequire(c,b){var a=function(e,d,f){if(e.length){window.require([e.shift()],function(g){f.push(g);a(e,d,f)})}else{d.apply(window,f)}};a(c,b,[])}var localeSubstitutions={};localeSubstitutions={be:"ru",uk:"ru",ba:"ru",sah:"ru",tt:"ru",ca:"es",ca:"es",gl:"es"};